NeverHappen variable in compiled classes

I changed several classes in my Grails project and created a war file. Then I compared the .class files from the new war to the war that was built before my changes (on another machine, if that matters), and it turns out that many (if not all) .class files are different. Looking at the decompiled classes, it seems that the differences are related to the timestamp in the variable, such as:

public static long __timeStamp__239_neverHappen1360886953029; 

Does anyone know what this variable is?

+6
source share
2 answers

It comes from the groovy generation.

See the discussion here http://groovy.329449.n5.nabble.com/Timestamp-in-class-files-leads-to-huge-patches-td365696.html

For completeness, here: -

For groovy own recompilation mechanism. Sources are not always in the file form, so we can’t just “check” the timestamp of the file, so we had to store this timestamp somewhere ... and where better than the class itself, since all that we have ?

In Tue, March 3, 2009 at 10:39, Jason Dillon and [hidden email]> wrote:

Why does groovyc capture the compile time stamp? What is this good for?

+3
source

This has changed in Groovy 2.4, .class files no longer contain timestamp fields.

https://github.com/groovy/groovy-core/commit/bcdb89e

+1
source

All Articles