On Thu, 26 Nov 2020 18:53:06 GMT, Alan Bateman <[email protected]> wrote:
>> Richard Fussenegger has refreshed the contents of this pull request, and
>> previous commits have been removed. The incremental views will show
>> differences compared to the previous content of the PR.
>
> src/java.base/share/classes/java/util/UUID.java line 151:
>
>> 149: * @throws IllegalArgumentException if {@code bytes} is not of
>> length 16.
>> 150: * @since 16
>> 151: */
>
> I think you need to agreement first on whether to add this API. Maybe there
> is a case for a new factory method rather than a constructor? Are there any
> concerns with creating UUIDs with random bytes.
>
> If it goes ahead then I assume the the javadoc will need a bit of work to
> specify how the byte[] is mapped to the 128-bit value.
>
> You might need to tweak a few other things like the javadoc styles and coding
> style to get it consistent with the existing code. That's for later.
Hey @AlanBateman π I figured that most of the PRs I just created for UUID will
require a CSR but I what couldn't figure out is/was how _I_ can create a CSR.
1. Constructor or factory, I would be fine with both and happily change the
impl.
1. We de-facto already allow the construction from random data through the
`UUID(long, long)` constructor.
1. No problem either.
1. I had a look at the whole (well, sampling) JDK and various documents
([super, super, like 1999 old
documents](https://www.oracle.com/java/technologies/javase/codeconventions-introduction.html))
and loaded the Oracle code style in IntelliJ. However, all I get is
inconsistent. The existing files in the JDK are inconsistent. The UUID file is
inconsistent in itself. The IntelliJ Oracle style is different too⦠I'm happy
to change any line but would prefer it if there is some guidance with what is
expected because I cannot figure it out on my own. π
-------------
PR: https://git.openjdk.java.net/jdk/pull/1465