Skip to content

Commit

Permalink
remove warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
subyssurendran666 committed Feb 5, 2025
1 parent 8ceaca1 commit 365454e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@ public void testParenthesizedExpression() {
basicMatch(x1);
}

@SuppressWarnings("deprecation")
@SuppressWarnings({ "deprecation", "removal" })
public void testPatternInstanceofExpression() {
if (this.ast.apiLevel() < AST.JLS17) {
return;
Expand All @@ -1094,7 +1094,11 @@ public void testPatternInstanceofExpression() {
x1.setRightOperand(svd);
} else {
TypePattern tp = this.ast.newTypePattern();
tp.setPatternVariable(svd);
if (this.ast.apiLevel() < AST.JLS22) {
tp.setPatternVariable(svd);
} else {
tp.setPatternVariable((VariableDeclaration)svd);
}
x1.setPattern(tp);
}
basicMatch(x1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ private boolean checkAPILevel() {
}


@SuppressWarnings("removal")
public void testAddRecordSwitchPattern() throws Exception {
if (checkAPILevel()) {
return;
Expand Down Expand Up @@ -137,6 +138,7 @@ public void testAddRecordSwitchPattern() throws Exception {
}


@SuppressWarnings("removal")
public void testModifyRecordSwitchPattern() throws Exception {
if (checkAPILevel()) {
return;
Expand Down Expand Up @@ -288,6 +290,7 @@ public void testRemoveRecordSwitchPattern() throws Exception {
}


@SuppressWarnings("removal")
public void testAddRecordInstanceOfPattern() throws Exception {
if (checkAPILevel()) {
return;
Expand Down Expand Up @@ -376,6 +379,7 @@ public void testAddRecordInstanceOfPattern() throws Exception {
assertEqualString(preview, buf.toString());
}

@SuppressWarnings("removal")
public void testModifyGuardedPattern() throws Exception {
if (checkAPILevel()) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ private boolean checkAPILevel() {
}


@SuppressWarnings("removal")
public void testAddTypePattern() throws Exception {
if (checkAPILevel()) {
return;
Expand Down Expand Up @@ -128,6 +129,7 @@ public void testAddTypePattern() throws Exception {
assertEqualString(preview, buf.toString());
}

@SuppressWarnings("removal")
public void tesModifyTypePattern() throws Exception {
if (checkAPILevel()) {
return;
Expand Down Expand Up @@ -251,6 +253,7 @@ public void testRemoveTypePattern() throws Exception {
}


@SuppressWarnings("removal")
public void testAddGuardedPattern() throws Exception {
if (checkAPILevel()) {
return;
Expand Down Expand Up @@ -340,6 +343,7 @@ public void testAddGuardedPattern() throws Exception {
assertEqualString(preview, buf.toString());
}

@SuppressWarnings("removal")
public void testModifyGuardedPattern() throws Exception {
if (checkAPILevel()) {
return;
Expand Down

0 comments on commit 365454e

Please sign in to comment.