Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Duplicate
-
1.7.0
-
None
-
None
-
Groovy 1.7.0, JDK 1.5, Spring 2.5.6, Win
Description
Version 1.7.0 corrupts Spring 2.5.X refresh interval behaviour. I include set of test proving that. If you run them with Groovy 1.6.5 (see comments containing Groovy 1.6.5, that are necessary to process before running with 1.6.5 - 1.7.0 introduces some changes breaking backward compatibility) all tests pass. With 1.7.0 two fails - one is described in another issue GROOVY-3980.
This issue should concern with test: com.fg.scripting.groovy.SpringGroovyReloadSupportTest#testReloadLoadGroovyClass
Note that before running tests, path in com.fg.scripting.groovy.AbstractGroovyTest#setUp must be modified to match your system.
Spring configuration is so simple, that (I hope) cannot be wrong:
<?xml version="1.0" encoding="utf-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:lang="http://www.springframework.org/schema/lang"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang.xsd">
<bean id="propertyPlaceholderConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<lang:groovy id="mainGroovyClass"
refresh-check-delay="0"
script-source="file:${project.build.directory}/target/test-classes/com/fg/mock/MainGroovyClass.groovy"/>
<lang:groovy id="referencingGroovyClass"
refresh-check-delay="0"
script-source="file:${project.build.directory}/target/test-classes/com/fg/mock/ReferencingGroovyClass.groovy">
<lang:property name="mainGroovyClass" ref="mainGroovyClass"/>
</lang:groovy>
</beans>
Bean refreshes to conform to actual source code occurs no more with Groovy 1.7.0.
Regretfully I wasn't able to find out where problem lies, so no patch is included.
Attachments
Attachments
Issue Links
- duplicates
-
GROOVY-3973 GroovyClassLoader incompatible with older version(s)
- Closed