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


##########
java/java.editor.base/src/org/netbeans/modules/java/editor/base/semantic/UnusedDetector.java:
##########
@@ -597,5 +619,49 @@ private void handleDeclaration(TreePath path) {
                 }
             }
         }
+
+        @Override
+        public Void visitLiteral(LiteralTree node, Void p) {
+            if (node.getKind() == Kind.STRING_LITERAL) {
+                allStringLiterals.add((String) ((LiteralTree) 
node).getValue());

Review Comment:
   The whole PR is conclusive to me, this part I don't understand. My initial 
thought was, that you are trying to get the strings used in lookups, but these 
are already covered by the explicit invocation in `visitMethodInvocation`. Or 
is this to find "indirect" lookups? If so, should this customizable?
   
   If I'm right - does this only match the unqualified name of a  method or a 
field?



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