Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Feb 9, 2024
1 parent e175f54 commit 6a62577
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public Uberspect(final Log runtimeLogger, final JexlUberspect.ResolverStrategy s
ref = new SoftReference<>(null);
loader = new SoftReference<>(getClass().getClassLoader());
operatorMap = new ConcurrentHashMap<>();
version = new AtomicInteger(0);
version = new AtomicInteger();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
*/
public class CollectionLiteralTest extends JexlTestCase {
public static class Arithmetic363 extends JexlArithmetic {
final AtomicInteger maps = new AtomicInteger(0);
final AtomicInteger sets = new AtomicInteger(0);
final AtomicInteger arrays = new AtomicInteger(0);
final AtomicInteger maps = new AtomicInteger();
final AtomicInteger sets = new AtomicInteger();
final AtomicInteger arrays = new AtomicInteger();

public Arithmetic363(final boolean strict) {
super(strict);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public void setVAT(final double vat) {
}
}

static AtomicInteger nsnsCtor = new AtomicInteger(0);
static AtomicInteger nsnsCtor = new AtomicInteger();

public ContextNamespaceTest() {
super("ContextNamespaceTest");
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/apache/commons/jexl3/Issues300Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public boolean isStrict(final JexlOperator op) {
}

public static class Arithmetic384c extends JexlArithmetic {
AtomicInteger cmp = new AtomicInteger(0);
AtomicInteger cmp = new AtomicInteger();
public Arithmetic384c(final boolean astrict) {
super(astrict);
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/apache/commons/jexl3/PragmaTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
public class PragmaTest extends JexlTestCase {
public static class CachingModuleContext extends ModuleContext implements JexlContext.ModuleProcessor {
private final ConcurrentMap<String, Object> modules = new ConcurrentHashMap<>();
private final AtomicInteger count = new AtomicInteger(0);
private final AtomicInteger count = new AtomicInteger();

CachingModuleContext() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ public class SynchronizedArithmetic extends JexlArithmetic {
*/
public static abstract class AbstractMonitor {
/* Counts the number of times enter is called. */
private final AtomicInteger enters = new AtomicInteger(0);
private final AtomicInteger enters = new AtomicInteger();
/* Counts the number of times exit is called. */
private final AtomicInteger exits = new AtomicInteger(0);
private final AtomicInteger exits = new AtomicInteger();

/**
* The number of enter calls.
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/example/SomeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public Object interpret(final JexlNode node) {
}

/** Counting the number of node interpretation calls. */
static AtomicInteger CALL406 = new AtomicInteger(0);
static AtomicInteger CALL406 = new AtomicInteger();

@Test
public void test406b() {
Expand Down

0 comments on commit 6a62577

Please sign in to comment.