diff --git a/gradle.properties b/gradle.properties index c2771461..22a39af9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ kotlin.code.style=official org.gradle.jvmargs=-Xmx4G org.gradle.parallel=true -version=0.8.0 +version=0.8.1 asm_version=9.7 diff --git a/src/main/java/xyz/wagyourtail/jvmdg/version/VersionProvider.java b/src/main/java/xyz/wagyourtail/jvmdg/version/VersionProvider.java index 392f4f05..5c2e41d5 100644 --- a/src/main/java/xyz/wagyourtail/jvmdg/version/VersionProvider.java +++ b/src/main/java/xyz/wagyourtail/jvmdg/version/VersionProvider.java @@ -729,8 +729,10 @@ public boolean isInitialized() { } public ClassNode downgrade(final ClassDowngrader downgrader, ClassNode clazz, final Set extra, final boolean enableRuntime, final Function getReadOnly) throws IOException { + String className = clazz.name; + if (clazz.version != inputVersion) - throw new IllegalArgumentException("Class " + clazz.name + " is not version " + inputVersion); + throw new IllegalArgumentException("Class " + className + " is not version " + inputVersion); ensureInit(downgrader); final Set warnings = new LinkedHashSet<>(); @@ -800,7 +802,7 @@ public List> apply(Type o) throws IOException { clazz = stubClasses(clazz, enableRuntime, warnings); if (clazz == null) { - printWarnings(warnings, clazz.name); + printWarnings(warnings, className); return null; } clazz = stubWithExtras(clazz, extra, new IOFunction() { @@ -810,7 +812,7 @@ public ClassNode apply(ClassNode classNode) throws IOException { } }); if (clazz == null) { - printWarnings(warnings, clazz.name); + printWarnings(warnings, className); return null; } clazz = stubWithExtras(clazz, extra, new IOFunction() { @@ -820,7 +822,7 @@ public ClassNode apply(ClassNode classNode) throws IOException { } }); if (clazz == null) { - printWarnings(warnings, clazz.name); + printWarnings(warnings, className); return null; } clazz = stubWithExtras(clazz, extra, new IOFunction() { @@ -830,10 +832,10 @@ public ClassNode apply(ClassNode classNode) throws IOException { } }); if (clazz == null) { - printWarnings(warnings, clazz.name); + printWarnings(warnings, className); return null; } - printWarnings(warnings, clazz.name); + printWarnings(warnings, className); clazz.version = inputVersion - 1; return clazz; }