Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8263560: Remove needless wrapping with BufferedInputStream #2992

wants to merge 7 commits into from
Changes from 1 commit
File filter

Filter by extension

Filter by extension

Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -53,10 +53,8 @@ public class JmodFile implements AutoCloseable {
public static void checkMagic(Path file) throws IOException {
try (InputStream in = Files.newInputStream(file)) {
// validate the header
byte[] magic = in.readNBytes(4);
if (magic.length != 4) {
throw new IOException("Header expected to be of length 4, but was " + magic.length);
byte[] magic = new byte[4];;
stsypanov marked this conversation as resolved.
Show resolved Hide resolved
if (magic[0] != JMOD_MAGIC_NUMBER[0] ||
magic[1] != JMOD_MAGIC_NUMBER[1]) {
throw new IOException("Invalid JMOD file: " + file.toString());