harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r463611 - /incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/
Date Fri, 13 Oct 2006 09:57:43 GMT
Author: hindessm
Date: Fri Oct 13 02:57:42 2006
New Revision: 463611

URL: http://svn.apache.org/viewvc?view=rev&rev=463611
Log:
Converting things like:

  assertTrue(blah == [true|false|null]) to assert[True|False|Null]
  assertEquals(blah, [true,false,null]) to assert[True|False|Null]
  assertEquals([true,false,null], blah) to assert[True|False|Null]

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/ConsoleHandlerTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/FileHandlerTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/HandlerTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogManagerTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogRecordTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LoggerTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/SocketHandlerTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/StreamHandlerTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/ConsoleHandlerTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/ConsoleHandlerTest.java?view=diff&rev=463611&r1=463610&r2=463611
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/ConsoleHandlerTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/ConsoleHandlerTest.java
Fri Oct 13 02:57:42 2006
@@ -164,10 +164,10 @@
 		ConsoleHandler h = new ConsoleHandler();
 		assertSame(h.getLevel(), Level.INFO);
 		assertTrue(h.getFormatter() instanceof SimpleFormatter);
-		assertEquals(h.getFilter(), null);
-		assertEquals(h.getEncoding(), null);
+		assertNull(h.getFilter());
+		assertNull(h.getEncoding());
 		h.publish(new LogRecord(Level.SEVERE, "test"));
