Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 10789 invoked from network); 18 Apr 2006 06:52:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Apr 2006 06:52:17 -0000 Received: (qmail 18236 invoked by uid 500); 18 Apr 2006 06:52:17 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 18207 invoked by uid 500); 18 Apr 2006 06:52:17 -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 18196 invoked by uid 99); 18 Apr 2006 06:52:17 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Apr 2006 23:52:17 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Apr 2006 23:52:16 -0700 Received: from brutus (localhost.localdomain [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B386B7142C6 for ; Tue, 18 Apr 2006 06:51:17 +0000 (GMT) Message-ID: <5678055.1145343077708.JavaMail.jira@brutus> Date: Tue, 18 Apr 2006 06:51:17 +0000 (GMT+00:00) From: "Dmitry M. Kononov (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Updated: (HARMONY-363) java.beans.beancontext.BeanContextServicesSupport.removeBeanContextServicesListener(...) does not throw NullPointerException In-Reply-To: <478064.1145342957494.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/HARMONY-363?page=all ] Dmitry M. Kononov updated HARMONY-363: -------------------------------------- Attachment: BeanContextServicesSupportTest.java BeanContextServicesSupport.java.diff > java.beans.beancontext.BeanContextServicesSupport.removeBeanContextServicesListener(...) does not throw NullPointerException > ---------------------------------------------------------------------------------------------------------------------------- > > Key: HARMONY-363 > URL: http://issues.apache.org/jira/browse/HARMONY-363 > Project: Harmony > Type: Bug > Components: Classlib > Reporter: Dmitry M. Kononov > Priority: Minor > Attachments: BeanContextServicesSupport.java.diff, BeanContextServicesSupportTest.java > > Problem details: > java.beans.beancontext.BeanContextServicesSupport.removeBeanContextServicesListener(BeanContextServicesListener bcsl): > Harmony does not throw NullPointerException when parameter bcsl=null, while RI throws it. > Specification doesn't say anything about NullPointerException throwing. > Junit test to reproduce the problem: > import junit.framework.TestCase; > import java.beans.beancontext.BeanContextServicesSupport; > public class BeanContextServicesSupportTest extends TestCase { > public void test_removeBeanContextServicesListenerLjava_beans_beancontext_BeanContextServicesListener() { > BeanContextServicesSupport obj = new BeanContextServicesSupport(); > boolean b = true; > try { > obj.removeBeanContextServicesListener(null); > b = false; > } catch (NullPointerException t) { > t.printStackTrace(); > } > assertTrue(b); > } > } > RI output: > .java.lang.NullPointerException: bcsl > at java.beans.beancontext.BeanContextServicesSupport.removeBeanContextSe > rvicesListener(BeanContextServicesSupport.java:632) > at BeanContextServicesSupportTest.test_removeBeanContextServicesListener > Ljava_beans_beancontext_BeanContextServicesListener(BeanContextServicesSupportTe > st.java:15) > at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[ > Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source) > at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object; > I)Ljava.lang.Object;(Unknown Source) > at junit.framework.TestCase.runTest(TestCase.java:154) > at junit.framework.TestCase.runBare(TestCase.java:127) > at junit.framework.TestResult$1.protect(TestResult.java:106) > at junit.framework.TestResult.runProtected(TestResult.java:124) > at junit.framework.TestResult.run(TestResult.java:109) > at junit.framework.TestCase.run(TestCase.java:118) > at junit.framework.TestSuite.runTest(TestSuite.java:208) > at junit.framework.TestSuite.run(TestSuite.java:203) > at junit.textui.TestRunner.doRun(TestRunner.java:116) > at junit.textui.TestRunner.start(TestRunner.java:172) > at junit.textui.TestRunner.main(TestRunner.java:138) > Time: 0.031 > OK (1 test) > HARMONY output: > java version 1.4.2 (subset) > (c) Copyright 1991, 2005 The Apache Software Foundation or its licensors, as app > licable. > .. > Time: 0.015 > There was 1 failure: > 1) test_removeBeanContextServicesListenerLjava_beans_beancontext_BeanContextServ > icesListener(BeanContextServicesSupportTest)junit.framework.AssertionFailedError > at BeanContextServicesSupportTest.test_removeBeanContextServicesListener > Ljava_beans_beancontext_BeanContextServicesListener(BeanContextServicesSupportTe > st.java:20) > at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:211) > FAILURES!!! > Tests run: 1, Failures: 1, Errors: 0 -- 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