You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Vladimir Ivanov (JIRA)" <ji...@apache.org> on 2006/09/06 15:10:23 UTC
[jira] Updated: (HARMONY-1393) [classlib][beans] no
IllegalArgumentException for BeanContextSupport.getChildBeanContextChild()
[ http://issues.apache.org/jira/browse/HARMONY-1393?page=all ]
Vladimir Ivanov updated HARMONY-1393:
-------------------------------------
Attachment: BeanContextSupport.patch
patch+test
> [classlib][beans] no IllegalArgumentException for BeanContextSupport.getChildBeanContextChild()
> -----------------------------------------------------------------------------------------------
>
> Key: HARMONY-1393
> URL: http://issues.apache.org/jira/browse/HARMONY-1393
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Vladimir Ivanov
> Attachments: BeanContextSupport.patch
>
>
> The spec says for java.beans.beancontext.BeanContextSupport.getChildBeanContextChild(Object child):
> "Throws: IllegalArgumentException - if child implements both BeanContextChild and BeanContextProxy"
> But in this case the method creates object on Harmony.
> ===================== test.java ====================
> import java.beans.beancontext.*;
> public class test {
> public static void main(String[] args) {
> System.out.println("res = " + new TestBeanContextSupport().testGetChildBeanContextChild(new TestBeanException()));
> }
> }
> class TestBeanContextSupport extends BeanContextSupport {
> public BeanContextChild testGetChildBeanContextChild(Object child) {
> return super.getChildBeanContextChild(child);
> }
> }
> class TestBeanException extends BeanContextChildSupport implements BeanContextProxy {
> private BeanContextChildSupport childSupport = new BeanContextChildSupport();
> public BeanContextChild getBeanContextProxy() {
> return childSupport;
> }
> }
> ================================================
> Output:
> C:\tmp\tmp17>C:\jrockit-jdk1.5.0-windows-ia32\bin\java.exe -cp . -showversion test
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar))
> java.lang.IllegalArgumentException: child cannot implement both BeanContextChild and BeanContextProxy
> at java.beans.beancontext.BeanContextSupport.getChildBeanContextChild(BeanContextSupport.java:1226)
> at TestBeanContextSupport.testGetChildBeanContextChild(test.java:11)
> at test.main(test.java:5)
> C:\tmp\tmp17>C:\harmony\classlib1.5\deploy\jdk\jre\bin\java.exe -cp . -showversion test
> java version 1.5 (subset)
> (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> res = TestBeanException@62d262d2
> C:\tmp\tmp17>C:\harmony\drlvm1.5\build\win_ia32_msvc_debug\deploy\jre\bin\java -Dvm.assert_dialog=false -cp . -showversion test
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r440571, (Sep 6 2006), Windows/ia32/msvc 1310, debug build
> http://incubator.apache.org/harmony
> res = TestBeanException@6
--
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