From 1deeccda30aea40040679102b1686ab8ca066f59 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 21 May 2014 13:58:13 +0100 Subject: [PATCH] Revert "Work around Groovy compiler bug that can name classes incorrectly" This reverts commit 46fc5c05e32b757c0d95eb13d4a592aa06593af3. Closes #598 --- .../boot/cli/compiler/GroovyCompiler.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/GroovyCompiler.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/GroovyCompiler.java index 190dcbaa157..12c6ff34f6b 100644 --- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/GroovyCompiler.java +++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/GroovyCompiler.java @@ -20,7 +20,6 @@ import groovy.lang.GroovyClassLoader; import groovy.lang.GroovyClassLoader.ClassCollector; import groovy.lang.GroovyCodeSource; -import java.io.File; import java.io.IOException; import java.lang.reflect.Field; import java.net.URL; @@ -182,13 +181,7 @@ public class GroovyCompiler { for (String source : sources) { List paths = ResourceUtils.getUrls(source, this.loader); for (String path : paths) { - URL url = new URL(path); - if ("file".equals(url.getProtocol())) { - compilationUnit.addSource(new File(url.getFile())); - } - else { - compilationUnit.addSource(url); - } + compilationUnit.addSource(new URL(path)); } }