Arno Unkrig
Arno Unkrig
Yeah; reading and editing code without a „search“ feature is not very useful. Certainly CODEHUB is not an IDE, but today it's not even possible to make even small changes.
Hey Shawn, your handling of the class loaders is a bit unorthodox and may the reason for the resource leak: If this code byte[] byteCodes = classes.entrySet().iterator().next().getValue(); ClassLoaderUtils.tryDefineClassesInClassLoader("B", dep, dep.getClassLoader(),...
Are you sure that package-level access is forbidden across class loaders? I don't think so! Again, I believe that the leak problem originates from that you call `defineClass()` on an...
Reproducable with these JREs: * jdk-9-157 * openjdk-10.0.2 * openjdk-ea+26 * openjdk-12-ea+6
JDK 11 produces: // #4: InterfaceMethodref: java.util.stream.Stream::java.util.stream.Stream.of(Object[]) => java.util.stream.Stream java.util.stream.Stream.of(Object[]) => java.util.stream.Stream (4) JANINO generates: // #18: Methodref: java.util.stream.Stream::java.util.stream.Stream.of(Object[]) => java.util.stream.Stream java.util.stream.Stream.of(Object[]) => java.util.stream.Stream (18) That leads to the `IncompatibleClassChangeError`.
When I change the `Methodref` to `InterfaceMethodref`, I get THIS result: ``` java.lang.VerifyError: Illegal type at constant pool entry 18 in class SC Exception Details: Location: SC.eval0()Ljava/lang/Object; @25: invokestatic Reason:...
Uh-oh... When I set `ClassFile.majorVersion` to `MAJOR_VERSION_JDK_1_8` or later, then it works like a breeze... unfortunately `ClassFile.majorVersion` must remain fixed to 1.6 as long as we don't generate a `StackMapTable`...
Janino now generates Java 8 .class files and can thus invoke static interface methods. See ```org.codehaus.commons.compiler.tests.ReportedBugsTest.testIssue69_IncompatibleClassChangeError_when_evaluating_against_janino9plus()```. Please test!
The current version of JANINO still produces Java 6 .class files -- you must re-configure it to produce Java 8 .class files: * Either call `setTargetVersion(8)` on the `ExpressionEvaluator` (or...