|
39 | 39 | import java.util.stream.StreamSupport;
|
40 | 40 |
|
41 | 41 | import org.graalvm.collections.Pair;
|
42 |
| -import jdk.graal.compiler.graph.Node; |
43 |
| -import jdk.graal.compiler.java.LambdaUtils; |
44 |
| -import jdk.graal.compiler.options.OptionValues; |
45 |
| -import jdk.graal.compiler.phases.util.Providers; |
46 | 42 | import org.graalvm.nativeimage.impl.clinit.ClassInitializationTracking;
|
47 | 43 |
|
48 | 44 | import com.oracle.graal.pointsto.constraints.UnsupportedFeatureException;
|
|
68 | 64 | import com.oracle.svm.hosted.FeatureImpl.AfterAnalysisAccessImpl;
|
69 | 65 | import com.oracle.svm.hosted.FeatureImpl.BeforeAnalysisAccessImpl;
|
70 | 66 |
|
| 67 | +import jdk.graal.compiler.graph.Node; |
| 68 | +import jdk.graal.compiler.java.LambdaUtils; |
| 69 | +import jdk.graal.compiler.options.OptionValues; |
| 70 | +import jdk.graal.compiler.phases.util.Providers; |
| 71 | + |
71 | 72 | @AutomaticallyRegisteredFeature
|
72 | 73 | public class ClassInitializationFeature implements InternalFeature {
|
73 | 74 | private static final String NATIVE_IMAGE_CLASS_REASON = "Native Image classes are always initialized at build time";
|
@@ -173,10 +174,8 @@ private Object checkImageHeapInstance(Object obj) {
|
173 | 174 | To fix this, include %s in your configuration. If the classes do not originate from your code, it is advised to update all library or framework dependencies to the latest version before addressing this error.
|
174 | 175 | """
|
175 | 176 | .replaceAll("\n", System.lineSeparator())
|
176 |
| - .formatted( |
177 |
| - SubstrateOptionsParser.commandArgument(ClassInitializationOptions.StrictImageHeap, "+", true, false), |
178 |
| - SubstrateOptionsParser.commandArgument(ClassInitializationOptions.ClassInitialization, proxyOrLambda ? proxyLambdaInterfaceCSV : typeName, |
179 |
| - "initialize-at-build-time", true, false)); |
| 177 | + .formatted(SubstrateOptionsParser.commandArgument(ClassInitializationOptions.ClassInitialization, proxyOrLambda ? proxyLambdaInterfaceCSV : typeName, |
| 178 | + "initialize-at-build-time", true, false)); |
180 | 179 | }
|
181 | 180 |
|
182 | 181 | msg += System.lineSeparator() + "The following detailed trace displays from which field in the code the object was reached.";
|
|
0 commit comments