File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed
com.oracle.svm.configure/src/com/oracle/svm/configure
com.oracle.svm.core/src/com/oracle/svm/core/metadata Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 2727import java .lang .reflect .Proxy ;
2828import java .util .Arrays ;
2929import java .util .Collection ;
30- import java .util .stream .Stream ;
3130
3231import com .oracle .svm .util .StringUtil ;
3332
@@ -51,13 +50,16 @@ enum Kind {
5150 }
5251
5352 static ConfigurationTypeDescriptor fromClass (Class <?> clazz ) {
54- Stream <String > interfacesStream = Arrays .stream (clazz .getInterfaces ())
55- .map (Class ::getTypeName );
53+ Class <?>[] interfaces = clazz .getInterfaces ();
54+ String [] interfaceNames = new String [interfaces .length ];
55+ for (int i = 0 ; i < interfaces .length ; i ++) {
56+ interfaceNames [i ] = interfaces [i ].getTypeName ();
57+ }
5658 if (Proxy .isProxyClass (clazz )) {
57- return ProxyConfigurationTypeDescriptor .fromInterfaceReflectionNames (interfacesStream . toList ( ));
59+ return ProxyConfigurationTypeDescriptor .fromInterfaceReflectionNames (Arrays . asList ( interfaceNames ));
5860 } else if (LambdaUtils .isLambdaClass (clazz )) {
5961 String declaringClass = StringUtil .split (clazz .getTypeName (), LambdaUtils .LAMBDA_CLASS_NAME_SUBSTRING )[0 ];
60- return LambdaConfigurationTypeDescriptor .fromReflectionNames (declaringClass , interfacesStream . toList ( ));
62+ return LambdaConfigurationTypeDescriptor .fromReflectionNames (declaringClass , Arrays . asList ( interfaceNames ));
6163 } else {
6264 return NamedConfigurationTypeDescriptor .fromReflectionName (clazz .getTypeName ());
6365 }
Original file line number Diff line number Diff line change @@ -236,8 +236,11 @@ public void traceUnsafeAllocatedType(Class<?> clazz) {
236236 * Marks the given proxy type as reachable from reflection.
237237 */
238238 public void traceProxyType (Class <?>[] interfaces ) {
239- List <String > interfaceNames = Arrays .stream (interfaces ).map (Class ::getTypeName ).toList ();
240- ProxyConfigurationTypeDescriptor descriptor = new ProxyConfigurationTypeDescriptor (interfaceNames );
239+ String [] interfaceNames = new String [interfaces .length ];
240+ for (int i = 0 ; i < interfaces .length ; i ++) {
241+ interfaceNames [i ] = interfaces [i ].getTypeName ();
242+ }
243+ ProxyConfigurationTypeDescriptor descriptor = new ProxyConfigurationTypeDescriptor (Arrays .asList (interfaceNames ));
241244 traceReflectionTypeImpl (descriptor );
242245 }
243246
You can’t perform that action at this time.
0 commit comments