mirror of
https://github.com/konsoletyper/teavm.git
synced 2024-11-27 01:30:35 +08:00
classlib: satisfy checkstyle after applying latest PR
This commit is contained in:
parent
6efade1b49
commit
2ae9c593d2
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2023 Jonathan Coates.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.teavm.classlib.java.io;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2023 Jonathan Coates.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.teavm.classlib.java.nio.channels;
|
||||
|
||||
public interface TByteChannel extends TReadableByteChannel, TWritableByteChannel {
|
||||
|
@ -1,8 +1,22 @@
|
||||
/*
|
||||
* Copyright 2023 Jonathan Coates.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.teavm.classlib.java.nio.channels;
|
||||
|
||||
import org.teavm.classlib.java.io.TCloseable;
|
||||
|
||||
import java.io.IOException;
|
||||
import org.teavm.classlib.java.io.TCloseable;
|
||||
|
||||
public interface TChannel extends TCloseable {
|
||||
boolean isOpen();
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2023 Jonathan Coates.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.teavm.classlib.java.nio.channels;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2023 Jonathan Coates.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.teavm.classlib.java.nio.channels;
|
||||
|
||||
public class TNonReadableChannelException extends IllegalStateException {
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2023 Jonathan Coates.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.teavm.classlib.java.nio.channels;
|
||||
|
||||
public class TNonWritableChannelException extends IllegalStateException {
|
||||
|
@ -1,8 +1,22 @@
|
||||
/*
|
||||
* Copyright 2023 Jonathan Coates.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.teavm.classlib.java.nio.channels;
|
||||
|
||||
import org.teavm.classlib.java.nio.TByteBuffer;
|
||||
|
||||
import java.io.IOException;
|
||||
import org.teavm.classlib.java.nio.TByteBuffer;
|
||||
|
||||
public interface TReadableByteChannel extends TChannel {
|
||||
int read(TByteBuffer dst) throws IOException;
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2023 Jonathan Coates.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.teavm.classlib.java.nio.channels;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -1,8 +1,22 @@
|
||||
/*
|
||||
* Copyright 2023 Jonathan Coates.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.teavm.classlib.java.nio.channels;
|
||||
|
||||
import org.teavm.classlib.java.nio.TByteBuffer;
|
||||
|
||||
import java.io.IOException;
|
||||
import org.teavm.classlib.java.nio.TByteBuffer;
|
||||
|
||||
public interface TWritableByteChannel extends TChannel {
|
||||
int write(TByteBuffer src) throws IOException;
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2023 Jonathan Coates.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.teavm.classlib.java.nio.file;
|
||||
|
||||
public class TAccessDeniedException extends TFileSystemException {
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright 2023 Jonathan Coates.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.teavm.classlib.java.nio.file;
|
||||
|
||||
import java.io.IOException;
|
||||
@ -36,12 +51,20 @@ public class TFileSystemException extends IOException {
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
if (file == null && other == null) return reason;
|
||||
if (file == null && other == null) {
|
||||
return reason;
|
||||
}
|
||||
|
||||
StringBuilder out = new StringBuilder();
|
||||
if (file != null) out.append(file);
|
||||
if (other != null) out.append(" -> ").append(other);
|
||||
if (reason != null) out.append(": ").append(reason);
|
||||
if (file != null) {
|
||||
out.append(file);
|
||||
}
|
||||
if (other != null) {
|
||||
out.append(" -> ").append(other);
|
||||
}
|
||||
if (reason != null) {
|
||||
out.append(": ").append(reason);
|
||||
}
|
||||
return out.toString();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user