Author: sebb
Date: Mon Nov 30 17:16:13 2009
New Revision: 885505
URL: http://svn.apache.org/viewvc?rev=885505&view=rev
Log:
Reduce visibility of "strict" variable (there is a getter)
Document why casts are safe
Modified:
commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java
Modified:
commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java
URL:
http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java?rev=885505&r1=885504&r2=885505&view=diff
==============================================================================
---
commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java
(original)
+++
commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java
Mon Nov 30 17:16:13 2009
@@ -51,7 +51,7 @@
/** Long.MIN_VALUE as BigInteger. */
protected static final BigInteger BIGI_LONG_MIN_VALUE =
BigInteger.valueOf(Long.MIN_VALUE);
/** Whether this JexlArithmetic instance behaves in strict or lenient
mode. */
- protected boolean strict;
+ private boolean strict;
/**
* Creates a JexlArithmetic.
@@ -535,11 +535,11 @@
String rightString = right.toString();
return leftString.compareTo(rightString) < 0;
} else if (left instanceof Comparable<?>) {
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("unchecked") // OK because of instanceof check
above
final Comparable<Object> comparable = (Comparable<Object>) left;
return comparable.compareTo(right) < 0;
} else if (right instanceof Comparable<?>) {
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("unchecked") // OK because of instanceof check
above
final Comparable<Object> comparable = (Comparable<Object>) right;
return comparable.compareTo(left) > 0;
}