-		assertEquals(h.getEncoding(), null);
+		assertNull(h.getEncoding());
 	}
 
 	/*

Modified: incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/FileHandlerTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/FileHandlerTest.java?view=diff&rev=463611&r1=463610&r2=463611
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/FileHandlerTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/FileHandlerTest.java
Fri Oct 13 02:57:42 2006
@@ -456,7 +456,7 @@
 				.PropertiesToInputStream(props));
 		handler = new FileHandler();
 		assertEquals(Level.ALL, handler.getLevel());
-		assertEquals(null, handler.getFilter());
+		assertNull(handler.getFilter());
 		assertTrue(handler.getFormatter() instanceof XMLFormatter);
 		assertNull(handler.getEncoding());
 		handler.close();

Modified: incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/HandlerTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/HandlerTest.java?view=diff&rev=463611&r1=463610&r2=463611
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/HandlerTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/HandlerTest.java
Fri Oct 13 02:57:42 2006
@@ -511,7 +511,7 @@
 			h.reportError(null, null, 0);
 			assertEquals(0, CallVerificationStack.getInstance().popInt());
 			assertSame(null, CallVerificationStack.getInstance().pop());
-			assertEquals(null, CallVerificationStack.getInstance().pop());
+			assertNull(CallVerificationStack.getInstance().pop());
 		} catch (SecurityException e) {
 			fail("Should not throw SecurityException!");
 		} finally {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogManagerTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogManagerTest.java?view=diff&rev=463611&r1=463610&r2=463611
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogManagerTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogManagerTest.java
Fri Oct 13 02:57:42 2006
@@ -413,7 +413,7 @@
 		root = mockManager.getLogger("");
 		checkPropertyNull(mockManager);
 		assertEquals(0, root.getHandlers().length);
-		assertEquals(null, root.getLevel());
+		assertNull(root.getLevel());
 		mockManager.readConfiguration(EnvironmentHelper.PropertiesToInputStream(props));
 		assertEquals(Level.FINE, root.getLevel());
 		checkProperty(mockManager);
@@ -489,7 +489,7 @@
 //	public void testReadConfiguration() throws SecurityException, IOException {
 //          FIXME: move the support_exec
 //			Logger foo = new MockLogger("foo", null);
-//			assertEquals(null, foo.getLevel());
+//			assertNull(foo.getLevel());
 //			assertTrue(mockManager.addLogger(foo));
 //
 //			Logger fo = new MockLogger("foo2", null);
@@ -505,7 +505,7 @@
 //			// level DO has effect
 //			assertEquals(Level.WARNING, foo.getLevel());
 //			// for non specifed logger, level is reset to null
-//			assertEquals(null, fo.getLevel());
+//			assertNull(fo.getLevel());
 //
 //			// read properties don't affect handler
 //			assertNotSame(Level.OFF, h.getLevel());
@@ -521,7 +521,7 @@
 		InputStream stream = EnvironmentHelper.PropertiesToInputStream(props);
 
 		Logger foo = new MockLogger(FOO, null);
-		assertEquals(null, foo.getLevel());
+		assertNull(foo.getLevel());
 		assertTrue(mockManager.addLogger(foo));
 
 		Logger fo = new MockLogger("LogManagerTestFoo2", null);
@@ -540,7 +540,7 @@
 		assertEquals(Level.WARNING, foo.getLevel());
 
 		// for non specifed logger, level is reset to null
-		assertEquals(null, fo.getLevel());
+		assertNull(fo.getLevel());
 
 		// read properties don't affect handler
 		assertNotSame(Level.OFF, h.getLevel());
@@ -568,11 +568,11 @@
 				.getLogger("testReadConfigurationInputStream_root.foo2");
 
 		manager.addLogger(logger);
-		assertEquals(null, logger.getLevel());
+		assertNull(logger.getLevel());
 		assertEquals(0, logger.getHandlers().length);
 		assertSame(root, logger.getParent());
 
-		assertEquals(null, logger2.getLevel());
+		assertNull(logger2.getLevel());
 		assertEquals(0, logger2.getHandlers().length);
 		assertSame(root, logger2.getParent());
 		// if (!hasConfigClass) {
@@ -584,7 +584,7 @@
 		manager.readConfiguration(stream);
 		assertEquals(Level.FINE, root.getLevel());
 		assertEquals(2, root.getHandlers().length);
-		assertEquals(null, logger.getLevel());
+		assertNull(logger.getLevel());
 		assertEquals(0, logger.getHandlers().length);
 		stream.close();
 	}
@@ -650,7 +650,7 @@
 		mockManager.readConfiguration(EnvironmentHelper.PropertiesToInputStream(props));
 		assertNotNull(mockManager.getProperty("handlers"));
 		Logger foo = new MockLogger(FOO, null);
-		assertEquals(null, foo.getLevel());
+		assertNull(foo.getLevel());
         assertEquals(0, foo.getHandlers().length);
 		foo.setLevel(Level.ALL);
 		foo.addHandler(new ConsoleHandler());
@@ -665,7 +665,7 @@
 		assertNull(mockManager.getProperty("handlers"));
 
 		// level is null
-		assertEquals(null, foo.getLevel());
+		assertNull(foo.getLevel());
 		// handlers are all closed
 		assertEquals(0, foo.getHandlers().length);
 
@@ -827,7 +827,7 @@
 				e.printStackTrace();
 			}
 			checkProperty(manager);
-			assertEquals(root.getHandlers()[0].getLevel(), null);
+			assertNull(root.getHandlers()[0].getLevel());
 			assertEquals(1, root.getHandlers().length);
 			assertEquals(Level.INFO, root.getLevel());
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogRecordTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogRecordTest.java?view=diff&rev=463611&r1=463610&r2=463611
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogRecordTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogRecordTest.java
Fri Oct 13 02:57:42 2006
@@ -147,15 +147,15 @@
 		lr = new LogRecord(Level.SEVERE, MSG);
 		lr.setSourceMethodName(null);
 		logger.log(lr);
-		assertEquals(null, handler.getSourceClassName());
-		assertEquals(null, handler.getSourceMethodName());
+		assertNull(handler.getSourceClassName());
+		assertNull(handler.getSourceMethodName());
 
 		// only set source class to null
 		lr = new LogRecord(Level.SEVERE, MSG);
 		lr.setSourceClassName(null);
 		logger.log(lr);
-		assertEquals(null, handler.getSourceClassName());
-		assertEquals(null, handler.getSourceMethodName());
+		assertNull(handler.getSourceClassName());
+		assertNull(handler.getSourceMethodName());
 
 		// set both
 		lr = new LogRecord(Level.SEVERE, MSG);
@@ -163,7 +163,7 @@
 		lr.setSourceMethodName(null);
 		logger.log(lr);
 		assertEquals("className", handler.getSourceClassName());
-		assertEquals(null, handler.getSourceMethodName());
+		assertNull(handler.getSourceMethodName());
 
 		// test if LogRecord is constructed in another class, and is published
 		// by Logger

Modified: incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LoggerTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LoggerTest.java?view=diff&rev=463611&r1=463610&r2=463611
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LoggerTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LoggerTest.java
Fri Oct 13 02:57:42 2006
@@ -133,7 +133,7 @@
 		assertNull(mlog.getFilter());
 		assertEquals(0, mlog.getHandlers().length);
 		assertNull(mlog.getLevel());
-		assertEquals(null, mlog.getName());
+		assertNull(mlog.getName());
 		assertNull(mlog.getParent());
 		assertNull(mlog.getResourceBundle());
 		assertNull(mlog.getResourceBundleName());
@@ -187,7 +187,7 @@
 			assertNull(alog.getFilter());
 			assertEquals(0, alog.getHandlers().length);
 			assertNull(alog.getLevel());
-			assertEquals(null, alog.getName());
+			assertNull(alog.getName());
 			assertNull(alog.getParent().getParent());
 			assertNull(alog.getResourceBundle());
 			assertNull(alog.getResourceBundleName());
@@ -209,7 +209,7 @@
 		assertNull(alog.getFilter());
 		assertEquals(0, alog.getHandlers().length);
 		assertNull(alog.getLevel());
-		assertEquals(null, alog.getName());
+		assertNull(alog.getName());
 		assertNull(alog.getParent().getParent());
 		assertEquals(VALID_VALUE, alog.getResourceBundle().getString(VALID_KEY));
 		assertEquals(alog.getResourceBundleName(), VALID_RESOURCE_BUNDLE);
@@ -226,7 +226,7 @@
 		assertNull(alog.getFilter());
 		assertEquals(0, alog.getHandlers().length);
 		assertNull(alog.getLevel());
-		assertEquals(null, alog.getName());
+		assertNull(alog.getName());
 		assertNull(alog.getParent().getParent());
 		assertNull(alog.getResourceBundle());
 		assertNull(alog.getResourceBundleName());
@@ -1242,10 +1242,10 @@
 	 */
 	public void testGetName_Null() {
 		Logger log = Logger.getAnonymousLogger();
-		assertEquals(null, log.getName());
+		assertNull(log.getName());
 
 		Logger mlog = new MockLogger(null, null);
-		assertEquals(null, mlog.getName());
+		assertNull(mlog.getName());
 	}
 
 	/*
@@ -1268,7 +1268,7 @@
 		assertNull(log.getResourceBundle());
 
 		Logger mlog = new MockLogger(null, null);
-		assertEquals(null, mlog.getResourceBundle());
+		assertNull(mlog.getResourceBundle());
 	}
 
 	/*
@@ -1280,7 +1280,7 @@
 		assertEquals(VALID_RESOURCE_BUNDLE, log.getResourceBundleName());
 
 		Logger mlog = new MockLogger(null, null);
-		assertEquals(null, mlog.getResourceBundleName());
+		assertNull(mlog.getResourceBundleName());
 	}
 
 	/*
@@ -1291,7 +1291,7 @@
 		assertNull(log.getResourceBundleName());
 
 		Logger mlog = new MockLogger(null, null);
-		assertEquals(null, mlog.getResourceBundleName());
+		assertNull(mlog.getResourceBundleName());
 	}
 
 	/*
@@ -1471,7 +1471,7 @@
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.FINER);
 		assertEquals(r.getParameters().length, 1);
-		assertEquals(r.getParameters()[0], null);
+		assertNull(r.getParameters()[0]);
 		assertSame(r.getThrown(), null);
 	}
 
@@ -1656,7 +1656,7 @@
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.FINER);
 		assertEquals(r.getParameters().length, 1);
-		assertEquals(r.getParameters()[0], null);
+		assertNull(r.getParameters()[0]);
 		assertSame(r.getThrown(), null);
 	}
 
@@ -1676,7 +1676,7 @@
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.CONFIG);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 
 		this.sharedLogger.setLevel(Level.INFO);
@@ -1698,13 +1698,13 @@
 		LogRecord r = (LogRecord) CallVerificationStack.getInstance().pop();
 		assertTrue(CallVerificationStack.getInstance().empty());
 		assertSame(r.getLoggerName(), child.getName());
-		assertEquals(r.getMessage(), null);
+		assertNull(r.getMessage());
 		assertSame(r.getResourceBundleName(), parent.getResourceBundleName());
 		assertSame(r.getResourceBundle(), parent.getResourceBundle());
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.CONFIG);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 
 		this.sharedLogger.setLevel(Level.INFO);
@@ -1728,7 +1728,7 @@
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.FINE);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 
 		this.sharedLogger.setLevel(Level.CONFIG);
@@ -1750,13 +1750,13 @@
 		LogRecord r = (LogRecord) CallVerificationStack.getInstance().pop();
 		assertTrue(CallVerificationStack.getInstance().empty());
 		assertSame(r.getLoggerName(), child.getName());
-		assertEquals(r.getMessage(), null);
+		assertNull(r.getMessage());
 		assertSame(r.getResourceBundleName(), parent.getResourceBundleName());
 		assertSame(r.getResourceBundle(), parent.getResourceBundle());
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.FINE);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 
 		this.sharedLogger.setLevel(Level.CONFIG);
@@ -1780,7 +1780,7 @@
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.FINER);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 
 		this.sharedLogger.setLevel(Level.FINE);
@@ -1802,13 +1802,13 @@
 		LogRecord r = (LogRecord) CallVerificationStack.getInstance().pop();
 		assertTrue(CallVerificationStack.getInstance().empty());
 		assertSame(r.getLoggerName(), child.getName());
-		assertEquals(r.getMessage(), null);
+		assertNull(r.getMessage());
 		assertSame(r.getResourceBundleName(), parent.getResourceBundleName());
 		assertSame(r.getResourceBundle(), parent.getResourceBundle());
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.FINER);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 
 		this.sharedLogger.setLevel(Level.FINE);
@@ -1832,7 +1832,7 @@
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.FINEST);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 
 		this.sharedLogger.setLevel(Level.FINER);
@@ -1854,13 +1854,13 @@
 		LogRecord r = (LogRecord) CallVerificationStack.getInstance().pop();
 		assertTrue(CallVerificationStack.getInstance().empty());
 		assertSame(r.getLoggerName(), child.getName());
-		assertEquals(r.getMessage(), null);
+		assertNull(r.getMessage());
 		assertSame(r.getResourceBundleName(), parent.getResourceBundleName());
 		assertSame(r.getResourceBundle(), parent.getResourceBundle());
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.FINEST);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 
 		this.sharedLogger.setLevel(Level.FINER);
@@ -1884,7 +1884,7 @@
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.INFO);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 
 		this.sharedLogger.setLevel(Level.WARNING);
@@ -1906,13 +1906,13 @@
 		LogRecord r = (LogRecord) CallVerificationStack.getInstance().pop();
 		assertTrue(CallVerificationStack.getInstance().empty());
 		assertSame(r.getLoggerName(), child.getName());
-		assertEquals(r.getMessage(), null);
+		assertNull(r.getMessage());
 		assertSame(r.getResourceBundleName(), parent.getResourceBundleName());
 		assertSame(r.getResourceBundle(), parent.getResourceBundle());
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.INFO);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 
 		this.sharedLogger.setLevel(Level.WARNING);
@@ -1936,7 +1936,7 @@
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.WARNING);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 
 		this.sharedLogger.setLevel(Level.SEVERE);
@@ -1958,13 +1958,13 @@
 		LogRecord r = (LogRecord) CallVerificationStack.getInstance().pop();
 		assertTrue(CallVerificationStack.getInstance().empty());
 		assertSame(r.getLoggerName(), child.getName());
-		assertEquals(r.getMessage(), null);
+		assertNull(r.getMessage());
 		assertSame(r.getResourceBundleName(), parent.getResourceBundleName());
 		assertSame(r.getResourceBundle(), parent.getResourceBundle());
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.WARNING);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 
 		this.sharedLogger.setLevel(Level.SEVERE);
@@ -1988,7 +1988,7 @@
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.SEVERE);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 
 		this.sharedLogger.setLevel(Level.OFF);
@@ -2010,13 +2010,13 @@
 		LogRecord r = (LogRecord) CallVerificationStack.getInstance().pop();
 		assertTrue(CallVerificationStack.getInstance().empty());
 		assertSame(r.getLoggerName(), child.getName());
-		assertEquals(r.getMessage(), null);
+		assertNull(r.getMessage());
 		assertSame(r.getResourceBundleName(), parent.getResourceBundleName());
 		assertSame(r.getResourceBundle(), parent.getResourceBundle());
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.SEVERE);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 
 		this.sharedLogger.setLevel(Level.OFF);
@@ -2040,7 +2040,7 @@
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.INFO);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 
 		this.sharedLogger.log(Level.CONFIG, "log(Level, String) msg");
@@ -2064,13 +2064,13 @@
 		LogRecord r = (LogRecord) CallVerificationStack.getInstance().pop();
 		assertTrue(CallVerificationStack.getInstance().empty());
 		assertSame(r.getLoggerName(), child.getName());
-		assertEquals(r.getMessage(), null);
+		assertNull(r.getMessage());
 		assertSame(r.getResourceBundleName(), parent.getResourceBundleName());
 		assertSame(r.getResourceBundle(), parent.getResourceBundle());
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.INFO);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 	}
 
@@ -2131,14 +2131,14 @@
 		LogRecord r = (LogRecord) CallVerificationStack.getInstance().pop();
 		assertTrue(CallVerificationStack.getInstance().empty());
 		assertSame(r.getLoggerName(), child.getName());
-		assertEquals(r.getMessage(), null);
+		assertNull(r.getMessage());
 		assertSame(r.getResourceBundleName(), parent.getResourceBundleName());
 		assertSame(r.getResourceBundle(), parent.getResourceBundle());
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.INFO);
 		assertEquals(1, r.getParameters().length);
-		assertEquals(null, r.getParameters()[0]);
+		assertNull(r.getParameters()[0]);
 		assertSame(r.getThrown(), null);
 	}
 
@@ -2203,13 +2203,13 @@
 		LogRecord r = (LogRecord) CallVerificationStack.getInstance().pop();
 		assertTrue(CallVerificationStack.getInstance().empty());
 		assertSame(r.getLoggerName(), child.getName());
-		assertEquals(r.getMessage(), null);
+		assertNull(r.getMessage());
 		assertSame(r.getResourceBundleName(), parent.getResourceBundleName());
 		assertSame(r.getResourceBundle(), parent.getResourceBundle());
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.INFO);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 	}
 
@@ -2244,7 +2244,7 @@
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.INFO);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), t);
 
 		this.sharedLogger.log(Level.CONFIG,
@@ -2270,13 +2270,13 @@
 		LogRecord r = (LogRecord) CallVerificationStack.getInstance().pop();
 		assertTrue(CallVerificationStack.getInstance().empty());
 		assertSame(r.getLoggerName(), child.getName());
-		assertEquals(r.getMessage(), null);
+		assertNull(r.getMessage());
 		assertSame(r.getResourceBundleName(), parent.getResourceBundleName());
 		assertSame(r.getResourceBundle(), parent.getResourceBundle());
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.INFO);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 	}
 
@@ -2310,7 +2310,7 @@
 		assertSame(r.getSourceClassName(), "sourceClass");
 		assertSame(r.getSourceMethodName(), "sourceMethod");
 		assertSame(r.getLevel(), Level.INFO);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 
 		this.sharedLogger.logp(Level.CONFIG, "sourceClass", "sourceMethod",
@@ -2336,13 +2336,13 @@
 		LogRecord r = (LogRecord) CallVerificationStack.getInstance().pop();
 		assertTrue(CallVerificationStack.getInstance().empty());
 		assertSame(r.getLoggerName(), child.getName());
-		assertEquals(r.getMessage(), null);
+		assertNull(r.getMessage());
 		assertSame(r.getResourceBundleName(), parent.getResourceBundleName());
 		assertSame(r.getResourceBundle(), parent.getResourceBundle());
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.INFO);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 	}
 
@@ -2406,14 +2406,14 @@
 		LogRecord r = (LogRecord) CallVerificationStack.getInstance().pop();
 		assertTrue(CallVerificationStack.getInstance().empty());
 		assertSame(r.getLoggerName(), child.getName());
-		assertEquals(r.getMessage(), null);
+		assertNull(r.getMessage());
 		assertSame(r.getResourceBundleName(), parent.getResourceBundleName());
 		assertSame(r.getResourceBundle(), parent.getResourceBundle());
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.INFO);
 		assertEquals(1, r.getParameters().length);
-		assertEquals(null, r.getParameters()[0]);
+		assertNull(r.getParameters()[0]);
 		assertSame(r.getThrown(), null);
 	}
 
@@ -2481,13 +2481,13 @@
 		LogRecord r = (LogRecord) CallVerificationStack.getInstance().pop();
 		assertTrue(CallVerificationStack.getInstance().empty());
 		assertSame(r.getLoggerName(), child.getName());
-		assertEquals(r.getMessage(), null);
+		assertNull(r.getMessage());
 		assertSame(r.getResourceBundleName(), parent.getResourceBundleName());
 		assertSame(r.getResourceBundle(), parent.getResourceBundle());
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.INFO);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 	}
 
@@ -2524,7 +2524,7 @@
 		assertSame(r.getSourceClassName(), "sourceClass");
 		assertSame(r.getSourceMethodName(), "sourceMethod");
 		assertSame(r.getLevel(), Level.INFO);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), t);
 
 		this.sharedLogger.logp(Level.CONFIG, "sourceClass", "sourceMethod",
@@ -2551,13 +2551,13 @@
 		LogRecord r = (LogRecord) CallVerificationStack.getInstance().pop();
 		assertTrue(CallVerificationStack.getInstance().empty());
 		assertSame(r.getLoggerName(), child.getName());
-		assertEquals(r.getMessage(), null);
+		assertNull(r.getMessage());
 		assertSame(r.getResourceBundleName(), parent.getResourceBundleName());
 		assertSame(r.getResourceBundle(), parent.getResourceBundle());
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.INFO);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 	}
 
@@ -2593,7 +2593,7 @@
 		assertSame(r.getSourceClassName(), "sourceClass");
 		assertSame(r.getSourceMethodName(), "sourceMethod");
 		assertSame(r.getLevel(), Level.INFO);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 
 		this.sharedLogger.logrb(Level.CONFIG, "sourceClass", "sourceMethod",
@@ -2616,12 +2616,12 @@
 		LogRecord r = (LogRecord) CallVerificationStack.getInstance().pop();
 		assertTrue(CallVerificationStack.getInstance().empty());
 		assertSame(r.getLoggerName(), this.sharedLogger.getName());
-		assertEquals(r.getMessage(), null);
+		assertNull(r.getMessage());
 		assertSame(r.getResourceBundleName(), null);
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.INFO);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 	}
 
@@ -2658,7 +2658,7 @@
 		assertSame(r.getSourceClassName(), "sourceClass");
 		assertSame(r.getSourceMethodName(), "sourceMethod");
 		assertSame(r.getLevel(), Level.ALL);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 	}
 
@@ -2710,13 +2710,13 @@
 		LogRecord r = (LogRecord) CallVerificationStack.getInstance().pop();
 		assertTrue(CallVerificationStack.getInstance().empty());
 		assertSame(r.getLoggerName(), this.sharedLogger.getName());
-		assertEquals(r.getMessage(), null);
+		assertNull(r.getMessage());
 		assertSame(r.getResourceBundleName(), null);
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.INFO);
 		assertEquals(1, r.getParameters().length);
-		assertEquals(null, r.getParameters()[0]);
+		assertNull(r.getParameters()[0]);
 		assertSame(r.getThrown(), null);
 	}
     
@@ -2828,12 +2828,12 @@
 		LogRecord r = (LogRecord) CallVerificationStack.getInstance().pop();
 		assertTrue(CallVerificationStack.getInstance().empty());
 		assertSame(r.getLoggerName(), this.sharedLogger.getName());
-		assertEquals(r.getMessage(), null);
+		assertNull(r.getMessage());
 		assertSame(r.getResourceBundleName(), null);
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.INFO);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 	}
 
@@ -2905,7 +2905,7 @@
 		assertSame(r.getSourceClassName(), "sourceClass");
 		assertSame(r.getSourceMethodName(), "sourceMethod");
 		assertSame(r.getLevel(), Level.parse("1611"));
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), t);
 		assertNull(Level.parse("1611").getResourceBundleName());
 
@@ -2933,12 +2933,12 @@
 		LogRecord r = (LogRecord) CallVerificationStack.getInstance().pop();
 		assertTrue(CallVerificationStack.getInstance().empty());
 		assertSame(r.getLoggerName(), this.sharedLogger.getName());
-		assertEquals(r.getMessage(), null);
+		assertNull(r.getMessage());
 		assertSame(r.getResourceBundleName(), null);
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.INFO);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 	}
 
@@ -2982,7 +2982,7 @@
 		assertSame(r.getSourceClassName(), "sourceClass");
 		assertSame(r.getSourceMethodName(), "sourceMethod");
 		assertSame(r.getLevel(), Level.ALL);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), t);
 	}
 
@@ -3006,7 +3006,7 @@
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.INFO);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 	}
 
@@ -3064,7 +3064,7 @@
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.INFO);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 	}
 
@@ -3091,7 +3091,7 @@
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.INFO);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 	}
 
@@ -3121,7 +3121,7 @@
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.INFO);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 
 		// set the child logger to disabling level
@@ -3264,7 +3264,7 @@
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.FINE);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 		assertNull(child.getLevel());
 
@@ -3335,7 +3335,7 @@
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.FINE);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 		assertNull(child.getResourceBundle());
 		assertNull(child.getResourceBundleName());
@@ -3368,7 +3368,7 @@
 		assertSame(r.getSourceClassName(), null);
 		assertSame(r.getSourceMethodName(), null);
 		assertSame(r.getLevel(), Level.FINE);
-		assertEquals(null, r.getParameters());
+		assertNull(r.getParameters());
 		assertSame(r.getThrown(), null);
 		assertNull(child.getResourceBundle());
 		assertNull(child.getResourceBundleName());

Modified: incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/SocketHandlerTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/SocketHandlerTest.java?view=diff&rev=463611&r1=463610&r2=463611
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/SocketHandlerTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/SocketHandlerTest.java
Fri Oct 13 02:57:42 2006
@@ -174,8 +174,8 @@
 		h = new SocketHandler("127.0.0.1", 6666);
 		assertSame(h.getLevel(), Level.ALL);
 		assertTrue(h.getFormatter() instanceof XMLFormatter);
-		assertEquals(h.getFilter(), null);
-		assertEquals(h.getEncoding(), null);
+		assertNull(h.getFilter());
+		assertNull(h.getEncoding());
 		h.close();
 		// ensure the thread exits and the port becomes available again
 		thread.getReadString();
@@ -208,8 +208,8 @@
 		h = new SocketHandler();
 		assertSame(h.getLevel(), Level.ALL);
 		assertTrue(h.getFormatter() instanceof XMLFormatter);
-		assertEquals(h.getFilter(), null);
-		assertEquals(h.getEncoding(), null);
+		assertNull(h.getFilter());
+		assertNull(h.getEncoding());
 		h.close();
 		// ensure the thread exits and the port becomes available again
 		thread.getReadString();
@@ -325,10 +325,10 @@
 		h = new SocketHandler();
 		assertSame(h.getLevel(), Level.ALL);
 		assertTrue(h.getFormatter() instanceof XMLFormatter);
-		assertEquals(h.getFilter(), null);
-		assertEquals(h.getEncoding(), null);
+		assertNull(h.getFilter());
+		assertNull(h.getEncoding());
 		h.publish(new LogRecord(Level.SEVERE, "test"));
-		assertEquals(h.getEncoding(), null);
+		assertNull(h.getEncoding());
 		h.close();
 		// ensure the thread exits and the port becomes available again
 		thread.getReadString();
@@ -341,10 +341,10 @@
 		h = new SocketHandler("127.0.0.1", 6666);
 		assertSame(h.getLevel(), Level.ALL);
 		assertTrue(h.getFormatter() instanceof XMLFormatter);
-		assertEquals(h.getFilter(), null);
-		assertEquals(h.getEncoding(), null);
+		assertNull(h.getFilter());
+		assertNull(h.getEncoding());
 		h.publish(new LogRecord(Level.SEVERE, "test"));
-		assertEquals(h.getEncoding(), null);
+		assertNull(h.getEncoding());
 		h.close();
 		// ensure the thread exits and the port becomes available again
 		thread.getReadString();

Modified: incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/StreamHandlerTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/StreamHandlerTest.java?view=diff&rev=463611&r1=463610&r2=463611
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/StreamHandlerTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/StreamHandlerTest.java
Fri Oct 13 02:57:42 2006
@@ -180,11 +180,11 @@
 		StreamHandler h = new StreamHandler();
 		assertSame(h.getLevel(), Level.INFO);
 		assertTrue(h.getFormatter() instanceof SimpleFormatter);
-		assertEquals(h.getFilter(), null);
-		assertEquals(h.getEncoding(), null);
+		assertNull(h.getFilter());
+		assertNull(h.getEncoding());
 		h.publish(new LogRecord(Level.SEVERE, "test"));
 		assertTrue(CallVerificationStack.getInstance().empty());
-		assertEquals(h.getEncoding(), null);
+		assertNull(h.getEncoding());
 	}
 
 	/*
@@ -287,8 +287,8 @@
 				new MockFormatter2());
 		assertSame(h.getLevel(), Level.INFO);
 		assertTrue(h.getFormatter() instanceof MockFormatter2);
-		assertEquals(h.getFilter(), null);
-		assertEquals(h.getEncoding(), null);
+		assertNull(h.getFilter());
+		assertNull(h.getEncoding());
 	}
 
 	/*



Mime
View raw message