Skip to content

Commit 3703dec

Browse files
committed
Further tidyups
1 parent b525a97 commit 3703dec

File tree

7 files changed

+7
-9
lines changed

7 files changed

+7
-9
lines changed

java-compiler-testing/src/main/java/io/github/ascopes/jct/assertions/AbstractContainerGroupAssert.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import org.apiguardian.api.API.Status;
2626
import org.assertj.core.api.AbstractAssert;
2727
import org.assertj.core.api.AbstractListAssert;
28-
import org.assertj.core.api.Assertions;
2928
import org.assertj.core.api.ObjectAssert;
3029
import org.jspecify.annotations.Nullable;
3130

java-compiler-testing/src/main/java/io/github/ascopes/jct/assertions/JctCompilationAssert.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public final class JctCompilationAssert extends
5151
*
5252
* @param value the value to assert on.
5353
*/
54+
@SuppressWarnings("DataFlowIssue")
5455
public JctCompilationAssert(@Nullable JctCompilation value) {
5556
super(value, JctCompilationAssert.class);
5657
}

java-compiler-testing/src/main/java/io/github/ascopes/jct/containers/impl/JarContainerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ public String inferBinaryName(PathFileObject javaFileObject) {
217217
}
218218

219219
@Override
220-
public Collection<Path> listAllFiles() throws IOException {
220+
public Collection<Path> listAllFiles() {
221221
return holder.access().getAllFiles();
222222
}
223223

java-compiler-testing/src/main/java/io/github/ascopes/jct/containers/impl/PathWrappingContainerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public PathWrappingContainerImpl(Location location, PathRoot root) {
6767
}
6868

6969
@Override
70-
public void close() throws IOException {
70+
public void close() {
7171
// Do nothing for this implementation. We have nothing to close here. Anything wrapped in
7272
// this type will be managed by the Workspace object instead if it needs to be closed.
7373
}

java-compiler-testing/src/main/java/io/github/ascopes/jct/filemanagers/JctFileManagers.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
import io.github.ascopes.jct.compilers.JctCompiler;
1919
import io.github.ascopes.jct.filemanagers.impl.JctFileManagerFactoryImpl;
20-
import io.github.ascopes.jct.filemanagers.impl.JctFileManagerImpl;
2120
import io.github.ascopes.jct.utils.UtilityClass;
2221
import org.apiguardian.api.API;
2322
import org.apiguardian.api.API.Status;

java-compiler-testing/src/main/java/io/github/ascopes/jct/filemanagers/config/JctFileManagerJvmClassPathModuleConfigurer.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020
import io.github.ascopes.jct.utils.ModuleDiscoverer;
2121
import io.github.ascopes.jct.utils.SpecialLocationUtils;
2222
import io.github.ascopes.jct.utils.StringUtils;
23-
import io.github.ascopes.jct.workspaces.impl.WrappingDirectoryImpl;
24-
import java.nio.file.Path;
25-
import java.util.Map.Entry;
2623
import java.util.Set;
2724
import javax.tools.StandardLocation;
2825
import org.apiguardian.api.API;

java-compiler-testing/src/main/java/io/github/ascopes/jct/utils/IterableUtils.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ public static <T> List<T> combineOneOrMore(T first, T... rest) {
123123
* @param <T> the input collection type.
124124
* @return the input array.
125125
*/
126+
@SuppressWarnings("RedundantSuppression")
126127
public static <T> T[] requireNonNullValues(
127128
@Nullable T @Nullable[] array,
128129
String arrayName
@@ -149,8 +150,9 @@ public static <T> T[] requireNonNullValues(
149150
throw new NullPointerException(error);
150151
}
151152

152-
// Cast is not redundant as we're casting away any nullability annotations for nullness
153-
// typecheckers.
153+
//noinspection RedundantCast -- Cast is not redundant as we're casting away any nullability
154+
// annotations for nullness typecheckers. Don't let IntelliJ tell you otherwise as it is a
155+
// bug.
154156
return (T[]) array;
155157
}
156158
}

0 commit comments

Comments
 (0)