lbownik commented on a change in pull request #3884:
URL: https://github.com/apache/netbeans/pull/3884#discussion_r837852599



##########
File path: 
java/java.source.base/src/org/netbeans/modules/java/source/TreeShims.java
##########
@@ -227,6 +229,33 @@ public static ExpressionTree getGuardedExpression(Tree 
node) {
             throw TreeShims.<RuntimeException>throwAny(ex);
         }
     }
+       
+       public static List<DocTree> getSnippetDocTreeAttributes(DocTree node) {
+        try {
+            Class gpt = Class.forName("com.sun.source.doctree.SnippetTree"); 
//NOI18N
+            return isJDKVersionRelease18_Or_Above()
+                    ? 
(List<DocTree>)gpt.getDeclaredMethod("getAttributes").invoke(node)  //NOI18N
+                    : null;

Review comment:
       wouldn't returning empty list be more apropriate?




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