Skip to content

Commit

Permalink
Update client code that references removed jdt.dom APIs (#1387)
Browse files Browse the repository at this point in the history
  • Loading branch information
jarthana committed May 6, 2024
1 parent 0cc16aa commit a26a56e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
4 changes: 2 additions & 2 deletions org.eclipse.jdt.core.manipulation/.settings/.api_filters
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@
</filter>
</resource>
<resource path="core extension/org/eclipse/jdt/internal/corext/fix/OneIfRatherThanDuplicateBlocksThatFallThroughFixCore.java" type="org.eclipse.jdt.internal.corext.fix.OneIfRatherThanDuplicateBlocksThatFallThroughFixCore$OneIfRatherThanDuplicateBlocksThatFallThroughFinder$SuccessiveIfVisitor$PatternNameVisitor">
<filter comment="Allow TypePattern.patternVariables() call" id="640712815">
<filter comment="Allow TypePattern.getPatternVariable() call" id="640712815">
<message_arguments>
<message_argument value="TypePattern"/>
<message_argument value="PatternNameVisitor"/>
<message_argument value="patternVariables()"/>
<message_argument value="getPatternVariable()"/>
</message_arguments>
</filter>
</resource>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1096,16 +1096,6 @@ public void endVisit(EnhancedForStatement node) {
endVisit((Statement)node);
}

@Override
public boolean visit(EnhancedForWithRecordPattern node) {
return visit((Statement)node);
}

@Override
public void endVisit(EnhancedForWithRecordPattern node) {
endVisit((Statement)node);
}

@Override
public boolean visit(ExpressionStatement node) {
return visit((Statement)node);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,8 @@ private class PatternNameVisitor extends ASTVisitor {
public boolean visit(PatternInstanceofExpression node) {
Pattern p= node.getPattern();
if (p instanceof TypePattern typePattern) {
List<SingleVariableDeclaration> patternVariables= typePattern.patternVariables();
for (SingleVariableDeclaration patternVariable : patternVariables) {
patternNames.add(patternVariable.getName().getFullyQualifiedName());
}
SingleVariableDeclaration patternVariable= typePattern.getPatternVariable();
patternNames.add(patternVariable.getName().getFullyQualifiedName());
}
return true;
}
Expand Down

0 comments on commit a26a56e

Please sign in to comment.