mbien commented on code in PR #7333:
URL: https://github.com/apache/netbeans/pull/7333#discussion_r1581534107


##########
java/java.hints.declarative/src/org/netbeans/modules/java/hints/declarative/test/TestParser.java:
##########
@@ -180,37 +187,42 @@ public static TestCase[] parse(String tests) {
             endIndicesArr[c++] = codeIndex + i;
         }
         
-        SourceVersion sourceLevel = DEFAULT_SOURCE_LEVEL;
+        SourceVersion sourceLevel = null;
         
         for (String option : options.split("[ \t]+")) {
             option = option.trim();
             
             if (option.startsWith(SOURCE_LEVEL)) {
                 option = option.substring(SOURCE_LEVEL.length());
-                
-                //XXX: log if not found!
-                
+                if (option.startsWith("1.")) {
+                    option = option.substring(2);
+                }
                 for (SourceVersion v : SourceVersion.values()) {
-                    if (option.equals("1." + 
v.name().substring("RELEASE_".length()))) {
+                    if 
(option.equals(v.name().substring("RELEASE_".length()))) {
                         sourceLevel = v;
                         break;
                     }
                 }
-            }
-
-            if (DISABLED.equals(option)) {
+                if (sourceLevel == null) {
+                    LOG.warning("unsupported source version: " + option);

Review Comment:
   well the old version didn't even log anything. There was a `// TODO logging` 
which I implemented.
   
   But I agree that it should probably fail.



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