Skip to content

Conversation

@akurtakov
Copy link
Member

Use static imports and pattern matching to ease reading.

Use static imports and pattern matching to ease reading.
@github-actions
Copy link
Contributor

Test Results

 1 821 files   1 821 suites   1h 44m 47s ⏱️
 7 714 tests  7 486 ✅ 228 💤 0 ❌
24 303 runs  23 556 ✅ 747 💤 0 ❌

Results for commit 0a7597e.

Comment on lines +144 to 145
assertTrue("Active workbench window not found.", activeWindow instanceof IWorkbenchWindow);
IWorkbenchWindow window = (IWorkbenchWindow) activeWindow;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably the following would be possible, but not everyone finds it more readable.

Suggested change
assertTrue("Active workbench window not found.", activeWindow instanceof IWorkbenchWindow);
IWorkbenchWindow window = (IWorkbenchWindow) activeWindow;
assertTrue("Active workbench window not found.", activeWindow instanceof IWorkbenchWindow window);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately this is not possible as that way window variable is local to the assertTrue call and thus not resolved outside of it.

@akurtakov akurtakov merged commit d4d7daa into eclipse-platform:master Oct 27, 2024
17 checks passed
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.

2 participants