Skip to content

Commit

Permalink
Merge pull request #2441 from Akshay-Gupta-Oracle/removeExtraGetPermit
Browse files Browse the repository at this point in the history
[NETBEANS-3990]: Removing extra getPermit Method from TreeShims
  • Loading branch information
Akshay-Gupta-19 committed Oct 11, 2020
2 parents 429c454 + 681f5e0 commit 1bfefb6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 255 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -177,20 +177,6 @@ public static List<? extends Tree> getPermits(JCClassDecl newT) {
return newPermitings;
}

public static List<? extends Tree> getPermits(ClassTree node) {
List<? extends Tree> perms = null;
try {
Class classTree = Class.forName("com.sun.source.tree.ClassTree");
Method getPerms = classTree.getDeclaredMethod("getPermitsClause");
perms = (List<? extends Tree>) getPerms.invoke(node);
} catch (ClassNotFoundException | NoSuchMethodException ex) {
return null;
} catch (SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) {
throw TreeShims.<RuntimeException>throwAny(ex);
}
return perms;
}

public static ExpressionTree getYieldValue(Tree node) {
if (!node.getKind().toString().equals(YIELD)) {
return null;
Expand Down

0 comments on commit 1bfefb6

Please sign in to comment.