harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Igor V. Stolyarov (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-1263) [classlib][naming] RI CompoundName doesn't clone Properties passed as a parameter into constructor
Date Wed, 23 Aug 2006 07:15:13 GMT
[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


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