/** * Reads the {@link LineRange} object the cursor is pointing at. */ public LineRange next() { int s = read(); int d = read(); return new LineRange(s, s + d); }
/** * Reads the {@link LineRange} object the cursor is pointing at. */ public LineRange next() { int s = read(); int d = read(); return new LineRange(s, s + d); }
private void setAffectedLines(final BugInstance warning, final Bug bug) { Iterator<BugAnnotation> annotationIterator = warning.annotationIterator(); while (annotationIterator.hasNext()) { BugAnnotation bugAnnotation = annotationIterator.next(); if (bugAnnotation instanceof SourceLineAnnotation) { SourceLineAnnotation annotation = (SourceLineAnnotation)bugAnnotation; bug.addLineRange(new LineRange(annotation.getStartLine(), annotation.getEndLine())); } } }
private void setAffectedLines(final BugInstance warning, final Bug bug) { Iterator<BugAnnotation> annotationIterator = warning.annotationIterator(); while (annotationIterator.hasNext()) { BugAnnotation bugAnnotation = annotationIterator.next(); if (bugAnnotation instanceof SourceLineAnnotation) { SourceLineAnnotation annotation = (SourceLineAnnotation)bugAnnotation; bug.addLineRange(new LineRange(annotation.getStartLine(), annotation.getEndLine())); } } }
private void setAffectedLines(final BugInstance warning, final Bug bug) { Iterator<BugAnnotation> annotationIterator = warning.annotationIterator(); while (annotationIterator.hasNext()) { BugAnnotation bugAnnotation = annotationIterator.next(); if (bugAnnotation instanceof SourceLineAnnotation) { SourceLineAnnotation annotation = (SourceLineAnnotation)bugAnnotation; bug.addLineRange(new LineRange(annotation.getStartLine(), annotation.getEndLine())); } } }
/** * Creates a new instance of <code>AbstractAnnotation</code>. * * @param message * the message of the warning * @param start * the first line of the line range * @param end * the last line of the line range * @param category * the category of the annotation * @param type * the type of the annotation */ @edu.umd.cs.findbugs.annotations.SuppressWarnings("ST") public AbstractAnnotation(final String message, final int start, final int end, final String category, final String type) { this.message = TreeString.of(StringUtils.strip(message)); this.category = StringUtils.defaultString(category); this.type = StringUtils.defaultString(type); key = currentKey++; lineRanges = new LineRangeList(); lineRanges.add(new LineRange(start, end)); primaryLineNumber = start; contextHashCode = currentKey; }
/** * Creates a new instance of <code>AbstractAnnotation</code>. * * @param message * the message of the warning * @param start * the first line of the line range * @param end * the last line of the line range * @param category * the category of the annotation * @param type * the type of the annotation */ @SuppressFBWarnings("ST") public AbstractAnnotation(final String message, final int start, final int end, final String category, final String type) { this.message = TreeString.of(StringUtils.strip(message)); this.category = defaultString(category); this.type = defaultString(type); key = currentKey++; lineRanges = new LineRangeList(); lineRanges.add(new LineRange(start, end)); primaryLineNumber = start; contextHashCode = currentKey; }