Mantis - Resin
Viewing Issue Advanced Details
79 minor always 04-04-05 00:00 05-11-05 00:00
user82  
 
immediate  
closed  
fixed  
none    
none 3.0.13  
0000079: MBean Proxy instance throws NPE in hashCode
RSN-70
I am creating MBean proxies by calling newProxyInstance() and I am adding them to an ArrayList() and then I create a HashSet of the list at a later time and I get NPE. See below:

ArrayList list = new ArrayList();
list.add(MBeanServerInvocationHandler.newProxyInstance());
...
HashSet set = new HashSet(list);

java.lang.NullPointerException
        at $Proxy7.hashCode(Unknown Source)
        at java.util.HashMap.hash(HashMap.java:264)
        at java.util.HashMap.put(HashMap.java:382)
        at java.util.HashSet.add(HashSet.java:194)
        at java.util.AbstractCollection.addAll(AbstractCollection.java:318)
        at java.util.HashSet.<init>(HashSet.java:100)
jdk1.5.0_02 using the resin-pro snap from 4/1/05

Notes
(0000084)
user82   
04-04-05 00:00   
I should note that all of this code worked with Resin-pro-3.0.10 and jdk1.4.2_06, but for for some reason we have been have all kinds of problems with the MBean proxies with jdk1.5.0_02.
(0000085)
ferg   
04-04-05 00:00   
server/1285