Return-Path: X-Original-To: apmail-groovy-notifications-archive@minotaur.apache.org Delivered-To: apmail-groovy-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9478C18DB4 for ; Thu, 2 Jul 2015 19:24:28 +0000 (UTC) Received: (qmail 17951 invoked by uid 500); 2 Jul 2015 19:24:28 -0000 Delivered-To: apmail-groovy-notifications-archive@groovy.apache.org Received: (qmail 17927 invoked by uid 500); 2 Jul 2015 19:24:28 -0000 Mailing-List: contact notifications-help@groovy.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@groovy.incubator.apache.org Delivered-To: mailing list notifications@groovy.incubator.apache.org Received: (qmail 17918 invoked by uid 99); 2 Jul 2015 19:24:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jul 2015 19:24:28 +0000 X-ASF-Spam-Status: No, hits=-2000.7 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 02 Jul 2015 19:22:18 +0000 Received: (qmail 15803 invoked by uid 99); 2 Jul 2015 19:24:05 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jul 2015 19:24:05 +0000 Date: Thu, 2 Jul 2015 19:24:05 +0000 (UTC) From: "Pascal Schumacher (JIRA)" To: notifications@groovy.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (GROOVY-7018) GroovyClassLoader addClasspath RegexPattern issue MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/GROOVY-7018?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pascal Schumacher resolved GROOVY-7018. --------------------------------------- Resolution: Fixed Assignee: Pascal Schumacher Fix Version/s: 2.4.4 > 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 > Assignee: Pascal Schumacher > Fix For: 2.4.4 > > > 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)