Skip to content

Commit

Permalink
Minor cleanups to #336
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexIIL committed Jul 28, 2023
1 parent bd1630f commit 14c9197
Showing 1 changed file with 1 addition and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
import org.quiltmc.loader.api.QuiltLoader;
import org.quiltmc.loader.api.plugin.solver.ModLoadOption;
import org.quiltmc.loader.api.plugin.solver.ModSolveResult;
import org.quiltmc.loader.impl.QuiltLoaderImpl;
import org.quiltmc.loader.impl.discovery.ModResolutionException;
import org.quiltmc.loader.impl.discovery.RuntimeModRemapper;
import org.quiltmc.loader.impl.filesystem.PartiallyWrittenIOException;
Expand All @@ -51,7 +50,6 @@
import org.quiltmc.loader.impl.filesystem.QuiltZipPath;
import org.quiltmc.loader.impl.util.FilePreloadHelper;
import org.quiltmc.loader.impl.util.FileSystemUtil;
import org.quiltmc.loader.impl.util.FileUtil;
import org.quiltmc.loader.impl.util.HashUtil;
import org.quiltmc.loader.impl.util.QuiltLoaderInternal;
import org.quiltmc.loader.impl.util.QuiltLoaderInternalType;
Expand Down Expand Up @@ -148,8 +146,7 @@ private static QuiltZipPath checkTransformCache(Path transformCacheFolder, Map<S
QuiltZipPath inner = fs.getRoot();
if (!FasterFiles.isRegularFile(inner.resolve(FILE_TRANSFORM_COMPLETE))) {
Log.info(LogCategory.CACHE, "Not reusing previous transform cache since it's incomplete!");
// delete the previous transform cache to prevent FileAlreadyExistsException later
try { Files.deleteIfExists(cacheFile); } catch(IOException ignored) {}
erasePreviousTransformCache(transformCacheFolder, cacheFile, null);
return null;
}
Path optionFile = inner.resolve("options.txt");
Expand Down Expand Up @@ -387,16 +384,6 @@ private boolean couldBeJavaElement(String name, boolean ignoreClassSuffix) {
});
}

static final class ClassData {
final ModLoadOption mod;
final byte[] classBytes;

ClassData(ModLoadOption mod, byte[] classBytes) {
this.mod = mod;
this.classBytes = classBytes;
}
}

@FunctionalInterface
interface ClassConsumer {
byte[] run(ModLoadOption mod, Path file) throws IOException;
Expand Down

0 comments on commit 14c9197

Please sign in to comment.