Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.6-beta-1
-
None
-
None
-
Java Runtime Environment version: 1.6.0_04
Java Runtime Environment vendor: Sun Microsystems Inc.
Ant version: Apache Ant version 1.7.0 compiled on December 13 2006
Operating system name: Windows XP
Operating system architecture: x86
[echo] Operating system version: 5.1
[echo] Base directory: C:\arbejde\workspace2\groovyJava Runtime Environment version: 1.6.0_04 Java Runtime Environment vendor: Sun Microsystems Inc. Ant version: Apache Ant version 1.7.0 compiled on December 13 2006 Operating system name: Windows XP Operating system architecture: x86 [echo] Operating system version: 5.1 [echo] Base directory: C:\arbejde\workspace2\groovy
Description
The GroovyClassLoader fails to recompile scripts when the script path contains spaces, as the file latest modified always return 0 (file not found).
I think this is related to Groovy-1787 issue.
As a consequence scripts cashed by a GroovyClassLoader will not be updated even if the source is replaced.
I've extended the GroovyClassLoaderTest.java with a new test method that demonstrate the issue. My guess is that this is not the proper location so someone with a better understanding that me of the project structure should properly move/refactor it.
Also as far as I can see a fix is almost trivial? within the isSorceNewer() method the filepath:
String path = source.getPath().replace('/', File.separatorChar).replace('|', ':');
should be parsed through the internal decodeFileName prior to creating the file object.
But I'm not convinced that this is the proper fix?