akshayyn / cloning

Automatically exported from code.google.com/p/cloning
Other
0 stars 0 forks source link

Problem cloning enums that override toString() #9

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
See attached java file for test code.

This should print 'true' 3 times. Instead it's all 'false'.

Tested with 1.7.9 on windows 7, with java:
Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
Java HotSpot(TM) Client VM (build 23.1-b03, mixed mode, sharing)

Original issue reported on code.google.com by kovacs.z...@gmail.com on 16 Jul 2012 at 9:31

Attachments:

GoogleCodeExporter commented 8 years ago
Hi,

Indeed this is very weird, maybe a JDK bug. As you pointed out, it prints 3 
times "false". I tried out and TestEnum.A.getClass().isEnum() == false !!! 
Certainly this is not a Cloning library issue. Maybe open a JDK bug?

Original comment by kostas.k...@googlemail.com on 17 Jul 2012 at 7:23

GoogleCodeExporter commented 8 years ago
Kovacs, I'll assume this is a jdk issue and will close this. Please let me know 
if you have anything newer on this.

Original comment by kostas.k...@googlemail.com on 25 Jul 2012 at 9:24