elharo commented on code in PR #177:
URL: https://github.com/apache/maven-shared-jar/pull/177#discussion_r4145389697
##########
src/main/java/org/apache/maven/shared/jar/identification/exposers/RepositorySearchExposer.java:
##########
@@ -77,7 +83,13 @@ public void expose(JarIdentification identification,
JarAnalyzer jarAnalyzer) {
repohits.addAll(repositoryHashSearch.searchFileHash(hash));
}
- String bytecodehash = bytecodeHashAnalyzer.computeHash(jarAnalyzer);
+ String bytecodehash;
+ try {
+ bytecodehash = bytecodeHashAnalyzer.computeHashCode(jarAnalyzer);
+ } catch (IOException e) {
+ logger.warn("Unable to calculate the bytecode hash.", e);
+ bytecodehash = null;
+ }
if (bytecodehash != null) {
Review Comment:
you can just move this into the try block without an if
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]