mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-22 17:19:30 +01:00
pmd corrections - unused exceptions
Former-commit-id: 25ac03c35e7805ec5b9a77c3a3deb5c667ae32c7
This commit is contained in:
@@ -337,7 +337,7 @@ public class Engine {
|
|||||||
Logger.getLogger(Engine.class.getName()).log(Level.FINE, "", ex);
|
Logger.getLogger(Engine.class.getName()).log(Level.FINE, "", ex);
|
||||||
} catch (Throwable ex) {
|
} catch (Throwable ex) {
|
||||||
final String axMsg = String.format("An unexpected error occurred during analysis of '%s'", d.getActualFilePath());
|
final String axMsg = String.format("An unexpected error occurred during analysis of '%s'", d.getActualFilePath());
|
||||||
final AnalysisException ax = new AnalysisException(axMsg, ex);
|
//final AnalysisException ax = new AnalysisException(axMsg, ex);
|
||||||
Logger.getLogger(Engine.class.getName()).log(Level.WARNING, axMsg);
|
Logger.getLogger(Engine.class.getName()).log(Level.WARNING, axMsg);
|
||||||
Logger.getLogger(Engine.class.getName()).log(Level.FINE, "", ex);
|
Logger.getLogger(Engine.class.getName()).log(Level.FINE, "", ex);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -261,7 +261,7 @@ public class JarAnalyzer extends AbstractAnalyzer implements Analyzer {
|
|||||||
jar = new JarFile(dependency.getActualFilePath());
|
jar = new JarFile(dependency.getActualFilePath());
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
final String msg = String.format("Unable to read JarFile '%s'.", dependency.getActualFilePath());
|
final String msg = String.format("Unable to read JarFile '%s'.", dependency.getActualFilePath());
|
||||||
final AnalysisException ax = new AnalysisException(msg, ex);
|
//final AnalysisException ax = new AnalysisException(msg, ex);
|
||||||
Logger.getLogger(JarAnalyzer.class.getName()).log(Level.WARNING, msg);
|
Logger.getLogger(JarAnalyzer.class.getName()).log(Level.WARNING, msg);
|
||||||
Logger.getLogger(JarAnalyzer.class.getName()).log(Level.FINE, null, ex);
|
Logger.getLogger(JarAnalyzer.class.getName()).log(Level.FINE, null, ex);
|
||||||
return false;
|
return false;
|
||||||
@@ -271,7 +271,7 @@ public class JarAnalyzer extends AbstractAnalyzer implements Analyzer {
|
|||||||
pomEntries = retrievePomListing(jar);
|
pomEntries = retrievePomListing(jar);
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
final String msg = String.format("Unable to read Jar file entries in '%s'.", dependency.getActualFilePath());
|
final String msg = String.format("Unable to read Jar file entries in '%s'.", dependency.getActualFilePath());
|
||||||
final AnalysisException ax = new AnalysisException(msg, ex);
|
//final AnalysisException ax = new AnalysisException(msg, ex);
|
||||||
Logger.getLogger(JarAnalyzer.class.getName()).log(Level.WARNING, msg);
|
Logger.getLogger(JarAnalyzer.class.getName()).log(Level.WARNING, msg);
|
||||||
Logger.getLogger(JarAnalyzer.class.getName()).log(Level.FINE, msg, ex);
|
Logger.getLogger(JarAnalyzer.class.getName()).log(Level.FINE, msg, ex);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user