"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/java/edu/umd/cs/findbugs/AddAnnotation.java" between
findbugs-3.0.0-source.zip and findbugs-3.0.1-source.zip

About: FindBugs uses static analysis to look for bugs in Java code. Source.

AddAnnotation.java  (findbugs-3.0.0-source):AddAnnotation.java  (findbugs-3.0.1-source)
skipping to change at line 66 skipping to change at line 66
public void execute() { public void execute() {
for (BugInstance bugInstance : bugCollection) { for (BugInstance bugInstance : bugCollection) {
// Don't add the annotation if it is already present // Don't add the annotation if it is already present
if (bugInstance.annotationTextContainsWord(this.annotation)) { if (bugInstance.annotationTextContainsWord(this.annotation)) {
continue; continue;
} }
String annotation = bugInstance.getAnnotationText(); String annotation = bugInstance.getAnnotationText();
StringBuilder buf = new StringBuilder(); StringBuilder buf = new StringBuilder();
if (!annotation.equals("")) { if (!"".equals(annotation)) {
buf.append(annotation); buf.append(annotation);
buf.append('\n'); buf.append('\n');
} }
buf.append(this.annotation); buf.append(this.annotation);
bugInstance.setAnnotationText(buf.toString(), bugCollection); bugInstance.setAnnotationText(buf.toString(), bugCollection);
} }
} }
@SuppressFBWarnings("DM_EXIT") @SuppressFBWarnings("DM_EXIT")
public static void main(String[] argv) throws Exception { public static void main(String[] argv) throws Exception {
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS