RFR(XS): 8226286 Remove unused method java.lang.Integer::formatUnsignedInt

Tagir Valeev amaembo at gmail.com
Wed Jun 19 05:28:34 UTC 2019


Hello, Brian!

Thank you for review. Here's updated version:
http://cr.openjdk.java.net/~tvaleev/webrev/8226286/r2/

I left dangling javadoc in-place in the same way as it's done in
> java.lang.Long.
>
>
> I don’t know whether this was intentional per some policy or an oversight.
>

Seems it was an oversight. Now I properly attached javadoc to both methods,
replaced "character buffer" with "byte buffer", added "(LATIN1 version)",
"(UTF16 version)" and did the same changes in java.lang.Long. I also made
formatUnsignedInt and formatUnsignedLong0 private (they were
package-private),
because they are not called from other classes and UTF16 methods are
already
declared as private.


> Also I removed redundant reassignment of parameter like s =
> Objects.requireNonNull(s).
>
> By the way I noticed that remaining methods formatUnsignedInt
> and formatUnsignedIntUTF16 always accept offset = 0. Probably it would be
> good to inline offset parameter?
>
>
> Yes at it is always zero.
>

Also done. In Long class offsets are used for UUID generation, so this
change was
applied to Integer only.

I updated the issue description to reflect all the changes made. Probably I
should
add some tags to the issue to indicate that it's a cleanup only?

With best regards,
Tagir Valeev.


More information about the core-libs-dev mailing list