Skip to content

Commit 0012f47

Browse files
Automatic merge of master into galahad
2 parents f75c556 + 247c680 commit 0012f47

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/EmbeddedResourcesInfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public static EmbeddedResourcesInfo singleton() {
4848
}
4949

5050
public void declareResourceAsRegistered(Module module, String resource, String source) {
51-
if (!ResourcesFeature.Options.GenerateEmbeddedResourcesFile.getValue()) {
51+
if (!ImageSingletons.lookup(ResourcesFeature.class).collectEmbeddedResourcesInfo()) {
5252
return;
5353
}
5454

substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/ResourcesFeature.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
* or visit www.oracle.com if you need additional information or have any
2323
* questions.
2424
*/
25-
2625
package com.oracle.svm.hosted;
2726

2827
import static com.oracle.svm.core.jdk.Resources.RESOURCES_INTERNAL_PATH_SEPARATOR;
@@ -141,7 +140,7 @@
141140
* @see NativeImageResourceFileAttributesView
142141
*/
143142
@AutomaticallyRegisteredFeature
144-
public final class ResourcesFeature implements InternalFeature {
143+
public class ResourcesFeature implements InternalFeature {
145144

146145
static final String MODULE_NAME_ALL_UNNAMED = "ALL-UNNAMED";
147146

@@ -389,6 +388,10 @@ private static ResourcesRegistryImpl resourceRegistryImpl() {
389388
return (ResourcesRegistryImpl) ImageSingletons.lookup(ResourcesRegistry.class);
390389
}
391390

391+
protected boolean collectEmbeddedResourcesInfo() {
392+
return Options.GenerateEmbeddedResourcesFile.getValue();
393+
}
394+
392395
@Override
393396
public void beforeAnalysis(BeforeAnalysisAccess access) {
394397
/* load and parse resource configuration files */

0 commit comments

Comments
 (0)