forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix X500PrincipalUtil to avoid method handles in native image
- Loading branch information
1 parent
85026c7
commit 0943a0b
Showing
2 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
...ava/io/quarkus/runtime/graal/Target_org_wildfly_security_x500_util_X500PrincipalUtil.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,31 @@ | ||
package io.quarkus.runtime.graal; | ||
|
||
import java.lang.invoke.MethodHandle; | ||
import java.security.Principal; | ||
|
||
import javax.security.auth.x500.X500Principal; | ||
|
||
import org.wildfly.security.x500.util.X500PrincipalUtil; | ||
|
||
import com.oracle.svm.core.annotate.Alias; | ||
import com.oracle.svm.core.annotate.Delete; | ||
import com.oracle.svm.core.annotate.RecomputeFieldValue; | ||
import com.oracle.svm.core.annotate.Substitute; | ||
import com.oracle.svm.core.annotate.TargetClass; | ||
|
||
/** | ||
* | ||
*/ | ||
@TargetClass(X500PrincipalUtil.class) | ||
final class Target_org_wildfly_security_x500_util_X500PrincipalUtil { | ||
@RecomputeFieldValue(kind = RecomputeFieldValue.Kind.Reset) | ||
@Alias | ||
static Class<?> X500_NAME_CLASS; | ||
@Delete | ||
static MethodHandle AS_X500_PRINCIPAL_HANDLE; | ||
|
||
@Substitute | ||
public static X500Principal asX500Principal(Principal principal, boolean convert) { | ||
return null; | ||
} | ||
} |
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