Reduced to useful function set

This commit is contained in:
Teifun2 2025-02-24 22:36:27 +01:00 committed by GitHub
parent 52e55dc489
commit d4079d22bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -217,7 +217,7 @@ public class GeneralUtils {
DoubleEvaluator evaluator = new DoubleEvaluator();
// Validate the expression
if (!expression.matches("(?:abs|acos|asin|atan|average|ceil|cos|cosh|floor|ln|log|max|min|round|sin|sinh|sum|tan|tanh|random|[0-9n+\\-*/()%^ ])+")) {
if (!expression.matches("(?:abs|average|ceil|floor|max|min|round|sum|random|[0-9n+\\-*/()%^ ])+")) {
throw new IllegalArgumentException("Invalid expression");
}