File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
spring-core/graalvm/src/main/java/org/springframework/aot/graalvm Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 17
17
package org .springframework .aot .graalvm ;
18
18
19
19
import java .lang .reflect .Field ;
20
+ import java .util .LinkedHashSet ;
21
+ import java .util .Set ;
20
22
import java .util .regex .Pattern ;
21
23
22
24
import com .oracle .graal .pointsto .infrastructure .SubstitutionProcessor ;
@@ -47,6 +49,8 @@ class ConstantFieldSubstitutionProcessor extends SubstitutionProcessor {
47
49
48
50
private final ThrowawayClassLoader throwawayClassLoader ;
49
51
52
+ private Set <String > seen = new LinkedHashSet <>();
53
+
50
54
51
55
ConstantFieldSubstitutionProcessor (DebugContext debug , ClassLoader applicationClassLoader ) {
52
56
this .throwawayClassLoader = new ThrowawayClassLoader (applicationClassLoader );
@@ -63,7 +67,10 @@ public ResolvedJavaField lookup(ResolvedJavaField field) {
63
67
JavaConstant constant = lookupConstant (declaringClass .toJavaName (), field .getName ());
64
68
if (constant != null ) {
65
69
// TODO Use proper logging only when --verbose is specified when https://github.com/oracle/graal/issues/4669 will be fixed
66
- System .out .println ("Field " + fieldIdentifier + " set to " + constant .toValueString () + " at build time" );
70
+ if (!this .seen .contains (fieldIdentifier )) {
71
+ this .seen .add (fieldIdentifier );
72
+ System .out .println ("Field " + fieldIdentifier + " set to " + constant .toValueString () + " at build time" );
73
+ }
67
74
return new ConstantReadableJavaField (field , constant );
68
75
}
69
76
}
You can’t perform that action at this time.
0 commit comments