本文整理汇总了Java中edu.umd.cs.findbugs.props.WarningPropertySet.decorateBugInstance方法的典型用法代码示例。如果您正苦于以下问题:Java WarningPropertySet.decorateBugInstance方法的具体用法?Java WarningPropertySet.decorateBugInstance怎么用?Java WarningPropertySet.decorateBugInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类edu.umd.cs.findbugs.props.WarningPropertySet
的用法示例。
在下文中一共展示了WarningPropertySet.decorateBugInstance方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: reportNullDeref
import edu.umd.cs.findbugs.props.WarningPropertySet; //导入方法依赖的package包/类
private void reportNullDeref(WarningPropertySet<WarningProperty> propertySet, Location location, String type, int priority,
BugAnnotation cause, @CheckForNull BugAnnotation variable) {
BugInstance bugInstance = new BugInstance(this, type, priority).addClassAndMethod(classContext.getJavaClass(), method);
bugInstance.add(cause);
if (variable != null)
bugInstance.add(variable);
else
bugInstance.add(new LocalVariableAnnotation("?", -1, -1));
bugInstance.addSourceLine(classContext, method, location).describe("SOURCE_LINE_DEREF");
if (FindBugsAnalysisFeatures.isRelaxedMode()) {
WarningPropertyUtil.addPropertiesForDataMining(propertySet, classContext, method, location);
}
addPropertiesForDereferenceLocations(propertySet, Collections.singleton(location));
propertySet.decorateBugInstance(bugInstance);
bugReporter.reportBug(bugInstance);
}
示例2: reportNullDeref
import edu.umd.cs.findbugs.props.WarningPropertySet; //导入方法依赖的package包/类
private void reportNullDeref(WarningPropertySet<WarningProperty> propertySet, Location location, String type, int priority,
@CheckForNull
BugAnnotation variable) {
BugInstance bugInstance = new BugInstance(this, type, priority).addClassAndMethod(classContext.getJavaClass(), method);
if (variable != null)
bugInstance.add(variable);
else
bugInstance.add(new LocalVariableAnnotation("?", -1, -1));
bugInstance.addSourceLine(classContext, method, location).describe("SOURCE_LINE_DEREF");
if (FindBugsAnalysisFeatures.isRelaxedMode()) {
WarningPropertyUtil.addPropertiesForDataMining(propertySet, classContext, method, location);
}
addPropertiesForDereferenceLocations(propertySet, Collections.singleton(location), false);
propertySet.decorateBugInstance(bugInstance);
bugReporter.reportBug(bugInstance);
}
示例3: decorateWarning
import edu.umd.cs.findbugs.props.WarningPropertySet; //导入方法依赖的package包/类
private void decorateWarning(Location location, WarningPropertySet<WarningProperty> propertySet, BugInstance warning) {
if (FindBugsAnalysisFeatures.isRelaxedMode()) {
WarningPropertyUtil.addPropertiesForDataMining(propertySet, classContext, method, location);
}
propertySet.decorateBugInstance(warning);
}