Simplify code
See gh-18342
This commit is contained in:
@@ -143,8 +143,8 @@ class BootArchiveSupport {
|
||||
}
|
||||
|
||||
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 b : ZIP_FILE_HEADER) {
|
||||
if (inputStream.read() != b) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user