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


##########
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:
   Ok - valid point. I think the target group for this support should indeed be 
able to live with this or improve the situation itself.



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