Skip to content

Commit

Permalink
remove useless class literals
Browse files Browse the repository at this point in the history
  • Loading branch information
mariofusco committed May 31, 2023
1 parent fc6024a commit 2eba49d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
7 changes: 0 additions & 7 deletions src/main/java/org/mvel2/compiler/AbstractParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -212,16 +212,9 @@ public static void setupParser() {
CLASS_LITERALS.put("ClassLoader", ClassLoader.class);
CLASS_LITERALS.put("Runtime", Runtime.class);
CLASS_LITERALS.put("Thread", Thread.class);
CLASS_LITERALS.put("Compiler", Compiler.class);
CLASS_LITERALS.put("StringBuffer", StringBuffer.class);
CLASS_LITERALS.put("ThreadLocal", ThreadLocal.class);
CLASS_LITERALS.put("SecurityManager", SecurityManager.class);
CLASS_LITERALS.put("StrictMath", StrictMath.class);

CLASS_LITERALS.put("Exception", Exception.class);

CLASS_LITERALS.put("Array", java.lang.reflect.Array.class);

CLASS_LITERALS.put("StringBuilder", StringBuilder.class);

// Setup LITERALS
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/mvel2/tests/core/ControlFlowTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ public void testNestedMethodCall() {

public void testStaticallyTypedItemInForEach() {
assertEquals("1234",
test("StringBuffer sbuf = new StringBuffer(); foreach (int i : new int[] { 1,2,3,4 })" +
test("java.lang.StringBuffer sbuf = new java.lang.StringBuffer(); foreach (int i : new int[] { 1,2,3,4 })" +
" { sbuf.append(i); }; sbuf.toString()"));
}

Expand Down

0 comments on commit 2eba49d

Please sign in to comment.