Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 97930 invoked from network); 25 Sep 2006 03:33:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 Sep 2006 03:33:57 -0000 Received: (qmail 88710 invoked by uid 500); 25 Sep 2006 03:33:57 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 88525 invoked by uid 500); 25 Sep 2006 03:33:56 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 88471 invoked by uid 99); 25 Sep 2006 03:33:56 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Sep 2006 20:33:56 -0700 Authentication-Results: idunn.apache.osuosl.org smtp.mail=ndbeyer@apache.org; spf=permerror X-ASF-Spam-Status: No, hits=-9.4 required=5.0 tests=ALL_TRUSTED,NO_REAL_NAME Received-SPF: error (idunn.apache.osuosl.org: domain apache.org from 140.211.166.113 cause and error) Received: from [140.211.166.113] ([140.211.166.113:50405] helo=eris.apache.org) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id B3/B4-13750-E1E47154 for ; Sun, 24 Sep 2006 20:33:51 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id B59961A9827; Sun, 24 Sep 2006 20:33:39 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: harmony-commits@incubator.apache.org From: ndbeyer@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20060925033339.B59961A9827@eris.apache.org> X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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 r = new Hashtable(); 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 ldapProps; - public MockLdapContext(Hashtable h) { + @SuppressWarnings("unchecked") + public MockLdapContext(Hashtable h) { super(h); - this.ldapProps = (Hashtable) h.clone(); + this.ldapProps = (Hashtable) h.clone(); } - public Hashtable getProps() { + public Hashtable 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 r = new Hashtable(); 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 r = new Hashtable(); 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 r = new Hashtable(); 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 r = new Hashtable(); 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 r = new Hashtable(); 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 r = new Hashtable(); 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 r = new Hashtable(); 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 r = new Hashtable(); 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 r = new Hashtable(); 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; + /** + *

+ */ + 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 ht = new Hashtable(); 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 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 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());