groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thibault Kruse <tibokr...@googlemail.com>
Subject Re: Failing Groovysh Test with JDK 9 SNAPSHOT on Buildserver
Date Tue, 01 Sep 2015 10:36:25 GMT
See https://github.com/apache/incubator-groovy/pull/107 for a possible fix

On Tue, Sep 1, 2015 at 11:13 AM, Thibault Kruse
<tibokruse@googlemail.com> wrote:
> The tests makes sure that completing java.util. includes 'Set', as in
> java.util.Set. I'll assume java9 does not move the Set class. I guess
> there is a change affecting method
> PackageHelperImpl.getClassnames(), which was originally copied from jline1.
>
> I see it has adaptations for jigsaw made by Cedric:
> https://github.com/apache/incubator-groovy/commit/0e384ec3
> (not pointing fingers, just analyzing the code)
>
> And the breaking test follows that new codepath.
>
> Debugging a bit, I notice that the files contained in 'jrt:/' does not
> contains only "/modules/java.base/java/util/Set.class". At a glance,
> it seems the assumptions in
> PackageHelperImpl.getPackagesAndClassesFromJigsaw() do not hold with
> the current Java9 implementation, since it produces a Class
> java.base.java.util.Set, but not java.util.Set.
>
> A quick fix is to change:
> -if (elems) {
> -   elems = elems[3..<elems.length]
> +if (elems && elems.length > 2) {
> +    elems = elems[3..<elems.length]
>
> in *two* places in that method.
>
> I have no idea whether there is a standard for the folder layout
> FileSystems.newFileSystem(URI.create("jrt:/")) should return, or
> whether and why this has changed since Cedric made his additions.
>
> However this might be related:
> http://mail.openjdk.java.net/pipermail/jigsaw-dev/2014-November/004044.html

Mime
View raw message