File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed
substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/jdk Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -158,14 +158,23 @@ public void afterRegistration(AfterRegistrationAccess access) {
158
158
rci .initializeAtRunTime ("java.io.UnixFileSystem" , FutureDefaultsOptions .RUN_TIME_INITIALIZE_JDK_REASON );
159
159
rci .initializeAtRunTime ("java.io.WindowsFileSystem" , FutureDefaultsOptions .RUN_TIME_INITIALIZE_JDK_REASON );
160
160
161
- rci .initializeAtBuildTime ("java.io.File" , FutureDefaultsOptions .RUN_TIME_INITIALIZE_JDK_REASON );
162
- rci .initializeAtBuildTime ("sun.nio.fs.UnixPath" , FutureDefaultsOptions .RUN_TIME_INITIALIZE_JDK_REASON );
163
- rci .initializeAtBuildTime ("sun.nio.fs.WindowsPath" , FutureDefaultsOptions .RUN_TIME_INITIALIZE_JDK_REASON );
164
-
165
- // holder for the default file system
161
+ /* Holder for the default file system. */
166
162
rci .initializeAtRunTime ("com.oracle.svm.core.jdk.runtimeinit.DefaultFileSystemHolder" , FutureDefaultsOptions .RUN_TIME_INITIALIZE_JDK_REASON );
167
163
168
- // JrtFS support
164
+ /*
165
+ * The following need to be build-time initialized because they can end up in the image
166
+ * heap. There are substitutions to patch the links to run-time initialized classes like
167
+ * FileSystem or FileSystemProvider.
168
+ */
169
+
170
+ /*
171
+ * Require explicit initializeAtBuildTime because the sun.nio.fs is registered for
172
+ * run-time initialization.
173
+ */
174
+ rci .initializeAtBuildTime ("sun.nio.fs.UnixPath" , "Allow UnixPath objects in the image heap (" + FutureDefaultsOptions .RUN_TIME_INITIALIZE_JDK_REASON + ")" );
175
+ rci .initializeAtBuildTime ("sun.nio.fs.WindowsPath" , "Allow WindowsPath objects in the image heap (" + FutureDefaultsOptions .RUN_TIME_INITIALIZE_JDK_REASON + ")" );
176
+
177
+ /* JrtFS support. */
169
178
rci .initializeAtBuildTime ("jdk.internal.jrtfs.SystemImage" , FutureDefaultsOptions .RUN_TIME_INITIALIZE_JDK_REASON );
170
179
}
171
180
You can’t perform that action at this time.
0 commit comments