Changed behaviour of ResourceBundle#getBundle()

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


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, 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?




More information about the jigsaw-dev mailing list