You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by GitBox <gi...@apache.org> on 2020/03/21 13:24:15 UTC

[GitHub] [groovy] eric-milles commented on a change in pull request #1200: Remove unnecessary null checks for values of final constants/fields w…

eric-milles commented on a change in pull request #1200: Remove unnecessary null checks for values of final constants/fields w…
URL: https://github.com/apache/groovy/pull/1200#discussion_r395992468
 
 

 ##########
 File path: src/main/java/org/codehaus/groovy/control/CompilerConfiguration.java
 ##########
 @@ -441,7 +441,7 @@ public CompilerConfiguration() {
     private void handleOptimizationOption(final Map<String, Boolean> options, final String optionName, final String sysOptionName) {
         String propValue = getSystemPropertySafe(sysOptionName);
         boolean optionEnabled = propValue == null
-                ? (DEFAULT != null && Boolean.TRUE.equals(DEFAULT.getOptimizationOptions().get(optionName)))
+                ? Boolean.TRUE.equals(DEFAULT.getOptimizationOptions().get(optionName))
 
 Review comment:
   DEFAULT is null while the constructor in its initializer expression is running.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services