Partial fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=48132
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 5 Nov 2009 01:21:11 +0000 (01:21 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 5 Nov 2009 01:21:11 +0000 (01:21 +0000)
Patch provided by sebb

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@832956 13f79535-47bb-0310-9956-ffa450edef68

34 files changed:
modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/CheckOutThreadTest.java
modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/ConnectCountTest.java
modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/DefaultTestCase.java
modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/FairnessTest.java
modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/TestAsyncQueue.java
test/org/apache/catalina/connector/TestRequest.java
test/org/apache/catalina/core/TestStandardContext.java
test/org/apache/catalina/startup/TestTomcat.java
test/org/apache/catalina/startup/TomcatBaseTest.java
test/org/apache/catalina/tribes/demos/CoordinationDemo.java
test/org/apache/catalina/tribes/demos/EchoRpcTest.java
test/org/apache/catalina/tribes/demos/LoadTest.java
test/org/apache/catalina/tribes/demos/MapDemo.java
test/org/apache/catalina/tribes/demos/MembersWithProperties.java
test/org/apache/catalina/tribes/test/channel/TestChannelOptionFlag.java
test/org/apache/catalina/tribes/test/channel/TestChannelStartStop.java
test/org/apache/catalina/tribes/test/channel/TestDataIntegrity.java
test/org/apache/catalina/tribes/test/channel/TestMulticastPackages.java
test/org/apache/catalina/tribes/test/channel/TestRemoteProcessException.java
test/org/apache/catalina/tribes/test/channel/TestUdpPackages.java
test/org/apache/catalina/tribes/test/interceptors/TestNonBlockingCoordinator.java
test/org/apache/catalina/tribes/test/interceptors/TestOrderInterceptor.java
test/org/apache/catalina/tribes/test/io/TestSenderConnections.java
test/org/apache/catalina/tribes/test/io/TestSerialization.java
test/org/apache/catalina/tribes/test/membership/TestDomainFilter.java
test/org/apache/catalina/tribes/test/membership/TestMemberArrival.java
test/org/apache/catalina/tribes/test/membership/TestMemberSerialization.java
test/org/apache/catalina/tribes/test/membership/TestTcpFailureDetector.java
test/org/apache/catalina/tribes/test/transport/SocketReceive.java
test/org/apache/catalina/tribes/test/transport/SocketTribesReceive.java
test/org/apache/catalina/tribes/test/transport/SocketValidateReceive.java
test/org/apache/catalina/valves/Benchmarks.java
test/org/apache/tomcat/util/http/CookiesBaseTest.java
test/org/apache/tomcat/util/http/TestCookiesNoFwdStrictSysProps.java

index 9b859c6..0c718b4 100644 (file)
@@ -374,6 +374,7 @@ public class CheckOutThreadTest extends DefaultTestCase {
     public class TestThread extends Thread {
         protected DataSource d;
         protected String query = null;
+        @Override
         public void run() {
             long max = -1, totalmax=0, totalcmax=0, cmax = -1, nroffetch = 0, totalruntime = 0;
             try {
index f0e8c10..9827395 100644 (file)
@@ -239,6 +239,7 @@ public class ConnectCountTest extends DefaultTestCase {
         protected long sleep = 10;
         protected boolean async = false;
         long minwait = Long.MAX_VALUE, maxwait = -1, totalwait=0, totalcmax=0, cmax = -1, nroffetch = 0, totalruntime = 0;
+        @Override
         public void run() {
             try {
                 long now = System.currentTimeMillis();
index 4752692..f19ff63 100644 (file)
@@ -171,6 +171,7 @@ public class DefaultTestCase extends TestCase {
     }
 
 
+    @Override
     protected void tearDown() throws Exception {
         try {datasource.close();}catch(Exception ignore){}
         try {tDatasource.close();}catch(Exception ignore){}
index 9f7164e..b296eee 100644 (file)
@@ -218,6 +218,7 @@ public class FairnessTest extends DefaultTestCase {
         protected long sleep = 10;
         protected boolean async = false;
         long minwait = Long.MAX_VALUE, maxwait = -1, totalwait=0, totalcmax=0, cmax = -1, nroffetch = 0, totalruntime = 0;
+        @Override
         public void run() {
             try {
                 long now = System.currentTimeMillis();
index d8ee55e..7f21c52 100644 (file)
@@ -27,11 +27,13 @@ import junit.framework.TestCase;
 
 public class TestAsyncQueue extends TestCase {
     protected FairBlockingQueue<Object> queue = null;
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         this.queue = new FairBlockingQueue<Object>();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         this.queue = null;
         super.tearDown();
@@ -72,6 +74,7 @@ public class TestAsyncQueue extends TestCase {
             this.setDaemon(false);
             this.setName(TestAsyncQueue.class.getName()+"-OfferThread");
         }
+        @Override
         public void run() {
             try {
                 sleep(delay);
index 9bc19dc..45bb7cd 100644 (file)
@@ -177,6 +177,7 @@ public class TestRequest extends TomcatBaseTest {
             return null;
         }
 
+        @Override
         public boolean isResponseBodyOK() {
             if (getResponseBody() == null) {
                 return false;
index b9d2b7d..6607e2d 100644 (file)
@@ -79,6 +79,7 @@ public class TestStandardContext extends TomcatBaseTest {
     }
     
     private static final class Bug46243Client extends SimpleHttpClient {
+        @Override
         public boolean isResponseBodyOK() {
             // Don't care about the body in this test
             return true;
index c7c0cf2..bb03800 100644 (file)
@@ -40,6 +40,7 @@ public class TestTomcat extends TomcatBaseTest {
 
         private static final long serialVersionUID = 1L;
 
+        @Override
         public void doGet(HttpServletRequest req, HttpServletResponse res) 
                 throws IOException {
             res.getWriter().write("Hello world");
@@ -55,6 +56,7 @@ public class TestTomcat extends TomcatBaseTest {
 
         private static final String JNDI_ENV_NAME = "test";
         
+        @Override
         public void doGet(HttpServletRequest req, HttpServletResponse res) 
                 throws IOException {
             
@@ -79,6 +81,7 @@ public class TestTomcat extends TomcatBaseTest {
         
         private static final long serialVersionUID = 1L;
         
+        @Override
         public void doGet(HttpServletRequest req, HttpServletResponse res) 
         throws IOException {
             URL url = req.getServletContext().getResource("/WEB-INF/web.xml");
index 4df959c..715930d 100644 (file)
@@ -66,6 +66,7 @@ public abstract class TomcatBaseTest extends TestCase {
         return getPort();
     }
     
+    @Override
     public void setUp() throws Exception {
         tempDir = new File("output/tmp");
         tempDir.mkdir();
@@ -80,6 +81,7 @@ public abstract class TomcatBaseTest extends TestCase {
         tomcat.setPort(port);
     }
     
+    @Override
     public void tearDown() throws Exception {
         tomcat.stop();
         ExpandWar.delete(tempDir);
index 43453ef..770b203 100644 (file)
@@ -136,6 +136,7 @@ public class CoordinationDemo {
             for (int i = 0; i < status.length; i++) {
                 final int j = i;
                 t[j] = new Thread() {
+                    @Override
                     public void run() {
                         status[j].stop();
                     }
@@ -161,6 +162,7 @@ public class CoordinationDemo {
             for (int i = 0; i < status.length; i++) {
                 final int j = i;
                 t[j] = new Thread() {
+                    @Override
                     public void run() {
                         status[j].start();
                     }
@@ -349,6 +351,7 @@ public class CoordinationDemo {
             channel = new GroupChannel();
             ((ReceiverBase)channel.getChannelReceiver()).setAutoBind(100);
             interceptor = new NonBlockingCoordinator() {
+                @Override
                 public void fireInterceptorEvent(InterceptorEvent event) {
                     status = event.getEventTypeDesc();
                     int type = event.getEventType();
index 22ce161..fec7c5d 100644 (file)
@@ -185,6 +185,7 @@ public class EchoRpcTest implements RpcCallback, Runnable {
                 this.channel = channel;
             }
     
+            @Override
             public void run() {
                 System.out.println("Shutting down...");
                 SystemExit exit = new SystemExit(5000);
@@ -204,6 +205,7 @@ public class EchoRpcTest implements RpcCallback, Runnable {
             public SystemExit(long delay) {
                 this.delay = delay;
             }
+            @Override
             public void run () {
                 try {
                     Thread.sleep(delay);
index 38e303c..462dd1c 100644 (file)
@@ -265,6 +265,7 @@ public class LoadTest implements MembershipListener,ChannelListener, Runnable {
             // Default constructor
         }
         
+        @Override
         public byte[] getMessage() {
             if ( message == null ) {
                 message = outdata;
@@ -272,6 +273,7 @@ public class LoadTest implements MembershipListener,ChannelListener, Runnable {
             return message;
         }
         
+        @Override
         public void setMessage(byte[] data) {
             this.message = data;
         }
@@ -382,6 +384,7 @@ public class LoadTest implements MembershipListener,ChannelListener, Runnable {
             this.channel = channel;
         }
         
+        @Override
         public void run() {
             System.out.println("Shutting down...");
             SystemExit exit = new SystemExit(5000);
@@ -401,6 +404,7 @@ public class LoadTest implements MembershipListener,ChannelListener, Runnable {
         public SystemExit(long delay) {
             this.delay = delay;
         }
+        @Override
         public void run () {
             try {
                 Thread.sleep(delay);
index ab6e7e1..6984be3 100644 (file)
@@ -166,6 +166,7 @@ public class MapDemo implements ChannelListener, MembershipListener{
         }
 
         
+        @Override
         public void run() {
             System.out.println("Shutting down...");
             //create an exit thread that forces a shutdown if the JVM wont exit cleanly
@@ -188,6 +189,7 @@ public class MapDemo implements ChannelListener, MembershipListener{
             this.delay = delay;
         }
 
+        @Override
         public void run() {
             try {
                 Thread.sleep(delay);
@@ -285,6 +287,7 @@ public class MapDemo implements ChannelListener, MembershipListener{
 
             if (DEBUG) {
                 table.addMouseListener(new MouseAdapter() {
+                    @Override
                     public void mouseClicked(MouseEvent e) {
                         printDebugData(table);
                     }
@@ -375,6 +378,7 @@ public class MapDemo implements ChannelListener, MembershipListener{
             }
             if ( "random".equals(e.getActionCommand()) ) {
                 Thread t = new Thread() {
+                    @Override
                     public void run() {
                         for (int i = 0; i < 5; i++) {
                             String key = random(5,0,0,true,true,null);
@@ -510,6 +514,7 @@ public class MapDemo implements ChannelListener, MembershipListener{
             super();
         }
 
+        @Override
         public Component getTableCellRendererComponent
             (JTable table, Object value, boolean isSelected,
              boolean hasFocus, int row, int column) {
index e817d95..f02399d 100644 (file)
@@ -106,6 +106,7 @@ public class MembersWithProperties implements MembershipListener{
             this.channel = channel;
         }
 
+        @Override
         public void run() {
             System.out.println("Shutting down...");
             try {
index 6595f33..2beb8c7 100644 (file)
@@ -34,11 +34,13 @@ import org.apache.catalina.tribes.ChannelException;
  */
 public class TestChannelOptionFlag extends TestCase {
     GroupChannel channel = null;
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         channel = new GroupChannel();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
         if ( channel != null ) try {channel.stop(Channel.DEFAULT);}catch ( Exception ignore) { /* Ignore */ }
index 517c516..0bfbf01 100644 (file)
@@ -27,11 +27,13 @@ import org.apache.catalina.tribes.transport.ReceiverBase;
 public class TestChannelStartStop extends TestCase {
     GroupChannel channel = null;
     int udpPort = 45543;
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         channel = new GroupChannel();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
         try {channel.stop(Channel.DEFAULT);}catch (Exception ignore){ /* Ignore */ }
index c5bf7b3..642ed59 100644 (file)
@@ -44,6 +44,7 @@ public class TestDataIntegrity extends TestCase {
     GroupChannel channel2;
     Listener listener1;
     int threadCounter = 0;
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         channel1 = new GroupChannel();
@@ -56,6 +57,7 @@ public class TestDataIntegrity extends TestCase {
         channel2.start(Channel.DEFAULT);
     }
 
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
         channel1.stop(Channel.DEFAULT);
@@ -67,6 +69,7 @@ public class TestDataIntegrity extends TestCase {
         Thread[] threads = new Thread[threadCount];
         for (int x=0; x<threads.length; x++ ) {
             threads[x] = new Thread() {
+                @Override
                 public void run() {
                     try {
                         long start = System.currentTimeMillis();
@@ -95,6 +98,7 @@ public class TestDataIntegrity extends TestCase {
             Thread[] threads = new Thread[threadCount];
             for (int x=0; x<threads.length; x++ ) {
                 threads[x] = new Thread() {
+                    @Override
                     public void run() {
                         try {
                             long start = System.currentTimeMillis();
index 33e8eb9..bed5757 100644 (file)
@@ -44,6 +44,7 @@ public class TestMulticastPackages extends TestCase {
     GroupChannel channel2;
     Listener listener1;
     int threadCounter = 0;
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         channel1 = new GroupChannel();
@@ -66,6 +67,7 @@ public class TestMulticastPackages extends TestCase {
         channel2.start(Channel.DEFAULT);
     }
 
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
         channel1.stop(Channel.DEFAULT);
@@ -105,6 +107,7 @@ public class TestMulticastPackages extends TestCase {
         Thread[] threads = new Thread[threadCount];
         for (int x=0; x<threads.length; x++ ) {
             threads[x] = new Thread() {
+                @Override
                 public void run() {
                     try {
                         long start = System.currentTimeMillis();
index 03b051a..d21d6d5 100644 (file)
@@ -42,6 +42,7 @@ public class TestRemoteProcessException extends TestCase {
     GroupChannel channel1;
     GroupChannel channel2;
     Listener listener1;
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         channel1 = new GroupChannel();
@@ -52,6 +53,7 @@ public class TestRemoteProcessException extends TestCase {
         channel2.start(Channel.DEFAULT);
     }
 
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
         channel1.stop(Channel.DEFAULT);
index 5af6411..135eda6 100644 (file)
@@ -44,6 +44,7 @@ public class TestUdpPackages extends TestCase {
     GroupChannel channel2;
     Listener listener1;
     int threadCounter = 0;
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         channel1 = new GroupChannel();
@@ -66,6 +67,7 @@ public class TestUdpPackages extends TestCase {
         channel2.start(Channel.DEFAULT);
     }
 
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
         channel1.stop(Channel.DEFAULT);
@@ -98,6 +100,7 @@ public class TestUdpPackages extends TestCase {
         Thread[] threads = new Thread[threadCount];
         for (int x=0; x<threads.length; x++ ) {
             threads[x] = new Thread() {
+                @Override
                 public void run() {
                     try {
                         long start = System.currentTimeMillis();
@@ -147,6 +150,7 @@ public class TestUdpPackages extends TestCase {
         Thread[] threads = new Thread[threadCount];
         for (int x=0; x<threads.length; x++ ) {
             threads[x] = new Thread() {
+                @Override
                 public void run() {
                     try {
                         long start = System.currentTimeMillis();
index 10dd2e8..104b1df 100644 (file)
@@ -31,6 +31,7 @@ public class TestNonBlockingCoordinator extends TestCase {
     NonBlockingCoordinator[] coordinators = null;
     int channelCount = 10;
     Thread[] threads = null;
+    @Override
     protected void setUp() throws Exception {
         System.out.println("Setup");
         super.setUp();
@@ -44,6 +45,7 @@ public class TestNonBlockingCoordinator extends TestCase {
             channels[i].addInterceptor(new TcpFailureDetector());
             final int j = i;
             threads[i] = new Thread() {
+                @Override
                 public void run() {
                     try {
                         channels[j].start(Channel.DEFAULT);
@@ -90,6 +92,7 @@ public class TestNonBlockingCoordinator extends TestCase {
         System.out.println("Coordinator[2b] is:" + member);
     }
 
+    @Override
     protected void tearDown() throws Exception {
         System.out.println("tearDown");
         super.tearDown();
index c88533d..95ff4a6 100644 (file)
@@ -39,6 +39,7 @@ public class TestOrderInterceptor extends TestCase {
     TestListener[] test = null;
     int channelCount = 2;
     Thread[] threads = null;
+    @Override
     protected void setUp() throws Exception {
         System.out.println("Setup");
         super.setUp();
@@ -59,6 +60,7 @@ public class TestOrderInterceptor extends TestCase {
             channels[i].addChannelListener(test[i]);
             final int j = i;
             threads[i] = new Thread() {
+                @Override
                 public void run() {
                     try {
                         channels[j].start(Channel.DEFAULT);
@@ -120,6 +122,7 @@ public class TestOrderInterceptor extends TestCase {
     }
 
 
+    @Override
     protected void tearDown() throws Exception {
         System.out.println("tearDown");
         super.tearDown();
@@ -160,6 +163,7 @@ public class TestOrderInterceptor extends TestCase {
         int cnt = 1;
         ChannelMessage hold = null;
         Member[] dest = null;
+        @Override
         public synchronized void sendMessage(Member[] destination, ChannelMessage msg, InterceptorPayload payload) throws ChannelException {
             if ( hold == null ) {
                 //System.out.println("Skipping message:"+msg);
index 8ee9057..6f7a4d3 100644 (file)
@@ -34,6 +34,7 @@ public class TestSenderConnections extends TestCase {
     private ManagedChannel[] channels = new ManagedChannel[count];
     private TestMsgListener[] listeners = new TestMsgListener[count];
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         for (int i = 0; i < channels.length; i++) {
@@ -86,6 +87,7 @@ public class TestSenderConnections extends TestCase {
         sendMessages(2000,15000);
     }
 
+    @Override
     protected void tearDown() throws Exception {
         for (int i = 0; i < channels.length; i++) {
             channels[i].stop(Channel.DEFAULT);
index bdb9fe0..75debf0 100644 (file)
@@ -20,6 +20,7 @@ import org.apache.catalina.tribes.io.XByteBuffer;
 import junit.framework.TestCase;
 
 public class TestSerialization extends TestCase {
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
     }
@@ -28,6 +29,7 @@ public class TestSerialization extends TestCase {
         
     }
 
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
     }
index 0239fcc..62d6541 100644 (file)
@@ -33,6 +33,7 @@ public class TestDomainFilter
     private ManagedChannel[] channels = new ManagedChannel[count];
     private TestMbrListener[] listeners = new TestMbrListener[count];
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         for (int i = 0; i < channels.length; i++) {
@@ -59,6 +60,7 @@ public class TestDomainFilter
         for (int i=0; i<channels.length; i++ ) {
             final Channel channel = channels[i];
             Thread t = new Thread() {
+                @Override
                 public void run() {
                     try {
                         channel.start(Channel.DEFAULT);
@@ -75,6 +77,7 @@ public class TestDomainFilter
         for (int i=listeners.length-1; i>=0; i-- ) assertEquals("Checking member arrival length",0,listeners[i].members.size());
     }
 
+    @Override
     protected void tearDown() throws Exception {
 
         for (int i = 0; i < channels.length; i++) {
index e74af4c..b57fe05 100644 (file)
@@ -31,6 +31,7 @@ public class TestMemberArrival
     private ManagedChannel[] channels = new ManagedChannel[count];
     private TestMbrListener[] listeners = new TestMbrListener[count];
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         for (int i = 0; i < channels.length; i++) {
@@ -55,6 +56,7 @@ public class TestMemberArrival
         for (int i=0; i<channels.length; i++ ) {
             final Channel channel = channels[i];
             Thread t = new Thread() {
+                @Override
                 public void run() {
                     try {
                         channel.start(Channel.DEFAULT);
@@ -72,6 +74,7 @@ public class TestMemberArrival
         for (int i=listeners.length-1; i>=0; i-- ) assertEquals("Checking member arrival length",channels.length-1,listeners[i].members.size());
     }
 
+    @Override
     protected void tearDown() throws Exception {
 
         for (int i = 0; i < channels.length; i++) {
index 623f674..2eef441 100644 (file)
@@ -33,6 +33,7 @@ public class TestMemberSerialization extends TestCase {
     MemberImpl m1, m2, p1,p2;
     byte[] payload = null;
     int udpPort = 3445;
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         payload = new byte[333];
@@ -108,6 +109,7 @@ public class TestMemberSerialization extends TestCase {
         return result;
     }
 
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
     }
index e0600db..ded0be2 100644 (file)
@@ -45,6 +45,7 @@ public class TestTcpFailureDetector extends TestCase {
     private ManagedChannel channel2 = null;
     private TestMbrListener mbrlist1 = null;
     private TestMbrListener mbrlist2 = null;
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         channel1 = new GroupChannel();
@@ -122,6 +123,7 @@ public class TestTcpFailureDetector extends TestCase {
     }
 
 
+    @Override
     protected void tearDown() throws Exception {
         tcpFailureDetector1 = null;
         tcpFailureDetector2 = null;
index 1619b25..bb90f4c 100644 (file)
@@ -41,6 +41,7 @@ public class SocketReceive {
         socket.setReceiveBufferSize(43800);
         InputStream in = socket.getInputStream();
         Thread t = new Thread() {
+            @Override
             public void run() {
                 while ( true ) {
                     try {
index e4b0555..97f0099 100644 (file)
@@ -45,6 +45,7 @@ public class SocketTribesReceive {
         socket.setReceiveBufferSize(size);
         InputStream in = socket.getInputStream();
         Thread t = new Thread() {
+            @Override
             public void run() {
                 while ( true ) {
                     try {
index e6193be..aa71133 100644 (file)
@@ -44,6 +44,7 @@ public class SocketValidateReceive {
         InputStream in = socket.getInputStream();
         MyDataReader reader = new MyDataReader(50000);
         Thread t = new Thread() {
+            @Override
             public void run() {
                 while ( true ) {
                     try {
index 6fee6e1..a986fa8 100644 (file)
@@ -41,6 +41,7 @@ public class Benchmarks extends TestCase {
 
     private static class GetDateBenchmarkTest_Sync implements Runnable {
 
+        @Override
         public String toString() {
             return "Syncs";
         }
@@ -68,11 +69,13 @@ public class Benchmarks extends TestCase {
 
     private static class GetDateBenchmarkTest_Local implements Runnable {
 
+        @Override
         public String toString() {
             return "ThreadLocals";
         }
 
         private ThreadLocal<Long> currentMillisLocal = new ThreadLocal<Long>() {
+            @Override
             protected Long initialValue() {
                 return Long.valueOf(0);
             }
@@ -97,6 +100,7 @@ public class Benchmarks extends TestCase {
     private static class GetDateBenchmarkTest_LocalMutableLong implements
             Runnable {
 
+        @Override
         public String toString() {
             return "ThreadLocals with a mutable Long";
         }
@@ -106,6 +110,7 @@ public class Benchmarks extends TestCase {
         }
 
         private ThreadLocal<MutableLong> currentMillisLocal = new ThreadLocal<MutableLong>() {
+            @Override
             protected MutableLong initialValue() {
                 return new MutableLong();
             }
@@ -129,6 +134,7 @@ public class Benchmarks extends TestCase {
 
     private static class GetDateBenchmarkTest_LocalStruct implements Runnable {
 
+        @Override
         public String toString() {
             return "single ThreadLocal";
         }
@@ -140,6 +146,7 @@ public class Benchmarks extends TestCase {
         }
 
         private ThreadLocal<Struct> currentStruct = new ThreadLocal<Struct>() {
+            @Override
             protected Struct initialValue() {
                 return new Struct();
             }
@@ -189,6 +196,7 @@ public class Benchmarks extends TestCase {
     private static class TimeDateElementBenchmarkTest_Sync extends
             TimeDateElementBenchmarkTestBase implements Runnable {
 
+        @Override
         public String toString() {
             return "Syncs";
         }
@@ -246,6 +254,7 @@ public class Benchmarks extends TestCase {
     private static class TimeDateElementBenchmarkTest_Local extends
             TimeDateElementBenchmarkTestBase implements Runnable {
 
+        @Override
         public String toString() {
             return "ThreadLocals";
         }
@@ -253,26 +262,31 @@ public class Benchmarks extends TestCase {
         private ThreadLocal<String> currentDateStringLocal = new ThreadLocal<String>();
 
         private ThreadLocal<Date> currentDateLocal = new ThreadLocal<Date>() {
+            @Override
             protected Date initialValue() {
                 return new Date();
             }
         };
         private ThreadLocal<SimpleDateFormat> dayFormatterLocal = new ThreadLocal<SimpleDateFormat>() {
+            @Override
             protected SimpleDateFormat initialValue() {
                 return new SimpleDateFormat("dd");
             }
         };
         private ThreadLocal<SimpleDateFormat> monthFormatterLocal = new ThreadLocal<SimpleDateFormat>() {
+            @Override
             protected SimpleDateFormat initialValue() {
                 return new SimpleDateFormat("MM");
             }
         };
         private ThreadLocal<SimpleDateFormat> yearFormatterLocal = new ThreadLocal<SimpleDateFormat>() {
+            @Override
             protected SimpleDateFormat initialValue() {
                 return new SimpleDateFormat("yyyy");
             }
         };
         private ThreadLocal<SimpleDateFormat> timeFormatterLocal = new ThreadLocal<SimpleDateFormat>() {
+            @Override
             protected SimpleDateFormat initialValue() {
                 return new SimpleDateFormat("hh:mm:ss");
             }
@@ -317,6 +331,7 @@ public class Benchmarks extends TestCase {
     private static class TimeDateElementBenchmarkTest_LocalStruct extends
             TimeDateElementBenchmarkTestBase implements Runnable {
 
+        @Override
         public String toString() {
             return "single ThreadLocal";
         }
@@ -332,6 +347,7 @@ public class Benchmarks extends TestCase {
         }
 
         private ThreadLocal<Struct> structLocal = new ThreadLocal<Struct>() {
+            @Override
             protected Struct initialValue() {
                 return new Struct();
             }
@@ -375,6 +391,7 @@ public class Benchmarks extends TestCase {
     private static class TimeDateElementBenchmarkTest_LocalStruct_SBuilder extends
             TimeDateElementBenchmarkTestBase implements Runnable {
 
+        @Override
         public String toString() {
             return "single ThreadLocal, with StringBuilder";
         }
@@ -390,6 +407,7 @@ public class Benchmarks extends TestCase {
         }
 
         private ThreadLocal<Struct> structLocal = new ThreadLocal<Struct>() {
+            @Override
             protected Struct initialValue() {
                 return new Struct();
             }
index d19eb73..712f9e5 100644 (file)
@@ -51,6 +51,7 @@ public abstract class CookiesBaseTest extends TomcatBaseTest {
             this.cookieValue = cookieValue;
         }
         
+        @Override
         public void doGet(HttpServletRequest req, HttpServletResponse res) 
                 throws IOException {
             try {
index d717a00..f7f18bd 100644 (file)
@@ -28,6 +28,7 @@ import org.apache.tomcat.util.buf.ByteChunk;
  */
 public class TestCookiesNoFwdStrictSysProps extends CookiesBaseTest {
     
+    @Override
     public void testCookiesInstance() throws Exception {
 
         System.setProperty("org.apache.catalina.STRICT_SERVLET_COMPLIANCE",