vlsi commented on code in PR #5873:
URL: https://github.com/apache/jmeter/pull/5873#discussion_r1181644139


##########
src/core/src/main/java/org/apache/jmeter/gui/action/AbstractAction.java:
##########
@@ -102,7 +102,6 @@ protected boolean popupCheckExistingFileListener(HashTree 
tree) {
                             return false;
                         }
                     case ASK:
-                    default:

Review Comment:
   The questionable part is whether we trust enums from third-party classes. In 
other words, even if we cover all the current cases, it might be the library 
would add a new case, so if users upgrade the library without recompiling 
jmeter, then it won't detect "unexpected enum value".
   
   WDYT? Is it really that important?
   Frankly speaking, I thin that an exhaustive switch over enum values looks 
better than arbitrary default that might unexpectedly catch newly added enum 
values. In other words, if we omit default for enums, then the newly added 
value would fail the compilation and ask the developer to add an appropriate 
case rather than falling into an unknown default.



-- 
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: dev-unsubscr...@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to