RFR: 8150680 JarFile.Release enum needs reconsideration with respect to it's values

Steve Drach steve.drach at oracle.com
Thu Jun 23 02:04:58 UTC 2016


> 144     private boolean notVersioned;           // legacy constructor called
> 
> Do you need this?

Unfortunately yes.  It’s used in entries() and stream().  If it’s set, they have the JDK 8 semantics.  If not set, entries/stream only see the appropriate versioned entries.  This will go away when JDK-8157524 is resolved.

> Is this condition already met if versionMajor == BASE_VERSION_MAJOR ?

No

> 
> i.e. why do you need to restrict to only the “legacy” constructor, since surely the same conditions should apply if a BASE_VERSION compatible version is passed into the version accepting constructor?

It’s the only way to differentiate how the version accepting constructor was called, from another constructor or from the “outside” world.

> 
> Paul.



More information about the core-libs-dev mailing list