Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 96107 invoked from network); 6 Dec 2006 11:39:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Dec 2006 11:39:42 -0000 Received: (qmail 6506 invoked by uid 500); 6 Dec 2006 11:39:50 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 6479 invoked by uid 500); 6 Dec 2006 11:39:50 -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 6470 invoked by uid 99); 6 Dec 2006 11:39:50 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Dec 2006 03:39:50 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Dec 2006 03:39:41 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 28D6A7142E1 for ; Wed, 6 Dec 2006 03:39:21 -0800 (PST) Message-ID: <11701748.1165405161164.JavaMail.jira@brutus> Date: Wed, 6 Dec 2006 03:39:21 -0800 (PST) From: "Anton Ivanov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Created: (HARMONY-2490) java.beans.DefaultPersistenceDelegate.initialize() does not throw NullPointerException (RI compatibility issue) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org java.beans.DefaultPersistenceDelegate.initialize() does not throw NullPointerException (RI compatibility issue) --------------------------------------------------------------------------------------------------------------- Key: HARMONY-2490 URL: http://issues.apache.org/jira/browse/HARMONY-2490 Project: Harmony Issue Type: Bug Components: Classlib Reporter: Anton Ivanov Priority: Trivial NullPointerException is not thrown for initialize(Class type, Object oldInstance, Object newInstance, Encoder out) if oldInstance == null while RI throws NullPointerException. It is not explicitly specified that NullPointerException should be thrown in such a case, however it is written in specification for java.beans package: "Unless explicitly stated, null values or empty Strings are not valid parameters for the methods in this package. You may expect to see exceptions if these parameters are used" This is a compatibility issue. The test to reproduce the problem: import junit.framework.TestCase; import java.beans.*; public class InitializeTest extends TestCase { public void test1 () { try { testDefaultPersistenceDelegate obj = new testDefaultPersistenceDelegate(); obj.initialize(Object.class, null, new Object(), new Encoder()); fail("NullPointerException should be thrown"); } catch (NullPointerException e) { //expected } } } class testDefaultPersistenceDelegate extends DefaultPersistenceDelegate { testDefaultPersistenceDelegate() { super(); } public void initialize(Class type, Object oldInstance, Object newInstance, Encoder out) { super.initialize(type,oldInstance, newInstance,out); } } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira