Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.7.1
-
None
Description
While debugging I try to hot swap a groovy class.
It always fails with messages "Schema change not implemented. Operation not supported by VM".
With Java classes there is no such problem - hot swap works as long as I don't add/remove any field or method or change a method signature.
I had hoped to gradually convert my Java app to groovy, but this made me refrain from using groovy for anything more complex than "java" beans.
Looking at the bytecode with javap, it is obvious where the problem is:
There is an artifical field that changes its name on each compilation.
Initial:
public static java.lang.Long _timeStamp_239_neverHappen1268432715287;
After recompilation:
public static java.lang.Long _timeStamp_239_neverHappen1268433121889;
What is this field used for? Can't we get rid of it?
All other fields/methods look the same after recompilation, so I am pretty sure that hot swap will work without this field change.
Attachments
Attachments
Issue Links
- is duplicated by
-
GROOVY-5390 groovyc class generation kind of break default serialVersionUID generation by the jvm
- Closed
-
GROOVY-6308 Timestamps in bytecode prevents baselining of code
- Closed