harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Beyer (JIRA)" <j...@apache.org>
Subject [jira] Closed: (HARMONY-1263) [classlib][naming] RI CompoundName doesn't clone Properties passed as a parameter into constructor
Date Mon, 25 Sep 2006 22:58:51 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-1263?page=all ]

Nathan Beyer closed HARMONY-1263.
---------------------------------


Verified.

> [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-tests.patch, 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

        

Mime
View raw message