Skip to content

Commit 0ec087c

Browse files
committed
cbore: typo and comments
1 parent ad9a3f1 commit 0ec087c

3 files changed

Lines changed: 13 additions & 16 deletions

File tree

src/main/java/com/googlecode/aviator/AviatorEvaluator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ public static AviatorFunction removeOpFunction(final OperatorType opType) {
430430

431431

432432
/**
433-
* Check if the function is existed in aviator
433+
* Check if the function exists in the global evaluator instance.
434434
*
435435
* @param name
436436
* @return

src/main/java/com/googlecode/aviator/AviatorEvaluatorInstance.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,7 +1327,7 @@ public AviatorFunction removeOpFunction(final OperatorType opType) {
13271327
}
13281328

13291329
/**
1330-
* Check if the function is existed in evaluator. Note: it doesn't check the runtime defined
1330+
* Check if the function exists in the evaluator. Note: it doesn't check the runtime defined
13311331
* functions.
13321332
*
13331333
* @param name
@@ -1337,13 +1337,10 @@ public boolean containsFunction(final String name) {
13371337
boolean exists = this.funcMap.containsKey(name);
13381338
if (!exists && this.functionLoaders != null) {
13391339
for (FunctionLoader loader : this.functionLoaders) {
1340-
if (loader != null) {
1341-
if (loader.onFunctionNotFound(name) != null) {
1342-
exists = true;
1343-
break;
1344-
}
1340+
if (loader != null && loader.onFunctionNotFound(name) != null) {
1341+
exists = true;
1342+
break;
13451343
}
1346-
13471344
}
13481345
}
13491346

src/main/java/com/googlecode/aviator/Expression.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,18 @@
2929
public interface Expression extends Serializable {
3030

3131
/**
32-
* Execute expression with environment
32+
* Execute an expression with an environment, returns the result.
3333
*
3434
* @param env Binding variable environment
35-
* @return
35+
* @return the result of execution
3636
*/
3737
Object execute(Map<String, Object> env);
3838

3939

4040
/**
41-
* Execute expression with empty environment
41+
* Execute an expression with an empty environment, returns the result.
4242
*
43-
* @return
43+
* @return the result of execution
4444
*/
4545
Object execute();
4646

@@ -55,7 +55,7 @@ public interface Expression extends Serializable {
5555

5656
/**
5757
* Returns this expression's all uninitialized global variable names in order when using
58-
* AviatorEvaluator.EVAL mode,else returns an empty list.
58+
* AviatorEvaluator.EVAL mode, otherwise returns an empty list.
5959
*
6060
* @see com.googlecode.aviator.AviatorEvaluator#EVAL
6161
* @return
@@ -65,7 +65,7 @@ public interface Expression extends Serializable {
6565

6666
/**
6767
* Returns this expression's all uninitialized global variable full names(contains dot) in order
68-
* when using AviatorEvaluator.EVAL mode,else returns an empty list.
68+
* when using AviatorEvaluator.EVAL mode, otherwise returns an empty list.
6969
*
7070
* @return
7171
*/
@@ -90,8 +90,8 @@ public interface Expression extends Serializable {
9090
String addSymbol(String name);
9191

9292
/**
93-
* Returns the function names in the expression when using AviatorEvaluator.EVAL mode,else returns
94-
* an empty list.
93+
* Returns the function names in the expression when using AviatorEvaluator.EVAL mode, otherwise
94+
* returns an empty list.
9595
*
9696
* @since 5.4.2
9797
* @return the function name list

0 commit comments

Comments
 (0)