apache/maven · error · ArithmeticException
Division by zero
Error message
Division by zero
What it means
Error "Division by zero" thrown in apache/maven.
Source
Thrown at impl/maven-impl/src/main/java/org/apache/maven/impl/model/profile/ConditionParser.java:496
} else {
throw new RuntimeException("Cannot multiply " + left + " and " + right);
}
}
/**
* Divides the left operand by the right operand.
*
* @param left the left operand (dividend)
* @param right the right operand (divisor)
* @return the result of the division
* @throws RuntimeException if the operands cannot be divided
* @throws ArithmeticException if attempting to divide by zero
*/
private static Object divide(Object left, Object right) {
if (left instanceof Number leftNumber && right instanceof Number rightNumber) {
double divisor = rightNumber.doubleValue();
if (divisor == 0) {
throw new ArithmeticException("Division by zero");
}
return leftNumber.doubleValue() / divisor;
} else {
throw new RuntimeException("Cannot divide " + left + " by " + right);
}
}
/**
* Compares two objects based on the given operator.
* Supports comparison of numbers and strings, and equality checks for null values.
*
* @param left the left operand
* @param operator the comparison operator (">", "<", ">=", "<=", "==", or "!=")
* @param right the right operand
* @return the result of the comparison (a boolean value)
* @throws IllegalStateException if an unknown operator is provided
* @throws RuntimeException if the operands cannot be compared
*/View on GitHub (pinned to e4093d4e12)
When it happens
Trigger: Thrown at impl/maven-impl/src/main/java/org/apache/maven/impl/model/profile/ConditionParser.java:496 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/maven@e4093d4e12 (2026-08-21).
Data as JSON: /api/errors/8445792a6c668ec6.
Report an issue: GitHub.