Author: bayard
Date: Thu Feb 3 18:37:55 2005
New Revision: 151296
URL: http://svn.apache.org/viewcvs?view=rev&rev=151296
Log:
removed tabs from source, as per checkstyle
Modified:
jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ClassUtils.java
jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/Validate.java
jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/StrTokenizer.java
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/BitFieldTest.java
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/BooleanUtilsTest.java
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/CharUtilsTest.java
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/ClassUtilsTest.java
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/NumberRangeTest.java
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/RandomStringUtilsTest.java
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/SerializationUtilsTest.java
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsEqualsIndexOfTest.java
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsIsTest.java
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsSubstringTest.java
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsTest.java
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsTrimEmptyTest.java
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/ValidateTest.java
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/CompareToBuilderTest.java
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/ToStringBuilderTest.java
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/enum/EnumTest.java
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/enum/ValuedEnumTest.java
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/enums/EnumTest.java
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/enums/ValuedEnumTest.java
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/exception/NestableDelegateTestCase.java
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/exception/NestableExceptionTestCase.java
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/InterpolationTest.java
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DateFormatUtilsTest.java
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DateUtilsTest.java
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DurationFormatUtilsTest.java
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/StopWatchTest.java
Modified:
jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ClassUtils.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ClassUtils.java?view=diff&r1=151295&r2=151296
==============================================================================
---
jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ClassUtils.java
(original)
+++
jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ClassUtils.java
Thu Feb 3 18:37:55 2005
@@ -170,7 +170,7 @@
* <p>Gets the package name from a <code>String</code>.</p>
*
* <p>The string passed in is assumed to be a class name - it is not
checked.</p>
- * <p>If the class is unpackaged, return an empty string.</p>
+ * <p>If the class is unpackaged, return an empty string.</p>
*
* @param className the className to get the package name for, may be
<code>null</code>
* @return the package name or an empty string
Modified:
jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/Validate.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/Validate.java?view=diff&r1=151295&r2=151296
==============================================================================
---
jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/Validate.java
(original)
+++
jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/Validate.java
Thu Feb 3 18:37:55 2005
@@ -35,7 +35,7 @@
* @author Gary Gregory
* @author Norm Deane
* @since 2.0
- * @version $Id: Validate.java,v 1.13 2004/10/08 21:44:41 scolebourne Exp $
+ * @version $Id$
*/
public class Validate {
// Validate has no dependencies on other classes in Commons Lang at present
@@ -508,13 +508,13 @@
* @since 2.1
*/
public static void allElementsOfType(Collection collection, Class clazz,
String message) {
- Validate.notNull(collection);
+ Validate.notNull(collection);
Validate.notNull(clazz);
- for (Iterator it = collection.iterator(); it.hasNext(); ) {
- if (clazz.isInstance(it.next()) == false) {
- throw new IllegalArgumentException(message);
- }
- }
+ for (Iterator it = collection.iterator(); it.hasNext(); ) {
+ if (clazz.isInstance(it.next()) == false) {
+ throw new IllegalArgumentException(message);
+ }
+ }
}
/**
@@ -533,15 +533,15 @@
* @since 2.1
*/
public static void allElementsOfType(Collection collection, Class clazz) {
- Validate.notNull(collection);
+ Validate.notNull(collection);
Validate.notNull(clazz);
- int i = 0;
- for (Iterator it = collection.iterator(); it.hasNext(); i++) {
+ int i = 0;
+ for (Iterator it = collection.iterator(); it.hasNext(); i++) {
if (clazz.isInstance(it.next()) == false) {
- throw new IllegalArgumentException("The validated
collection contains an element not of type "
+ throw new IllegalArgumentException("The validated collection
contains an element not of type "
+ clazz.getName() + " at index: " + i);
- }
- }
+ }
+ }
}
}
Modified:
jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/StrTokenizer.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/StrTokenizer.java?view=diff&r1=151295&r2=151296
==============================================================================
---
jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/StrTokenizer.java
(original)
+++
jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/text/StrTokenizer.java
Thu Feb 3 18:37:55 2005
@@ -73,7 +73,7 @@
* @author Stephen Colebourne
* @author Gary D. Gregory
* @since 2.1
- * @version $Id: StrTokenizer.java,v 1.6 2004/12/25 21:02:20 bayard Exp $
+ * @version $Id$
*/
public class StrTokenizer implements ListIterator, Cloneable {
@@ -839,20 +839,20 @@
/* Trim string based on the trimmer matcher */
while (trimmer.isMatch(chars, 1, start) > 0) {
- start++;
- }
+ start++;
+ }
- int length = Math.min(pos, len) - start;
+ int length = Math.min(pos, len) - start;
while (trimmer.isMatch(chars, 1, start + length - 1) > 0) {
- length--;
- }
+ length--;
+ }
for (int i=0;i<length;i++) {
- if (ignored.isMatch(chars, 1, start + i) == 0) {
- token.append(chars[start + i]);
- }
- }
+ if (ignored.isMatch(chars, 1, start + i) == 0) {
+ token.append(chars[start + i]);
+ }
+ }
return pos + delimLen;
Modified:
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/BitFieldTest.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/BitFieldTest.java?view=diff&r1=151295&r2=151296
==============================================================================
---
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/BitFieldTest.java
(original)
+++
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/BitFieldTest.java
Thu Feb 3 18:37:55 2005
@@ -26,7 +26,7 @@
* @author Scott Sanders
* @author Marc Johnson
* @author Glen Stampoultzis
- * @version $Id: BitFieldTest.java,v 1.4 2004/02/18 23:06:19 ggregory Exp $
+ * @version $Id$
*/
public class BitFieldTest extends TestCase {
@@ -35,8 +35,8 @@
}
public static Test suite() {
- TestSuite suite = new TestSuite(BitFieldTest.class);
- suite.setName("BitField Tests");
+ TestSuite suite = new TestSuite(BitFieldTest.class);
+ suite.setName("BitField Tests");
return suite;
}
Modified:
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/BooleanUtilsTest.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/BooleanUtilsTest.java?view=diff&r1=151295&r2=151296
==============================================================================
---
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/BooleanUtilsTest.java
(original)
+++
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/BooleanUtilsTest.java
Thu Feb 3 18:37:55 2005
@@ -28,7 +28,7 @@
*
* @author Stephen Colebourne
* @author Matthew Hawthorne
- * @version $Id: BooleanUtilsTest.java,v 1.10 2004/10/08 21:27:00 scolebourne
Exp $
+ * @version $Id$
*/
public class BooleanUtilsTest extends TestCase {
@@ -41,8 +41,8 @@
}
public static Test suite() {
- TestSuite suite = new TestSuite(BooleanUtilsTest.class);
- suite.setName("BooleanUtils Tests");
+ TestSuite suite = new TestSuite(BooleanUtilsTest.class);
+ suite.setName("BooleanUtils Tests");
return suite;
}
Modified:
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/CharUtilsTest.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/CharUtilsTest.java?view=diff&r1=151295&r2=151296
==============================================================================
---
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/CharUtilsTest.java
(original)
+++
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/CharUtilsTest.java
Thu Feb 3 18:37:55 2005
@@ -27,7 +27,7 @@
* Unit tests [EMAIL PROTECTED] org.apache.commons.lang.CharUtils}.
*
* @author Stephen Colebourne
- * @version $Id: CharUtilsTest.java,v 1.4 2004/03/10 23:23:46 scolebourne Exp $
+ * @version $Id$
*/
public class CharUtilsTest extends TestCase {
@@ -44,8 +44,8 @@
}
public static Test suite() {
- TestSuite suite = new TestSuite(CharUtilsTest.class);
- suite.setName("CharUtils Tests");
+ TestSuite suite = new TestSuite(CharUtilsTest.class);
+ suite.setName("CharUtils Tests");
return suite;
}
Modified:
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/ClassUtilsTest.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/ClassUtilsTest.java?view=diff&r1=151295&r2=151296
==============================================================================
---
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/ClassUtilsTest.java
(original)
+++
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/ClassUtilsTest.java
Thu Feb 3 18:37:55 2005
@@ -45,8 +45,8 @@
}
public static Test suite() {
- TestSuite suite = new TestSuite(ClassUtilsTest.class);
- suite.setName("ClassUtils Tests");
+ TestSuite suite = new TestSuite(ClassUtilsTest.class);
+ suite.setName("ClassUtils Tests");
return suite;
}
@@ -390,12 +390,12 @@
}
public static ClassLoader newSystemClassLoader() throws
SecurityException, IllegalArgumentException {
- ClassLoader scl = ClassLoader.getSystemClassLoader();
- if (!(scl instanceof URLClassLoader)) {
- fail("Need a better test set up.");
- }
- URLClassLoader urlScl = (URLClassLoader)scl;
- return URLClassLoader.newInstance(urlScl.getURLs(), null);
+ ClassLoader scl = ClassLoader.getSystemClassLoader();
+ if (!(scl instanceof URLClassLoader)) {
+ fail("Need a better test set up.");
+ }
+ URLClassLoader urlScl = (URLClassLoader)scl;
+ return URLClassLoader.newInstance(urlScl.getURLs(), null);
}
}
Modified:
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/NumberRangeTest.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/NumberRangeTest.java?view=diff&r1=151295&r2=151296
==============================================================================
---
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/NumberRangeTest.java
(original)
+++
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/NumberRangeTest.java
Thu Feb 3 18:37:55 2005
@@ -25,7 +25,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Christopher Elkins</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Ringo De Smet</a>
* @author Tim O'Brien
- * @version $Revision: 1.8 $ $Date: 2004/02/18 23:22:29 $
+ * @version $Revision: 1.8 $ $Date$
*/
public final class NumberRangeTest extends TestCase {
@@ -183,28 +183,28 @@
assertEquals("Unexpected max on NumberRange", 2.0,
nr.getMaximum().doubleValue(), Double.MIN_VALUE);
}
- public void testConstructorNullParameters() {
- try {
- NumberRange nr = new NumberRange(null);
- fail("NumberRange(null) did not throw an exception.");
- } catch (Exception e) {
- assertTrue( "NumberRange(null)", e instanceof
NullPointerException);
- }
-
- try {
- NumberRange nr = new NumberRange(five, null);
- fail("NumberRange(five, null) did not throw an
exception.");
- } catch (Exception e) {
- assertTrue("NumberRange(five, null)", e instanceof
NullPointerException);
- }
-
- try {
- NumberRange nr = new NumberRange(null, five);
- fail("NumberRange(null, five) did not throw an
exception.");
- } catch (Exception e) {
- assertTrue("NumberRange(null, five)", e instanceof
NullPointerException);
- }
- }
+ public void testConstructorNullParameters() {
+ try {
+ NumberRange nr = new NumberRange(null);
+ fail("NumberRange(null) did not throw an exception.");
+ } catch (Exception e) {
+ assertTrue( "NumberRange(null)", e instanceof
NullPointerException);
+ }
+
+ try {
+ NumberRange nr = new NumberRange(five, null);
+ fail("NumberRange(five, null) did not throw an exception.");
+ } catch (Exception e) {
+ assertTrue("NumberRange(five, null)", e instanceof
NullPointerException);
+ }
+
+ try {
+ NumberRange nr = new NumberRange(null, five);
+ fail("NumberRange(null, five) did not throw an exception.");
+ } catch (Exception e) {
+ assertTrue("NumberRange(null, five)", e instanceof
NullPointerException);
+ }
+ }
public void testConstructorWithMaxLessThanMin() {
NumberRange nr = new NumberRange( new Double(2.0), new Double(1.0));
Modified:
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/RandomStringUtilsTest.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/RandomStringUtilsTest.java?view=diff&r1=151295&r2=151296
==============================================================================
---
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/RandomStringUtilsTest.java
(original)
+++
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/RandomStringUtilsTest.java
Thu Feb 3 18:37:55 2005
@@ -29,7 +29,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Steven Caswell</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Ringo De Smet</a>
* @author Phil Steitz
- * @version $Id: RandomStringUtilsTest.java,v 1.13 2004/02/18 23:06:19
ggregory Exp $
+ * @version $Id$
*/
public class RandomStringUtilsTest extends junit.framework.TestCase {
/**
@@ -40,8 +40,8 @@
}
public static Test suite() {
- TestSuite suite = new TestSuite(RandomStringUtilsTest.class);
- suite.setName("RandomStringUtils Tests");
+ TestSuite suite = new TestSuite(RandomStringUtilsTest.class);
+ suite.setName("RandomStringUtils Tests");
return suite;
}
Modified:
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/SerializationUtilsTest.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/SerializationUtilsTest.java?view=diff&r1=151295&r2=151296
==============================================================================
---
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/SerializationUtilsTest.java
(original)
+++
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/SerializationUtilsTest.java
Thu Feb 3 18:37:55 2005
@@ -33,7 +33,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Stephen Colebourne</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Ringo De Smet</a>
- * @version $Id: SerializationUtilsTest.java,v 1.6 2004/02/18 23:06:19
ggregory Exp $
+ * @version $Id$
*/
public class SerializationUtilsTest extends TestCase {
private String iString;
@@ -49,8 +49,8 @@
}
public static Test suite() {
- TestSuite suite = new TestSuite(SerializationUtilsTest.class);
- suite.setName("SerializationUtils Tests");
+ TestSuite suite = new TestSuite(SerializationUtilsTest.class);
+ suite.setName("SerializationUtils Tests");
return suite;
}
Modified:
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsEqualsIndexOfTest.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsEqualsIndexOfTest.java?view=diff&r1=151295&r2=151296
==============================================================================
---
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsEqualsIndexOfTest.java
(original)
+++
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsEqualsIndexOfTest.java
Thu Feb 3 18:37:55 2005
@@ -26,7 +26,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Stephen Colebourne</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Ringo De Smet</a>
* @author Phil Steitz
- * @version $Id: StringUtilsEqualsIndexOfTest.java,v 1.10 2004/02/18 23:06:19
ggregory Exp $
+ * @version $Id$
*/
public class StringUtilsEqualsIndexOfTest extends TestCase {
private static final String FOO = "foo";
@@ -43,8 +43,8 @@
}
public static Test suite() {
- TestSuite suite = new TestSuite(StringUtilsEqualsIndexOfTest.class);
- suite.setName("StringUtilsEqualsIndexOf Tests");
+ TestSuite suite = new TestSuite(StringUtilsEqualsIndexOfTest.class);
+ suite.setName("StringUtilsEqualsIndexOf Tests");
return suite;
}
Modified:
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsIsTest.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsIsTest.java?view=diff&r1=151295&r2=151296
==============================================================================
---
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsIsTest.java
(original)
+++
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsIsTest.java
Thu Feb 3 18:37:55 2005
@@ -25,7 +25,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Stephen Colebourne</a>
* @author Michael Davey
- * @version $Id: StringUtilsIsTest.java,v 1.9 2004/02/24 22:31:43 fredrik Exp $
+ * @version $Id$
*/
public class StringUtilsIsTest extends TestCase {
@@ -38,8 +38,8 @@
}
public static Test suite() {
- TestSuite suite = new TestSuite(StringUtilsIsTest.class);
- suite.setName("StringUtilsIsXxx Tests");
+ TestSuite suite = new TestSuite(StringUtilsIsTest.class);
+ suite.setName("StringUtilsIsXxx Tests");
return suite;
}
Modified:
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsSubstringTest.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsSubstringTest.java?view=diff&r1=151295&r2=151296
==============================================================================
---
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsSubstringTest.java
(original)
+++
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsSubstringTest.java
Thu Feb 3 18:37:55 2005
@@ -26,7 +26,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Stephen Colebourne</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Ringo De Smet</a>
* @author Phil Steitz
- * @version $Id: StringUtilsSubstringTest.java,v 1.14 2004/02/18 23:06:19
ggregory Exp $
+ * @version $Id$
*/
public class StringUtilsSubstringTest extends TestCase {
private static final String FOO = "foo";
@@ -44,8 +44,8 @@
}
public static Test suite() {
- TestSuite suite = new TestSuite(StringUtilsSubstringTest.class);
- suite.setName("StringUtilsSubstring Tests");
+ TestSuite suite = new TestSuite(StringUtilsSubstringTest.class);
+ suite.setName("StringUtilsSubstring Tests");
return suite;
}
Modified:
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsTest.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsTest.java?view=diff&r1=151295&r2=151296
==============================================================================
---
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsTest.java
(original)
+++
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsTest.java
Thu Feb 3 18:37:55 2005
@@ -98,8 +98,8 @@
}
public static Test suite() {
- TestSuite suite = new TestSuite(StringUtilsTest.class);
- suite.setName("StringUtilsTest Tests");
+ TestSuite suite = new TestSuite(StringUtilsTest.class);
+ suite.setName("StringUtilsTest Tests");
return suite;
}
Modified:
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsTrimEmptyTest.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsTrimEmptyTest.java?view=diff&r1=151295&r2=151296
==============================================================================
---
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsTrimEmptyTest.java
(original)
+++
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsTrimEmptyTest.java
Thu Feb 3 18:37:55 2005
@@ -25,7 +25,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Stephen Colebourne</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Ringo De Smet</a>
- * @version $Id: StringUtilsTrimEmptyTest.java,v 1.17 2004/02/18 23:06:19
ggregory Exp $
+ * @version $Id$
*/
public class StringUtilsTrimEmptyTest extends TestCase {
private static final String FOO = "foo";
@@ -39,8 +39,8 @@
}
public static Test suite() {
- TestSuite suite = new TestSuite(StringUtilsTrimEmptyTest.class);
- suite.setName("StringUtilsTrimEmpty Tests");
+ TestSuite suite = new TestSuite(StringUtilsTrimEmptyTest.class);
+ suite.setName("StringUtilsTrimEmpty Tests");
return suite;
}
Modified:
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/ValidateTest.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/ValidateTest.java?view=diff&r1=151295&r2=151296
==============================================================================
---
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/ValidateTest.java
(original)
+++
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/ValidateTest.java
Thu Feb 3 18:37:55 2005
@@ -30,7 +30,7 @@
*
* @author Stephen Colebourne
* @author Norm Deane
- * @version $Id: ValidateTest.java,v 1.6 2004/10/08 21:44:41 scolebourne Exp $
+ * @version $Id$
*/
public class ValidateTest extends TestCase {
@@ -43,8 +43,8 @@
}
public static Test suite() {
- TestSuite suite = new TestSuite(ValidateTest.class);
- suite.setName("Validate Tests");
+ TestSuite suite = new TestSuite(ValidateTest.class);
+ suite.setName("Validate Tests");
return suite;
}
@@ -359,23 +359,23 @@
//-----------------------------------------------------------------------
public void testAllElementsOfType() {
- List coll = new ArrayList();
- coll.add("a");
- coll.add("b");
- Validate.allElementsOfType(coll, String.class, "MSG");
- try {
- Validate.allElementsOfType(coll, Integer.class, "MSG");
- fail("Expecting IllegalArgumentException");
- } catch (IllegalArgumentException ex) {
- assertEquals("MSG", ex.getMessage());
- }
- coll.set(1, Boolean.FALSE);
- try {
- Validate.allElementsOfType(coll, String.class);
- fail("Expecting IllegalArgumentException");
- } catch (IllegalArgumentException ex) {
- assertEquals("The validated collection contains an element not
of type java.lang.String at index: 1", ex.getMessage());
- }
+ List coll = new ArrayList();
+ coll.add("a");
+ coll.add("b");
+ Validate.allElementsOfType(coll, String.class, "MSG");
+ try {
+ Validate.allElementsOfType(coll, Integer.class, "MSG");
+ fail("Expecting IllegalArgumentException");
+ } catch (IllegalArgumentException ex) {
+ assertEquals("MSG", ex.getMessage());
+ }
+ coll.set(1, Boolean.FALSE);
+ try {
+ Validate.allElementsOfType(coll, String.class);
+ fail("Expecting IllegalArgumentException");
+ } catch (IllegalArgumentException ex) {
+ assertEquals("The validated collection contains an element not of
type java.lang.String at index: 1", ex.getMessage());
+ }
coll = new ArrayList();
coll.add(new Integer(5));
Modified:
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/CompareToBuilderTest.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/CompareToBuilderTest.java?view=diff&r1=151295&r2=151296
==============================================================================
---
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/CompareToBuilderTest.java
(original)
+++
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/CompareToBuilderTest.java
Thu Feb 3 18:37:55 2005
@@ -27,7 +27,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Steve Downey</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Stephen Colebourne</a>
- * @version $Id: CompareToBuilderTest.java,v 1.8 2004/02/18 23:00:51 ggregory
Exp $
+ * @version $Id$
*/
public class CompareToBuilderTest extends TestCase {
@@ -77,10 +77,10 @@
public int getA() {
return a;
}
- public int compareTo(Object o) {
- TestObject rhs = (TestObject) o;
- return (a < rhs.a) ? -1 : (a > rhs.a) ? +1 : 0;
- }
+ public int compareTo(Object o) {
+ TestObject rhs = (TestObject) o;
+ return (a < rhs.a) ? -1 : (a > rhs.a) ? +1 : 0;
+ }
}
static class TestSubObject extends TestObject {
Modified:
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/ToStringBuilderTest.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/ToStringBuilderTest.java?view=diff&r1=151295&r2=151296
==============================================================================
---
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/ToStringBuilderTest.java
(original)
+++
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/builder/ToStringBuilderTest.java
Thu Feb 3 18:37:55 2005
@@ -30,7 +30,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Stephen Colebourne</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Gary Gregory</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Alex Chaffee</a>
- * @version $Id: ToStringBuilderTest.java,v 1.16 2004/07/26 21:39:21 ggregory
Exp $
+ * @version $Id$
*/
public class ToStringBuilderTest extends TestCase {
@@ -355,15 +355,15 @@
this.validateEmptyReflectionRegistry();
}
- static class ReflectionTestFixtureA {
- private char a='a';
+ static class ReflectionTestFixtureA {
+ private char a='a';
private transient char transientA='t';
- }
+ }
- static class ReflectionTestFixtureB extends ReflectionTestFixtureA {
- private char b='b';
+ static class ReflectionTestFixtureB extends ReflectionTestFixtureA {
+ private char b='b';
private transient char transientB='t';
- }
+ }
public void testInnerClassReflection() {
Outer outer = new Outer();
Modified:
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/enum/EnumTest.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/enum/EnumTest.java?view=diff&r1=151295&r2=151296
==============================================================================
---
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/enum/EnumTest.java
(original)
+++
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/enum/EnumTest.java
Thu Feb 3 18:37:55 2005
@@ -35,7 +35,7 @@
*
* @author Stephen Colebourne
* @author Gary D. Gregory
- * @version $Id: EnumTest.java,v 1.17 2004/02/18 23:01:51 ggregory Exp $
+ * @version $Id$
*/
public final class EnumTest extends TestCase {
@@ -105,7 +105,7 @@
assertNotNull(list);
assertEquals( list.size(),
- ColorEnum.getEnumMap().keySet().size());
+ ColorEnum.getEnumMap().keySet().size());
Iterator it = list.iterator();
assertSame(ColorEnum.RED, it.next());
Modified:
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/enum/ValuedEnumTest.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/enum/ValuedEnumTest.java?view=diff&r1=151295&r2=151296
==============================================================================
---
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/enum/ValuedEnumTest.java
(original)
+++
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/enum/ValuedEnumTest.java
Thu Feb 3 18:37:55 2005
@@ -28,7 +28,7 @@
* Test cases for the [EMAIL PROTECTED] Enum} class.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Stephen Colebourne</a>
- * @version $Id: ValuedEnumTest.java,v 1.7 2004/02/18 23:22:29 ggregory Exp $
+ * @version $Id$
*/
public final class ValuedEnumTest extends TestCase {
@@ -88,7 +88,7 @@
assertNotNull(list);
assertEquals( list.size(),
- ValuedColorEnum.getEnumMap().keySet().size());
+ ValuedColorEnum.getEnumMap().keySet().size());
Iterator it = list.iterator();
assertSame(ValuedColorEnum.RED, it.next());
@@ -102,8 +102,8 @@
assertNotNull(map);
assertEquals( map.keySet().size(),
- ValuedColorEnum.getEnumList().size());
-
+ ValuedColorEnum.getEnumList().size());
+
assertTrue(map.containsValue(ValuedColorEnum.RED));
assertTrue(map.containsValue(ValuedColorEnum.GREEN));
assertTrue(map.containsValue(ValuedColorEnum.BLUE));
Modified:
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/enums/EnumTest.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/enums/EnumTest.java?view=diff&r1=151295&r2=151296
==============================================================================
---
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/enums/EnumTest.java
(original)
+++
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/enums/EnumTest.java
Thu Feb 3 18:37:55 2005
@@ -35,7 +35,7 @@
*
* @author Stephen Colebourne
* @author Gary D. Gregory
- * @version $Id: EnumTest.java,v 1.1 2004/02/23 04:34:20 ggregory Exp $
+ * @version $Id$
*/
public final class EnumTest extends TestCase {
@@ -105,7 +105,7 @@
assertNotNull(list);
assertEquals( list.size(),
- ColorEnum.getEnumMap().keySet().size());
+ ColorEnum.getEnumMap().keySet().size());
Iterator it = list.iterator();
assertSame(ColorEnum.RED, it.next());
Modified:
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/enums/ValuedEnumTest.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/enums/ValuedEnumTest.java?view=diff&r1=151295&r2=151296
==============================================================================
---
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/enums/ValuedEnumTest.java
(original)
+++
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/enums/ValuedEnumTest.java
Thu Feb 3 18:37:55 2005
@@ -28,7 +28,7 @@
* Test cases for the [EMAIL PROTECTED] Enum} class.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Stephen Colebourne</a>
- * @version $Id: ValuedEnumTest.java,v 1.1 2004/02/23 04:34:20 ggregory Exp $
+ * @version $Id$
*/
public final class ValuedEnumTest extends TestCase {
@@ -88,7 +88,7 @@
assertNotNull(list);
assertEquals( list.size(),
- ValuedColorEnum.getEnumMap().keySet().size());
+ ValuedColorEnum.getEnumMap().keySet().size());
Iterator it = list.iterator();
assertSame(ValuedColorEnum.RED, it.next());
@@ -102,8 +102,8 @@
assertNotNull(map);
assertEquals( map.keySet().size(),
- ValuedColorEnum.getEnumList().size());
-
+ ValuedColorEnum.getEnumList().size());
+
assertTrue(map.containsValue(ValuedColorEnum.RED));
assertTrue(map.containsValue(ValuedColorEnum.GREEN));
assertTrue(map.containsValue(ValuedColorEnum.BLUE));
Modified:
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/exception/NestableDelegateTestCase.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/exception/NestableDelegateTestCase.java?view=diff&r1=151295&r2=151296
==============================================================================
---
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/exception/NestableDelegateTestCase.java
(original)
+++
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/exception/NestableDelegateTestCase.java
Thu Feb 3 18:37:55 2005
@@ -30,7 +30,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Steven Caswell</a>
* @author <a href="mailto:[email protected]">Daniel Rall</a>
- * @version $Id: NestableDelegateTestCase.java,v 1.10 2004/12/25 19:50:09
bayard Exp $
+ * @version $Id$
*/
public class NestableDelegateTestCase extends junit.framework.TestCase {
private static final String CONSTRUCTOR_FAILED_MSG =
@@ -521,7 +521,7 @@
// Only testing the flags for jdk1.3 and below
if (!ExceptionUtils.isThrowableNested()) {
- NestableDelegate.topDown = true;
NestableDelegate.trimStackFrames = true;
+ NestableDelegate.topDown = true; NestableDelegate.trimStackFrames
= true;
checkStackTrace(d, true, true,
NestableDelegateTester1.class.getName()+": level 1", 24);
NestableDelegate.topDown = true; NestableDelegate.trimStackFrames
= false;
checkStackTrace(d, true, false,
NestableDelegateTester1.class.getName()+": level 1", 80);
Modified:
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/exception/NestableExceptionTestCase.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/exception/NestableExceptionTestCase.java?view=diff&r1=151295&r2=151296
==============================================================================
---
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/exception/NestableExceptionTestCase.java
(original)
+++
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/exception/NestableExceptionTestCase.java
Thu Feb 3 18:37:55 2005
@@ -30,7 +30,7 @@
* Tests the org.apache.commons.lang.exception.NestableException class.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Steven Caswell</a>
- * @version $Id: NestableExceptionTestCase.java,v 1.12 2004/10/09 10:45:24
scolebourne Exp $
+ * @version $Id$
*/
public class NestableExceptionTestCase extends AbstractNestableTestCase {
@@ -252,61 +252,61 @@
}
public void testSerialization()
- throws java.io.IOException, ClassNotFoundException
+ throws java.io.IOException, ClassNotFoundException
{
- RuntimeException nestedEx = new RuntimeException("nested exception
message");
- NestableExceptionTester1 ex = new
NestableExceptionTester1("serialization test", nestedEx);
+ RuntimeException nestedEx = new RuntimeException("nested exception
message");
+ NestableExceptionTester1 ex = new
NestableExceptionTester1("serialization test", nestedEx);
- assertTrue( "implements java.io.Serializable", nestedEx
instanceof java.io.Serializable);
-
- assertTrue( "implements java.io.Serializable", ex instanceof
java.io.Serializable);
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- ByteArrayInputStream bais = null;
- ObjectOutputStream oos = null;
- ObjectInputStream ois = null;
+ assertTrue( "implements java.io.Serializable", nestedEx instanceof
java.io.Serializable);
+
+ assertTrue( "implements java.io.Serializable", ex instanceof
java.io.Serializable);
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ByteArrayInputStream bais = null;
+ ObjectOutputStream oos = null;
+ ObjectInputStream ois = null;
- try
- {
- oos = new ObjectOutputStream(baos);
- oos.writeObject(ex);
- oos.flush();
- bais = new ByteArrayInputStream(baos.toByteArray());
- ois = new ObjectInputStream(bais);
- NestableExceptionTester1 deserializedEx =
(NestableExceptionTester1) ois.readObject();
- assertEquals(
- "getThrowableCount() return value",
- ex.getThrowableCount(),
-
deserializedEx.getThrowableCount());
-
- for (int i = 0; i < ex.getThrowableCount(); i++)
- {
- Throwable t = ex.getThrowable(i);
- Throwable deserializedThrowable =
deserializedEx.getThrowable(i);
-
- assertEquals( t.getClass(),
-
deserializedThrowable.getClass());
-
- assertEquals(
- t.getMessage(),
- deserializedThrowable.getMessage());
- }
- }
- finally
- {
- if (null != oos)
- {
- try
- {
- oos.close();
- }
- catch (Exception ignored)
- {
- // intentionally empty
- }
- }
- }
-
+ try
+ {
+ oos = new ObjectOutputStream(baos);
+ oos.writeObject(ex);
+ oos.flush();
+ bais = new ByteArrayInputStream(baos.toByteArray());
+ ois = new ObjectInputStream(bais);
+ NestableExceptionTester1 deserializedEx =
(NestableExceptionTester1) ois.readObject();
+ assertEquals(
+ "getThrowableCount() return value",
+ ex.getThrowableCount(),
+ deserializedEx.getThrowableCount());
+
+ for (int i = 0; i < ex.getThrowableCount(); i++)
+ {
+ Throwable t = ex.getThrowable(i);
+ Throwable deserializedThrowable =
deserializedEx.getThrowable(i);
+
+ assertEquals( t.getClass(),
+ deserializedThrowable.getClass());
+
+ assertEquals(
+ t.getMessage(),
+ deserializedThrowable.getMessage());
+ }
+ }
+ finally
+ {
+ if (null != oos)
+ {
+ try
+ {
+ oos.close();
+ }
+ catch (Exception ignored)
+ {
+ // intentionally empty
+ }
+ }
+ }
+
}
}
Modified:
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/InterpolationTest.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/InterpolationTest.java?view=diff&r1=151295&r2=151296
==============================================================================
---
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/InterpolationTest.java
(original)
+++
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/InterpolationTest.java
Thu Feb 3 18:37:55 2005
@@ -28,7 +28,7 @@
*
* @author Henri Yandell
* @author Ken Fitzpatrick
- * @version $Id: InterpolationTest.java,v 1.1 2004/09/05 00:56:31 bayard Exp $
+ * @version $Id$
*/
public class InterpolationTest extends TestCase {
@@ -45,8 +45,8 @@
}
public static Test suite() {
- TestSuite suite = new TestSuite(InterpolationTest.class);
- suite.setName("Interpolation Tests");
+ TestSuite suite = new TestSuite(InterpolationTest.class);
+ suite.setName("Interpolation Tests");
return suite;
}
Modified:
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DateFormatUtilsTest.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DateFormatUtilsTest.java?view=diff&r1=151295&r2=151296
==============================================================================
---
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DateFormatUtilsTest.java
(original)
+++
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DateFormatUtilsTest.java
Thu Feb 3 18:37:55 2005
@@ -41,8 +41,8 @@
}
public static Test suite() {
- TestSuite suite = new TestSuite(DateFormatUtilsTest.class);
- suite.setName("DateFormatUtils Tests");
+ TestSuite suite = new TestSuite(DateFormatUtilsTest.class);
+ suite.setName("DateFormatUtils Tests");
return suite;
}
Modified:
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DateUtilsTest.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DateUtilsTest.java?view=diff&r1=151295&r2=151296
==============================================================================
---
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DateUtilsTest.java
(original)
+++
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DateUtilsTest.java
Thu Feb 3 18:37:55 2005
@@ -81,8 +81,8 @@
}
public static Test suite() {
- TestSuite suite = new TestSuite(DateUtilsTest.class);
- suite.setName("DateUtils Tests");
+ TestSuite suite = new TestSuite(DateUtilsTest.class);
+ suite.setName("DateUtils Tests");
return suite;
}
Modified:
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DurationFormatUtilsTest.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DurationFormatUtilsTest.java?view=diff&r1=151295&r2=151296
==============================================================================
---
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DurationFormatUtilsTest.java
(original)
+++
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DurationFormatUtilsTest.java
Thu Feb 3 18:37:55 2005
@@ -42,8 +42,8 @@
}
public static Test suite() {
- TestSuite suite = new TestSuite(DurationFormatUtilsTest.class);
- suite.setName("DurationFormatUtils Tests");
+ TestSuite suite = new TestSuite(DurationFormatUtilsTest.class);
+ suite.setName("DurationFormatUtils Tests");
return suite;
}
Modified:
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/StopWatchTest.java
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/StopWatchTest.java?view=diff&r1=151295&r2=151296
==============================================================================
---
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/StopWatchTest.java
(original)
+++
jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/StopWatchTest.java
Thu Feb 3 18:37:55 2005
@@ -33,8 +33,8 @@
}
public static Test suite() {
- TestSuite suite = new TestSuite(StopWatchTest.class);
- suite.setName("StopWatch Tests");
+ TestSuite suite = new TestSuite(StopWatchTest.class);
+ suite.setName("StopWatch Tests");
return suite;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]