Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 60516 invoked from network); 24 Nov 2006 09:44:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Nov 2006 09:44:42 -0000 Received: (qmail 23874 invoked by uid 500); 24 Nov 2006 09:44:51 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 23799 invoked by uid 500); 24 Nov 2006 09:44:51 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 23787 invoked by uid 99); 24 Nov 2006 09:44:51 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Nov 2006 01:44:51 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Nov 2006 01:44:40 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id 0AD0B1A9846; Fri, 24 Nov 2006 01:44:05 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r478817 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java Date: Fri, 24 Nov 2006 09:44:04 -0000 To: commits@harmony.apache.org From: tellison@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20061124094405.0AD0B1A9846@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: tellison Date: Fri Nov 24 01:44:03 2006 New Revision: 478817 URL: http://svn.apache.org/viewvc?view=rev&rev=478817 Log: Fix logic mistake reported by findbugs. Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java?view=diff&rev=478817&r1=478816&r2=478817 ============================================================================== --- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java (original) +++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/ObjectInputStream.java Fri Nov 24 01:44:03 2006 @@ -1849,18 +1849,20 @@ // one that implements Serializable so that slots that were not // dumped can be initialized properly while (constructorClass != null - & ObjectStreamClass.isSerializable(constructorClass)) { + && ObjectStreamClass.isSerializable(constructorClass)) { constructorClass = constructorClass.getSuperclass(); } } - // Fetch the empty constructor - Constructor constructor; - try { - constructor = constructorClass - .getDeclaredConstructor(ObjectStreamClass.EMPTY_CONSTRUCTOR_PARAM_TYPES); - } catch (NoSuchMethodException nsmEx) { - constructor = null; + // Fetch the empty constructor, or null if none. + Constructor constructor = null; + if (constructorClass != null) { + try { + constructor = constructorClass + .getDeclaredConstructor(ObjectStreamClass.EMPTY_CONSTRUCTOR_PARAM_TYPES); + } catch (NoSuchMethodException nsmEx) { + // Ignored + } } // Has to have an empty constructor