Skip to content

Commit

Permalink
Simplify attribute unpickler
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasstucki committed Oct 25, 2023
1 parent 108db21 commit a167dce
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ class AttributeUnpickler(reader: TastyReader):
val attributesBuilder = List.newBuilder[String]
while (!isAtEnd) {
val length = readNat()
if (length > 0) {
val bytes = readBytes(length)
val attribute = new String(bytes, StandardCharsets.UTF_8)
attributesBuilder += attribute
}
val bytes = readBytes(length)
val attribute = new String(bytes, StandardCharsets.UTF_8)
attributesBuilder += attribute
}
attributesBuilder.result()
}
Expand Down

0 comments on commit a167dce

Please sign in to comment.