Skip to content

ClassDefinitionUtils doesn't compile with Java 11 #61

@ebourg

Description

@ebourg

ClassDefinitionUtils.defineClass() uses the Unsafe.defineClass() method which was removed in Java 11:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project objenesis: Compilation failure
[ERROR] ~/objenesis/main/src/main/java/org/objenesis/instantiator/util/ClassDefinitionUtils.java:[100,54] cannot find symbol
[ERROR]   symbol:   method defineClass(java.lang.String,byte[],int,int,java.lang.ClassLoader,java.security.ProtectionDomain)
[ERROR]   location: class sun.misc.Unsafe

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions