You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "elharo (via GitHub)" <gi...@apache.org> on 2026/10/01 11:47:57 UTC
Re: [PR] fix: expose bytecode hash I/O failures [maven-shared-jar]
elharo commented on code in PR #177:
URL: https://github.com/apache/maven-shared-jar/pull/177#discussion_r4155007748
##########
src/main/java/org/apache/maven/shared/jar/identification/exposers/RepositorySearchExposer.java:
##########
@@ -77,9 +83,11 @@ public void expose(JarIdentification identification, JarAnalyzer jarAnalyzer) {
repohits.addAll(repositoryHashSearch.searchFileHash(hash));
}
- String bytecodehash = bytecodeHashAnalyzer.computeHash(jarAnalyzer);
- if (bytecodehash != null) {
- repohits.addAll(repositoryHashSearch.searchBytecodeHash(bytecodehash));
+ try {
+ String bytecodeHash = bytecodeHashAnalyzer.computeHashCode(jarAnalyzer);
+ repohits.addAll(repositoryHashSearch.searchBytecodeHash(bytecodeHash));
+ } catch (IOException e) {
+ logger.warn("Unable to calculate the bytecode hash.", e);
Review Comment:
I'm not sure this is working. all this does is move one ignored exception into a different method. It doesn't deal with or really report the I/O error.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org