Skip to content
This repository was archived by the owner on Sep 18, 2025. It is now read-only.

issues/205: consider full byte code when computing hashes#206

Closed
fmck3516 wants to merge 2 commits intomainfrom
issues/205
Closed

issues/205: consider full byte code when computing hashes#206
fmck3516 wants to merge 2 commits intomainfrom
issues/205

Conversation

@fmck3516
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown

@pjmartos pjmartos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

var classVisitor = new ClassVisitor(Opcodes.ASM9, classWriter) {};
new ClassReader(inputStream).accept(classVisitor, ClassReader.SKIP_DEBUG);
return classWriter.toByteArray();
return inputStream.readAllBytes();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about Files.readAllBytes(Path)? Both solutions would fail in case of reading a class that is way too large (> 2GiB), but Files.readAllBytes(Path) would fail early.

@fmck3516 fmck3516 closed this Sep 18, 2025
@fmck3516 fmck3516 deleted the issues/205 branch September 18, 2025 01:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants