-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make sure it works with the graalvm jdk8 native image
- Loading branch information
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...runtime/src/main/java/io/quarkus/mybatis/runtime/graal/DefineClassHelperSubstitution.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package io.quarkus.mybatis.runtime.graal; | ||
|
||
import java.lang.invoke.MethodHandles; | ||
|
||
import org.apache.ibatis.javassist.CannotCompileException; | ||
import org.apache.ibatis.javassist.util.proxy.DefineClassHelper; | ||
|
||
import com.oracle.svm.core.annotate.Substitute; | ||
import com.oracle.svm.core.annotate.TargetClass; | ||
import com.oracle.svm.core.jdk.JDK8OrEarlier; | ||
|
||
@TargetClass(value = DefineClassHelper.class, onlyWith = JDK8OrEarlier.class) | ||
final public class DefineClassHelperSubstitution { | ||
|
||
@Substitute | ||
public static Class<?> toClass(MethodHandles.Lookup lookup, byte[] bcode) throws CannotCompileException { | ||
throw new CannotCompileException("Not support"); | ||
} | ||
|
||
@Substitute | ||
static Class<?> toPublicClass(String className, byte[] bcode) throws CannotCompileException { | ||
throw new CannotCompileException("Not support"); | ||
} | ||
|
||
} |