Skip to content

Remove unwanted inner try block#2741

Open
SougandhS wants to merge 1 commit into
eclipse-platform:masterfrom
SougandhS:RemoveUnwantedTryCatchBlock
Open

Remove unwanted inner try block#2741
SougandhS wants to merge 1 commit into
eclipse-platform:masterfrom
SougandhS:RemoveUnwantedTryCatchBlock

Conversation

@SougandhS
Copy link
Copy Markdown
Contributor

No description provided.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 7, 2026

Test Results

    54 files  ±0      54 suites  ±0   36m 39s ⏱️ + 2m 25s
 4 671 tests ±0   4 649 ✅ +1   22 💤 ±0  0 ❌  - 1 
11 907 runs  ±0  11 754 ✅ +3  153 💤 ±0  0 ❌  - 3 

Results for commit 7cd6483. ± Comparison against base commit 4b2964a.

}
} catch (Exception e) {
DebugPlugin.log(e);
if (attr.startsWith(MULTI_LAUNCH_CONSTANTS_PREFIX)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What kind of exception might happen? Do you really want the whole loop to terminate if there is an exception?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Since neither startsWith() nor removeAttribute() declares any exceptions, I initially thought the inner try/catch could be removed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It all looks a little overly cautious given that nothing declares any thrown exceptions. It looks like it's always been there so there's no real accounting for why either of those try blocks are there, neither the inner nor the outer. Maybe it happened during some initial implementation and was then never cleaned up. I'm not sure what to say about that. 😞

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