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 d673ed09 Use preferred spelling for "cannot"
d673ed09 is described below
commit d673ed09fd08a3c2f212eabc4fdd19d1569dc44e
Author: Gary Gregory <[email protected]>
AuthorDate: Tue Nov 5 07:29:45 2024 -0500
Use preferred spelling for "cannot"
---
.../org/apache/commons/jexl3/JexlArithmetic.java | 20 ++++++++++----------
.../org/apache/commons/jexl3/JexlFeatures.java | 4 ++--
.../org/apache/commons/jexl3/internal/Engine.java | 2 +-
.../commons/jexl3/internal/FqcnResolver.java | 2 +-
.../apache/commons/jexl3/internal/Interpreter.java | 6 +++---
.../commons/jexl3/internal/InterpreterBase.java | 8 ++++----
.../commons/jexl3/internal/TemplateEngine.java | 4 ++--
.../commons/jexl3/internal/TemplateScript.java | 2 +-
.../internal/introspection/SandboxUberspect.java | 4 ++--
.../jexl3/internal/introspection/Uberspect.java | 2 +-
.../jexl3/introspection/JexlPermissions.java | 22 +++++++++++-----------
.../commons/jexl3/introspection/JexlSandbox.java | 2 +-
.../commons/jexl3/introspection/JexlUberspect.java | 2 +-
.../org/apache/commons/jexl3/parser/JexlNode.java | 2 +-
.../apache/commons/jexl3/parser/JexlParser.java | 4 ++--
.../org/apache/commons/jexl3/ClassCreatorTest.java | 4 ++--
.../org/apache/commons/jexl3/Issues200Test.java | 2 +-
.../java/org/apache/commons/jexl3/JXLTTest.java | 4 ++--
.../commons/jexl3/introspection/SandboxTest.java | 8 ++++----
.../commons/jexl3/jexl342/ReferenceUberspect.java | 4 ++--
20 files changed, 54 insertions(+), 54 deletions(-)
diff --git a/src/main/java/org/apache/commons/jexl3/JexlArithmetic.java
b/src/main/java/org/apache/commons/jexl3/JexlArithmetic.java
index a81a8366..5e9b54f6 100644
--- a/src/main/java/org/apache/commons/jexl3/JexlArithmetic.java
+++ b/src/main/java/org/apache/commons/jexl3/JexlArithmetic.java
@@ -981,7 +981,7 @@ public class JexlArithmetic {
* Check for emptiness of various types: Number, Collection, Array, Map,
String.
*
* @param object the object to check the emptiness of
- * @param def the default value if object emptiness can not be determined
+ * @param def the default value if object emptiness cannot be determined
* @return the boolean or null if there is no arithmetic solution
*/
public Boolean isEmpty(final Object object, final Boolean def) {
@@ -1453,7 +1453,7 @@ public class JexlArithmetic {
value = big.longValueExact();
// continue in sequence to try and further reduce
} catch (final ArithmeticException xa) {
- // if it is bigger than a double, it can not be narrowed
+ // if it is bigger than a double, it cannot be narrowed
if (big.compareTo(BIGD_DOUBLE_MAX_VALUE) > 0
|| big.compareTo(BIGD_DOUBLE_MIN_VALUE) < 0) {
return original;
@@ -1472,7 +1472,7 @@ public class JexlArithmetic {
// else it can be represented as a long
} else if (original instanceof BigInteger) {
final BigInteger bigi = (BigInteger) original;
- // if it is bigger than a Long, it can not be narrowed
+ // if it is bigger than a Long, it cannot be narrowed
if (!BigInteger.valueOf(bigi.longValue()).equals(bigi)) {
return original;
}
@@ -1642,7 +1642,7 @@ public class JexlArithmetic {
* <>Empty string is considered as 0.</>
* @param arg the arg
* @return a BigDecimal
- * @throws CoercionException if the string can not be coerced into a
BigDecimal
+ * @throws CoercionException if the string cannot be coerced into a
BigDecimal
*/
private BigDecimal parseBigDecimal(final String arg) throws
ArithmeticException {
try {
@@ -1659,7 +1659,7 @@ public class JexlArithmetic {
* <>Empty string is considered as 0.</>
* @param arg the arg
* @return a big integer
- * @throws ArithmeticException if the string can not be coerced into a big
integer
+ * @throws ArithmeticException if the string cannot be coerced into a big
integer
*/
private BigInteger parseBigInteger(final String arg) throws
ArithmeticException {
try {
@@ -1676,7 +1676,7 @@ public class JexlArithmetic {
* <>Empty string is considered as NaN.</>
* @param arg the arg
* @return a double
- * @throws ArithmeticException if the string can not be coerced into a
double
+ * @throws ArithmeticException if the string cannot be coerced into a
double
*/
private double parseDouble(final String arg) throws ArithmeticException {
try {
@@ -1693,7 +1693,7 @@ public class JexlArithmetic {
* <p>This ensure the represented number is a natural (not a real).</p>
* @param arg the arg
* @return an int
- * @throws ArithmeticException if the string can not be coerced into a long
+ * @throws ArithmeticException if the string cannot be coerced into a long
*/
private int parseInteger(final String arg) throws ArithmeticException {
final long l = parseLong(arg);
@@ -1709,7 +1709,7 @@ public class JexlArithmetic {
* <p>This ensure the represented number is a natural (not a real).</p>
* @param arg the arg
* @return a long
- * @throws ArithmeticException if the string can not be coerced into a long
+ * @throws ArithmeticException if the string cannot be coerced into a long
*/
private long parseLong(final String arg) throws ArithmeticException {
final double d = parseDouble(arg);
@@ -1737,7 +1737,7 @@ public class JexlArithmetic {
if (id instanceof CharSequence) {
final CharSequence str = (CharSequence) id;
final int length = str.length();
- // can not be empty string and can not be longer than
Integer.MAX_VALUE representation
+ // cannot be empty string and cannot be longer than
Integer.MAX_VALUE representation
if (length > 0 && length <= 10) {
int val = 0;
for (int i = 0; i < length; ++i) {
@@ -1877,7 +1877,7 @@ public class JexlArithmetic {
* Calculate the {@code size} of various types: Collection, Array, Map,
String.
*
* @param object the object to get the size of
- * @param def the default value if object size can not be determined
+ * @param def the default value if object size cannot be determined
* @return the size of object or null if there is no arithmetic solution
*/
public Integer size(final Object object, final Integer def) {
diff --git a/src/main/java/org/apache/commons/jexl3/JexlFeatures.java
b/src/main/java/org/apache/commons/jexl3/JexlFeatures.java
index c05b776c..17c7289b 100644
--- a/src/main/java/org/apache/commons/jexl3/JexlFeatures.java
+++ b/src/main/java/org/apache/commons/jexl3/JexlFeatures.java
@@ -36,7 +36,7 @@ import java.util.function.Predicate;
* are the recommended starting points to selectively enable or disable chosen
features.</p>
* <ul>
* <li>Registers: register syntax (#number), used internally for
{g,s}etProperty
- * <li>Reserved Names: a set of reserved variable names that can not be used
as local variable (or parameter) names
+ * <li>Reserved Names: a set of reserved variable names that cannot be used as
local variable (or parameter) names
* <li>Global Side Effect : assigning/modifying values on global variables (=,
+= , -=, ...)
* <li>Lexical: lexical scope, prevents redefining local variables
* <li>Lexical Shade: local variables shade globals, prevents confusing a
global variable with a local one
@@ -265,7 +265,7 @@ public final class JexlFeatures {
/** The feature flags. */
private long flags;
- /** The set of reserved names, aka global variables that can not be masked
by local variables or parameters. */
+ /** The set of reserved names, aka global variables that cannot be masked
by local variables or parameters. */
private Set<String> reservedNames;
/** The namespace names. */
diff --git a/src/main/java/org/apache/commons/jexl3/internal/Engine.java
b/src/main/java/org/apache/commons/jexl3/internal/Engine.java
index 95f5f450..96d1b2c4 100644
--- a/src/main/java/org/apache/commons/jexl3/internal/Engine.java
+++ b/src/main/java/org/apache/commons/jexl3/internal/Engine.java
@@ -365,7 +365,7 @@ public class Engine extends JexlEngine {
this.cache = (JexlCache<Source, ASTJexlScript>) (conf.cache() > 0 ?
factory.apply(conf.cache()) : null);
this.cacheThreshold = conf.cacheThreshold();
if (uberspect == null) {
- throw new IllegalArgumentException("uberspect can not be null");
+ throw new IllegalArgumentException("uberspect cannot be null");
}
}
diff --git a/src/main/java/org/apache/commons/jexl3/internal/FqcnResolver.java
b/src/main/java/org/apache/commons/jexl3/internal/FqcnResolver.java
index cb792e2f..64e4dde4 100644
--- a/src/main/java/org/apache/commons/jexl3/internal/FqcnResolver.java
+++ b/src/main/java/org/apache/commons/jexl3/internal/FqcnResolver.java
@@ -62,7 +62,7 @@ import org.apache.commons.jexl3.introspection.JexlUberspect;
*/
FqcnResolver(final FqcnResolver solver) {
if (solver == null) {
- throw new NullPointerException("parent solver can not be null");
+ throw new NullPointerException("parent solver cannot be null");
}
this.parent = solver;
this.uberspect = solver.uberspect;
diff --git a/src/main/java/org/apache/commons/jexl3/internal/Interpreter.java
b/src/main/java/org/apache/commons/jexl3/internal/Interpreter.java
index 7b917841..0a3389f4 100644
--- a/src/main/java/org/apache/commons/jexl3/internal/Interpreter.java
+++ b/src/main/java/org/apache/commons/jexl3/internal/Interpreter.java
@@ -565,7 +565,7 @@ public class Interpreter extends InterpreterBase {
return actual; // 1
}
object = getVariable(frame, block, variable);
- // top level is a symbol, can not be an antish var
+ // top level is a symbol, cannot be an antish var
antish = false;
} else {
// check we are not assigning direct global
@@ -582,7 +582,7 @@ public class Interpreter extends InterpreterBase {
return actual; // 2
}
object = context.get(name);
- // top level accesses object, can not be an antish var
+ // top level accesses object, cannot be an antish var
if (object != null) {
antish = false;
}
@@ -673,7 +673,7 @@ public class Interpreter extends InterpreterBase {
throw new JexlException(objectNode, "illegal assignment form");
}
// we may have a null property as in map[null], no check needed.
- // we can not *have* a null object though.
+ // we cannot *have* a null object though.
if (object == null) {
// no object, we fail
return unsolvableProperty(objectNode, "<null>.<?>", true, null);
diff --git
a/src/main/java/org/apache/commons/jexl3/internal/InterpreterBase.java
b/src/main/java/org/apache/commons/jexl3/internal/InterpreterBase.java
index ec7d85de..62ae4ae8 100644
--- a/src/main/java/org/apache/commons/jexl3/internal/InterpreterBase.java
+++ b/src/main/java/org/apache/commons/jexl3/internal/InterpreterBase.java
@@ -1041,7 +1041,7 @@ public abstract class InterpreterBase extends
ParserVisitor {
}
/**
- * Triggered when a method can not be resolved.
+ * Triggered when a method cannot be resolved.
* @param node the node where the error originated from
* @param method the method name
* @return throws JexlException if strict and not silent, null otherwise
@@ -1051,7 +1051,7 @@ public abstract class InterpreterBase extends
ParserVisitor {
}
/**
- * Triggered when a method can not be resolved.
+ * Triggered when a method cannot be resolved.
* @param node the node where the error originated from
* @param method the method name
* @param args the method arguments
@@ -1068,7 +1068,7 @@ public abstract class InterpreterBase extends
ParserVisitor {
}
/**
- * Triggered when a property can not be resolved.
+ * Triggered when a property cannot be resolved.
* @param node the node where the error originated from
* @param property the property node
* @param cause the cause if any
@@ -1086,7 +1086,7 @@ public abstract class InterpreterBase extends
ParserVisitor {
}
/**
- * Triggered when a variable can not be resolved.
+ * Triggered when a variable cannot be resolved.
* @param node the node where the error originated from
* @param variable the variable name
* @param undef whether the variable is undefined or null
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 07806b33..abc3861e 100644
--- a/src/main/java/org/apache/commons/jexl3/internal/TemplateEngine.java
+++ b/src/main/java/org/apache/commons/jexl3/internal/TemplateEngine.java
@@ -224,7 +224,7 @@ public final class TemplateEngine extends JxltEngine {
ConstantExpression(final Object val, final TemplateExpression source) {
super(source);
if (val == null) {
- throw new NullPointerException("constant can not be null");
+ throw new NullPointerException("constant cannot be null");
}
this.value = val instanceof String
? StringParser.buildTemplate((String) val, false)
@@ -487,7 +487,7 @@ public final class TemplateEngine extends JxltEngine {
NestedExpression(final CharSequence expr, final JexlNode node, final
TemplateExpression source) {
super(expr, node, source);
if (this.source != this) {
- throw new IllegalArgumentException("Nested TemplateExpression
can not have a source");
+ throw new IllegalArgumentException("Nested TemplateExpression
cannot have a source");
}
}
diff --git
a/src/main/java/org/apache/commons/jexl3/internal/TemplateScript.java
b/src/main/java/org/apache/commons/jexl3/internal/TemplateScript.java
index c4251f53..4a6d06dc 100644
--- a/src/main/java/org/apache/commons/jexl3/internal/TemplateScript.java
+++ b/src/main/java/org/apache/commons/jexl3/internal/TemplateScript.java
@@ -104,7 +104,7 @@ public final class TemplateScript implements
JxltEngine.Template {
* Creates a new template from an character input.
* @param engine the template engine
* @param jexlInfo the source info
- * @param directive the prefix for lines of code; can not be "$", "${",
"#" or "#{"
+ * @param directive the prefix for lines of code; cannot be "$", "${", "#"
or "#{"
since this would preclude being able to differentiate
directives and jxlt expressions
* @param reader the input reader
* @param parms the parameter names
diff --git
a/src/main/java/org/apache/commons/jexl3/internal/introspection/SandboxUberspect.java
b/src/main/java/org/apache/commons/jexl3/internal/introspection/SandboxUberspect.java
index 47767a57..86712463 100644
---
a/src/main/java/org/apache/commons/jexl3/internal/introspection/SandboxUberspect.java
+++
b/src/main/java/org/apache/commons/jexl3/internal/introspection/SandboxUberspect.java
@@ -55,10 +55,10 @@ public final class SandboxUberspect implements
JexlUberspect {
*/
public SandboxUberspect(final JexlUberspect theUberspect, final
JexlSandbox theSandbox) {
if (theSandbox == null) {
- throw new NullPointerException("sandbox can not be null");
+ throw new NullPointerException("sandbox cannot be null");
}
if (theUberspect == null) {
- throw new NullPointerException("uberspect can not be null");
+ throw new NullPointerException("uberspect cannot be null");
}
this.uberspect = theUberspect;
this.sandbox = theSandbox.copy();
diff --git
a/src/main/java/org/apache/commons/jexl3/internal/introspection/Uberspect.java
b/src/main/java/org/apache/commons/jexl3/internal/introspection/Uberspect.java
index 8cb9b914..975dbd75 100644
---
a/src/main/java/org/apache/commons/jexl3/internal/introspection/Uberspect.java
+++
b/src/main/java/org/apache/commons/jexl3/internal/introspection/Uberspect.java
@@ -348,7 +348,7 @@ public class Uberspect implements JexlUberspect {
}
break;
case FIELD:
- // a field may be? (can not be a number)
+ // a field may be? (cannot be a number)
executor = FieldGetExecutor.discover(is, clazz,
property);
// static class fields (enums included)
if (obj instanceof Class<?>) {
diff --git
a/src/main/java/org/apache/commons/jexl3/introspection/JexlPermissions.java
b/src/main/java/org/apache/commons/jexl3/introspection/JexlPermissions.java
index d59b7d10..3525cf49 100644
--- a/src/main/java/org/apache/commons/jexl3/introspection/JexlPermissions.java
+++ b/src/main/java/org/apache/commons/jexl3/introspection/JexlPermissions.java
@@ -299,15 +299,15 @@ public interface JexlPermissions {
* class0 {
* class1 {} # the whole class1 is hidden
* class2 {
- * class2(); # class2 constructors can not be invoked
+ * class2(); # class2 constructors cannot be invoked
* class3 {
- * aMethod(); # aMethod can not be called
- * aField; # aField can not be accessed
+ * aMethod(); # aMethod cannot be called
+ * aField; # aField cannot be accessed
* }
* } # end of class2
- * class0(); # class0 constructors can not be invoked
- * method(); # method can not be called
- * field; # field can not be accessed
+ * class0(); # class0 constructors cannot be invoked
+ * method(); # method cannot be called
+ * field; # field cannot be accessed
* } # end class0
* } # end package my.package
* </pre>
@@ -323,7 +323,7 @@ public interface JexlPermissions {
/**
* Checks whether a class allows JEXL introspection.
* <p>If the class disallows JEXL introspection, none of its constructors,
methods or fields
- * as well as derived classes are visible to JEXL and can not be used in
scripts or expressions.
+ * as well as derived classes are visible to JEXL and cannot be used in
scripts or expressions.
* If one of its super-classes is not allowed, tbe class is not allowed
either.</p>
* <p>For interfaces, only methods and fields are disallowed in derived
interfaces or implementing classes.</p>
* @param clazz the class to check
@@ -334,7 +334,7 @@ public interface JexlPermissions {
/**
* Checks whether a constructor allows JEXL introspection.
- * <p>If a constructor is not allowed, the new operator can not be used to
instantiate its declared class
+ * <p>If a constructor is not allowed, the new operator cannot be used to
instantiate its declared class
* in scripts or expressions.</p>
* @param ctor the constructor to check
* @return true if JEXL is allowed to introspect, false otherwise
@@ -344,7 +344,7 @@ public interface JexlPermissions {
/**
* Checks whether a field explicitly disallows JEXL introspection.
- * <p>If a field is not allowed, it can not resolved and accessed in
scripts or expressions.</p>
+ * <p>If a field is not allowed, it cannot resolved and accessed in
scripts or expressions.</p>
* @param field the field to check
* @return true if JEXL is allowed to introspect, false otherwise
* @since 3.3
@@ -352,7 +352,7 @@ public interface JexlPermissions {
boolean allow(final Field field);
/**
* Checks whether a method allows JEXL introspection.
- * <p>If a method is not allowed, it can not resolved and called in
scripts or expressions.</p>
+ * <p>If a method is not allowed, it cannot resolved and called in scripts
or expressions.</p>
* <p>Since methods can be overridden and overloaded, this also checks
that no superclass or interface
* explicitly disallows this methods.</p>
* @param method the method to check
@@ -364,7 +364,7 @@ public interface JexlPermissions {
/**
* Checks whether a package allows JEXL introspection.
* <p>If the package disallows JEXL introspection, none of its classes or
interfaces are visible
- * to JEXL and can not be used in scripts or expression.</p>
+ * to JEXL and cannot be used in scripts or expression.</p>
* @param pack the package
* @return true if JEXL is allowed to introspect, false otherwise
* @since 3.3
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 3015f291..8535cc67 100644
--- a/src/main/java/org/apache/commons/jexl3/introspection/JexlSandbox.java
+++ b/src/main/java/org/apache/commons/jexl3/introspection/JexlSandbox.java
@@ -267,7 +267,7 @@ public final class JexlSandbox {
*/
@SuppressWarnings("null")
public Permissions get(final Class<?> clazz) {
- // argument clazz can not be null since permissions would be not null
and block:
+ // argument clazz cannot be null since permissions would be not null
and block:
// we only store the result for classes we actively seek permissions
for.
return compute(clazz, true);
}
diff --git
a/src/main/java/org/apache/commons/jexl3/introspection/JexlUberspect.java
b/src/main/java/org/apache/commons/jexl3/introspection/JexlUberspect.java
index 5f8f9fe8..4bf2d969 100644
--- a/src/main/java/org/apache/commons/jexl3/introspection/JexlUberspect.java
+++ b/src/main/java/org/apache/commons/jexl3/introspection/JexlUberspect.java
@@ -128,7 +128,7 @@ public interface JexlUberspect {
* Applies this strategy to a list of resolver types.
*
* @param operator the property access operator, may be null
- * @param obj the instance we seek to obtain a property
setter/getter from, can not be null
+ * @param obj the instance we seek to obtain a property
setter/getter from, cannot be null
* @return the ordered list of resolvers types, must not be null
*/
List<PropertyResolver> apply(JexlOperator operator, Object obj);
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 b44e70de..3154081f 100644
--- a/src/main/java/org/apache/commons/jexl3/parser/JexlNode.java
+++ b/src/main/java/org/apache/commons/jexl3/parser/JexlNode.java
@@ -177,7 +177,7 @@ public abstract class JexlNode extends SimpleNode
implements JexlCache.Reference
/**
* Whether this node is a constant node.
- * <p>Its value can not change after the first evaluation and can be cached
+ * <p>Its value cannot change after the first evaluation and can be cached
* indefinitely.</p>
*
* @return true if constant, 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 d0e5df66..c360bf7e 100644
--- a/src/main/java/org/apache/commons/jexl3/parser/JexlParser.java
+++ b/src/main/java/org/apache/commons/jexl3/parser/JexlParser.java
@@ -302,7 +302,7 @@ public abstract class JexlParser extends StringParser {
identifier.setSymbol(symbol, name);
if (!declared) {
if (getFeatures().isLexicalShade()) {
- // can not reuse a local as a global
+ // cannot reuse a local as a global
throw new JexlException.Parsing(info, name + ":
variable is not declared").clean();
}
identifier.setShaded(true);
@@ -836,7 +836,7 @@ public abstract class JexlParser extends StringParser {
* Throws a feature exception.
* @param feature the feature code
* @param trigger the token that triggered it
- * @throws JexlException.Parsing if actual error token can not be found
+ * @throws JexlException.Parsing if actual error token cannot be found
* @throws JexlException.Feature in all other cases
*/
protected void throwFeatureException(final int feature, final Token
trigger) {
diff --git a/src/test/java/org/apache/commons/jexl3/ClassCreatorTest.java
b/src/test/java/org/apache/commons/jexl3/ClassCreatorTest.java
index d62fdba0..000640a4 100644
--- a/src/test/java/org/apache/commons/jexl3/ClassCreatorTest.java
+++ b/src/test/java/org/apache/commons/jexl3/ClassCreatorTest.java
@@ -315,7 +315,7 @@ public class ClassCreatorTest extends JexlTestCase {
@Test
public void testMany() throws Exception {
- // abort test if class creator can not run
+ // abort test if class creator cannot run
if (!ClassCreator.canRun) {
return;
}
@@ -407,7 +407,7 @@ public class ClassCreatorTest extends JexlTestCase {
@Test
public void testOne() throws Exception {
- // abort test if class creator can not run
+ // abort test if class creator cannot run
if (!ClassCreator.canRun) {
logger.warn("unable to create classes");
return;
diff --git a/src/test/java/org/apache/commons/jexl3/Issues200Test.java
b/src/test/java/org/apache/commons/jexl3/Issues200Test.java
index a0c2182d..a6dfc4b0 100644
--- a/src/test/java/org/apache/commons/jexl3/Issues200Test.java
+++ b/src/test/java/org/apache/commons/jexl3/Issues200Test.java
@@ -494,7 +494,7 @@ public class Issues200Test extends JexlTestCase {
@Override
public void set(final String name, final Object value) {
if ("java".equals(name)) {
- throw new JexlException(null, "can not set " + name);
+ throw new JexlException(null, "cannot set " + name);
}
super.set(name, value);
}
diff --git a/src/test/java/org/apache/commons/jexl3/JXLTTest.java
b/src/test/java/org/apache/commons/jexl3/JXLTTest.java
index 70eddbdf..0a30af3e 100644
--- a/src/test/java/org/apache/commons/jexl3/JXLTTest.java
+++ b/src/test/java/org/apache/commons/jexl3/JXLTTest.java
@@ -1264,7 +1264,7 @@ public class JXLTTest extends JexlTestCase {
@MethodSource("engines")
void testSanboxed311i(final JexlBuilder builder) {
init(builder);
- /// this uberspect can not access jexl3 classes (besides test)
+ /// this uberspect cannot access jexl3 classes (besides test)
final Uberspect uberspect = new
Uberspect(LogFactory.getLog(JXLTTest.class), null, NOJEXL3);
final Method method = uberspect.getMethod(TemplateInterpreter.class,
"print", new Object[]{Integer.TYPE});
final JexlEngine jexl= new JexlBuilder().uberspect(uberspect).create();
@@ -1290,7 +1290,7 @@ public class JXLTTest extends JexlTestCase {
final String src = "Hello ${user}";
final JexlContext ctxt = new MapContext();
ctxt.set("user", "Francesco");
- /// this uberspect can not access jexl3 classes (besides test)
+ /// this uberspect cannot access jexl3 classes (besides test)
final Uberspect uberspect = new
Uberspect(LogFactory.getLog(JXLTTest.class), null, NOJEXL3);
final Method method = uberspect.getMethod(TemplateInterpreter.class,
"print", new Object[]{Integer.TYPE});
assertNull(method);
diff --git
a/src/test/java/org/apache/commons/jexl3/introspection/SandboxTest.java
b/src/test/java/org/apache/commons/jexl3/introspection/SandboxTest.java
index 4120e0d9..cd90ebec 100644
--- a/src/test/java/org/apache/commons/jexl3/introspection/SandboxTest.java
+++ b/src/test/java/org/apache/commons/jexl3/introspection/SandboxTest.java
@@ -340,7 +340,7 @@ class SandboxTest extends JexlTestCase {
final JexlExpression e0 = jexl.createExpression("{'bar' :
'foo'}['bar']");
final Object r0 = e0.evaluate(null);
assertEquals("foo", r0);
- // can not read quux, null
+ // cannot read quux, null
for (final String k : Arrays.asList("'quux'", "null")) {
final JexlExpression expression = jexl.createExpression("{" + k +
" : 'foo'}[" + k + "]");
assertTrue(
@@ -455,7 +455,7 @@ class SandboxTest extends JexlTestCase {
final JexlSandbox sandbox = new JexlSandbox();
// only allow call to currentTimeMillis (avoid exit, gc, loadLibrary,
etc.)
sandbox.allow(System.class.getName()).execute("currentTimeMillis");
- // can not create a new file
+ // cannot create a new file
sandbox.block(java.io.File.class.getName()).execute("");
final JexlEngine sjexl = new
JexlBuilder().permissions(JexlPermissions.UNRESTRICTED).sandbox(sandbox).safe(false).strict(true).create();
Object result;
@@ -563,7 +563,7 @@ class SandboxTest extends JexlTestCase {
final JexlSandbox.Permissions p = sandbox.permissions("java.util.Map",
true, false, true);
p.write().add("quux");
final JexlEngine jexl = new
JexlBuilder().arithmetic(a350).sandbox(sandbox).create();
- // can not write quux
+ // cannot write quux
final String q = "'quux'"; // quotes are important!
final JexlExpression expression1 = jexl.createExpression("{" + q + " :
'foo'}[" + q + "] = '42'");
assertTrue(assertThrows(JexlException.Property.class, () ->
expression1.evaluate(null), "should have blocked " +
q).getMessage().contains("undefined"));
@@ -592,7 +592,7 @@ class SandboxTest extends JexlTestCase {
expression.evaluate(null);
final Map<?, ?> map = a350.getLastMap();
assertEquals("42", map.get("bar"));
- // can not write quux, null
+ // cannot write quux, null
for (final String k : Arrays.asList("'quux'", "null")) {
final JexlExpression expression2 = jexl.createExpression("{" + k +
" : 'foo'}[" + k + "] = '42'");
assertTrue(assertThrows(JexlException.Property.class, () ->
expression2.evaluate(null), "should have blocked " + k).getMessage()
diff --git
a/src/test/java/org/apache/commons/jexl3/jexl342/ReferenceUberspect.java
b/src/test/java/org/apache/commons/jexl3/jexl342/ReferenceUberspect.java
index cdf38ed1..ac06d1ed 100644
--- a/src/test/java/org/apache/commons/jexl3/jexl342/ReferenceUberspect.java
+++ b/src/test/java/org/apache/commons/jexl3/jexl342/ReferenceUberspect.java
@@ -113,7 +113,7 @@ public class ReferenceUberspect implements JexlUberspect {
/**
* Find a reference handler for a given instance.
* @param ref the reference
- * @return the handler or null if object can not be handled
+ * @return the handler or null if object cannot be handled
*/
private static ReferenceHandler discoverHandler(final Object ref) {
// optional support
@@ -291,7 +291,7 @@ public class ReferenceUberspect implements JexlUberspect {
return null;
}
// obj is null means proper dereference of an optional; we don't have
an object,
- // we can not determine jexlGet, not a pb till we call with a not-null
object
+ // we cannot determine jexlGet, not a pb till we call with a not-null
object
// since the result is likely to be not null... TryInvoke will fail
and invoke will throw.
// from that object, get the property getter if any
JexlPropertyGet jexlGet = null;