File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed
substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -572,13 +572,20 @@ public SingletonTraitMap getUninstalledSingletonTraitMap(Class<?> key) {
572
572
if (annotation != null ) {
573
573
if (annotation .layeredInstallationKind () != null ) {
574
574
var installationKindSupplierClass = annotation .layeredInstallationKind ();
575
- SingletonLayeredInstallationKindSupplier installationKindSupplier = ReflectionUtil .newInstance (installationKindSupplierClass );
576
- SingletonTrait installationTrait = installationKindSupplier .getLayeredInstallationKindTrait ();
577
- assert installationTrait .kind () == SingletonTraitKind .LAYERED_INSTALLATION_KIND : installationTrait ;
578
- SingletonTraitMap traitMap = SingletonTraitMap .create ();
579
- traitMap .addTrait (installationTrait );
580
- traitMap .seal ();
581
- return new SingletonInfo (SINGLETON_INSTALLATION_FORBIDDEN , traitMap );
575
+ /*
576
+ * Initial Layer information should never be injected, as this is something
577
+ * which occurred in the past and should already be present in configObject
578
+ * when it exists.
579
+ */
580
+ if (installationKindSupplierClass != SingletonLayeredInstallationKind .InitialLayerOnly .class ) {
581
+ SingletonLayeredInstallationKindSupplier installationKindSupplier = ReflectionUtil .newInstance (installationKindSupplierClass );
582
+ SingletonTrait installationTrait = installationKindSupplier .getLayeredInstallationKindTrait ();
583
+ assert installationTrait .kind () == SingletonTraitKind .LAYERED_INSTALLATION_KIND : installationTrait ;
584
+ SingletonTraitMap traitMap = SingletonTraitMap .create ();
585
+ traitMap .addTrait (installationTrait );
586
+ traitMap .seal ();
587
+ return new SingletonInfo (SINGLETON_INSTALLATION_FORBIDDEN , traitMap );
588
+ }
582
589
}
583
590
}
584
591
You can’t perform that action at this time.
0 commit comments