Add ModCheckTest to test runtime mod validations and entry point superclass checks. Include Gradle verification metadata for dependency integrity.
This commit is contained in:
1 parent
18ff32b5ce
commit
6761f2d9ea
29 files changed
+1306
-72
No files matched your search
@@ -8,6 +8,7 @@ import org.objectweb.asm.ClassReader;
|
||||
import org.objectweb.asm.tree.ClassNode;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.UncheckedIOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
@@ -161,7 +162,7 @@ public final class JarPatcher
|
||||
{
|
||||
ZipEntry entry = entries.nextElement();
|
||||
List<ClassPatch> patches = patchesByEntry.get(entry.getName());
|
||||
byte[] bytes = jar.getInputStream(entry).readAllBytes();
|
||||
byte[] bytes = JarPatcher.read(jar, entry);
|
||||
|
||||
if (patches != null) {
|
||||
bytes = transform(jar, bytes, patches);
|
||||
@@ -227,7 +228,12 @@ public final class JarPatcher
|
||||
ZipEntry entry = jar.getEntry(entryName);
|
||||
if (entry == null) return null;
|
||||
|
||||
try { return jar.getInputStream(entry).readAllBytes(); }
|
||||
try { return JarPatcher.read(jar, entry); }
|
||||
catch (IOException e) { throw new UncheckedIOException(e); }
|
||||
}
|
||||
|
||||
private static byte[] read(ZipFile jar, ZipEntry entry) throws IOException
|
||||
{
|
||||
try (InputStream in = jar.getInputStream(entry)) { return in.readAllBytes(); }
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user