Skip to content

Commit 0591f7d

Browse files
committed
Simplify attribute unpickler
1 parent e8dc487 commit 0591f7d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

compiler/src/dotty/tools/dotc/core/tasty/AttributeUnpickler.scala

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,9 @@ class AttributeUnpickler(reader: TastyReader):
1414
val attributesBuilder = List.newBuilder[String]
1515
while (!isAtEnd) {
1616
val length = readNat()
17-
if (length > 0) {
18-
val bytes = readBytes(length)
19-
val attribute = new String(bytes, StandardCharsets.UTF_8)
20-
attributesBuilder += attribute
21-
}
17+
val bytes = readBytes(length)
18+
val attribute = new String(bytes, StandardCharsets.UTF_8)
19+
attributesBuilder += attribute
2220
}
2321
attributesBuilder.result()
2422
}

0 commit comments

Comments
 (0)