Skip to content

Commit

Permalink
Improve var names in UUID serializer
Browse files Browse the repository at this point in the history
Co-authored-by: Riley Park <[email protected]>
  • Loading branch information
zml2008 and kashike committed Nov 21, 2023
1 parent 6feacda commit f9a739c
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ public UUID read(final JsonReader in) throws IOException {
// int-array format was added in 23w40a, a pre for 1.20.3
if (in.peek() == JsonToken.BEGIN_ARRAY) {
in.beginArray();
final int v0 = in.nextInt();
final int v1 = in.nextInt();
final int v2 = in.nextInt();
final int v3 = in.nextInt();
final int msb0 = in.nextInt();
final int msb1 = in.nextInt();
final int lsb0 = in.nextInt();
final int lsb1 = in.nextInt();
in.endArray();
return new UUID((long) v0 << 32 | ((long) v1 & 0xffffffffl), (long) v2 << 32 | ((long) v3 & 0xffffffffl));
return new UUID((long) msb0 << 32 | ((long) msb1 & 0xffffffffl), (long) lsb0 << 32 | ((long) lsb1 & 0xffffffffl));
}

return UUID.fromString(in.nextString());
Expand Down

0 comments on commit f9a739c

Please sign in to comment.