[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/optimistic ...
Manik Surtani
msurtani at jboss.com
Sat Dec 30 14:48:48 EST 2006
User: msurtani
Date: 06/12/30 14:48:48
Modified: tests/functional/org/jboss/cache/optimistic
ComparatorTest.java
Log:
Genericised, autoboxed
Revision Changes Path
1.7 +124 -115 JBossCache/tests/functional/org/jboss/cache/optimistic/ComparatorTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ComparatorTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/ComparatorTest.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- ComparatorTest.java 10 Apr 2006 00:36:54 -0000 1.6
+++ ComparatorTest.java 30 Dec 2006 19:48:48 -0000 1.7
@@ -8,6 +8,7 @@
/**
* Tests {@link FqnComparator}.
+ *
* @author xenephon
*/
public class ComparatorTest extends TestCase
@@ -124,7 +125,7 @@
Fqn fqn1 = Fqn.fromString("/one/two");
List temp = new ArrayList();
- temp.add(new Integer(1234));
+ temp.add(1234);
Fqn fqn2 = new Fqn(temp);
assertTrue(comp.compare(fqn1, fqn2) > 0);
@@ -137,11 +138,11 @@
public void testOrdinaryObjectCompare()
{
- Fqn fqn1 = new Fqn(new Object[] {new XYZ(), new ABC()});
- Fqn fqn2 = new Fqn(new Object[] {"XYZ", "ABC"});
- Fqn fqn3 = new Fqn(new Object[] {"XYZ", new ABC()});
+ Fqn fqn1 = new Fqn(new Object[]{new XYZ(), new ABC()});
+ Fqn fqn2 = new Fqn(new Object[]{"XYZ", "ABC"});
+ Fqn fqn3 = new Fqn(new Object[]{"XYZ", new ABC()});
- Fqn fqn4 = new Fqn(new Object[] {"XYZ", new XYZ()});
+ Fqn fqn4 = new Fqn(new Object[]{"XYZ", new XYZ()});
assertEquals(0, comp.compare(fqn1, fqn2));
assertEquals(0, comp.compare(fqn1, fqn3));
@@ -165,12 +166,20 @@
}
*/
- private static class XYZ {
- public String toString() { return "XYZ"; }
+ private static class XYZ
+ {
+ public String toString()
+ {
+ return "XYZ";
+ }
}
- private static class ABC {
- public String toString() { return "ABC"; }
+ private static class ABC
+ {
+ public String toString()
+ {
+ return "ABC";
+ }
}
}
More information about the jboss-cvs-commits
mailing list