You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2021/12/22 15:41:26 UTC

[isis] branch master updated: ISIS-2445: fixes IsisPresets priming of prototyping mode

This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git


The following commit(s) were added to refs/heads/master by this push:
     new 981e1ea  ISIS-2445: fixes IsisPresets priming of prototyping mode
981e1ea is described below

commit 981e1ea71de63d498d158faaded606e0e35b33e3
Author: Andi Huber <ah...@apache.org>
AuthorDate: Wed Dec 22 16:41:15 2021 +0100

    ISIS-2445: fixes IsisPresets priming of prototyping mode
    
    - don't overrule env vars
---
 .../main/java/org/apache/isis/core/config/presets/IsisPresets.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/core/config/src/main/java/org/apache/isis/core/config/presets/IsisPresets.java b/core/config/src/main/java/org/apache/isis/core/config/presets/IsisPresets.java
index 3c86b9f..e5d3d9a 100644
--- a/core/config/src/main/java/org/apache/isis/core/config/presets/IsisPresets.java
+++ b/core/config/src/main/java/org/apache/isis/core/config/presets/IsisPresets.java
@@ -18,6 +18,8 @@
  */
 package org.apache.isis.core.config.presets;
 
+import org.apache.isis.commons.internal.base._Strings;
+
 /**
  * Supports Spring's {@code @PropertySource} annotation.
  *
@@ -57,7 +59,8 @@ public final class IsisPresets  {
      * 'PROTOTYPING' was already set.
      */
     public static void prototyping() {
-        if(System.getProperty("PROTOTYPING")==null) {
+        if(_Strings.isEmpty(System.getProperty("PROTOTYPING"))
+                && _Strings.isEmpty(System.getenv("PROTOTYPING"))) {
             forcePrototyping();
         }
     }
@@ -70,7 +73,7 @@ public final class IsisPresets  {
         System.setProperty("PROTOTYPING", "true");
     }
 
-    public static void logging(Class<?> clazz, String loggingLevel) {
+    public static void logging(final Class<?> clazz, final String loggingLevel) {
         System.setProperty("logging.level." + clazz.getName(), loggingLevel);
     }