harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Ellison (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (HARMONY-1393) [classlib][beans] no IllegalArgumentException for BeanContextSupport.getChildBeanContextChild()
Date Tue, 19 Sep 2006 11:43:23 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-1393?page=all ]

Tim Ellison reassigned HARMONY-1393:
------------------------------------

    Assignee: Tim Ellison

> [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
>         Assigned To: Tim Ellison
>         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

        

Mime
View raw message