efegokdemir commented on code in PR #177:
URL: https://github.com/apache/maven-shared-jar/pull/177#discussion_r4145723507
##########
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:
Implemented in `a858c39`: moved the nullable bytecode-hash handling inside
the existing `try` block and removed the unnecessary conditional state outside
it. `git diff --check` passes. Maven verification could not run because this
checkout has no Maven wrapper and Maven is not installed locally.
--
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]