RFR: 6594730: UUID.getVersion() is only meaningful for Leach-Salz variant

Lance Andersen lancea at openjdk.java.net
Thu Dec 17 17:20:56 UTC 2020


On Wed, 16 Dec 2020 14:42:36 GMT, Richard Fussenegger <github.com+1059453+Fleshgrinder at openjdk.org> wrote:

> > There is very little value in adding the exception doing so might prevent existing applications from continuing to function.
> 
> I disagree on the value and am with the author of the original issue. All these existing applications are functioning but factually invalid, adding the exception like we have it in all other methods of the class would surface the issue in exactly those applications.

While I can appreciate that the current behavior might be less than ideal, changing it to throw an UnsupportedOperationException could break existing applications.    Have you had a chance to research the number of uses of version() in the java eco-system to determine that  the risk to existing applications will minimal?

If you feel that the change in functionality  is important for users of UUID,  then please propose a replacement method for version and propose to deprecate the existing method ?  

If you decide to move forward with proposing a replacement method for version, then please socialize the proposal on corelibs-dev prior to creating a new PR.   

 Please note that a CSR will also be required to move forward.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1467


More information about the core-libs-dev mailing list