You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by jk...@apache.org on 2015/11/12 12:46:15 UTC
tapestry-5 git commit: TAP5-2517: fix test
Repository: tapestry-5
Updated Branches:
refs/heads/master 232b637a1 -> 8b90518ff
TAP5-2517: fix test
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/8b90518f
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/8b90518f
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/8b90518f
Branch: refs/heads/master
Commit: 8b90518ff556b7ff3d8ecdc77386fca59d463ece
Parents: 232b637
Author: Jochen Kemnade <jo...@eddyson.de>
Authored: Thu Nov 12 12:45:32 2015 +0100
Committer: Jochen Kemnade <jo...@eddyson.de>
Committed: Thu Nov 12 12:45:32 2015 +0100
----------------------------------------------------------------------
.../test/groovy/ioc/specs/ClasspathResourceSpec.groovy | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/8b90518f/tapestry-ioc/src/test/groovy/ioc/specs/ClasspathResourceSpec.groovy
----------------------------------------------------------------------
diff --git a/tapestry-ioc/src/test/groovy/ioc/specs/ClasspathResourceSpec.groovy b/tapestry-ioc/src/test/groovy/ioc/specs/ClasspathResourceSpec.groovy
index 6f446cb..f50111b 100644
--- a/tapestry-ioc/src/test/groovy/ioc/specs/ClasspathResourceSpec.groovy
+++ b/tapestry-ioc/src/test/groovy/ioc/specs/ClasspathResourceSpec.groovy
@@ -286,13 +286,13 @@ class ClasspathResourceSpec extends Specification {
def "Can open a stream for a file resource within a JAR file that has a duplicate on the classpath"() {
setup:
def currentCl = Thread.currentThread().contextClassLoader
+ def resourcePath = 'META-INF/maven/org.slf4j/slf4j-api/pom.xml'
- def loadedURLs = currentCl.ucp.path
- def slf4jApiFirst = loadedURLs.sort{!it.toString().contains('slf4j-api')}
-
- ClassLoader cl = new URLClassLoader(slf4jApiFirst as URL[], null, AccessController.getContext())
+ def resourceURLs = currentCl.findResources resourcePath
+ def slf4jApiURL = resourceURLs.find{it.toString().contains('.jar!')}
+ ClassLoader cl = new URLClassLoader(slf4jApiURL as URL[], null, AccessController.getContext())
- ClasspathResource r = new ClasspathResource(cl, '/META-INF/maven/org.slf4j/slf4j-api/pom.xml')
+ ClasspathResource r = new ClasspathResource(cl, resourcePath)
when:
r.openStream()