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


##########
java/java.hints.declarative/src/org/netbeans/modules/java/hints/declarative/DeclarativeHintRegistry.java:
##########
@@ -229,8 +229,12 @@ private static Collection<? extends FileObject> 
findFilesRecursive(FileObject fo
 
     public static Map<HintMetadata, Collection<? extends HintDescription>> 
parseHintFile(@NonNull FileObject file) {
         String spec = Utilities.readFile(file);
-
-        return spec != null ? parseHints(file, spec) : Collections.emptyMap();
+        try {
+            return spec != null ? parseHints(file, spec) : 
Collections.emptyMap();
+        } catch (Exception ex) {
+            LOG.log(Level.WARNING, "Can not parse hint file: 
"+file.toURL()+"\n"+spec, ex);
+            return Collections.emptyMap();
+        }

Review Comment:
   `~/.netbeans/[version]/conf/rules ` are put into the "Custom" category. You 
can edit the files and it will update on save in real time.
   
   This ensures that a single invalid file does not break everything and 
disable hints.



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