[ https://issues.apache.org/jira/browse/GROOVY-7018?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14599332#comment-14599332 ]
ASF GitHub Bot commented on GROOVY-7018: ---------------------------------------- GitHub user Persi opened a pull request: https://github.com/apache/incubator-groovy/pull/43 GROOVY-7018 GroovyClassLoader addClasspath RegexPattern issue You can merge this pull request into a Git repository by running: $ git pull https://github.com/Persi/incubator-groovy master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-groovy/pull/43.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #43 ---- commit 6cf17e1d171503b5e86f5e29098d0cb619e94959 Author: Persi <the_hamm...@freenet.de> Date: 2015-06-24T09:09:35Z GROOVY-7018 GroovyClassLoader addClasspath RegexPattern issue GroovyMain and GroovyClassLoader had problems in Cygwin environments with finding Scripts. commit cdcb16930bf5ef63b6c6eff9f50f644353c85d0e Author: Persi <the_hamm...@freenet.de> Date: 2015-06-24T09:15:53Z Revert "GROOVY-7018 GroovyClassLoader addClasspath RegexPattern issue" This reverts commit 6cf17e1d171503b5e86f5e29098d0cb619e94959. commit 6495a83e5f047719fc85d6f09a4334c8ad94eccb Author: Persi <the_hamm...@freenet.de> Date: 2015-06-24T09:20:16Z Revert "Revert "GROOVY-7018 GroovyClassLoader addClasspath RegexPattern issue"" This reverts commit cdcb16930bf5ef63b6c6eff9f50f644353c85d0e. commit c86f4a54ab282b84ea9aabd67721894b93e9d093 Author: Persi <the_hamm...@freenet.de> Date: 2015-06-24T12:40:12Z GROOVY-7018 GroovyClassLoader addClasspath RegexPattern issue GroovyClassLoaderTest is now running succesfully with the new ClassLoaderCode. ---- > GroovyClassLoader addClasspath RegexPattern issue > ------------------------------------------------- > > Key: GROOVY-7018 > URL: https://issues.apache.org/jira/browse/GROOVY-7018 > Project: Groovy > Issue Type: Bug > Components: GroovyScriptEngine > Affects Versions: 2.3.6 > Environment: JDK 1.7u51 > Reporter: Stefan Leonhartsberger > > When adding Groovy Files from the file system to the GroovyClassLoader's > classpath grabbed from a default java properties file ("/" instead of "\")) > Then the addClasspath() method uses a simple URL instead of the File URL > This is due to a simple mistake in this mentioned method: > {code} > public void addClasspath(final String path) { > .... > if (!URI_PATTERN.matcher(path).matches()) { > newURI = new File(path).toURI(); > } else { > newURI = new URI(path); > } > } > private static final Pattern URI_PATTERN = > Pattern.compile("\\p{Alpha}[-+.\\p{Alnum}]*:[^\\\\]*"); > {code} > The URI_PATTERN which should match "URIs but not Windows filenames" doesn't > work as expected. > It matches i.e. C:/xxx/file.ext > This is related to using forward instead of backslashes - which souldn't > matter. > This was i.e. NOT the case for Groovy 2.1.3 -- This message was sent by Atlassian JIRA (v6.3.4#6332)