Skip to content

Commit 09188a9

Browse files
hvadehracopybara-github
authored andcommitted
Fix error prone ComparisonOutOfRange in ZipTester
`filename` has type `byte[]`, so the range of each element is `[-128,127]` PiperOrigin-RevId: 544327350 Change-Id: I58b4829044fa5891157c4ef7dbc3e70fb458e33f
1 parent 785b91f commit 09188a9

File tree

1 file changed

+1
-1
lines changed
  • src/java_tools/singlejar/javatests/com/google/devtools/build/singlejar

1 file changed

+1
-1
lines changed

src/java_tools/singlejar/javatests/com/google/devtools/build/singlejar/ZipTester.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ private void readEntry() throws IOException {
228228

229229
String name = new String(filename, "UTF-8");
230230
for (int i = 0; i < filename.length; i++) {
231-
if ((filename[i] < ' ') || (filename[i] > 127)) {
231+
if ((filename[i] < ' ')) {
232232
warn(entryDesc + ": file name has unexpected non-ascii characters");
233233
}
234234
}

0 commit comments

Comments
 (0)