Skip to content

Conversation

@ptziegler
Copy link
Contributor

We already skip anonymous classes outside of a few exceptions (e.g. EventQueue.invokeLater(Runnable)). Given that Java allows the Runnable to be implemented as both an anonymous class and a lambda expression, WindowBuilder needs to be extended to support both variants.

@ptziegler ptziegler added this to the 1.22.0 milestone Sep 25, 2025
@ptziegler ptziegler force-pushed the dont-traverse-lambda-expressions branch from c4fa515 to 0cb3c29 Compare September 25, 2025 20:13
We already skip anonymous classes outside of a few exceptions (e.g.
EventQueue.invokeLater(Runnable)). Given that Java allows the Runnable
to be implemented as both an anonymous class and a lambda expression,
WindowBuilder needs to be extended to support both variants.
@ptziegler ptziegler force-pushed the dont-traverse-lambda-expressions branch from 0cb3c29 to a739837 Compare September 25, 2025 20:14
@github-actions
Copy link

Test Results

 2 720 files  ± 0   2 720 suites  ±0   9h 47m 29s ⏱️ + 4m 35s
 6 992 tests + 3   6 933 ✅ + 3   59 💤 ±0  0 ❌ ±0 
27 968 runs  +12  27 732 ✅ +12  236 💤 ±0  0 ❌ ±0 

Results for commit a739837. ± Comparison against base commit 5c70761.

This pull request removes 3 and adds 6 tests. Note that renamed tests count towards both.
WindowBuilderTests CoreTests AstEvaluationEngineTests ExecutionFlowUtilsTest ‑ test_visit_AnonymousClassDeclaration_noVisit
WindowBuilderTests CoreTests AstEvaluationEngineTests ExecutionFlowUtilsTest ‑ test_visit_AnonymousClassDeclaration_withInvocation
WindowBuilderTests CoreTests AstEvaluationEngineTests ExecutionFlowUtilsTest ‑ test_visit_AnonymousClassDeclaration_withInvocation_doVisit
WindowBuilderTests CoreTests AstEvaluationEngineTests ExecutionFlowUtilsTest ‑ test_visit_AnonymousClassDeclaration_noVisit(String)[1] new Runnable() {public void run() {int a;}}
WindowBuilderTests CoreTests AstEvaluationEngineTests ExecutionFlowUtilsTest ‑ test_visit_AnonymousClassDeclaration_noVisit(String)[2] () -> {int a;}
WindowBuilderTests CoreTests AstEvaluationEngineTests ExecutionFlowUtilsTest ‑ test_visit_AnonymousClassDeclaration_withInvocation(String)[1] new Runnable() {public void run() {foo();}}
WindowBuilderTests CoreTests AstEvaluationEngineTests ExecutionFlowUtilsTest ‑ test_visit_AnonymousClassDeclaration_withInvocation(String)[2] () -> {foo();}
WindowBuilderTests CoreTests AstEvaluationEngineTests ExecutionFlowUtilsTest ‑ test_visit_AnonymousClassDeclaration_withInvocation_doVisit(String)[1] new Runnable() {public void run() {foo();}}
WindowBuilderTests CoreTests AstEvaluationEngineTests ExecutionFlowUtilsTest ‑ test_visit_AnonymousClassDeclaration_withInvocation_doVisit(String)[2] () -> {foo();}

@ptziegler ptziegler merged commit fc49e4b into eclipse-windowbuilder:master Sep 26, 2025
9 checks passed
@ptziegler ptziegler deleted the dont-traverse-lambda-expressions branch September 26, 2025 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant