Fixed typo in logging

Former-commit-id: a98d83ab10a6d81c81e4a919bb0992e1bfa56934
This commit is contained in:
Jeremy Long
2014-01-05 07:14:59 -05:00
parent b569ad4ef5
commit cc915e39c5
6 changed files with 11 additions and 11 deletions

View File

@@ -495,8 +495,8 @@ public class DependencyCheckTask extends Task {
Logger.getLogger(DependencyCheckTask.class.getName()).log(Level.FINE, "Unable to generate dependency-check report", ex); Logger.getLogger(DependencyCheckTask.class.getName()).log(Level.FINE, "Unable to generate dependency-check report", ex);
throw new BuildException("Unable to generate dependency-check report", ex); throw new BuildException("Unable to generate dependency-check report", ex);
} catch (Exception ex) { } catch (Exception ex) {
Logger.getLogger(DependencyCheckTask.class.getName()).log(Level.FINE, "An exception occured; unable to continue task", ex); Logger.getLogger(DependencyCheckTask.class.getName()).log(Level.FINE, "An exception occurred; unable to continue task", ex);
throw new BuildException("An exception occured; unable to continue task", ex); throw new BuildException("An exception occurred; unable to continue task", ex);
} }
} }

View File

@@ -349,7 +349,7 @@ public class Engine {
} catch (AnalysisException ex) { } catch (AnalysisException ex) {
d.addAnalysisException(ex); d.addAnalysisException(ex);
} catch (Throwable ex) { } catch (Throwable ex) {
final String axMsg = String.format("An unexpected error occured 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);
d.addAnalysisException(ax); d.addAnalysisException(ax);
Logger.getLogger(Engine.class.getName()).log(Level.SEVERE, axMsg); Logger.getLogger(Engine.class.getName()).log(Level.SEVERE, axMsg);

View File

@@ -374,7 +374,7 @@ public class CveDB {
cpe.add(vs); cpe.add(vs);
} }
} catch (SQLException ex) { } catch (SQLException ex) {
final String msg = "An unexpected SQL Exception occured; please see the verbose log for more details."; final String msg = "An unexpected SQL Exception occurred; please see the verbose log for more details.";
Logger.getLogger(CveDB.class.getName()).log(Level.SEVERE, msg); Logger.getLogger(CveDB.class.getName()).log(Level.SEVERE, msg);
Logger.getLogger(CveDB.class.getName()).log(Level.FINE, null, ex); Logger.getLogger(CveDB.class.getName()).log(Level.FINE, null, ex);
} finally { } finally {
@@ -395,7 +395,7 @@ public class CveDB {
final PreparedStatement ps = getConnection().prepareStatement(SELECT_VENDOR_PRODUCT_LIST); final PreparedStatement ps = getConnection().prepareStatement(SELECT_VENDOR_PRODUCT_LIST);
rs = ps.executeQuery(); rs = ps.executeQuery();
} catch (SQLException ex) { } catch (SQLException ex) {
final String msg = "An unexpected SQL Exception occured; please see the verbose log for more details."; final String msg = "An unexpected SQL Exception occurred; please see the verbose log for more details.";
Logger.getLogger(CveDB.class.getName()).log(Level.SEVERE, msg); Logger.getLogger(CveDB.class.getName()).log(Level.SEVERE, msg);
Logger.getLogger(CveDB.class.getName()).log(Level.FINE, null, ex); Logger.getLogger(CveDB.class.getName()).log(Level.FINE, null, ex);
} // can't close the statement in the PS as the resultset is returned, closing PS would close the resultset } // can't close the statement in the PS as the resultset is returned, closing PS would close the resultset
@@ -418,7 +418,7 @@ public class CveDB {
prop.setProperty(rs.getString(1), rs.getString(2)); prop.setProperty(rs.getString(1), rs.getString(2));
} }
} catch (SQLException ex) { } catch (SQLException ex) {
final String msg = "An unexpected SQL Exception occured; please see the verbose log for more details."; final String msg = "An unexpected SQL Exception occurred; please see the verbose log for more details.";
Logger.getLogger(CveDB.class.getName()).log(Level.SEVERE, msg); Logger.getLogger(CveDB.class.getName()).log(Level.SEVERE, msg);
Logger.getLogger(CveDB.class.getName()).log(Level.FINE, null, ex); Logger.getLogger(CveDB.class.getName()).log(Level.FINE, null, ex);
} finally { } finally {
@@ -788,7 +788,7 @@ public class CveDB {
ps.executeUpdate(); ps.executeUpdate();
} }
} catch (SQLException ex) { } catch (SQLException ex) {
final String msg = "An unexpected SQL Exception occured; please see the verbose log for more details."; final String msg = "An unexpected SQL Exception occurred; please see the verbose log for more details.";
Logger.getLogger(CveDB.class.getName()).log(Level.SEVERE, msg); Logger.getLogger(CveDB.class.getName()).log(Level.SEVERE, msg);
Logger.getLogger(CveDB.class.getName()).log(Level.FINE, null, ex); Logger.getLogger(CveDB.class.getName()).log(Level.FINE, null, ex);
} finally { } finally {

View File

@@ -191,7 +191,7 @@ public class CallableDownloadTask implements Callable<Future<ProcessTask>> {
return this.processorService.submit(task); return this.processorService.submit(task);
} catch (Throwable ex) { } catch (Throwable ex) {
final String msg = String.format("An exception occured downloading NVD CVE - %s%nSome CVEs may not be reported.", nvdCveInfo.getId()); final String msg = String.format("An exception occurred downloading NVD CVE - %s%nSome CVEs may not be reported.", nvdCveInfo.getId());
Logger.getLogger(CallableDownloadTask.class.getName()).log(Level.WARNING, msg); Logger.getLogger(CallableDownloadTask.class.getName()).log(Level.WARNING, msg);
Logger.getLogger(CallableDownloadTask.class.getName()).log(Level.FINE, "Download Task Failed", ex); Logger.getLogger(CallableDownloadTask.class.getName()).log(Level.FINE, "Download Task Failed", ex);
} }

View File

@@ -74,7 +74,7 @@ public class DirectorySpinLockTest {
throw task.getException(); throw task.getException();
} }
long timeElapsed = end - start; long timeElapsed = end - start;
assertTrue("no lock contention occured?", timeElapsed >= 5000); assertTrue("no lock contention occurred?", timeElapsed >= 5000);
//no exceptions means everything worked. //no exceptions means everything worked.
} }

View File

@@ -228,10 +228,10 @@ public class DependencyCheckMojo extends AbstractMojo implements MavenMultiPageR
try { try {
r.generateReports(outputDirectory.getCanonicalPath(), format); r.generateReports(outputDirectory.getCanonicalPath(), format);
} catch (IOException ex) { } catch (IOException ex) {
Logger.getLogger(DependencyCheckMojo.class.getName()).log(Level.SEVERE, "Unexpected exception occured during analysis; please see the verbose error log for more details."); Logger.getLogger(DependencyCheckMojo.class.getName()).log(Level.SEVERE, "Unexpected exception occurred during analysis; please see the verbose error log for more details.");
Logger.getLogger(DependencyCheckMojo.class.getName()).log(Level.FINE, null, ex); Logger.getLogger(DependencyCheckMojo.class.getName()).log(Level.FINE, null, ex);
} catch (Exception ex) { } catch (Exception ex) {
Logger.getLogger(DependencyCheckMojo.class.getName()).log(Level.SEVERE, "Unexpected exception occured during analysis; please see the verbose error log for more details."); Logger.getLogger(DependencyCheckMojo.class.getName()).log(Level.SEVERE, "Unexpected exception occurred during analysis; please see the verbose error log for more details.");
Logger.getLogger(DependencyCheckMojo.class.getName()).log(Level.FINE, null, ex); Logger.getLogger(DependencyCheckMojo.class.getName()).log(Level.FINE, null, ex);
} }
} }