Simplify code by using for-each loop
See gh-15563
This commit is contained in:
committed by
Stephane Nicoll
parent
cc5624efc4
commit
dfb3cd51bc
@@ -270,8 +270,8 @@ public class Repackager {
|
||||
}
|
||||
|
||||
private boolean isZip(InputStream inputStream) throws IOException {
|
||||
for (int i = 0; i < ZIP_FILE_HEADER.length; i++) {
|
||||
if (inputStream.read() != ZIP_FILE_HEADER[i]) {
|
||||
for (byte magicByte : ZIP_FILE_HEADER) {
|
||||
if (inputStream.read() != magicByte) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user