Skip to content

Avoid NumberFormatException for non-numeric expression arguments - #3086

Open
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:expressions-convert-argument
Open

vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:expressions-convert-argument

Conversation

@vogella

@vogella vogella commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Expressions.convertArgument tried Float.valueOf or Integer.valueOf on every unquoted argument and caught the NumberFormatException, so exceptions were the normal control flow for context ids, nature ids and values like ACTIVE. A check of the first character now skips parsing for values that cannot be numbers, while numeric values parse exactly as before. This removes dozens of exceptions thrown during IDE startup, keeps exception logs and profiler recordings free of this noise, and a debugger breakpoint on NumberFormatException no longer stops here whenever a menu or handler expression is read.

Expressions.convertArgument tried Float.valueOf or Integer.valueOf on every unquoted value and caught the NumberFormatException, which is the normal case for context ids, nature ids and similar values. A check of the first character now skips parsing for values that cannot be numbers, so startup no longer throws dozens of these exceptions and a debugger breakpoint on NumberFormatException no longer stops here.

Assisted-by: multiple AI agents and layers of automated tooling 🤖
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

    54 files  ±0      54 suites  ±0   36m 4s ⏱️ - 2m 30s
 5 022 tests ±0   5 000 ✅ ±0   22 💤 ±0  0 ❌ ±0 
12 957 runs  ±0  12 803 ✅ ±0  154 💤 ±0  0 ❌ ±0 

Results for commit 7972aae. ± Comparison against base commit 2518f7f.

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