Skip to content

Commit 6c2bf1e

Browse files
committed
[ci skip] minor tweaks
1 parent b72a15e commit 6c2bf1e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

importer-anvil/src/main/java/net/roxymc/slime/importer/anvil/SlimeAnvilImporter.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ private CompoundBinaryTag readCustomData(CompoundBinaryTag tag, Set<String> tags
236236
}
237237
}
238238

239-
private <T> T[] readRegionFiles(File regionDir, IntFunction<T[]> generator, Function<CompoundBinaryTag, T> function) throws IOException {
239+
private <T> T[] readRegionFiles(File regionDir, IntFunction<T[]> generator, Function<CompoundBinaryTag, @Nullable T> function) throws IOException {
240240
File[] files = regionDir.listFiles((dir, name) -> name.endsWith(MCA));
241241
if (files == null || files.length == 0) {
242242
return generator.apply(0);
@@ -252,7 +252,7 @@ private <T> T[] readRegionFiles(File regionDir, IntFunction<T[]> generator, Func
252252
);
253253
}
254254

255-
private <T> T[] readRegionFile(File regionFile, IntFunction<T[]> generator, Function<CompoundBinaryTag, T> function) throws IOException {
255+
private <T> T[] readRegionFile(File regionFile, IntFunction<T[]> generator, Function<CompoundBinaryTag, @Nullable T> function) throws IOException {
256256
byte[] bytes;
257257
try (FileInputStream is = new FileInputStream(regionFile)) {
258258
bytes = is.readAllBytes();
@@ -287,7 +287,6 @@ private <T> T[] readRegionFile(File regionFile, IntFunction<T[]> generator, Func
287287

288288
CompoundBinaryTag tag = BinaryTagIO.reader().read(decompressorStream);
289289
T element = function.apply(tag);
290-
//noinspection ConstantValue
291290
if (element != null) {
292291
data.add(element);
293292
}

0 commit comments

Comments
 (0)