Changed behaviour of ResourceBundle#getBundle()
Martin Lehmann
martin.lehmann at gmx.de
Tue Feb 14 11:15:45 UTC 2017
Hi Alan,
thanks for that explanation.
If I understand this correctly: Assume that I have two modules M and N , both containing eg a properties file and both files need to get encapsulated. Then M and N have to choose *different* package names for where to put the file, right? Because of split package problem...?!
Isn't Jigsaw's default to "encapsulate all" (so anything which is not explicitely exported or opened is per default encapsulated)? Why is this not also the default for resources in the unnamed package or in a "not-a-package place"? Sounds incosistent to me.
Cheers,
Martin
-----Original Message-----
From: jigsaw-dev [mailto:jigsaw-dev-bounces at openjdk.java.net] On Behalf Of Alan Bateman
Sent: Monday, December 12, 2016 5:57 PM
To: Gunnar Morling <gunnar at hibernate.org>
Cc: jigsaw-dev <jigsaw-dev at openjdk.java.net>
Subject: Re: Changed behaviour of ResourceBundle#getBundle()
On 12/12/2016 15:29, Gunnar Morling wrote:
> :
>
> It seems to be related to the fact that the bundle is located in the
> default package, because the expected exception is raised if the
> bundle is located in a proper package.
>
Right, resources in the unnamed package or with names that don't map to packages in the module are not encapsulated. So what you are seeing is correct.
-Alan
More information about the jigsaw-dev
mailing list