[prev in list] [next in list] [prev in thread] [next in thread]
List: jakarta-commons-dev
Subject: svn commit: r885490 - in
From: sebb () apache ! org
Date: 2009-11-30 16:50:24
Message-ID: 20091130165024.C6C632388996 () eris ! apache ! org
[Download RAW message or body]
Author: sebb
Date: Mon Nov 30 16:50:24 2009
New Revision: 885490
URL: http://svn.apache.org/viewvc?rev=885490&view=rev
Log:
Reduce visibility and mutability where possible
Modified:
commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ArrayAccessTest.java
commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/CacheTest.java
commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/UnifiedJEXLTest.java
commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/util/introspection/MethodKeyTest.java
Modified: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ArrayAccessTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ArrayAccessTest.java?rev=885490&r1=885489&r2=885490&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ArrayAccessTest.java \
(original)
+++ commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/ArrayAccessTest.java \
Mon Nov 30 16:50:24 2009 @@ -33,11 +33,14 @@
private Asserter asserter;
- protected static final String GET_METHOD_STRING = "GetMethod string";
- protected static final String[] GET_METHOD_ARRAY =
+ private static final String GET_METHOD_STRING = "GetMethod string";
+
+ // Needs to be accessible by Foo.class
+ static final String[] GET_METHOD_ARRAY =
new String[] { "One", "Two", "Three" };
- protected static final String[][] GET_METHOD_ARRAY2 =
+ // Needs to be accessible by Foo.class
+ static final String[][] GET_METHOD_ARRAY2 =
new String[][] { {"One", "Two", "Three"},{"Four", "Five", "Six"} };
@Override
Modified: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/CacheTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/CacheTest.java?rev=885490&r1=885489&r2=885490&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/CacheTest.java \
(original)
+++ commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/CacheTest.java \
Mon Nov 30 16:50:24 2009 @@ -26,16 +26,16 @@
public CacheTest(String testName) {
super(testName);
}
- static JexlEngine jexl = new JexlEngine();
+ private static final JexlEngine jexl = new JexlEngine();
static {
jexl.setCache(512);
jexl.setLenient(false);
jexl.setSilent(false);
}
- static int LOOPS = 1024;
+ private static final int LOOPS = 1024;
// A pseudo random mix of accessors
- static int[] MIX = {
+ private static final int[] MIX = {
0, 0, 3, 3, 4, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 1, 1, 1, 2, 2, 2,
3, 3, 3, 4, 4, 4, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 2, 2, 3, 3, 0
};
Modified: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/UnifiedJEXLTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/UnifiedJEXLTest.java?rev=885490&r1=885489&r2=885490&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/UnifiedJEXLTest.java \
(original)
+++ commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/UnifiedJEXLTest.java \
Mon Nov 30 16:50:24 2009 @@ -29,10 +29,10 @@
ENGINE.setSilent(false);
ENGINE.setCache(128);
}
- static UnifiedJEXL EL = new UnifiedJEXL(ENGINE);
- static Log LOG = LogFactory.getLog(UnifiedJEXL.class);
- JexlContext context = null;
- Map<String,Object> vars =null;
+ private static final UnifiedJEXL EL = new UnifiedJEXL(ENGINE);
+ private static final Log LOG = LogFactory.getLog(UnifiedJEXL.class);
+ private JexlContext context = null;
+ private Map<String,Object> vars =null;
@Override
public void setUp() throws Exception {
Modified: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/util/introspection/MethodKeyTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/c \
ommons/jexl2/util/introspection/MethodKeyTest.java?rev=885490&r1=885489&r2=885490&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/util/introspection/MethodKeyTest.java \
(original)
+++ commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/util/introspection/MethodKeyTest.java \
Mon Nov 30 16:50:24 2009 @@ -21,7 +21,7 @@
*/
public class MethodKeyTest extends TestCase {
// A set of classes (most of them primitives)
- static Class<?>[] PRIMS = {
+ private static final Class<?>[] PRIMS = {
Boolean.TYPE,
Byte.TYPE,
Character.TYPE,
@@ -35,7 +35,7 @@
};
// A set of instances corresponding to the classes
- static Object[] ARGS = {
+ private static final Object[] ARGS = {
new Boolean(true),
new Byte((byte) 1),
new Character('2'),
@@ -49,7 +49,7 @@
};
// A set of (pseudo) method names
- static String[] METHODS = {
+ private static final String[] METHODS = {
"plus",
"minus",
"execute",
@@ -75,14 +75,14 @@
};
/** from key to string */
- static java.util.Map< MethodKey, String> byKey;
+ private static final java.util.Map< MethodKey, String> byKey;
/** form string to key */
- static java.util.Map<String,MethodKey> byString;
+ private static final java.util.Map<String,MethodKey> byString;
/** the list of keys we generated & test against */
- static MethodKey[] keyList;
+ private static final MethodKey[] keyList;
/** Creates & inserts a key into the byKey & byString map */
- static void setUpKey(String name, Class<?>[] parms) {
+ private static void setUpKey(String name, Class<?>[] parms) {
MethodKey key = new MethodKey(name, parms);
String str = key.toString();
byKey.put(key, str);
@@ -162,7 +162,7 @@
}
- static final int LOOP = 3;//00;
+ private static final int LOOP = 3;//00;
public void testPerfKey() throws Exception {
for(int l = 0; l < LOOP; ++l)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic