neilcsmith-net commented on code in PR #5876:
URL: https://github.com/apache/netbeans/pull/5876#discussion_r1176232611


##########
java/maven/src/org/netbeans/modules/maven/customizer/CompilePanel.java:
##########
@@ -162,15 +166,18 @@ public Boolean getValue() {
             public void setValue(Boolean v) {
                 handle.removePOMModification(operation);
                 modifiedValue = null;
-                String value = v != null ? (v ? "all" : "none") : "all";
+                boolean cosEnabled = v != null ? v : getDefaultValue();
+                String value = cosEnabled ? "all" : "none";

Review Comment:
   I'd be inclined to consider that in the NB19 timeframe rather than here. 
Previous releases have always stored the value, whichever it is. Let's keep 
that behaviour for now, and just keep the changed default - useful for people 
switching between 17 & 18, and just in case there's any other edge cases in 
there.
   
   The bold is kind of correct, if unintuitive - it seems to be whenever the 
value is set in `nb-configuration` no matter if it matches the default or not.  
Another example of this being ternary logic rather than boolean.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to