You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of `Short.valueOf(value).toString()` we can implement
`UByte#toString()` as `Short.toString(value)`. Also `UByte#hashCode()`
can be changed from `Short.valueOf(value).hashCode()` to
`Short.hashCode(value)` as of Java 1.8.
Same changes for `UInteger` and `UShort` and also to `ULong` for the
`hashCode()` implementation.
The current implementation on e.g.
UByte.toString()
is:This produces an unnecessary allocation of a
java.lang.Short
, when instead, we could writeOther types are also affected.
Credits to @knutwannheden for discovering this.
The text was updated successfully, but these errors were encountered: