Make sure a non-null theme is returned.
authorMathieu Baudier <mbaudier@argeo.org>
Wed, 30 Jun 2021 08:59:04 +0000 (10:59 +0200)
committerMathieu Baudier <mbaudier@argeo.org>
Wed, 30 Jun 2021 08:59:04 +0000 (10:59 +0200)
org.argeo.cms.ui/src/org/argeo/cms/ui/AbstractCmsApp.java

index 2ecc658413507860381d30f238e7019a1dd29350..e760a101820f16d87b61ccdf260045c050456a50 100644 (file)
@@ -25,6 +25,8 @@ public abstract class AbstractCmsApp implements CmsApp {
                String themeId = getThemeId(uiName);
                if (themeId == null)
                        return null;
+               if (!themes.containsKey(themeId))
+                       throw new IllegalArgumentException("Theme " + themeId + " not found.");
                return themes.get(themeId);
        }