RFR: 8060130: Simplify the synchronization of defining and getting java.lang.Package
Claes Redestad
claes.redestad at oracle.com
Mon Oct 13 15:41:18 UTC 2014
On 10/13/2014 05:29 PM, Peter Levart wrote:
> On 10/13/2014 05:15 PM, Peter Levart wrote:
>> Yes, I realized I got this messed up and have prepared a new patch
>> which passes tests and includes your previous
>> comments:
>>
>> http://cr.openjdk.java.net/~redestad/8060130/webrev.04
>
>
> Hi Claes,
>
> Hm, CachedManifest.getManifest() in 4th webrev is still a little
> faulty. It sometimes returns EMPTY_MANIFEST and sometimes null. I
> think it should always return null in case when no manifest is found
> (at least that was the old code behaviour).
Hmm, yes, that last little detail of making sure we also set m before
returning:
- manifest = (m == null ? EMPTY_MANIFEST : m);
+ manifest = m = (m == null ? EMPTY_MANIFEST : m);
http://cr.openjdk.java.net/~redestad/8060130/webrev.05
We rely on returning a non-null manifest from
CachedManifest.getManifest() in the current code, so returning null
would be a bad idea unless we revert the simplifications to
defineSystemPackage.
/Claes
>
> Regards, Peter
More information about the core-libs-dev
mailing list