Changed behaviour of ResourceBundle#getBundle()

Gunnar Morling gunnar at hibernate.org
Mon Dec 12 13:38:48 UTC 2016


Hi,

I'm about to update my blog post on Bean Validation and Jigsaw from a while
ago [1] to the latest JDK 9 build.

There is one behavioural change that made me curious:
ResourceBundle#getBundle() called from within named module "A" now (as of
b148) returns a bundle based on a properties file located in another named
module "B". "A" does not require "B" in it's module-info.java, nor does "B"
export any packages at all. This was not the case when I originally tried
it (b122).

This change seems odd, as it's not in line with the "resource
encapsulation" requirement [2]. Reading the "Issue Summary" document, I now
realize that I'm probably running into issue "#ResourceEncapsulation". It
has been marked as resolved in that document, but I suppose that only
refers to the fact that a solution has been identified which not
necessarily has been implemented yet at this point? I.e. that's a known
issue in the implementation at this point?

Thanks,

--Gunnar

[1] http://in.relation.to/2016/06/17/bean-validation-and-the-jigsaw-liaison/
[2]
http://openjdk.java.net/projects/jigsaw/spec/reqs/#resource-encapsulation
[3]
http://openjdk.java.net/projects/jigsaw/spec/issues/#ResourceEncapsulation


More information about the jigsaw-dev mailing list