oracle/graal · error · InvalidArgumentException
The argument '%s' could not be parsed: %s
Error message
The argument '%s' could not be parsed: %s
What it means
Thrown by DoubleArgument.parseValue when Double.parseDouble raises NumberFormatException; the JDK message (e.g. 'For input string: "abc"') is chained into InvalidArgumentException. It marks a numeric option that received something that is not a parsable IEEE double.
Source
Thrown at compiler/src/org.graalvm.profdiff/src/org/graalvm/profdiff/args/DoubleArgument.java:40
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.graalvm.profdiff.args;
/**
* A program argument that holds a double.
*/
public class DoubleArgument extends ValuedArgument<Double> {
public DoubleArgument(String name, double defaultValue, String help) {
super(name, defaultValue, help);
}
@Override
protected Double parseValue(String s) throws InvalidArgumentException {
try {
return Double.parseDouble(s);
} catch (NumberFormatException e) {
throw new InvalidArgumentException(getName(), e.getMessage());
}
}
}
View on GitHub (pinned to a66e9ccd1d)
Solutions
- Provide a plain dot-decimal number, e.g. '1.5', with no units or thousand separators.
- If the value comes from a locale-aware tool, convert ',' to '.' before passing it.
- Validate the value with Double.parseDouble in your script before invoking the command.
Example fix
# before mx profdiff ... --cur-decimals 2,5 # after mx profdiff ... --cur-decimals 2.5
Defensive patterns
Strategy: validation
Validate before calling
Double d;
try { d = Double.parseDouble(value); } catch (NumberFormatException e) { throw new IllegalArgumentException("Not a double: " + value); } Type guard
static boolean isParsableDouble(String s) {
if (s == null || s.isEmpty()) return false;
try { Double.parseDouble(s); return true; } catch (NumberFormatException e) { return false; }
} Try / catch
try {
parser.parse(args);
} catch (InvalidArgumentException e) {
// message contains the JDK NumberFormatException text; correct the numeric option
} Prevention
- Use dot as the decimal separator.
- No units, no thousands separators, no percent signs in numeric values.
When it happens
Trigger: Passing '--some-double=abc', '--some-double=1,5' (comma decimal separator from a locale), an empty string, or 'NaN-like' text that Double.parseDouble rejects, to any double-valued option registered in a profdiff-style parser.
Common situations: Locale-related decimal separators ('1,5' vs '1.5'), trailing units ('0.5x'), empty CI variables, or copy-paste of percentages like '50%'.
Related errors
- invalid double value: "%s"
- The argument '%s' could not be parsed: %s
- Unknown argument: %s
- no value provided
- invalid boolean value: "%s"
AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14).
Data as JSON: /api/errors/1a0236c0069f36eb.
Report an issue: GitHub.