Quarkus本机和org.kohsuke:github-api -解析期间未解析的方法- @WithBridgeMethods
注释方法
这是Quarkus本机和org.kohsuke:github-api -未能反序列化异常问题的后续,我使用https://github.com/quarkusio/quarkus/pull/9182修补程序来克服注册,以便使用私有内部类GHRepository.GHRepoPermission.class
进行反射挑战。
我不得不将GHLicense.class
添加到@RegisterForReflection
中,现在我的示例应用程序在本机编译过程中失败了:发现了未解决的方法。
[getting-started-1.0-SNAPSHOT-runner:42440] analysis: 60,222.05 ms, 6.04 GB
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved method during parsing: org.kohsuke.github.GHLicense.urlToString(java.net.URL, java.lang.Class). To diagnose the issue you can use the --allow-incomplete-classpath option. The missing method is then reported at run time when it is accessed the first time.
Detailed message:
Trace:
at parsing org.kohsuke.github.GHLicense.getUrl(GHLicense.java)
Call path from entry point to org.kohsuke.github.GHLicense.getUrl():
at org.kohsuke.github.GHLicense.getUrl(GHLicense.java)
at com.oracle.svm.reflect.GHObject_getUrl_d595a42af79d3a07fda24477277adddcaeacd46d_608.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:566)
at org.jboss.resteasy.core.ContextParameterInjector$GenericDelegatingProxy.invoke(ContextParameterInjector.java:122)
https://github.com/hub4j/github-api/blob/master/src/main/java/org/kohsuke/github/GHLicense.java#L84 getUrl()方法使用@WithBridgeMethods
注释
@WithBridgeMethods(value = String.class, adapterMethod = "urlToString")
public URL getUrl() {
return GitHubClient.parseURL(url);
}
有什么解决办法的建议吗?还是这纯粹是GraalVM的事?
https://stackoverflow.com/questions/61693823
复制相似问题