You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Nathan Beyer (JIRA)" <ji...@apache.org> on 2006/08/27 19:54:23 UTC

[jira] Assigned: (HARMONY-1263) [classlib][naming] RI CompoundName doesn't clone Properties passed as a parameter into constructor

     [ http://issues.apache.org/jira/browse/HARMONY-1263?page=all ]

Nathan Beyer reassigned HARMONY-1263:
-------------------------------------

    Assignee: Nathan Beyer

> [classlib][naming] RI CompoundName doesn't clone Properties passed as a parameter into constructor
> --------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1263
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1263
>             Project: Harmony
>          Issue Type: Bug
>            Reporter: Igor V. Stolyarov
>         Assigned To: Nathan Beyer
>         Attachments: Harmony-1263.patch
>
>
> RI CompoundName doesn't clone Properties passed as a parameter into constructor
> Test------------------------------------------------------------------------------------------
> ---------------------- MyProperties.java -------------------------
> import java.util.Properties;
> public class MyProperties extends Properties {
>     
>     public Object clone(){
>         throw new UnsupportedOperationException();
>     }
> }
> -------------------- CompoundNameTest .java -------------------------------
> import javax.naming.CompoundName;
> import javax.naming.InvalidNameException;
> public class CompoundNameTest {
>     public static void main(String[] args) throws InvalidNameException {
>         CompoundName cn = new CompoundName("name", new MyProperties());
>         System.out.println(cn);
>         System.out.println(cn.clone());
>         
>     }
> }
> -------------------------------------------------------------------------------------------------------------------------
> Output:
> JRockit-----------------------------------
> 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))
> name
> name
> Harmony---------------------------------
> java version 1.5 (subset)
> (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> Exception in thread "main" java.lang.UnsupportedOperationException
> 	at test.MyProperties.clone(MyProperties.java:20)
> 	at javax.naming.CompoundName.init(CompoundName.java:373)
> 	at javax.naming.CompoundName.<init>(CompoundName.java:363)
> 	at test.CompoundNametest.main(CompoundNametest.java:21)

-- 
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