Fix unused local variable warnings
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -104,7 +104,7 @@ public class LabeledEnumTests extends TestCase {
|
||||
|
||||
public void testDoesNotMatchWrongClass() {
|
||||
try {
|
||||
LabeledEnum none = StaticLabeledEnumResolver.instance().getLabeledEnumByCode(Dog.class,
|
||||
StaticLabeledEnumResolver.instance().getLabeledEnumByCode(Dog.class,
|
||||
new Short((short) 1));
|
||||
fail("Should have failed");
|
||||
}
|
||||
@@ -119,10 +119,11 @@ public class LabeledEnumTests extends TestCase {
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@SuppressWarnings({ "serial", "unused" })
|
||||
private static class Other extends StaticLabeledEnum {
|
||||
|
||||
public static final Other THING1 = new Other(1, "Thing1");
|
||||
|
||||
public static final Other THING2 = new Other(2, "Thing2");
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -34,7 +34,6 @@ public class StopWatchTests extends TestCase {
|
||||
String name1 = "Task 1";
|
||||
String name2 = "Task 2";
|
||||
|
||||
long fudgeFactor = 5L;
|
||||
assertFalse(sw.isRunning());
|
||||
sw.start(name1);
|
||||
Thread.sleep(int1);
|
||||
@@ -44,6 +43,7 @@ public class StopWatchTests extends TestCase {
|
||||
// TODO are timings off in JUnit? Why do these assertions sometimes fail
|
||||
// under both Ant and Eclipse?
|
||||
|
||||
//long fudgeFactor = 5L;
|
||||
//assertTrue("Unexpected timing " + sw.getTotalTime(), sw.getTotalTime() >= int1);
|
||||
//assertTrue("Unexpected timing " + sw.getTotalTime(), sw.getTotalTime() <= int1 + fudgeFactor);
|
||||
sw.start(name2);
|
||||
@@ -72,7 +72,6 @@ public class StopWatchTests extends TestCase {
|
||||
String name1 = "Task 1";
|
||||
String name2 = "Task 2";
|
||||
|
||||
long fudgeFactor = 5L;
|
||||
assertFalse(sw.isRunning());
|
||||
sw.start(name1);
|
||||
Thread.sleep(int1);
|
||||
@@ -82,6 +81,7 @@ public class StopWatchTests extends TestCase {
|
||||
// TODO are timings off in JUnit? Why do these assertions sometimes fail
|
||||
// under both Ant and Eclipse?
|
||||
|
||||
//long fudgeFactor = 5L;
|
||||
//assertTrue("Unexpected timing " + sw.getTotalTime(), sw.getTotalTime() >= int1);
|
||||
//assertTrue("Unexpected timing " + sw.getTotalTime(), sw.getTotalTime() <= int1 + fudgeFactor);
|
||||
sw.start(name2);
|
||||
|
||||
Reference in New Issue
Block a user