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

Roger Riggs rriggs at openjdk.java.net
Mon Dec 14 19:39:57 UTC 2020


On Thu, 26 Nov 2020 18:51:10 GMT, Richard Fussenegger <github.com+1059453+Fleshgrinder at openjdk.org> wrote:

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

The `version` method is described in the javadoc as only being applicable to variant = 2 UUIDs.
Changing the behavior to throw a `UnsupportedOperationException` is not a compatible change.
There is very little value in adding the exception doing so might prevent existing applications from continuing to function. 

Repeating the limitation to version 2 to the javadoc of the version method as far as this request can go.

Otherwise, please close the PR without integrating.

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

Changes requested by rriggs (Reviewer).

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


More information about the core-libs-dev mailing list