Index: modules/archive/src/test/java/tests/api/java/util/zip/ZipEntryTest.java =================================================================== --- modules/archive/src/test/java/tests/api/java/util/zip/ZipEntryTest.java.orig 2006-03-22 15:33:20.000000000 +0000 +++ modules/archive/src/test/java/tests/api/java/util/zip/ZipEntryTest.java 2006-03-22 15:51:19.000000000 +0000 @@ -291,12 +291,12 @@ public void test_setMethodI() { // Test for method void java.util.zip.ZipEntry.setMethod(int) zentry = zfile.getEntry("File3.txt"); - zentry.setMethod(zentry.STORED); + zentry.setMethod(ZipEntry.STORED); assertTrue("Failed to set compression method", - zentry.getMethod() == zentry.STORED); - zentry.setMethod(zentry.DEFLATED); + zentry.getMethod() == ZipEntry.STORED); + zentry.setMethod(ZipEntry.DEFLATED); assertTrue("Failed to set compression method", - zentry.getMethod() == zentry.DEFLATED); + zentry.getMethod() == ZipEntry.DEFLATED); try { int error = 1; zentry = new ZipEntry("test.tst"); Index: modules/archive/src/test/java/tests/api/java/util/zip/ZipOutputStreamTest.java =================================================================== --- modules/archive/src/test/java/tests/api/java/util/zip/ZipOutputStreamTest.java.orig 2006-03-22 15:33:20.000000000 +0000 +++ modules/archive/src/test/java/tests/api/java/util/zip/ZipOutputStreamTest.java 2006-03-22 15:51:19.000000000 +0000 @@ -174,7 +174,7 @@ public void test_setMethodI() { try { ZipEntry ze = new ZipEntry("test"); - zos.setMethod(zos.STORED); + zos.setMethod(ZipOutputStream.STORED); CRC32 tempCrc = new CRC32(); tempCrc.update(data.getBytes()); ze.setCrc(tempCrc.getValue()); @@ -183,7 +183,7 @@ zos.write(data.getBytes()); zos.closeEntry(); long csize = ze.getCompressedSize(); - zos.setMethod(zos.DEFLATED); + zos.setMethod(ZipOutputStream.DEFLATED); zos.putNextEntry(ze = new ZipEntry("test2")); zos.write(data.getBytes()); zos.closeEntry(); Index: modules/beans/src/main/java/java/beans/beancontext/BeanContextServicesSupport.java =================================================================== --- modules/beans/src/main/java/java/beans/beancontext/BeanContextServicesSupport.java.orig 2006-03-22 15:33:20.000000000 +0000 +++ modules/beans/src/main/java/java/beans/beancontext/BeanContextServicesSupport.java 2006-03-22 15:51:19.000000000 +0000 @@ -309,7 +309,7 @@ for (Iterator it = this.services.keySet().iterator(); it.hasNext(); ) { Object key = it.next(); - if (this.getChildSerializable(key) != null) { + if (BeanContextSupport.getChildSerializable(key) != null) { oos.writeObject(this.services.get(key)); } } Index: modules/beans/src/main/java/java/beans/beancontext/BeanContextSupport.java =================================================================== --- modules/beans/src/main/java/java/beans/beancontext/BeanContextSupport.java.orig 2006-03-22 15:33:20.000000000 +0000 +++ modules/beans/src/main/java/java/beans/beancontext/BeanContextSupport.java 2006-03-22 15:51:19.000000000 +0000 @@ -1188,7 +1188,7 @@ for (Iterator it = coll.iterator(); it.hasNext(); ) { Object l = it.next(); - if (this.getChildSerializable(l) != null) { + if (getChildSerializable(l) != null) { oos.writeObject(l); } } Index: modules/luni/src/test/java/tests/api/java/lang/IllegalArgumentExceptionTest.java =================================================================== --- modules/luni/src/test/java/tests/api/java/lang/IllegalArgumentExceptionTest.java.orig 2006-03-22 15:33:20.000000000 +0000 +++ modules/luni/src/test/java/tests/api/java/lang/IllegalArgumentExceptionTest.java 2006-03-22 15:51:19.000000000 +0000 @@ -20,7 +20,7 @@ class TestThread implements Runnable { public void run() { try { - Thread.currentThread().sleep(5000); + Thread.sleep(5000); } catch (Exception e) { System.out.println("Unable to start thread"); } Index: modules/luni/src/test/java/tests/api/java/lang/IllegalThreadStateExceptionTest.java =================================================================== --- modules/luni/src/test/java/tests/api/java/lang/IllegalThreadStateExceptionTest.java.orig 2006-03-22 15:36:17.000000000 +0000 +++ modules/luni/src/test/java/tests/api/java/lang/IllegalThreadStateExceptionTest.java 2006-03-22 15:51:19.000000000 +0000 @@ -20,7 +20,7 @@ class TestThread implements Runnable { public void run() { try { - Thread.currentThread().sleep(1000); + Thread.sleep(1000); } catch (Exception e) { System.out.println("Unable to start thread"); } Index: modules/luni/src/test/java/tests/api/java/lang/ProcessTest.java =================================================================== --- modules/luni/src/test/java/tests/api/java/lang/ProcessTest.java.orig 2006-03-22 15:33:20.000000000 +0000 +++ modules/luni/src/test/java/tests/api/java/lang/ProcessTest.java 2006-03-22 15:51:19.000000000 +0000 @@ -81,7 +81,7 @@ String str3 = "Here is some more data.\n"; os.write(str1.getBytes()); try { - Thread.currentThread().sleep(1000); + Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } Index: modules/luni/src/test/java/tests/api/java/lang/ThreadGroupTest.java =================================================================== --- modules/luni/src/test/java/tests/api/java/lang/ThreadGroupTest.java.orig 2006-03-22 15:36:17.000000000 +0000 +++ modules/luni/src/test/java/tests/api/java/lang/ThreadGroupTest.java 2006-03-22 15:51:19.000000000 +0000 @@ -1489,7 +1489,7 @@ protected void myassertTrue(String msg, boolean b) { // This method is defined here just to solve a visibility problem // of protected methods with inner types - this.assertTrue(msg, b); + assertTrue(msg, b); } private ThreadGroup getRootThreadGroup() { Index: modules/luni/src/test/java/tests/api/java/lang/ThreadTest.java =================================================================== --- modules/luni/src/test/java/tests/api/java/lang/ThreadTest.java.orig 2006-03-22 15:33:20.000000000 +0000 +++ modules/luni/src/test/java/tests/api/java/lang/ThreadTest.java 2006-03-22 15:51:19.000000000 +0000 @@ -245,7 +245,7 @@ public void test_activeCount() { // Test for method int java.lang.Thread.activeCount() Thread t = new Thread(new SimpleThread(1)); - int active = t.activeCount(); + int active = Thread.activeCount(); assertTrue("Incorrect read made: " + active, active > 0); t.start(); try { @@ -840,7 +840,7 @@ long stime = 0, ftime = 0; try { stime = System.currentTimeMillis(); - Thread.currentThread().sleep(1000); + Thread.sleep(1000); ftime = System.currentTimeMillis(); } catch (InterruptedException e) { fail("Unexpected interrupt received"); @@ -858,7 +858,7 @@ long stime = 0, ftime = 0; try { stime = System.currentTimeMillis(); - Thread.currentThread().sleep(1000, 999999); + Thread.sleep(1000, 999999); ftime = System.currentTimeMillis(); } catch (InterruptedException e) { fail("Unexpected interrupt received"); Index: modules/luni/src/test/java/tests/api/java/net/DatagramSocketTest.java =================================================================== --- modules/luni/src/test/java/tests/api/java/net/DatagramSocketTest.java.orig 2006-03-22 15:33:20.000000000 +0000 +++ modules/luni/src/test/java/tests/api/java/net/DatagramSocketTest.java 2006-03-22 15:51:19.000000000 +0000 @@ -734,7 +734,7 @@ InetAddress localHost = null; try { localHost = InetAddress.getLocalHost(); - Thread.currentThread().sleep(1000); + Thread.sleep(1000); DatagramSocket sds = new DatagramSocket(Support_PortManager .getNextPort()); DatagramPacket rdp = new DatagramPacket("Test String" @@ -910,7 +910,7 @@ try { Thread.sleep(500); ds.send(dp); - Thread.currentThread().sleep(5000); + Thread.sleep(5000); } catch (InterruptedException e) { ds.close(); assertTrue("Incorrect data sent: " + retval, retval Index: modules/luni/src/test/java/tests/api/java/net/ServerSocketTest.java =================================================================== --- modules/luni/src/test/java/tests/api/java/net/ServerSocketTest.java.orig 2006-03-22 15:33:20.000000000 +0000 +++ modules/luni/src/test/java/tests/api/java/net/ServerSocketTest.java 2006-03-22 15:51:19.000000000 +0000 @@ -51,11 +51,11 @@ public void run() { try { // Go to sleep so the server can setup and wait for connection - Thread.currentThread().sleep(1000); + Thread.sleep(1000); cs = new Socket(InetAddress.getLocalHost().getHostName(), port); // Sleep again to allow server side processing. Thread is // stopped by server. - Thread.currentThread().sleep(10000); + Thread.sleep(10000); } catch (InterruptedException e) { return; } catch (Throwable e) { @@ -914,7 +914,7 @@ t = new Thread(new SSClient(port), "SSClient"); t.start(); try { - Thread.currentThread().sleep(1000); + Thread.sleep(1000); } catch (java.lang.InterruptedException e) { System.out.println("Exception during startClinet()" + e.toString()); } Index: modules/luni/src/test/java/tests/api/java/net/URLConnectionTest.java =================================================================== --- modules/luni/src/test/java/tests/api/java/net/URLConnectionTest.java.orig 2006-03-22 15:33:20.000000000 +0000 +++ modules/luni/src/test/java/tests/api/java/net/URLConnectionTest.java 2006-03-22 15:51:19.000000000 +0000 @@ -221,17 +221,17 @@ * @tests java.net.URLConnection#getFileNameMap() */ public void test_getFileNameMap() { - uc.setFileNameMap(new FileNameMap() { + URLConnection.setFileNameMap(new FileNameMap() { public String getContentTypeFor(String fileName) { return "Spam!"; } }); try { - assertTrue("Incorrect FileNameMap returned", uc.getFileNameMap() + assertTrue("Incorrect FileNameMap returned", URLConnection.getFileNameMap() .getContentTypeFor(null).equals("Spam!")); } finally { // unset the map so other tests don't fail - uc.setFileNameMap(null); + URLConnection.setFileNameMap(null); } } Index: modules/luni/src/test/java/tests/api/java/net/URLTest.java =================================================================== --- modules/luni/src/test/java/tests/api/java/net/URLTest.java.orig 2006-03-22 15:33:20.000000000 +0000 +++ modules/luni/src/test/java/tests/api/java/net/URLTest.java 2006-03-22 15:51:19.000000000 +0000 @@ -69,12 +69,12 @@ } try { u = new URL("http://www.yahoo.com"); - u.setURLStreamHandlerFactory(new TestFactory()); + URL.setURLStreamHandlerFactory(new TestFactory()); } catch (Exception e) { fail("Exception during test : " + e.getMessage()); } try { - u.setURLStreamHandlerFactory(new TestFactory()); + URL.setURLStreamHandlerFactory(new TestFactory()); fail("Can only set Factory once."); } catch (Error e) { } Index: modules/luni/src/test/java/tests/api/java/util/LocaleTest.java =================================================================== --- modules/luni/src/test/java/tests/api/java/util/LocaleTest.java.orig 2006-03-22 15:33:20.000000000 +0000 +++ modules/luni/src/test/java/tests/api/java/util/LocaleTest.java 2006-03-22 15:51:19.000000000 +0000 @@ -73,7 +73,7 @@ // java.util.Locale.getAvailableLocales() // Assumes there will generally be about 100+ available locales... try { - Locale[] locales = testLocale.getAvailableLocales(); + Locale[] locales = Locale.getAvailableLocales(); assertTrue("Wrong number of locales: ", locales.length > 100); } catch (Exception e) { fail("Exception during test : " + e.getMessage()); @@ -235,7 +235,7 @@ // Test for method java.lang.String [] // java.util.Locale.getISOLanguages() // Assumes always at least 131 ISOlanguages... - String[] isoLang = testLocale.getISOLanguages(); + String[] isoLang = Locale.getISOLanguages(); int length = isoLang.length; assertTrue("Random element in wrong format.", (isoLang[length / 2] .length() == 2) Index: support/src/test/java/tests/support/Support_HttpServer.java =================================================================== --- support/src/test/java/tests/support/Support_HttpServer.java.orig 2006-03-22 15:33:20.000000000 +0000 +++ support/src/test/java/tests/support/Support_HttpServer.java 2006-03-22 15:51:19.000000000 +0000 @@ -125,8 +125,7 @@ // release the lock so the tests will finish running if (!shuttingDown) { e.printStackTrace(); - testcase - .fail("Test server error on HTTP Server on port " + TestCase.fail("Test server error on HTTP Server on port " + port + ": " + e); } synchronized (lock) { @@ -228,26 +227,25 @@ } if (lline.startsWith("content-length")) { if (contentLength) - testcase.fail("Duplicate Content-Length: " + line); + TestCase.fail("Duplicate Content-Length: " + line); contentLength = true; length = Integer.parseInt(line.substring(line .indexOf(' ') + 1)); } if (line.startsWith("transfer-encoding")) { if (chunked) - testcase.fail("Duplicate Transfer-Encoding: " + TestCase.fail("Duplicate Transfer-Encoding: " + line); chunked = true; String encoding = line.substring(line.indexOf(' ') + 1); if ("chunked".equals(encoding)) - testcase.fail("Unknown Transfer-Encoding: " + TestCase.fail("Unknown Transfer-Encoding: " + encoding); } } if (contentLength && chunked) - testcase - .fail("Found both Content-Length and Transfer-Encoding"); + TestCase.fail("Found both Content-Length and Transfer-Encoding"); // call the test function based on the requested resource if (resourceName.equals(CHUNKEDTEST)) @@ -407,9 +405,9 @@ String header = (String) headers.elementAt(i); if (header.startsWith("header1:")) { found++; - testcase.assertTrue("unexpected header: " + header, + TestCase.assertTrue("unexpected header: " + header, found == 1); - testcase.assertTrue("invalid header: " + header, + TestCase.assertTrue("invalid header: " + header, "header1: value2".equals(header)); } } Index: support/src/test/java/tests/support/Support_HttpTests.java =================================================================== --- support/src/test/java/tests/support/Support_HttpTests.java.orig 2006-03-22 15:33:20.000000000 +0000 +++ support/src/test/java/tests/support/Support_HttpTests.java 2006-03-22 15:51:19.000000000 +0000 @@ -20,6 +20,8 @@ import java.io.InputStream; import java.io.OutputStream; +import junit.framework.TestCase; + /** * Performs some basic testing of either HttpConnection or HttpURLConnection * depending on the Support_ServerSocket and Support_HttpConnector passed to the @@ -77,11 +79,11 @@ c = is.read(); is.close(); connector.close(); - test.assertTrue("Error receiving chunked transfer coded data", + TestCase.assertTrue("Error receiving chunked transfer coded data", c == -1); } catch (Exception e) { e.printStackTrace(); - test.fail("Exception during test a: " + e); + TestCase.fail("Exception during test a: " + e); } // Content-Length Test @@ -97,11 +99,11 @@ is.close(); connector.close(); String result = new String(bout.toByteArray(), "ISO8859_1"); - test.assertTrue("Error receiving content coded data: " + result, + TestCase.assertTrue("Error receiving content coded data: " + result, "ABCDE".equals(result)); } catch (Exception e) { e.printStackTrace(); - test.fail("Exception during test b: " + e); + TestCase.fail("Exception during test b: " + e); } // Headers Test @@ -117,19 +119,19 @@ if (key == null && i > 0) break; if ("Cache-Control".equals(key)) { - test.assertTrue("Too many headers at: " + i, found <= 2); + TestCase.assertTrue("Too many headers at: " + i, found <= 2); String value = connector.getHeaderField(i); - test.assertTrue("Invalid header value: " + found + ": " + TestCase.assertTrue("Invalid header value: " + found + ": " + value, expected[found].equals(value)); found++; } i++; } - test.assertTrue("Invalid headers: " + found, found == 3); + TestCase.assertTrue("Invalid headers: " + found, found == 3); connector.close(); } catch (Exception e) { e.printStackTrace(); - test.fail("Exception during test c: " + e); + TestCase.fail("Exception during test c: " + e); } // Post Test @@ -151,11 +153,11 @@ is.close(); connector.close(); String result = new String(bout.toByteArray(), "ISO8859_1"); - test.assertTrue("Error sending data 1: " + result, toWrite + TestCase.assertTrue("Error sending data 1: " + result, toWrite .equals(result)); } catch (Exception e) { e.printStackTrace(); - test.fail("Exception during test d: " + e); + TestCase.fail("Exception during test d: " + e); } // Post Test chunked @@ -176,11 +178,11 @@ is.close(); connector.close(); String result = new String(bout.toByteArray(), "ISO8859_1"); - test.assertTrue("Error sending data 2: " + result, ("C" + toWrite) + TestCase.assertTrue("Error sending data 2: " + result, ("C" + toWrite) .equals(result)); } catch (Exception e) { e.printStackTrace(); - test.fail("Exception during test e: " + e); + TestCase.fail("Exception during test e: " + e); } OutputStream os = null; @@ -206,11 +208,11 @@ is.close(); connector.close(); String result = new String(data, 0, len, "ISO8859_1"); - test.assertTrue("Basic port error: " + result, message + TestCase.assertTrue("Basic port error: " + result, message .equals(result)); } catch (IOException e) { e.printStackTrace(); - test.fail("Exception during basic post test: " + e); + TestCase.fail("Exception during basic post test: " + e); } String chunkChar = connector.isChunkedOnFlush() ? "C" : ""; @@ -235,11 +237,11 @@ is.close(); connector.close(); String result = new String(data, 0, len, "ISO8859_1"); - test.assertTrue("Flushing with post: " + result, (chunkChar + TestCase.assertTrue("Flushing with post: " + result, (chunkChar + message1 + chunkChar + message2).equals(result)); } catch (IOException e) { e.printStackTrace(); - test.fail("Exception during flushing post test: " + e); + TestCase.fail("Exception during flushing post test: " + e); } // Flushing with post and setting content-length @@ -263,13 +265,12 @@ is.close(); connector.close(); String result = new String(data, 0, len, "ISO8859_1"); - test.assertTrue("Flushing with post and setting content-length: " + TestCase.assertTrue("Flushing with post and setting content-length: " + result, (chunkChar + message1 + chunkChar + message2) .equals(result)); } catch (IOException e) { e.printStackTrace(); - test - .fail("Exception during flushing with content-length post test: " + TestCase.fail("Exception during flushing with content-length post test: " + e); } @@ -292,11 +293,11 @@ is.close(); connector.close(); String result = new String(data, 0, len, "ISO8859_1"); - test.assertTrue("Flushing followed immediately by a close(): " + TestCase.assertTrue("Flushing followed immediately by a close(): " + result, (chunkChar + message).equals(result)); } catch (IOException e) { e.printStackTrace(); - test.fail("Exception during flush followed by close post test: " + TestCase.fail("Exception during flush followed by close post test: " + e); } @@ -330,13 +331,11 @@ // says there MUST NOT be a message body on 304 responses. // But Java returns the message-body if (!(c == results[i] || c == -1)) { - test - .fail("Incorrect data returned on test of HTTP response " + TestCase.fail("Incorrect data returned on test of HTTP response " + testCodes[i]); } } else if (c != results[i]) { - test - .fail("Incorrect data returned on test of HTTP response " + TestCase.fail("Incorrect data returned on test of HTTP response " + testCodes[i]); } while (c > 0) @@ -345,7 +344,7 @@ is.close(); } catch (Exception e) { e.printStackTrace(); - test.fail("Error during redirection test " + i + ": " + e); + TestCase.fail("Error during redirection test " + i + ": " + e); } } @@ -376,8 +375,7 @@ connector.close(); c = is.read(); - test - .assertTrue( + TestCase.assertTrue( "Incorrect data returned on redirection to a different port.", c == 'A'); while (c > 0) @@ -386,13 +384,13 @@ is.close(); } catch (Exception e) { e.printStackTrace(); - test.fail("Exception during test f: " + e); + TestCase.fail("Exception during test f: " + e); } server2.stopServer(); } catch (IllegalAccessException e) { - test.fail("Exception during redirection to a different port:" + e); + TestCase.fail("Exception during redirection to a different port:" + e); } catch (InstantiationException e) { - test.fail("Exception during redirection to a different port:" + e); + TestCase.fail("Exception during redirection to a different port:" + e); } // test redirecting to a relative URL on the same host @@ -404,8 +402,7 @@ connector.close(); c = is.read(); - test.assertTrue( - "Incorrect data returned on redirect to relative URI.", + TestCase.assertTrue("Incorrect data returned on redirect to relative URI.", c == 'A'); while (c > 0) c = is.read(); @@ -413,7 +410,7 @@ is.close(); } catch (Exception e) { e.printStackTrace(); - test.fail("Exception during redirection test to a relative URL: " + TestCase.fail("Exception during redirection test to a relative URL: " + e); } server.stopServer();