groovy/groovy-core — pull request #499 by melix (2014-07-31 15:21:51+00:00)
Title: GROOVY-6990: Do not add timestamp fields if possible

This pull request disables the generation of the timestamp fields. The responsability of adding them is delegated to the `GroovyClassLoader`, depending on its configuration.

There are actually two flags in GCL that could trigger generation of the timestamp:

* `recompile`
* `config.recompileGroovySource`

The behavior should normally be a breaking change if you have a .class file (precompiled class) which was compiled with recompilation set to false (which would not generate the timestamp) then try to reload the source file with recompilation set to true. However, as the unit test illustrates, this is not the case. Uncommenting the `config.targetDirectory` line will *do* fail the test, but not for the expected reason. Putting in a debugger will show that `groovy.lang.GroovyClassLoader#isRecompilable` is not reached because a `.class` file is found and is preferred anyway.

So as is, it seems that this PR doesn't break anything, but the current behavior seems a bit strange.