Skip to content

Commit

Permalink
build(deps): update dependency org.eclipse.jdt:org.eclipse.jdt.core t…
Browse files Browse the repository at this point in the history
…o v3.40.0 (#6087)

Co-authored-by: SirYwell <[email protected]>
  • Loading branch information
renovate[bot] and SirYwell authored Feb 18, 2025
1 parent 44488ea commit 1d1eafc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.core</artifactId>
<version>3.39.0</version>
<version>3.40.0</version>
<exclusions>
<exclusion>
<groupId>org.eclipse.platform</groupId>
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/spoon/support/compiler/jdt/JDTTreeBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -1780,6 +1780,10 @@ public void endVisit(TypePattern anyPattern, BlockScope scope) {

@Override
public boolean visit(SwitchStatement switchStatement, BlockScope scope) {
// JDT 3.40.0 removes SwitchExpression#traverse method, so let's emulate it
if (switchStatement instanceof SwitchExpression switchExpression) {
return visit(switchExpression, scope);
}
context.enter(factory.Core().createSwitch(), switchStatement);
return true;
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/spoon/support/compiler/jdt/ParentExiter.java
Original file line number Diff line number Diff line change
Expand Up @@ -503,8 +503,8 @@ public void visitCtBreak(CtBreak b) {
@Override
public <E> void visitCtCase(CtCase<E> caseStatement) {
final ASTNode node = jdtTreeBuilder.getContextBuilder().getCurrentNode();
if (node instanceof CaseStatement) {
caseStatement.setCaseKind(((CaseStatement) node).isExpr ? CaseKind.ARROW : CaseKind.COLON);
if (node instanceof CaseStatement cs) {
caseStatement.setCaseKind(cs.isSwitchRule ? CaseKind.ARROW : CaseKind.COLON);
}
if (shouldAddAsCaseExpression(caseStatement, node)) {
if (child instanceof CtPattern pattern) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public <T> void visitCtExecutableReference(
}
}

@GitHubIssue(issueNumber = 5977, fixed = false)
@Test
public void testStackOverflow() {
Launcher launcher = new Launcher();
Expand Down

0 comments on commit 1d1eafc

Please sign in to comment.