atsteffen commented on code in PR #43:
URL: 
https://github.com/apache/maven-build-cache-extension/pull/43#discussion_r1126456733


##########
src/main/java/org/apache/maven/buildcache/xml/CacheConfigImpl.java:
##########
@@ -597,4 +597,15 @@ private String getProperty(String key, String 
defaultValue) {
         }
         return value;
     }
+
+    private boolean getProperty(String key, boolean defaultValue) {
+        String value = session.getUserProperties().getProperty(key);
+        if (value == null) {
+            value = session.getSystemProperties().getProperty(key);
+            if (value == null) {
+                return defaultValue;
+            }
+        }
+        return Boolean.parseBoolean(value);

Review Comment:
   This could be accomplished any number of ways, but I decided to go with the 
micro-optimized form that does not require a string parse to handle the default 
case.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to