@@ -69,31 +69,34 @@ public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
6969 TypeReference .of (PropertyValueDescriptor .class )),
7070 hint -> hint .withMembers (MemberCategory .INVOKE_DECLARED_CONSTRUCTORS ));
7171 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
7779 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 )),
8283 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 )),
9085 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 )) {
9293 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
9499 .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 ));
97100 }
98101 }
99102
0 commit comments