harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r449555 [6/6] - in /incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java: com/sun/jndi/url/dir2/ com/sun/jndi/url/nntp/ dazzle/jndi/testing/spi/ org/apache/harmony/jndi/provider/dns/ org/apache/harmony/jndi/tests/javax/namin...
Date Mon, 25 Sep 2006 03:33:32 GMT
Modified: incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/MockDirStateFactory.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/MockDirStateFactory.java?view=diff&rev=449555&r1=449554&r2=449555
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/MockDirStateFactory.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/MockDirStateFactory.java
Sun Sep 24 20:33:27 2006
@@ -40,13 +40,13 @@
 	 *      javax.naming.Name, javax.naming.Context, java.util.Hashtable,
 	 *      javax.naming.directory.Attributes)
 	 */
-	public Result getStateToBind(Object o, Name n, Context c, Hashtable h,
+	public Result getStateToBind(Object o, Name n, Context c, Hashtable<?, ?> h,
 			Attributes a) throws NamingException {
 		NamingManagerTest.issueIndicatedExceptions(h);
 		if (NamingManagerTest.returnNullIndicated(h)) {
 			return null;
 		}
-		Hashtable r = new Hashtable();
+		Hashtable<String, Object> r = new Hashtable<String, Object>();
 		if (null != o) {
 			r.put("o", o);
 		}
@@ -72,7 +72,7 @@
 	 * @see javax.naming.spi.StateFactory#getStateToBind(java.lang.Object,
 	 *      javax.naming.Name, javax.naming.Context, java.util.Hashtable)
 	 */
-	public Object getStateToBind(Object o, Name n, Context c, Hashtable h)
+	public Object getStateToBind(Object o, Name n, Context c, Hashtable<?, ?> h)
 			throws NamingException {
 		return getStateToBind(o, n, c, h, null);
 	}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/MockInitialContextFactoryBuilder.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/MockInitialContextFactoryBuilder.java?view=diff&rev=449555&r1=449554&r2=449555
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/MockInitialContextFactoryBuilder.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/MockInitialContextFactoryBuilder.java
Sun Sep 24 20:33:27 2006
@@ -31,13 +31,13 @@
 public class MockInitialContextFactoryBuilder implements
 		InitialContextFactoryBuilder {
 
-	private static MockInitialContextFactoryBuilder _builder = new MockInitialContextFactoryBuilder();
+	private static final MockInitialContextFactoryBuilder _builder = new MockInitialContextFactoryBuilder();
 
 	public static MockInitialContextFactoryBuilder getInstance() {
 		return MockInitialContextFactoryBuilder._builder;
 	}
 
-	public InitialContextFactory createInitialContextFactory(Hashtable envmt)
+	public InitialContextFactory createInitialContextFactory(Hashtable<?,?> envmt)
 			throws NamingException {
 		NamingManagerTest.issueIndicatedExceptions(envmt);
 		if (NamingManagerTest.returnNullIndicated(envmt)) {
@@ -48,9 +48,7 @@
 
 	public static class MockInitialContextFactory implements
 			InitialContextFactory {
-		private Hashtable ht;
-
-		public Context getInitialContext(Hashtable envmt)
+		public Context getInitialContext(Hashtable<?, ?> envmt)
 				throws NamingException {
 			NamingManagerTest.issueIndicatedExceptions(envmt);
 			if (NamingManagerTest.returnNullIndicated(envmt)) {
@@ -59,8 +57,7 @@
 			return new MockContext(envmt);
 		}
 
-		public MockInitialContextFactory(Hashtable envmt) {
-			ht = envmt;
+		public MockInitialContextFactory(Hashtable<?,?> envmt) {
 		}
 
 		public MockInitialContextFactory() {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/MockLdapContext.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/MockLdapContext.java?view=diff&rev=449555&r1=449554&r2=449555
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/MockLdapContext.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/MockLdapContext.java
Sun Sep 24 20:33:27 2006
@@ -24,14 +24,15 @@
 import javax.naming.ldap.LdapContext;
 
 public class MockLdapContext extends MockDirContext implements LdapContext {
-	Hashtable ldapProps;
+	Hashtable<String, Object> ldapProps;
 
-	public MockLdapContext(Hashtable h) {
+	@SuppressWarnings("unchecked")
+    public MockLdapContext(Hashtable<?, ?> h) {
 		super(h);
-		this.ldapProps = (Hashtable) h.clone();
+		this.ldapProps = (Hashtable<String, Object>) h.clone();
 	}
 
-	public Hashtable getProps() {
+	public Hashtable<String, Object> getProps() {
 		return this.ldapProps;
 	}
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/MockLdapContextFactory.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/MockLdapContextFactory.java?view=diff&rev=449555&r1=449554&r2=449555
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/MockLdapContextFactory.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/MockLdapContextFactory.java
Sun Sep 24 20:33:27 2006
@@ -22,7 +22,7 @@
 
 public class MockLdapContextFactory implements InitialContextFactory {
 
-	public Context getInitialContext(Hashtable envmt) throws NamingException {
+	public Context getInitialContext(Hashtable<?, ?> envmt) throws NamingException {
 		envmt.remove("url.schema");
 		return new MockLdapContext(envmt);
 	}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/SuccessMockDirStateFactory.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/SuccessMockDirStateFactory.java?view=diff&rev=449555&r1=449554&r2=449555
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/SuccessMockDirStateFactory.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/SuccessMockDirStateFactory.java
Sun Sep 24 20:33:27 2006
@@ -22,9 +22,10 @@
 import javax.naming.directory.Attributes;
 
 public class SuccessMockDirStateFactory extends MockDirStateFactory {
-	public Result getStateToBind(Object o, Name n, Context c, Hashtable h,
+	@Override
+    public Result getStateToBind(Object o, Name n, Context c, Hashtable<?, ?> h,
 			Attributes a) throws NamingException {
-		Hashtable r = new Hashtable();
+		Hashtable<String, Object> r = new Hashtable<String, Object>();
 		if (null != o) {
 			r.put("o", o);
 		}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/a_b_c/a_b_cURLContextFactory.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/a_b_c/a_b_cURLContextFactory.java?view=diff&rev=449555&r1=449554&r2=449555
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/a_b_c/a_b_cURLContextFactory.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/a_b_c/a_b_cURLContextFactory.java
Sun Sep 24 20:33:27 2006
@@ -31,7 +31,7 @@
 	 * @see javax.naming.spi.ObjectFactory#getObjectInstance(java.lang.Object,
 	 *      javax.naming.Name, javax.naming.Context, java.util.Hashtable)
 	 */
-	public Object getObjectInstance(Object o, Name n, Context c, Hashtable h)
+	public Object getObjectInstance(Object o, Name n, Context c, Hashtable<?, ?> h)
 			throws Exception {
 
 		NamingManagerTest.issueIndicatedExceptions(h);
@@ -39,7 +39,7 @@
 			return null;
 		}
 
-		Hashtable r = new Hashtable();
+		Hashtable<String, Object> r = new Hashtable<String, Object>();
 		if (null != o) {
 			r.put("o", o);
 		}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/abc/abcURLContextFactory.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/abc/abcURLContextFactory.java?view=diff&rev=449555&r1=449554&r2=449555
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/abc/abcURLContextFactory.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/abc/abcURLContextFactory.java
Sun Sep 24 20:33:27 2006
@@ -31,7 +31,7 @@
 	 * @see javax.naming.spi.ObjectFactory#getObjectInstance(java.lang.Object,
 	 *      javax.naming.Name, javax.naming.Context, java.util.Hashtable)
 	 */
-	public Object getObjectInstance(Object o, Name n, Context c, Hashtable h)
+	public Object getObjectInstance(Object o, Name n, Context c, Hashtable<?, ?> h)
 			throws Exception {
 
 		NamingManagerTest.issueIndicatedExceptions(h);
@@ -39,7 +39,7 @@
 			return null;
 		}
 
-		Hashtable r = new Hashtable();
+		Hashtable<String, Object> r = new Hashtable<String, Object>();
 		if (null != o) {
 			r.put("o", o);
 		}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/dire/direURLContextFactory.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/dire/direURLContextFactory.java?view=diff&rev=449555&r1=449554&r2=449555
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/dire/direURLContextFactory.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/dire/direURLContextFactory.java
Sun Sep 24 20:33:27 2006
@@ -35,7 +35,7 @@
 	 * @see javax.naming.spi.ObjectFactory#getObjectInstance(java.lang.Object,
 	 *      javax.naming.Name, javax.naming.Context, java.util.Hashtable)
 	 */
-	public Object getObjectInstance(Object o, Name n, Context c, Hashtable h)
+	public Object getObjectInstance(Object o, Name n, Context c, Hashtable<?, ?> h)
 			throws Exception {
 		// NamingManagerTest.issueIndicatedExceptions(h);
 		// if (NamingManagerTest.returnNullIndicated(h)) {
@@ -44,7 +44,7 @@
 		log
 				.setMethod("getObjectInstance(Object o, Name n, Context c, Hashtable h)");
 		log.log("wrong method called!");
-		Hashtable r = new Hashtable();
+		Hashtable<String, Object> r = new Hashtable<String, Object>();
 		if (null != o) {
 			r.put("o", o);
 		}
@@ -68,13 +68,13 @@
 	 *      javax.naming.Name, javax.naming.Context, java.util.Hashtable,
 	 *      javax.naming.directory.Attributes)
 	 */
-	public Object getObjectInstance(Object o, Name n, Context c, Hashtable h,
+	public Object getObjectInstance(Object o, Name n, Context c, Hashtable<?, ?> h,
 			Attributes a) throws Exception {
 		NamingManagerTest.issueIndicatedExceptions(h);
 		if (NamingManagerTest.returnNullIndicated(h)) {
 			return null;
 		}
-		Hashtable r = new Hashtable();
+		Hashtable<String, Object> r = new Hashtable<String, Object>();
 		if (null != o) {
 			r.put("o", o);
 		}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/ftp/ftpURLContextFactory.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/ftp/ftpURLContextFactory.java?view=diff&rev=449555&r1=449554&r2=449555
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/ftp/ftpURLContextFactory.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/ftp/ftpURLContextFactory.java
Sun Sep 24 20:33:27 2006
@@ -28,10 +28,10 @@
  * Allways succeed.
  */
 public class ftpURLContextFactory implements ObjectFactory {
-	public Object getObjectInstance(Object o, Name n, Context c, Hashtable h)
+	public Object getObjectInstance(Object o, Name n, Context c, Hashtable<?, ?> h)
 			throws Exception {
 
-		Hashtable r = new Hashtable();
+		Hashtable<String, Object> r = new Hashtable<String, Object>();
 		if (null != o) {
 			r.put("o", o);
 		}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/http/httpURLContextFactory.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/http/httpURLContextFactory.java?view=diff&rev=449555&r1=449554&r2=449555
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/http/httpURLContextFactory.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/http/httpURLContextFactory.java
Sun Sep 24 20:33:27 2006
@@ -31,7 +31,7 @@
 	 * @see javax.naming.spi.ObjectFactory#getObjectInstance(java.lang.Object,
 	 *      javax.naming.Name, javax.naming.Context, java.util.Hashtable)
 	 */
-	public Object getObjectInstance(Object o, Name n, Context c, Hashtable h)
+	public Object getObjectInstance(Object o, Name n, Context c, Hashtable<?, ?> h)
 			throws Exception {
 
 		NamingManagerTest.issueIndicatedExceptions(h);
@@ -39,7 +39,7 @@
 			return null;
 		}
 
-		Hashtable r = new Hashtable();
+		Hashtable<String, Object> r = new Hashtable<String, Object>();
 		if (null != o) {
 			r.put("o", o);
 		}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/https/httpsURLContextFactory.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/https/httpsURLContextFactory.java?view=diff&rev=449555&r1=449554&r2=449555
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/https/httpsURLContextFactory.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/https/httpsURLContextFactory.java
Sun Sep 24 20:33:27 2006
@@ -31,7 +31,7 @@
 	 * @see javax.naming.spi.ObjectFactory#getObjectInstance(java.lang.Object,
 	 *      javax.naming.Name, javax.naming.Context, java.util.Hashtable)
 	 */
-	public Object getObjectInstance(Object o, Name n, Context c, Hashtable h)
+	public Object getObjectInstance(Object o, Name n, Context c, Hashtable<?, ?> h)
 			throws Exception {
 
 		NamingManagerTest.issueIndicatedExceptions(h);
@@ -39,7 +39,7 @@
 			return null;
 		}
 
-		Hashtable r = new Hashtable();
+		Hashtable<String, Object> r = new Hashtable<String, Object>();
 		if (null != o) {
 			r.put("o", o);
 		}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/news/newsURLContextFactory.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/news/newsURLContextFactory.java?view=diff&rev=449555&r1=449554&r2=449555
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/news/newsURLContextFactory.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mock/news/newsURLContextFactory.java
Sun Sep 24 20:33:27 2006
@@ -26,7 +26,7 @@
  * Always return null.
  */
 public class newsURLContextFactory implements ObjectFactory {
-	public Object getObjectInstance(Object o, Name n, Context c, Hashtable h)
+	public Object getObjectInstance(Object o, Name n, Context c, Hashtable<?, ?> h)
 			throws Exception {
 		return null;
 	}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mocksuccess/http/httpURLContextFactory.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mocksuccess/http/httpURLContextFactory.java?view=diff&rev=449555&r1=449554&r2=449555
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mocksuccess/http/httpURLContextFactory.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/spi/mocksuccess/http/httpURLContextFactory.java
Sun Sep 24 20:33:27 2006
@@ -30,10 +30,10 @@
 	 * @see javax.naming.spi.ObjectFactory#getObjectInstance(java.lang.Object,
 	 *      javax.naming.Name, javax.naming.Context, java.util.Hashtable)
 	 */
-	public Object getObjectInstance(Object o, Name n, Context c, Hashtable h)
+	public Object getObjectInstance(Object o, Name n, Context c, Hashtable<?, ?> h)
 			throws Exception {
 
-		Hashtable r = new Hashtable();
+		Hashtable<String, Object> r = new Hashtable<String, Object>();
 		if (null != o) {
 			r.put("o", o);
 		}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/util/FileFilter.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/util/FileFilter.java?view=diff&rev=449555&r1=449554&r2=449555
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/util/FileFilter.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/util/FileFilter.java
Sun Sep 24 20:33:27 2006
@@ -81,9 +81,8 @@
 						if (junitStartsWith(pre, "at ")) {
 							if (nxt == null) {
 								break;
-							} else {
-								pre = nxt;
 							}
+                            pre = nxt;
 							continue;
 						}
 					}
@@ -97,9 +96,8 @@
 									|| null == nxt) {
 								if (nxt == null) {
 									break;
-								} else {
-									pre = nxt;
 								}
+                                pre = nxt;
 								continue;
 							}
 						}
@@ -110,9 +108,8 @@
 
 				if (null == nxt) {
 					break;
-				} else {
-					pre = nxt;
 				}
+                pre = nxt;
 			}
 		} catch (Exception e) {
 			System.out.println("Filter exception: " + e.getMessage());

Modified: incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/util/Log.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/util/Log.java?view=diff&rev=449555&r1=449554&r2=449555
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/util/Log.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/util/Log.java
Sun Sep 24 20:33:27 2006
@@ -16,7 +16,6 @@
 
 import java.io.ByteArrayOutputStream;
 import java.io.PrintStream;
-import java.text.SimpleDateFormat;
 
 public class Log {
 
@@ -32,7 +31,7 @@
 		}
 
 		try {
-			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+//			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
 			// _out =
 			// new PrintStream(
 			// new FileOutputStream(
@@ -54,8 +53,6 @@
 		_out = null;
 	}
 
-	private Class clz;
-
 	private String clzname;
 
 	private String method;
@@ -65,9 +62,7 @@
 	 * 
 	 * @param clz
 	 */
-	public Log(Class clz) {
-		this.clz = clz;
-
+	public Log(Class<?> clz) {
 		if (null != clz) {
 			clzname = clz.getName();
 			int dot = clzname.lastIndexOf('.');

Modified: incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/util/Person.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/util/Person.java?view=diff&rev=449555&r1=449554&r2=449555
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/util/Person.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/util/Person.java
Sun Sep 24 20:33:27 2006
@@ -21,7 +21,12 @@
 import javax.naming.StringRefAddr;
 
 public class Person implements Serializable, Cloneable, Referenceable {
-	private static int maxId = 0;
+	/**
+     * <p></p>
+     */
+    private static final long serialVersionUID = 1L;
+
+    private static int maxId = 0;
 
 	int id;
 
@@ -99,7 +104,8 @@
 		name = string;
 	}
 
-	public String toString() {
+	@Override
+    public String toString() {
 		StringBuffer buffer = new StringBuffer(100);
 		buffer.append(this.getClass().getName()).append(" : ");
 		buffer.append("id=").append(id);
@@ -114,7 +120,8 @@
 	 * 
 	 * @see java.lang.Object#equals(java.lang.Object)
 	 */
-	public boolean equals(Object o) {
+	@Override
+    public boolean equals(Object o) {
 		boolean result = false;
 		if (o instanceof Person) {
 			Person p = (Person) o;
@@ -136,7 +143,8 @@
 	 * 
 	 * @see java.lang.Object#hashCode()
 	 */
-	public int hashCode() {
+	@Override
+    public int hashCode() {
 		int result = 17;
 		result = 37 * result + id;
 		result = 37 * result + gender;
@@ -149,7 +157,8 @@
 		return result;
 	}
 
-	public Object clone() throws CloneNotSupportedException {
+	@Override
+    public Object clone() throws CloneNotSupportedException {
 		return super.clone();
 	}
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/util/Util.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/util/Util.java?view=diff&rev=449555&r1=449554&r2=449555
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/util/Util.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/util/Util.java
Sun Sep 24 20:33:27 2006
@@ -72,7 +72,7 @@
 			Properties p = new Properties();
 			p.load(Util.class.getClassLoader().getResourceAsStream(
 					"jndi.properties"));
-			Hashtable ht = new Hashtable();
+			Hashtable<String, String> ht = new Hashtable<String, String>();
 			ht.put(Context.INITIAL_CONTEXT_FACTORY,
 					"dazzle.jndi.testing.spi.DazzleContextFactory");
 			return new InitialDirContext(p);
@@ -145,22 +145,21 @@
 		try {
 			if (as.size() == 0) {
 				return "{}";
-			} else {
-				StringBuffer buf = new StringBuffer();
-				buf.append("{ ");
-				NamingEnumeration enumeration = as.getAll();
-				int i = 0;
-				while (enumeration.hasMoreElements()) {
-					Attribute a = (Attribute) enumeration.nextElement();
-					if (i != 0) {
-						buf.append(", ");
-					}
-					buf.append(toString(a));
-					i++;
-				}
-				buf.append(" }");
-				return buf.toString();
 			}
+            StringBuffer buf = new StringBuffer();
+            buf.append("{ ");
+            NamingEnumeration<? extends Attribute> enumeration = as.getAll();
+            int i = 0;
+            while (enumeration.hasMoreElements()) {
+            	Attribute a = enumeration.nextElement();
+            	if (i != 0) {
+            		buf.append(", ");
+            	}
+            	buf.append(toString(a));
+            	i++;
+            }
+            buf.append(" }");
+            return buf.toString();
 		} catch (Throwable e) {
 			e.printStackTrace();
 			return "NULL";
@@ -230,9 +229,9 @@
 		space(buf, i);
 		buf.append(ctx + " {").append("\n");
 
-		NamingEnumeration enumeration = ctx.listBindings("");
+		NamingEnumeration<Binding> enumeration = ctx.listBindings("");
 		while (enumeration.hasMoreElements()) {
-			Binding r = (Binding) enumeration.nextElement();
+			Binding r = enumeration.nextElement();
 			space(buf, j);
 			if (r.getName() != null) {
 				buf.append(r.getName());



Mime
View raw message