Skip to content

Commit 59b08f9

Browse files
committed
groovy work
1 parent b2a7d18 commit 59b08f9

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

booter/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<dependency>
4949
<groupId>org.codehaus.groovy</groupId>
5050
<artifactId>groovy-all</artifactId>
51-
<version>1.8.9</version>
51+
<version>2.4.16</version>
5252
<scope>integration-test</scope>
5353
</dependency>
5454
<dependency>

script/script-core/src/java/org/picocontainer/script/ScriptedContainerBuilder.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ public int read() throws IOException {
9696
return scriptURL.openStream();
9797
}
9898

99+
protected final URL getScriptURL() throws IOException{
100+
return scriptURL;
101+
}
102+
99103
protected final Reader getScriptReader() throws IOException{
100104
if ( scriptReader != null ){
101105
return scriptReader;

script/script-groovy/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<dependency>
1818
<groupId>org.codehaus.groovy</groupId>
1919
<artifactId>groovy-all</artifactId>
20-
<version>1.8.9</version>
20+
<version>2.4.16</version>
2121
<exclusions>
2222
<exclusion>
2323
<groupId>junit</groupId>

script/script-groovy/src/java/org/picocontainer/script/groovy/GroovyContainerBuilder.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,7 @@ protected void handleBinding(Binding binding) {
102102
private void createGroovyClass() {
103103
try {
104104
GroovyClassLoader loader = new GroovyClassLoader(getClassLoader());
105-
InputStream scriptIs = getScriptInputStream();
106-
GroovyCodeSource groovyCodeSource = new GroovyCodeSource(scriptIs, "picocontainer.groovy","groovyGeneratedForPicoContainer");
105+
GroovyCodeSource groovyCodeSource = new GroovyCodeSource(super.getScriptURL());
107106
scriptClass = loader.parseClass(groovyCodeSource);
108107
} catch (CompilationFailedException e) {
109108
throw new GroovyCompilationException("Compilation Failed '" + e.getMessage() + "'", e);

0 commit comments

Comments
 (0)