Add missing @Override markers

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@753660 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2009-03-14 14:00:22 +00:00
parent 94036044a4
commit 80941d0b80
58 changed files with 197 additions and 6 deletions

View File

@ -47,10 +47,12 @@ public class BooleanUtilsTest extends TestCase {
return suite;
}
@Override
protected void setUp() throws Exception {
super.setUp();
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
}

View File

@ -47,10 +47,12 @@ public class CharRangeTest extends TestCase {
return suite;
}
@Override
protected void setUp() throws Exception {
super.setUp();
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
}

View File

@ -48,10 +48,12 @@ public class CharSetTest extends TestCase {
return suite;
}
@Override
protected void setUp() throws Exception {
super.setUp();
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
}

View File

@ -48,10 +48,12 @@ public class CharSetUtilsTest extends TestCase {
return suite;
}
@Override
protected void setUp() throws Exception {
super.setUp();
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
}

View File

@ -50,10 +50,12 @@ public class CharUtilsTest extends TestCase {
return suite;
}
@Override
protected void setUp() throws Exception {
super.setUp();
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
}

View File

@ -57,10 +57,12 @@ public class ClassUtilsTest extends TestCase {
return suite;
}
@Override
protected void setUp() throws Exception {
super.setUp();
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
}

View File

@ -47,6 +47,7 @@ public class EntitiesPerformanceTest extends TestCase {
return suite;
}
@Override
public void setUp() {
if (stringWithUnicode == null) {
StringBuffer buf = new StringBuffer(STRING_LENGTH);

View File

@ -48,6 +48,7 @@ public class EntitiesTest extends TestCase
Entities entities;
@Override
public void setUp()
{
entities = new Entities();

View File

@ -75,6 +75,7 @@ public class LocaleUtilsTest extends TestCase {
return suite;
}
@Override
public void setUp() throws Exception {
super.setUp();

View File

@ -52,10 +52,12 @@ public class ObjectUtilsTest extends TestCase {
return suite;
}
@Override
protected void setUp() throws Exception {
super.setUp();
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
}

View File

@ -49,12 +49,14 @@ public class RandomStringUtilsTest extends junit.framework.TestCase {
/**
* Set up instance variables required by this test case.
*/
@Override
public void setUp() {
}
/**
* Tear down instance variables required by this test case.
*/
@Override
public void tearDown() {
}
@ -311,8 +313,8 @@ public class RandomStringUtilsTest extends junit.framework.TestCase {
double sumSq = 0.0d;
double dev = 0.0d;
for (int i = 0; i < observed.length; i++) {
dev = (double) (observed[i] - expected[i]);
sumSq += dev * dev / (double) expected[i];
dev = (observed[i] - expected[i]);
sumSq += dev * dev / expected[i];
}
return sumSq;
}

View File

@ -63,6 +63,7 @@ public class SerializationUtilsTest extends TestCase {
return suite;
}
@Override
protected void setUp() throws Exception {
super.setUp();
@ -73,6 +74,7 @@ public class SerializationUtilsTest extends TestCase {
iMap.put("BAR", iInteger);
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
}
@ -180,6 +182,7 @@ public class SerializationUtilsTest extends TestCase {
// forces an IOException when the ObjectOutputStream is created, to test not closing the stream
// in the finally block
OutputStream streamTest = new OutputStream() {
@Override
public void write(int arg0) throws IOException {
throw new IOException(SERIALIZE_IO_EXCEPTION_MESSAGE);
}

View File

@ -49,10 +49,12 @@ public class StringUtilsEqualsIndexOfTest extends TestCase {
return suite;
}
@Override
protected void setUp() throws Exception {
super.setUp();
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
}

View File

@ -44,10 +44,12 @@ public class StringUtilsIsTest extends TestCase {
return suite;
}
@Override
protected void setUp() throws Exception {
super.setUp();
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
}

View File

@ -48,10 +48,12 @@ public class StringUtilsStartsEndsWithTest extends TestCase {
return suite;
}
@Override
protected void setUp() throws Exception {
super.setUp();
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
}

View File

@ -50,10 +50,12 @@ public class StringUtilsSubstringTest extends TestCase {
return suite;
}
@Override
protected void setUp() throws Exception {
super.setUp();
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
}

View File

@ -107,10 +107,12 @@ public class StringUtilsTest extends TestCase {
return suite;
}
@Override
protected void setUp() throws Exception {
super.setUp();
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
}

View File

@ -45,10 +45,12 @@ public class StringUtilsTrimEmptyTest extends TestCase {
return suite;
}
@Override
protected void setUp() throws Exception {
super.setUp();
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
}

View File

@ -188,10 +188,12 @@ public class SystemUtilsTest extends TestCase {
return OS_NAME.startsWith(osNamePrefix) && OS_VERSION.startsWith(osVersionPrefix);
}
@Override
protected void setUp() throws Exception {
super.setUp();
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
}

View File

@ -53,10 +53,12 @@ public class ValidateTest extends TestCase {
return suite;
}
@Override
protected void setUp() throws Exception {
super.setUp();
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
}

View File

@ -45,10 +45,12 @@ public class CompareToBuilderTest extends TestCase {
return suite;
}
@Override
protected void setUp() throws Exception {
super.setUp();
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
}
@ -60,6 +62,7 @@ public class CompareToBuilderTest extends TestCase {
public TestObject(int a) {
this.a = a;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
@ -93,6 +96,7 @@ public class CompareToBuilderTest extends TestCase {
super(a);
this.b = b;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;

View File

@ -51,11 +51,13 @@ public class DefaultToStringStyleTest extends TestCase {
return suite;
}
@Override
protected void setUp() throws Exception {
super.setUp();
ToStringBuilder.setDefaultStyle(ToStringStyle.DEFAULT_STYLE);
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
ToStringBuilder.setDefaultStyle(ToStringStyle.DEFAULT_STYLE);

View File

@ -49,10 +49,12 @@ public class EqualsBuilderTest extends TestCase {
return suite;
}
@Override
protected void setUp() throws Exception {
super.setUp();
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
}
@ -66,6 +68,7 @@ public class EqualsBuilderTest extends TestCase {
public TestObject(int a) {
this.a = a;
}
@Override
public boolean equals(Object o) {
if (o == null) { return false; }
if (o == this) { return true; }
@ -95,6 +98,7 @@ public class EqualsBuilderTest extends TestCase {
super(a);
this.b = b;
}
@Override
public boolean equals(Object o) {
if (o == null) { return false; }
if (o == this) { return true; }
@ -893,6 +897,7 @@ public class EqualsBuilderTest extends TestCase {
this.a = a;
}
@Override
public boolean equals(Object o) {
if (o == this)
return true;
@ -915,6 +920,7 @@ public class EqualsBuilderTest extends TestCase {
this.b = b;
}
@Override
public boolean equals(Object o) {
if (o == this)
return true;

View File

@ -49,10 +49,12 @@ public class HashCodeBuilderAndEqualsBuilderTest extends TestCase {
return suite;
}
@Override
protected void setUp() throws Exception {
super.setUp();
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
}

View File

@ -52,11 +52,13 @@ public class MultiLineToStringStyleTest extends TestCase {
return suite;
}
@Override
protected void setUp() throws Exception {
super.setUp();
ToStringBuilder.setDefaultStyle(ToStringStyle.MULTI_LINE_STYLE);
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
ToStringBuilder.setDefaultStyle(ToStringStyle.DEFAULT_STYLE);

View File

@ -51,11 +51,13 @@ public class NoFieldNamesToStringStyleTest extends TestCase {
return suite;
}
@Override
protected void setUp() throws Exception {
super.setUp();
ToStringBuilder.setDefaultStyle(ToStringStyle.NO_FIELD_NAMES_STYLE);
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
ToStringBuilder.setDefaultStyle(ToStringStyle.DEFAULT_STYLE);

View File

@ -34,11 +34,13 @@ public class ShortPrefixToStringStyleTest extends TestCase {
private final Integer base = new Integer(5);
private final String baseStr = "Integer";
@Override
protected void setUp() throws Exception {
super.setUp();
ToStringBuilder.setDefaultStyle(ToStringStyle.SHORT_PREFIX_STYLE);
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
ToStringBuilder.setDefaultStyle(ToStringStyle.DEFAULT_STYLE);

View File

@ -50,11 +50,13 @@ public class SimpleToStringStyleTest extends TestCase {
return suite;
}
@Override
protected void setUp() throws Exception {
super.setUp();
ToStringBuilder.setDefaultStyle(ToStringStyle.SIMPLE_STYLE);
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
ToStringBuilder.setDefaultStyle(ToStringStyle.DEFAULT_STYLE);

View File

@ -66,11 +66,13 @@ public class StandardToStringStyleTest extends TestCase {
return suite;
}
@Override
protected void setUp() throws Exception {
super.setUp();
ToStringBuilder.setDefaultStyle(STYLE);
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
ToStringBuilder.setDefaultStyle(STYLE);

View File

@ -43,6 +43,7 @@ public class ToStringStyleTest extends TestCase {
return suite;
}
@Override
protected void setUp() throws Exception {
super.setUp();
}

View File

@ -76,6 +76,7 @@ public class ExceptionUtilsTest extends TestCase {
return new TestSuite(ExceptionUtilsTest.class);
}
@Override
public void setUp() {
withoutCause = createExceptionWithoutCause();
nested = new NestableException(withoutCause);
@ -89,6 +90,7 @@ public class ExceptionUtilsTest extends TestCase {
cyclicCause = new ExceptionWithCause(a);
}
@Override
protected void tearDown() throws Exception {
withoutCause = null;
nested = null;
@ -579,6 +581,7 @@ public class ExceptionUtilsTest extends TestCase {
setCause(cause);
}
@Override
public Throwable getCause() {
return cause;
}

View File

@ -54,6 +54,7 @@ public class NestableDelegateTest extends TestCase {
/**
* Set up instance variables required by this test case.
*/
@Override
public void setUp()
{
lineSeparator = System.getProperty("line.separator");
@ -67,6 +68,7 @@ public class NestableDelegateTest extends TestCase {
/**
* Tear down instance variables required by this test case.
*/
@Override
public void tearDown()
{
lineSeparator = null;
@ -661,6 +663,7 @@ class NestableDelegateTester1 extends Exception implements Nestable
/**
* @see Nestable#getCause()
*/
@Override
public Throwable getCause()
{
return cause;
@ -784,6 +787,7 @@ class NestableDelegateTester2 extends Throwable implements Nestable
/**
* @see Nestable#getCause()
*/
@Override
public Throwable getCause()
{
return cause;
@ -849,6 +853,7 @@ class ThrowableNestable extends Throwable implements Nestable
* Returns the hard-coded string "ThrowableNestable exception" for this
* test.
*/
@Override
public String getMessage()
{
return "ThrowableNestable exception";
@ -878,6 +883,7 @@ class ThrowableNestable extends Throwable implements Nestable
/**
* @see Nestable#getCause()
*/
@Override
public Throwable getCause()
{
return cause;
@ -888,6 +894,7 @@ class ThrowableNestable extends Throwable implements Nestable
* Empty method to satisfy the implemented interface. Does nothing
* in this test.
*/
@Override
public void printStackTrace(PrintWriter out)
{
}
@ -969,6 +976,7 @@ class ThrowableNestedNestable extends Throwable implements Nestable
* For this test, returns "ThrowableNestable exception (" appended to the
* message of the cause specified in the constructor.
*/
@Override
public String getMessage()
{
return "ThrowableNestedNestable exception (" + cause.getMessage() + ")";
@ -1000,6 +1008,7 @@ class ThrowableNestedNestable extends Throwable implements Nestable
/**
* @see Nestable#getCause()
*/
@Override
public Throwable getCause()
{
return cause;
@ -1010,6 +1019,7 @@ class ThrowableNestedNestable extends Throwable implements Nestable
* For this test, writes the string
* "ThrowableNestedNestable stack trace place-holder" to the print writer.
*/
@Override
public void printStackTrace(PrintWriter out)
{
out.println("ThrowableNestedNestable stack trace place-holder");

View File

@ -44,6 +44,7 @@ public class NestableErrorTest extends AbstractNestableTest {
/**
* Sets up instance variables required by this test case.
*/
@Override
public void setUp()
{
}
@ -61,6 +62,7 @@ public class NestableErrorTest extends AbstractNestableTest {
/**
* Tears down instance variables required by this test case.
*/
@Override
public void tearDown()
{
}
@ -78,6 +80,7 @@ public class NestableErrorTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getNestable()
*/
@Override
public Nestable getNestable()
{
return new NestableError();
@ -86,6 +89,7 @@ public class NestableErrorTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getNestable(Nestable)
*/
@Override
public Nestable getNestable(Nestable n)
{
return new NestableError((Throwable) n);
@ -94,6 +98,7 @@ public class NestableErrorTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getNestable(String)
*/
@Override
public Nestable getNestable(String msg)
{
return new NestableError(msg);
@ -102,6 +107,7 @@ public class NestableErrorTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getNestable(Throwable)
*/
@Override
public Nestable getNestable(Throwable t)
{
return new NestableError(t);
@ -110,6 +116,7 @@ public class NestableErrorTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getNestable(String, Throwable)
*/
@Override
public Nestable getNestable(String msg, Throwable t)
{
return new NestableError(msg, t);
@ -118,6 +125,7 @@ public class NestableErrorTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getNestable(String, Nestable)
*/
@Override
public Nestable getNestable(String msg, Nestable n)
{
return new NestableError(msg, (Throwable) n);
@ -126,6 +134,7 @@ public class NestableErrorTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getTester1(Throwable)
*/
@Override
public Nestable getTester1(Throwable t)
{
return new NestableErrorTester1(t);
@ -134,6 +143,7 @@ public class NestableErrorTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getTester1(Nestable)
*/
@Override
public Nestable getTester1(Nestable n)
{
return new NestableErrorTester1((Throwable) n);
@ -142,6 +152,7 @@ public class NestableErrorTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getTester1(String, Throwable)
*/
@Override
public Nestable getTester1(String msg, Throwable t)
{
return new NestableErrorTester1(msg, t);
@ -150,6 +161,7 @@ public class NestableErrorTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getTester1(String, Nestable)
*/
@Override
public Nestable getTester1(String msg, Nestable n)
{
return new NestableErrorTester1(msg, (Throwable) n);
@ -158,6 +170,7 @@ public class NestableErrorTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getTester1Class()
*/
@Override
public Class getTester1Class()
{
return NestableErrorTester1.class;
@ -166,6 +179,7 @@ public class NestableErrorTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getTester2(String, Throwable)
*/
@Override
public Nestable getTester2(String msg, Throwable t)
{
return new NestableErrorTester2(msg, t);
@ -174,6 +188,7 @@ public class NestableErrorTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getTester2(String, Nestable)
*/
@Override
public Nestable getTester2(String msg, Nestable n)
{
return new NestableErrorTester2(msg, (Throwable) n);
@ -182,6 +197,7 @@ public class NestableErrorTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getTester2Class()
*/
@Override
public Class getTester2Class()
{
return NestableErrorTester2.class;
@ -190,6 +206,7 @@ public class NestableErrorTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getThrowable(String)
*/
@Override
public Throwable getThrowable(String msg)
{
return new EOFException(msg);
@ -198,6 +215,7 @@ public class NestableErrorTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getThrowableClass()
*/
@Override
public Class getThrowableClass()
{
return EOFException.class;
@ -206,6 +224,7 @@ public class NestableErrorTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getBaseThrowableClass()
*/
@Override
public Class getBaseThrowableClass()
{
return Error.class;

View File

@ -49,6 +49,7 @@ public class NestableExceptionTest extends AbstractNestableTest {
/**
* Sets up instance variables required by this test case.
*/
@Override
public void setUp()
{
}
@ -66,6 +67,7 @@ public class NestableExceptionTest extends AbstractNestableTest {
/**
* Tears down instance variables required by this test case.
*/
@Override
public void tearDown()
{
}
@ -83,6 +85,7 @@ public class NestableExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getNestable()
*/
@Override
public Nestable getNestable()
{
return new NestableException();
@ -91,6 +94,7 @@ public class NestableExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getNestable(Nestable)
*/
@Override
public Nestable getNestable(Nestable n)
{
return new NestableException((Throwable) n);
@ -99,6 +103,7 @@ public class NestableExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getNestable(String)
*/
@Override
public Nestable getNestable(String msg)
{
return new NestableException(msg);
@ -107,6 +112,7 @@ public class NestableExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getNestable(Throwable)
*/
@Override
public Nestable getNestable(Throwable t)
{
return new NestableException(t);
@ -115,6 +121,7 @@ public class NestableExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getNestable(String, Throwable)
*/
@Override
public Nestable getNestable(String msg, Throwable t)
{
return new NestableException(msg, t);
@ -123,6 +130,7 @@ public class NestableExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getNestable(String, Nestable)
*/
@Override
public Nestable getNestable(String msg, Nestable n)
{
return new NestableException(msg, (Throwable) n);
@ -131,6 +139,7 @@ public class NestableExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getTester1(Throwable)
*/
@Override
public Nestable getTester1(Throwable t)
{
return new NestableExceptionTester1(t);
@ -139,6 +148,7 @@ public class NestableExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getTester1(Nestable)
*/
@Override
public Nestable getTester1(Nestable n)
{
return new NestableExceptionTester1((Throwable) n);
@ -147,6 +157,7 @@ public class NestableExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getTester1(String, Throwable)
*/
@Override
public Nestable getTester1(String msg, Throwable t)
{
return new NestableExceptionTester1(msg, t);
@ -155,6 +166,7 @@ public class NestableExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getTester1(String, Nestable)
*/
@Override
public Nestable getTester1(String msg, Nestable n)
{
return new NestableExceptionTester1(msg, (Throwable) n);
@ -163,6 +175,7 @@ public class NestableExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getTester1Class()
*/
@Override
public Class getTester1Class()
{
return NestableExceptionTester1.class;
@ -171,6 +184,7 @@ public class NestableExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getTester2(String, Throwable)
*/
@Override
public Nestable getTester2(String msg, Throwable t)
{
return new NestableExceptionTester2(msg, t);
@ -179,6 +193,7 @@ public class NestableExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getTester2(String, Nestable)
*/
@Override
public Nestable getTester2(String msg, Nestable n)
{
return new NestableExceptionTester2(msg, (Throwable) n);
@ -187,6 +202,7 @@ public class NestableExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getTester2Class()
*/
@Override
public Class getTester2Class()
{
return NestableExceptionTester2.class;
@ -195,6 +211,7 @@ public class NestableExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getThrowable(String)
*/
@Override
public Throwable getThrowable(String msg)
{
return new EOFException(msg);
@ -203,6 +220,7 @@ public class NestableExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getThrowableClass()
*/
@Override
public Class getThrowableClass()
{
return EOFException.class;
@ -211,6 +229,7 @@ public class NestableExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getBaseThrowableClass()
*/
@Override
public Class getBaseThrowableClass()
{
return Exception.class;

View File

@ -46,6 +46,7 @@ public class NestableRuntimeExceptionTest extends AbstractNestableTest {
/**
* Sets up instance variables required by this test case.
*/
@Override
public void setUp()
{
}
@ -63,6 +64,7 @@ public class NestableRuntimeExceptionTest extends AbstractNestableTest {
/**
* Tears down instance variables required by this test case.
*/
@Override
public void tearDown()
{
}
@ -80,6 +82,7 @@ public class NestableRuntimeExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getNestable()
*/
@Override
public Nestable getNestable()
{
return new NestableRuntimeException();
@ -88,6 +91,7 @@ public class NestableRuntimeExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getNestable(Nestable)
*/
@Override
public Nestable getNestable(Nestable n)
{
return new NestableRuntimeException((Throwable) n);
@ -96,6 +100,7 @@ public class NestableRuntimeExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getNestable(String)
*/
@Override
public Nestable getNestable(String msg)
{
return new NestableRuntimeException(msg);
@ -104,6 +109,7 @@ public class NestableRuntimeExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getNestable(Throwable)
*/
@Override
public Nestable getNestable(Throwable t)
{
return new NestableRuntimeException(t);
@ -112,6 +118,7 @@ public class NestableRuntimeExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getNestable(String, Throwable)
*/
@Override
public Nestable getNestable(String msg, Throwable t)
{
return new NestableRuntimeException(msg, t);
@ -120,6 +127,7 @@ public class NestableRuntimeExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getNestable(String, Nestable)
*/
@Override
public Nestable getNestable(String msg, Nestable n)
{
return new NestableRuntimeException(msg, (Throwable) n);
@ -128,6 +136,7 @@ public class NestableRuntimeExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getTester1(Throwable)
*/
@Override
public Nestable getTester1(Throwable t)
{
return new NestableRuntimeExceptionTester1(t);
@ -136,6 +145,7 @@ public class NestableRuntimeExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getTester1(Nestable)
*/
@Override
public Nestable getTester1(Nestable n)
{
return new NestableRuntimeExceptionTester1((Throwable) n);
@ -144,6 +154,7 @@ public class NestableRuntimeExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getTester1(String, Throwable)
*/
@Override
public Nestable getTester1(String msg, Throwable t)
{
return new NestableRuntimeExceptionTester1(msg, t);
@ -152,6 +163,7 @@ public class NestableRuntimeExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getTester1(String, Nestable)
*/
@Override
public Nestable getTester1(String msg, Nestable n)
{
return new NestableRuntimeExceptionTester1(msg, (Throwable) n);
@ -160,6 +172,7 @@ public class NestableRuntimeExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getTester1Class()
*/
@Override
public Class getTester1Class()
{
return NestableRuntimeExceptionTester1.class;
@ -168,6 +181,7 @@ public class NestableRuntimeExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getTester2(String, Throwable)
*/
@Override
public Nestable getTester2(String msg, Throwable t)
{
return new NestableRuntimeExceptionTester2(msg, t);
@ -176,6 +190,7 @@ public class NestableRuntimeExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getTester2(String, Nestable)
*/
@Override
public Nestable getTester2(String msg, Nestable n)
{
return new NestableRuntimeExceptionTester2(msg, (Throwable) n);
@ -184,6 +199,7 @@ public class NestableRuntimeExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getTester2Class()
*/
@Override
public Class getTester2Class()
{
return NestableRuntimeExceptionTester2.class;
@ -192,6 +208,7 @@ public class NestableRuntimeExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getThrowable(String)
*/
@Override
public Throwable getThrowable(String msg)
{
return new EOFException(msg);
@ -200,6 +217,7 @@ public class NestableRuntimeExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getThrowableClass()
*/
@Override
public Class getThrowableClass()
{
return EOFException.class;
@ -208,6 +226,7 @@ public class NestableRuntimeExceptionTest extends AbstractNestableTest {
/**
* @see AbstractNestableTest#getBaseThrowableClass()
*/
@Override
public Class getBaseThrowableClass()
{
return RuntimeException.class;

View File

@ -54,15 +54,19 @@ public abstract class AbstractRangeTest extends TestCase {
protected Float float21;
private static class InnerNumber extends Number {
@Override
public double doubleValue() {
return 12d;
}
@Override
public float floatValue() {
return 12f;
}
@Override
public int intValue() {
return 12;
}
@Override
public long longValue() {
return 12L;
}
@ -75,6 +79,7 @@ public abstract class AbstractRangeTest extends TestCase {
super(name);
}
@Override
public void setUp() {
five = new Integer(5);
ten = new Integer(10);

View File

@ -39,15 +39,18 @@ public final class DoubleRangeTest extends AbstractRangeTest {
return suite;
}
@Override
public void setUp() {
super.setUp();
tenToTwenty = new DoubleRange(double10, double20);
otherRange = new NumberRange(ten, twenty);
}
@Override
protected Range createRange(Integer integer1, Integer integer2) {
return new DoubleRange(integer1, integer2);
}
@Override
protected Range createRange(Integer integer) {
return new NumberRange(integer);
}
@ -161,6 +164,7 @@ public final class DoubleRangeTest extends AbstractRangeTest {
assertEquals(false, tenToTwenty.containsNumber(float21));
}
@Override
public void testToString() {
String str = tenToTwenty.toString();
assertEquals("Range[10.0,20.0]", str);

View File

@ -39,15 +39,18 @@ public final class FloatRangeTest extends AbstractRangeTest {
return suite;
}
@Override
public void setUp() {
super.setUp();
tenToTwenty = new FloatRange(float10, float20);
otherRange = new NumberRange(ten, twenty);
}
@Override
protected Range createRange(Integer integer1, Integer integer2) {
return new FloatRange(integer1, integer2);
}
@Override
protected Range createRange(Integer integer) {
return new NumberRange(integer);
}
@ -161,6 +164,7 @@ public final class FloatRangeTest extends AbstractRangeTest {
assertEquals(false, tenToTwenty.containsNumber(float21));
}
@Override
public void testToString() {
String str = tenToTwenty.toString();
assertEquals("Range[10.0,20.0]", str);

View File

@ -43,6 +43,7 @@ public class FractionTest extends TestCase {
return suite;
}
@Override
public void setUp() {
}

View File

@ -43,15 +43,18 @@ public final class IntRangeTest extends AbstractRangeTest {
return suite;
}
@Override
public void setUp() {
super.setUp();
tenToTwenty = new IntRange(ten, twenty);
otherRange = new NumberRange(ten, twenty);
}
@Override
protected Range createRange(Integer integer1, Integer integer2) {
return new IntRange(integer1, integer2);
}
@Override
protected Range createRange(Integer integer) {
return new NumberRange(integer);
}

View File

@ -41,15 +41,18 @@ public final class LongRangeTest extends AbstractRangeTest {
return suite;
}
@Override
public void setUp() {
super.setUp();
tenToTwenty = new LongRange(long10, long20);
otherRange = new NumberRange(ten, twenty);
}
@Override
protected Range createRange(Integer integer1, Integer integer2) {
return new LongRange(integer1, integer2);
}
@Override
protected Range createRange(Integer integer) {
return new NumberRange(integer);
}

View File

@ -60,16 +60,19 @@ public final class NumberRangeTest extends AbstractRangeTest {
}
}
@Override
protected Range createRange(Integer integer) {
return new NumberRange(integer);
}
// --------------------------------------------------------------------------
@Override
protected Range createRange(Integer integer1, Integer integer2) {
return new NumberRange(integer1, integer2);
}
@Override
public void setUp() {
super.setUp();
tenToTwenty = new NumberRange(ten, twenty);

View File

@ -35,6 +35,7 @@ public final class RandomUtilsTest extends TestCase {
super(name);
}
@Override
public void setUp() {
}

View File

@ -42,6 +42,7 @@ public class RangeTest extends TestCase {
this.max = max;
}
@Override
public boolean containsNumber(Number number) {
if (number.byteValue() >= min && number.byteValue() <= max) {
return true;
@ -49,10 +50,12 @@ public class RangeTest extends TestCase {
return false;
}
@Override
public Number getMaximumNumber() {
return new Byte(max);
}
@Override
public Number getMinimumNumber() {
return new Byte(min);
}
@ -68,10 +71,12 @@ public class RangeTest extends TestCase {
super(name);
}
@Override
protected void setUp() throws Exception {
super.setUp();
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
}

View File

@ -61,6 +61,7 @@ public class ConstructorUtilsTest extends TestCase {
toString = "(Object)";
}
@Override
public String toString() {
return toString;
}
@ -88,6 +89,7 @@ public class ConstructorUtilsTest extends TestCase {
return suite;
}
@Override
protected void setUp() throws Exception {
super.setUp();
classCache.clear();

View File

@ -59,6 +59,7 @@ public class FieldUtilsTest extends TestCase {
return suite;
}
@Override
protected void setUp() throws Exception {
super.setUp();
StaticContainer.reset();

View File

@ -114,6 +114,7 @@ public class MethodUtilsTest extends TestCase {
return suite;
}
@Override
protected void setUp() throws Exception {
super.setUp();
testBean = new TestBean();

View File

@ -70,20 +70,24 @@ public class CompositeFormatTest extends TestCase {
public void testCompositeFormat() {
Format parser = new Format() {
@Override
public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
throw new UnsupportedOperationException("Not implemented");
}
@Override
public Object parseObject(String source, ParsePosition pos) {
return null; // do nothing
}
};
Format formatter = new Format() {
@Override
public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
return null; // do nothing
}
@Override
public Object parseObject(String source, ParsePosition pos) {
throw new UnsupportedOperationException("Not implemented");
}

View File

@ -68,12 +68,14 @@ public class ExtendedMessageFormatTest extends TestCase {
super(name);
}
@Override
protected void setUp() throws Exception {
super.setUp();
registry.put("lower", new LowerCaseFormatFactory());
registry.put("upper", new UpperCaseFormatFactory());
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
}
@ -359,9 +361,11 @@ public class ExtendedMessageFormatTest extends TestCase {
* {@link Format} implementation which converts to lower case.
*/
private static class LowerCaseFormat extends Format {
@Override
public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
return toAppendTo.append(((String)obj).toLowerCase());
}
@Override
public Object parseObject(String source, ParsePosition pos) {throw new UnsupportedOperationException();}
}
@ -369,9 +373,11 @@ public class ExtendedMessageFormatTest extends TestCase {
* {@link Format} implementation which converts to upper case.
*/
private static class UpperCaseFormat extends Format {
@Override
public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
return toAppendTo.append(((String)obj).toUpperCase());
}
@Override
public Object parseObject(String source, ParsePosition pos) {throw new UnsupportedOperationException();}
}

View File

@ -40,7 +40,7 @@ public class StrBuilderAppendInsertTest extends TestCase {
private static final String SEP = SystemUtils.LINE_SEPARATOR;
/** Test subclass of Object, with a toString method. */
private static Object FOO = new Object() {
private static final Object FOO = new Object() {
@Override
public String toString() {
return "foo";
@ -476,7 +476,7 @@ public class StrBuilderAppendInsertTest extends TestCase {
sb.appendln((Object) null);
assertEquals("" + SEP, sb.toString());
sb.appendln((Object) FOO);
sb.appendln(FOO);
assertEquals(SEP + "foo" + SEP, sb.toString());
sb.appendln(new Integer(6));

View File

@ -1496,6 +1496,7 @@ public class StrBuilderTest extends TestCase {
}
static final StrMatcher A_NUMBER_MATCHER = new StrMatcher() {
@Override
public int isMatch(char[] buffer, int pos, int bufferStart, int bufferEnd) {
if (buffer[pos] == 'A') {
pos++;

View File

@ -52,10 +52,12 @@ public class StrLookupTest extends TestCase {
return suite;
}
@Override
protected void setUp() throws Exception {
super.setUp();
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
}

View File

@ -57,6 +57,7 @@ public class StrSubstitutorTest extends TestCase {
return suite;
}
@Override
protected void setUp() throws Exception {
super.setUp();
values = new HashMap();
@ -64,6 +65,7 @@ public class StrSubstitutorTest extends TestCase {
values.put("target", "lazy dog");
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
values = null;
@ -284,6 +286,7 @@ public class StrSubstitutorTest extends TestCase {
Map map = new HashMap();
map.put("name", "commons");
StrSubstitutor sub = new StrSubstitutor(map) {
@Override
protected String resolveVariable(String variableName, StrBuilder buf, int startPos, int endPos) {
assertEquals("name", variableName);
assertSame(builder, buf);

View File

@ -566,6 +566,7 @@ public class StrTokenizerTest extends TestCase {
*/
public void testCloneNotSupportedException() {
Object notCloned = (new StrTokenizer() {
@Override
Object cloneReset() throws CloneNotSupportedException {
throw new CloneNotSupportedException("test");
}
@ -812,6 +813,7 @@ public class StrTokenizerTest extends TestCase {
//-----------------------------------------------------------------------
public void testTokenizeSubclassInputChange() {
StrTokenizer tkn = new StrTokenizer("a b c d e") {
@Override
protected List tokenize(char[] chars, int offset, int count) {
return super.tokenize("w x y z".toCharArray(), 2, 5);
}
@ -823,6 +825,7 @@ public class StrTokenizerTest extends TestCase {
//-----------------------------------------------------------------------
public void testTokenizeSubclassOutputChange() {
StrTokenizer tkn = new StrTokenizer("a b c") {
@Override
protected List tokenize(char[] chars, int offset, int count) {
List list = super.tokenize(chars, offset, count);
Collections.reverse(list);

View File

@ -44,7 +44,8 @@ public class DateUtilsFragmentTest extends TestCase {
private Date aDate;
private Calendar aCalendar;
protected void setUp() {
@Override
protected void setUp() {
aCalendar = Calendar.getInstance();
aCalendar.set(2005, months, days, hours, minutes, seconds);
aCalendar.set(Calendar.MILLISECOND, millis);

View File

@ -64,7 +64,8 @@ public class DateUtilsRoundingTest extends TestCase {
Calendar januaryOneCalendar;
FastDateFormat fdf = DateFormatUtils.ISO_DATETIME_FORMAT;
protected void setUp() throws Exception {
@Override
protected void setUp() throws Exception {
super.setUp();
dateTimeParser = new SimpleDateFormat("MMM dd, yyyy H:mm:ss.SSS", Locale.ENGLISH);

View File

@ -97,6 +97,7 @@ public class DateUtilsTest extends TestCase {
return suite;
}
@Override
protected void setUp() throws Exception {
super.setUp();
@ -150,6 +151,7 @@ public class DateUtilsTest extends TestCase {
TimeZone.setDefault(defaultZone);
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
}

View File

@ -56,10 +56,12 @@ public class FastDateFormatTest extends TestCase {
return suite;
}
@Override
protected void setUp() throws Exception {
super.setUp();
}
@Override
protected void tearDown() throws Exception {
super.tearDown();
}