/** * Get the ClassNotFoundException that caused this exception. * * @return the ClassNotFoundException that caused this exception */ public ClassNotFoundException getClassNotFoundException() { return (ClassNotFoundException) getCause(); } }
static public void reportMissingClass(edu.umd.cs.findbugs.ba.MissingClassException e) { requireNonNull(e, "argument is null"); reportMissingClass(e.getClassDescriptor()); }
@Override @SuppressFBWarnings("DM_EXIT") public void logError(String message, Throwable e) { if (e instanceof MissingClassException) { MissingClassException missingClassEx = (MissingClassException) e; ClassNotFoundException cnfe = missingClassEx.getClassNotFoundException(); reportMissingClass(cnfe); // Don't report dataflow analysis exceptions due to missing classes. // Too much noise. return; } if (e instanceof MethodUnprofitableException) { // TODO: log this return; } System.err.println("Error: " + message); e.printStackTrace(); System.exit(1); }
/** * Constructor. * * @param exception * the ClassNotFoundException that caused this exception */ public MissingClassException(ClassNotFoundException exception) { this(ClassNotFoundExceptionParser.getMissingClassName(exception)); initCause(exception); }
} catch (ClassNotFoundException e) { errorLogger.reportMissingClass(e); throw new MissingClassException(e);
/** * Constructor. * * @param exception * the ClassNotFoundException that caused this exception */ public MissingClassException(ClassNotFoundException exception) { this(ClassNotFoundExceptionParser.getMissingClassName(exception)); initCause(exception); }
} catch (ClassNotFoundException e) { errorLogger.reportMissingClass(e); throw new MissingClassException(e);
@Override public void logError(String message, Throwable e) { if (e instanceof MissingClassException) { MissingClassException e2 = (MissingClassException) e; reportMissingClass(e2.getClassNotFoundException()); return; } if (e instanceof MethodUnprofitableException) { // TODO: log this return; } bugCollection.addError(message, e); super.logError(message, e); }
/** * Get the ClassNotFoundException that caused this exception. * * @return the ClassNotFoundException that caused this exception */ public ClassNotFoundException getClassNotFoundException() { return (ClassNotFoundException) getCause(); } }
static public void reportMissingClass(edu.umd.cs.findbugs.ba.MissingClassException e) { requireNonNull(e, "argument is null"); reportMissingClass(e.getClassDescriptor()); }
@Override public void logError(String message, Throwable e) { if (e instanceof MethodUnprofitableException) { // TODO: log this return; } if (e instanceof edu.umd.cs.findbugs.classfile.MissingClassException) { edu.umd.cs.findbugs.classfile.MissingClassException e2 = (edu.umd.cs.findbugs.classfile.MissingClassException) e; reportMissingClass(e2.getClassDescriptor()); return; } if (e instanceof edu.umd.cs.findbugs.ba.MissingClassException) { // Record the missing class, in case the exception thrower didn't. edu.umd.cs.findbugs.ba.MissingClassException missingClassEx = (edu.umd.cs.findbugs.ba.MissingClassException) e; ClassNotFoundException cnfe = missingClassEx.getClassNotFoundException(); reportMissingClass(cnfe); // Don't report dataflow analysis exceptions due to missing classes. // Too much noise. return; } if (verbosityLevel == SILENT) { return; } Error error = new Error(errorCount++, message, e); if (!errorSet.contains(error)) { errorSet.add(error); } }
reportMissingClass(((MissingClassException) e).getClassNotFoundException()); return;
public void addError(String message, Throwable exception) { if (exception instanceof MissingClassException) { MissingClassException e = (MissingClassException) exception; addMissingClass(AbstractBugReporter.getMissingClassName(e.getClassNotFoundException())); return; } if (exception instanceof ClassNotFoundException) { ClassNotFoundException e = (ClassNotFoundException) exception; addMissingClass(AbstractBugReporter.getMissingClassName(e)); return; } if (exception instanceof edu.umd.cs.findbugs.classfile.MissingClassException) { edu.umd.cs.findbugs.classfile.MissingClassException e = (edu.umd.cs.findbugs.classfile.MissingClassException) exception; addMissingClass(AbstractBugReporter.getMissingClassName(e.toClassNotFoundException())); return; } errorList.add(new AnalysisError(message, exception)); }
AnalysisContext.currentAnalysisContext().getLookupFailureCallback().reportMissingClass(e.getClassNotFoundException()); } catch (CheckedAnalysisException e) { AnalysisContext.logError("Error looking up annotation class " + typeQualifier.toDottedClassName(), e);
bugReporter.reportMissingClass(e.getClassNotFoundException()); } catch (DataflowAnalysisException e) { bugReporter.logError("While analyzing " + currentMethod + ": FindNullDeref caught dae exception", e);
public boolean isCalledDirectlyOrIndirectly(XMethod m) { if (isCalled(m)) { return true; } if (m.isStatic() || m.isPrivate() || Const.CONSTRUCTOR_NAME.equals(m.getName())) { return false; } try { IAnalysisCache analysisCache = Global.getAnalysisCache(); XClass clazz = analysisCache.getClassAnalysis(XClass.class, m.getClassDescriptor()); if (isCalledDirectlyOrIndirectly(clazz.getSuperclassDescriptor(), m)) { return true; } for (ClassDescriptor i : clazz.getInterfaceDescriptorList()) { if (isCalledDirectlyOrIndirectly(i, m)) { return true; } } return false; } catch (edu.umd.cs.findbugs.classfile.MissingClassException e) { // AnalysisContext.reportMissingClass(e.getClassNotFoundException()); return false; } catch (MissingClassException e) { AnalysisContext.reportMissingClass(e.getClassNotFoundException()); return false; } catch (Exception e) { AnalysisContext.logError("Error checking to see if " + m + " is called (" + e.getClass().getCanonicalName() + ")", e); return false; } }
bugReporter.reportMissingClass(e.getClassNotFoundException()); } catch (DataflowAnalysisException e) { bugReporter.logError("While analyzing " + currentMethod + ": FindNullDeref caught dae exception", e);
AnalysisContext.reportMissingClass(e); } catch (MissingClassException e) { AnalysisContext.reportMissingClass(e.getClassNotFoundException()); } catch (CheckedAnalysisException e) { AnalysisContext.logError("Error checking for incompatible types", e);
AnalysisContext.reportMissingClass(e.getClassNotFoundException()); } catch (CheckedAnalysisException e) { AnalysisContext.logError("Error while checking guaranteed derefs in "
} catch (MissingClassException e) { AnalysisContext.currentAnalysisContext().getLookupFailureCallback() .reportMissingClass(e.getClassNotFoundException()); } catch (DataflowAnalysisException e) { AnalysisContext.currentAnalysisContext().getLookupFailureCallback()