@@ -69,31 +69,34 @@ public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
69
69
TypeReference .of (PropertyValueDescriptor .class )),
70
70
hint -> hint .withMembers (MemberCategory .INVOKE_DECLARED_CONSTRUCTORS ));
71
71
hints .reflection ().registerTypes (
72
- Set .of (TypeReference .of (PropertyValueDescriptor .class ), TypeReference .of (Mac .class ),
73
- TypeReference .of (KeyAgreement .class ), TypeReference .of (KeyPairGenerator .class ),
74
- TypeReference .of (KeyFactory .class ), TypeReference .of (Signature .class ),
75
- TypeReference .of (MessageDigest .class )),
76
- hint -> hint .withMembers (MemberCategory .INVOKE_DECLARED_METHODS ));
72
+ Set .of (TypeReference .of (PropertyValueDescriptor .class ), TypeReference .of (Mac .class ),
73
+ TypeReference .of (KeyAgreement .class ), TypeReference .of (KeyPairGenerator .class ),
74
+ TypeReference .of (KeyFactory .class ), TypeReference .of (Signature .class ),
75
+ TypeReference .of (MessageDigest .class )),
76
+ hint -> hint .withMembers (MemberCategory .INVOKE_DECLARED_METHODS ));
77
+
78
+ // TODO: move over to GraalVM reachability metadata
77
79
if (ClassUtils .isPresent ("org.apache.sshd.common.SshConstants" , classLoader )) {
78
- hints .reflection ()
79
- .registerTypes (Set .of (TypeReference .of (BouncyCastleSecurityProviderRegistrar .class ),
80
- TypeReference .of (EdDSASecurityProviderRegistrar .class ), TypeReference .of (SshdText .class ),
81
- TypeReference .of (Nio2ServiceFactory .class ), TypeReference .of (Nio2ServiceFactoryFactory .class )),
80
+ hints .reflection ().registerTypes (Set .of (TypeReference .of (BouncyCastleSecurityProviderRegistrar .class ),
81
+ TypeReference .of (EdDSASecurityProviderRegistrar .class ), TypeReference .of (Nio2ServiceFactory .class ),
82
+ TypeReference .of (Nio2ServiceFactoryFactory .class )),
82
83
hint -> hint .withMembers (MemberCategory .INVOKE_DECLARED_CONSTRUCTORS ));
83
- hints .reflection ()
84
- .registerTypes (Set .of (TypeReference .of (MergeCommand .FastForwardMode .Merge .class ),
85
- TypeReference .of (MergeCommand .ConflictStyle .class ),
86
- TypeReference .of (MergeCommand .FastForwardMode .class ), TypeReference .of (FetchCommand .class )),
87
- hint -> hint .withMembers (MemberCategory .INVOKE_DECLARED_METHODS ));
88
- hints .reflection ()
89
- .registerTypes (Set .of (TypeReference .of (PortForwardingEventListener .class )),
84
+ hints .reflection ().registerTypes (Set .of (TypeReference .of (PortForwardingEventListener .class )),
90
85
hint -> hint .withMembers (MemberCategory .INVOKE_DECLARED_CONSTRUCTORS ,
91
- MemberCategory .INVOKE_DECLARED_METHODS , MemberCategory .DECLARED_FIELDS ));
86
+ MemberCategory .INVOKE_DECLARED_METHODS , MemberCategory .DECLARED_FIELDS ));
87
+ hints .proxies ().registerJdkProxy (TypeReference .of (ChannelListener .class ),
88
+ TypeReference .of (PortForwardingEventListener .class ), TypeReference .of (SessionListener .class ));
89
+ }
90
+
91
+ // TODO: move over to GraalVM reachability metadata
92
+ if (ClassUtils .isPresent ("org.eclipse.jgit.api.Git" , classLoader )) {
92
93
hints .reflection ()
93
- .registerTypes (Set .of (TypeReference .of (SshdText .class )), hint -> hint
94
+ .registerTypes (Set .of (TypeReference .of (MergeCommand .FastForwardMode .Merge .class ),
95
+ TypeReference .of (MergeCommand .ConflictStyle .class ),
96
+ TypeReference .of (MergeCommand .FastForwardMode .class ), TypeReference .of (FetchCommand .class )),
97
+ hint -> hint .withMembers (MemberCategory .INVOKE_DECLARED_METHODS ));
98
+ hints .reflection ().registerTypes (Set .of (TypeReference .of (SshdText .class )), hint -> hint
94
99
.withMembers (MemberCategory .INVOKE_DECLARED_CONSTRUCTORS , MemberCategory .DECLARED_FIELDS ));
95
- hints .proxies ().registerJdkProxy (TypeReference .of (ChannelListener .class ),
96
- TypeReference .of (PortForwardingEventListener .class ), TypeReference .of (SessionListener .class ));
97
100
}
98
101
}
99
102
0 commit comments