Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,13 @@ private enum JumpType {
}

/**
* The target of a jump statement (break or continue) is (1) the enclosing loop if the jump is
* unlabeled (2) the enclosing LabeledStatementTree with matching label if the jump is labeled
* (3) the enclosing switch statement if the jump is a break
* The target of a jump statement (break or continue) is:
*
* <ol>
* <li>the enclosing loop if the jump is unlabeled;
* <li>the enclosing LabeledStatementTree with matching label if the jump is labeled;
* <li>the enclosing switch statement if the jump is a break.
* </ol>
*
* <p>If the target of a break or continue statement is encountered before reaching a finally
* block, return NO_MATCH.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,13 @@ public class NonOverridingEquals extends BugChecker implements MethodTreeMatcher
private static final String MESSAGE_BASE = "equals method doesn't override Object.equals";

/**
* Matches any method definition that: 1) is named `equals` 2) takes a single argument of a type
* other than Object 3) returns a boolean or Boolean
* Matches any method definition that:
*
* <ol>
* <li>is named {@code equals};
* <li>takes a single argument of a type other than {@code Object};
* <li>returns a {@code boolean} or {@code Boolean}.
* </ol>
*/
private static final Matcher<MethodTree> MATCHER =
allOf(
Expand All @@ -88,9 +93,9 @@ public class NonOverridingEquals extends BugChecker implements MethodTreeMatcher
* doesn't work:
*
* <ul>
* <li>the method is static
* <li>the method is not public
* <li>the method returns a boxed Boolean
* <li>the method is static;
* <li>the method is not public;
* <li>the method returns a boxed Boolean.
* </ul>
*/
private static final Matcher<MethodTree> noFixMatcher =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,7 @@ private boolean tryCatchesException(TryTree tryTree, Type exceptionToCatch, Visi
/**
* Whether the given WakeLock may throw an unexpected RuntimeException when released.
*
* <p>Returns true if: 1) the given WakeLock was acquired with timeout, and 2) the given WakeLock
* is reference counted.
* <p>Returns true if the given WakeLock was acquired with timeout and it is reference counted.
*/
private boolean wakelockMayThrow(Symbol wakelockSymbol, VisitorState state) {
ClassTree enclosingClass = getTopLevelClass(state);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,13 @@ private static boolean anyArgumentsMatch(
* Find all the other calls to {@code calledMethod} within the method (or class) which enclosed
* the original call.
*
* <p>We are interested in two different cases: 1) where there are other calls to the method we
* are calling; 2) declarations of the method we are calling (this catches the case when there is
* a recursive call with the arguments correctly swapped).
* <p>We are interested in two different cases:
*
* <ol>
* <li>where there are other calls to the method we are calling
* <li>declarations of the method we are calling (this catches the case when there is a
* recursive call with the arguments correctly swapped).
* </ol>
*
* @param calledMethod is the method call we are analysing for swaps
* @param currentNode is the tree node the method call occurred at
Expand Down
Loading