• Bug
  • Status: Closed
  • 2 Major
  • Resolution: Fixed
  • DSO:L1
  • hhuynh
  • Reporter: steve
  • April 24, 2007
  • 0
  • Watchers: 0
  • June 04, 2007
  • April 26, 2007

Description

Take a java.util.concurrent.ConcurrentHashMap and try to do a put(MyClass.class, “this is a test”);

you get this:

java.lang.ClassCastException: java.lang.Class at com.tc.object.bytecode.ManagerImpl.shareObjectIfNecessary(ManagerImpl.java:548) at com.tc.object.bytecode.ManagerUtil.shareObjectIfNecessary(ManagerUtil.java:132) at java.util.concurrent.ConcurrentHashMap.__tc_hash(ConcurrentHashMap.java) at java.util.concurrent.ConcurrentHashMap.__tc_hash(ConcurrentHashMap.java) at java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:848) at com.tctest.ConcurrentHashMapTestApp.testPut1(ConcurrentHashMapTestApp.java:62) at com.tctest.GenericTestApp.runMethod(GenericTestApp.java:144) at com.tctest.GenericTestApp.runOp(GenericTestApp.java:138) at com.tctest.GenericTestApp.doMutate(GenericTestApp.java:104) at com.tctest.GenericTestApp.runTest(GenericTestApp.java:69) at com.tctest.runner.AbstractErrorCatchingTransparentApp.run(AbstractErrorCatchingTransparentApp.java:29) at com.tc.simulator.container.ApplicationRunner.run(ApplicationRunner.java:43) at java.lang.Thread.run(Thread.java:613)

End error contexts.

Comments

Antonio Si 2007-04-26

Add a test case in ConcurrentHashMapTest.

Fiona OShea 2007-05-30

verify that test passes and works as described

Hung Huynh 2007-05-30

verified