In my project there are some \'Prototype\' factories that create instances by cloning a final private instance.
The author of those factories says that this pattern prov
Gee. That's one of the worst idea I've ever heard.
Don't do weird things. Even if you have measured and see some apparent improvement (well, zero chance of that in this case), think a long time before doing it.. Who knows it will be fixed in the next JVM. Then you are left with some weird piece of code that performs worse, is difficult to read, and some bugs because of that.
I mean, it's not like people developing the JVM are idiots! Use new
!
I think you should get rid of that strange piece of code.