This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-jexl.git
The following commit(s) were added to refs/heads/master by this push: new 13fe4074 Javadoc 13fe4074 is described below commit 13fe407488cfdc59e1158c916dc434d28b1b967c Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Sun Mar 23 10:48:12 2025 -0400 Javadoc --- src/main/java/org/apache/commons/jexl3/JexlArithmetic.java | 12 ++++++------ src/main/java/org/apache/commons/jexl3/JexlEngine.java | 8 ++++---- src/main/java/org/apache/commons/jexl3/JexlException.java | 4 ++-- src/main/java/org/apache/commons/jexl3/JexlOptions.java | 2 +- .../java/org/apache/commons/jexl3/internal/Debugger.java | 4 ++-- src/main/java/org/apache/commons/jexl3/internal/Frame.java | 2 +- .../java/org/apache/commons/jexl3/internal/LexicalScope.java | 2 +- .../org/apache/commons/jexl3/internal/TemplateEngine.java | 2 +- .../commons/jexl3/internal/introspection/MethodKey.java | 7 +++++-- .../commons/jexl3/internal/introspection/Permissions.java | 12 ++++++------ .../org/apache/commons/jexl3/introspection/JexlSandbox.java | 2 +- .../org/apache/commons/jexl3/parser/ASTIdentifierAccess.java | 4 ++-- src/main/java/org/apache/commons/jexl3/parser/JexlNode.java | 6 +++--- .../java/org/apache/commons/jexl3/parser/JexlParser.java | 2 +- .../org/apache/commons/jexl3/SynchronizedArithmetic.java | 2 +- 15 files changed, 37 insertions(+), 34 deletions(-) diff --git a/src/main/java/org/apache/commons/jexl3/JexlArithmetic.java b/src/main/java/org/apache/commons/jexl3/JexlArithmetic.java index 93c9b96f..ea438592 100644 --- a/src/main/java/org/apache/commons/jexl3/JexlArithmetic.java +++ b/src/main/java/org/apache/commons/jexl3/JexlArithmetic.java @@ -1055,7 +1055,7 @@ public class JexlArithmetic { } /** - * Whether negate called with a given argument will always return the same result. + * Tests whether negate called with a given argument will always return the same result. * <p>This is used to determine whether negate results on number literals can be cached. * If the result on calling negate with the same constant argument may change between calls, * which means the function is not deterministic, this method must return false. @@ -1089,7 +1089,7 @@ public class JexlArithmetic { } /** - * Whether positivize called with a given argument will always return the same result. + * Tests whether positivize called with a given argument will always return the same result. * <p>This is used to determine whether positivize results on number literals can be cached. * If the result on calling positivize with the same constant argument may change between calls, * which means the function is not deterministic, this method must return false. @@ -1110,7 +1110,7 @@ public class JexlArithmetic { } /** - * Checks whether this arithmetic considers a given operator as strict or null-safe. + * Tests whether this arithmetic considers a given operator as strict or null-safe. * <p>When an operator is strict, it does <em>not</em> accept null arguments when the arithmetic is strict. * If null-safe (ie not-strict), the operator does accept null arguments even if the arithmetic itself is strict.</p> * <p>The default implementation considers equal/not-equal operators as null-safe so one can check for null as in @@ -1143,7 +1143,7 @@ public class JexlArithmetic { } /** - * Test if left < right. + * Tests if left < right. * * @param left left argument * @param right right argument @@ -1158,7 +1158,7 @@ public class JexlArithmetic { } /** - * Test if left <= right. + * Tests if left <= right. * * @param left left argument * @param right right argument @@ -1348,7 +1348,7 @@ public class JexlArithmetic { } /** - * Whether we consider the narrow class as a potential candidate for narrowing the source. + * Tests whether we consider the narrow class as a potential candidate for narrowing the source. * * @param narrow the target narrow class * @param source the original source class diff --git a/src/main/java/org/apache/commons/jexl3/JexlEngine.java b/src/main/java/org/apache/commons/jexl3/JexlEngine.java index 6c08870f..c7b69d27 100644 --- a/src/main/java/org/apache/commons/jexl3/JexlEngine.java +++ b/src/main/java/org/apache/commons/jexl3/JexlEngine.java @@ -132,21 +132,21 @@ public abstract class JexlEngine { Charset getCharset(); /** - * Whether evaluation will throw JexlException.Cancel (true) or return null (false) when interrupted. + * Tests whether evaluation will throw JexlException.Cancel (true) or return null (false) when interrupted. * @return true when cancellable, false otherwise * @since 3.1 */ Boolean isCancellable(); /** - * Sets whether the engine will throw a {@link JexlException} when an error is encountered during evaluation. + * Tests whether the engine will throw a {@link JexlException} when an error is encountered during evaluation. * * @return true if silent, false otherwise */ Boolean isSilent(); /** - * Checks whether the engine considers unknown variables, methods, functions and constructors as errors or + * Tests whether the engine considers unknown variables, methods, functions and constructors as errors or * evaluates them as null. * * @return true if strict, false otherwise @@ -154,7 +154,7 @@ public abstract class JexlEngine { Boolean isStrict(); /** - * Checks whether the arithmetic triggers errors during evaluation when null is used as an operand. + * Tests whether the arithmetic triggers errors during evaluation when null is used as an operand. * * @return true if strict, false otherwise */ diff --git a/src/main/java/org/apache/commons/jexl3/JexlException.java b/src/main/java/org/apache/commons/jexl3/JexlException.java index b92d420f..cede55e0 100644 --- a/src/main/java/org/apache/commons/jexl3/JexlException.java +++ b/src/main/java/org/apache/commons/jexl3/JexlException.java @@ -441,7 +441,7 @@ public class JexlException extends RuntimeException { } /** - * Whether the variable causing an error is undefined or evaluated as null. + * Tests whether the variable causing an error is undefined or evaluated as null. * * @return true if undefined, false otherwise */ @@ -625,7 +625,7 @@ public class JexlException extends RuntimeException { } /** - * Whether the variable causing an error is undefined or evaluated as null. + * Tests whether the variable causing an error is undefined or evaluated as null. * * @return true if undefined, false otherwise */ diff --git a/src/main/java/org/apache/commons/jexl3/JexlOptions.java b/src/main/java/org/apache/commons/jexl3/JexlOptions.java index 9e7fcdb4..b7cb6b56 100644 --- a/src/main/java/org/apache/commons/jexl3/JexlOptions.java +++ b/src/main/java/org/apache/commons/jexl3/JexlOptions.java @@ -468,7 +468,7 @@ public final class JexlOptions { } /** - * Whether these options are immutable at runtime. + * Sets wether these options are immutable at runtime. * <p>Expert mode; allows instance handled through context to be shared * instead of copied. * @param flag true if shared, false if not diff --git a/src/main/java/org/apache/commons/jexl3/internal/Debugger.java b/src/main/java/org/apache/commons/jexl3/internal/Debugger.java index a55b8a96..9ecc12ab 100644 --- a/src/main/java/org/apache/commons/jexl3/internal/Debugger.java +++ b/src/main/java/org/apache/commons/jexl3/internal/Debugger.java @@ -140,7 +140,7 @@ public class Debugger extends ParserVisitor implements JexlInfo.Detail { return lambda.jjtGetNumChildren() == 1 && !isStatement(lambda.jjtGetChild(0)); } /** - * Whether a node is a statement (vs an expression). + * Tests whether a node is a statement (vs an expression). * @param child the node * @return true if node is a statement */ @@ -156,7 +156,7 @@ public class Debugger extends ParserVisitor implements JexlInfo.Detail { || child instanceof ASTThrowStatement; } /** - * Whether a script or expression ends with a semicolumn. + * Tests whether a script or expression ends with a semicolumn. * @param cs the string * @return true if a semicolumn is the last non-whitespace character */ diff --git a/src/main/java/org/apache/commons/jexl3/internal/Frame.java b/src/main/java/org/apache/commons/jexl3/internal/Frame.java index 7305d228..3e22c0e9 100644 --- a/src/main/java/org/apache/commons/jexl3/internal/Frame.java +++ b/src/main/java/org/apache/commons/jexl3/internal/Frame.java @@ -119,7 +119,7 @@ public class Frame { } /** - * Whether this frame defines a symbol, ie declared it and assigned it a value. + * Tests whether this frame defines a symbol, ie declared it and assigned it a value. * @param s the offset in this frame * @return true if this symbol has been assigned a value, false otherwise */ diff --git a/src/main/java/org/apache/commons/jexl3/internal/LexicalScope.java b/src/main/java/org/apache/commons/jexl3/internal/LexicalScope.java index 435f6223..d833b960 100644 --- a/src/main/java/org/apache/commons/jexl3/internal/LexicalScope.java +++ b/src/main/java/org/apache/commons/jexl3/internal/LexicalScope.java @@ -163,7 +163,7 @@ public class LexicalScope { } /** - * Whether a given bit (not symbol) is set. + * Tests whether a given bit (not symbol) is set. * @param bit the bit * @return true if set */ diff --git a/src/main/java/org/apache/commons/jexl3/internal/TemplateEngine.java b/src/main/java/org/apache/commons/jexl3/internal/TemplateEngine.java index 6c90bf7a..a596b58a 100644 --- a/src/main/java/org/apache/commons/jexl3/internal/TemplateEngine.java +++ b/src/main/java/org/apache/commons/jexl3/internal/TemplateEngine.java @@ -1183,7 +1183,7 @@ public final class TemplateEngine extends JxltEngine { } /** - * Whether a sequence starts with a given set of characters (following spaces). + * Tests whether a sequence starts with a given set of characters (following spaces). * <p>Space characters at beginning of line before the pattern are discarded.</p> * @param sequence the sequence * @param pattern the pattern to match at start of sequence diff --git a/src/main/java/org/apache/commons/jexl3/internal/introspection/MethodKey.java b/src/main/java/org/apache/commons/jexl3/internal/introspection/MethodKey.java index 36bcca68..c77cd430 100644 --- a/src/main/java/org/apache/commons/jexl3/internal/introspection/MethodKey.java +++ b/src/main/java/org/apache/commons/jexl3/internal/introspection/MethodKey.java @@ -66,9 +66,12 @@ public final class MethodKey { } /** - * Whether this exception is considered severe or benign. - * <p>Note that this is meant in the context of an ambiguous exception; benign cases can only be triggered + * Tests whether this exception is considered severe or benign. + * <p> + * Note that this is meant in the context of an ambiguous exception; benign cases can only be triggered * by null arguments often related to runtime problems (not simply on overload signatures). + * </p> + * * @return true if severe, false if benign. */ public boolean isSevere() { diff --git a/src/main/java/org/apache/commons/jexl3/internal/introspection/Permissions.java b/src/main/java/org/apache/commons/jexl3/internal/introspection/Permissions.java index 3678b030..f89800ad 100644 --- a/src/main/java/org/apache/commons/jexl3/internal/introspection/Permissions.java +++ b/src/main/java/org/apache/commons/jexl3/internal/introspection/Permissions.java @@ -429,7 +429,7 @@ public class Permissions implements JexlPermissions { } /** - * Whether a whole class is denied Jexl visibility. + * Tests whether a whole class is denied Jexl visibility. * <p>Also checks package visibility.</p> * @param clazz the class * @return true if denied, false otherwise @@ -449,7 +449,7 @@ public class Permissions implements JexlPermissions { } /** - * Whether a constructor is denied Jexl visibility. + * Tests whether a constructor is denied Jexl visibility. * @param ctor the constructor * @return true if denied, false otherwise */ @@ -463,7 +463,7 @@ public class Permissions implements JexlPermissions { } /** - * Whether a field is denied Jexl visibility. + * Tests whether a field is denied Jexl visibility. * @param field the field * @return true if denied, false otherwise */ @@ -477,7 +477,7 @@ public class Permissions implements JexlPermissions { } /** - * Whether a method is denied Jexl visibility. + * Tests whether a method is denied Jexl visibility. * @param method the method * @return true if denied, false otherwise */ @@ -491,7 +491,7 @@ public class Permissions implements JexlPermissions { } /** - * Whether a whole package is denied Jexl visibility. + * Tests whether a whole package is denied Jexl visibility. * @param pack the package * @return true if denied, false otherwise */ @@ -505,7 +505,7 @@ public class Permissions implements JexlPermissions { } /** - * Checks whether a method is denied. + * Tests whether a method is denied. * @param method the method * @return true if it has been disallowed through annotation or declaration */ diff --git a/src/main/java/org/apache/commons/jexl3/introspection/JexlSandbox.java b/src/main/java/org/apache/commons/jexl3/introspection/JexlSandbox.java index f9c39e58..8dec6fb0 100644 --- a/src/main/java/org/apache/commons/jexl3/introspection/JexlSandbox.java +++ b/src/main/java/org/apache/commons/jexl3/introspection/JexlSandbox.java @@ -521,7 +521,7 @@ public final class JexlSandbox { } /** - * Whether a given name is allowed or not. + * Gets whether a given name is allowed or not. * * @param name the method/property name to check * @return null (or NULL if name is null) if not allowed, the actual name to use otherwise diff --git a/src/main/java/org/apache/commons/jexl3/parser/ASTIdentifierAccess.java b/src/main/java/org/apache/commons/jexl3/parser/ASTIdentifierAccess.java index 61f02535..104e6ff0 100644 --- a/src/main/java/org/apache/commons/jexl3/parser/ASTIdentifierAccess.java +++ b/src/main/java/org/apache/commons/jexl3/parser/ASTIdentifierAccess.java @@ -42,7 +42,7 @@ public class ASTIdentifierAccess extends JexlNode { } /** - * Whether this is a Jxlt based identifier. + * Tests whether this is a Jxlt based identifier. * @return true if `..${...}...`, false otherwise */ public boolean isExpression() { @@ -55,7 +55,7 @@ public class ASTIdentifierAccess extends JexlNode { } /** - * Whether this is a dot or a question-mark-dot aka safe-navigation access. + * Tests whether this is a dot or a question-mark-dot aka safe-navigation access. * @return true is ?., false if. */ public boolean isSafe() { diff --git a/src/main/java/org/apache/commons/jexl3/parser/JexlNode.java b/src/main/java/org/apache/commons/jexl3/parser/JexlNode.java index 6fc2d7e4..fd2fee44 100644 --- a/src/main/java/org/apache/commons/jexl3/parser/JexlNode.java +++ b/src/main/java/org/apache/commons/jexl3/parser/JexlNode.java @@ -178,7 +178,7 @@ public abstract class JexlNode extends SimpleNode implements JexlCache.Reference } /** - * Whether this node is a constant node. + * Tests whether this node is a constant node. * <p>Its value cannot change after the first evaluation and can be cached * indefinitely.</p> * @@ -228,7 +228,7 @@ public abstract class JexlNode extends SimpleNode implements JexlCache.Reference } /** - * Whether this node is a left value. + * Tests whether this node is a left value. * @return true if node is assignable, false otherwise */ public boolean isLeftValue() { @@ -249,7 +249,7 @@ public abstract class JexlNode extends SimpleNode implements JexlCache.Reference } /** - * Whether this node is the left-hand side of a safe access identifier as in. + * Tests whether this node is the left-hand side of a safe access identifier as in. * For instance, in 'x?.y' , 'x' is safe. * @param safe whether the engine is in safe-navigation mode * @return true if safe lhs, false otherwise diff --git a/src/main/java/org/apache/commons/jexl3/parser/JexlParser.java b/src/main/java/org/apache/commons/jexl3/parser/JexlParser.java index 340036d2..e408aa3f 100644 --- a/src/main/java/org/apache/commons/jexl3/parser/JexlParser.java +++ b/src/main/java/org/apache/commons/jexl3/parser/JexlParser.java @@ -230,7 +230,7 @@ public abstract class JexlParser extends StringParser { } /** - * Whether a given variable name is allowed. + * Tests whether a given variable name is allowed. * @param image the name * @return true if allowed, false if reserved */ diff --git a/src/test/java/org/apache/commons/jexl3/SynchronizedArithmetic.java b/src/test/java/org/apache/commons/jexl3/SynchronizedArithmetic.java index 8e4fa6a4..2e15eafd 100644 --- a/src/test/java/org/apache/commons/jexl3/SynchronizedArithmetic.java +++ b/src/test/java/org/apache/commons/jexl3/SynchronizedArithmetic.java @@ -49,7 +49,7 @@ public class SynchronizedArithmetic extends JexlArithmetic { } /** - * Whether the number of monitor enter is equals to the number of exits. + * Tests whether the number of monitor enter is equals to the number of exits. * @return true if balanced, false otherwise */ public boolean isBalanced() {