{"record":{"id":"2c64c0652ba8b5ae","repo":"apache/maven","slug":"cannot-subtract-right-from-left","errorCode":null,"errorMessage":"Cannot subtract ${right} from ${left}","messagePattern":"Cannot subtract (.+?) from (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"impl/maven-impl/src/main/java/org/apache/maven/impl/model/profile/ConditionParser.java","lineNumber":463,"sourceCode":"        if (value instanceof Number number) {\n            return -number.doubleValue();\n        }\n        throw new RuntimeException(\"Cannot negate non-numeric value: \" + value);\n    }\n\n    /**\n     * Subtracts the right operand from the left operand.\n     *\n     * @param left the left operand\n     * @param right the right operand\n     * @return the result of the subtraction\n     * @throws RuntimeException if the operands cannot be subtracted\n     */\n    private static Object subtract(Object left, Object right) {\n        if (left instanceof Number leftNumber && right instanceof Number rightNumber) {\n            return leftNumber.doubleValue() - rightNumber.doubleValue();\n        } else {\n            throw new RuntimeException(\"Cannot subtract \" + right + \" from \" + left);\n        }\n    }\n\n    /**\n     * Multiplies two numeric operands.\n     *\n     * @param left the left operand\n     * @param right the right operand\n     * @return the result of the multiplication\n     * @throws RuntimeException if the operands cannot be multiplied\n     */\n    private static Object multiply(Object left, Object right) {\n        if (left instanceof Number leftNumber && right instanceof Number rightNumber) {\n            return leftNumber.doubleValue() * rightNumber.doubleValue();\n        } else {\n            throw new RuntimeException(\"Cannot multiply \" + left + \" and \" + right);\n        }\n    }","sourceCodeStart":445,"sourceCodeEnd":481,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/impl/maven-impl/src/main/java/org/apache/maven/impl/model/profile/ConditionParser.java#L445-L481","documentation":"Error \"Cannot subtract ${right} from ${left}\" thrown in apache/maven.","triggerScenarios":"Thrown at impl/maven-impl/src/main/java/org/apache/maven/impl/model/profile/ConditionParser.java:463 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e4093d4e120eac99d6bdce5ba67cace2f3085c97","analyzedAt":"2026-08-21T22:58:24.034Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}