Skip to content

Commit 3ef3d79

Browse files
netdpbError Prone Team
authored andcommitted
The verb form of "recursion" is "to recur", not "to recurse". Quoting my CS professor Stuart Shieber: "To recur is to occur again, while to recurse is to curse again."
Yes, this is a silly, pedantic complaint. Sorry. PiperOrigin-RevId: 834421529
1 parent d41f822 commit 3ef3d79

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core/src/main/java/com/google/errorprone/bugpatterns/InfiniteRecursion.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353
/** A {@link BugChecker}; see the associated {@link BugPattern} annotation for details. */
5454
@BugPattern(
55-
summary = "This method always recurses, and will cause a StackOverflowError",
55+
summary = "This method calls itself unconditionally; it will throw StackOverflowError",
5656
severity = ERROR)
5757
public class InfiniteRecursion extends BugChecker implements MethodTreeMatcher {
5858
@Override
@@ -225,15 +225,15 @@ void checkInvocation(MethodInvocationTree invocation, boolean underConditional)
225225
* in practice, but consider the following example:
226226
*/
227227
// sealed class Parent {
228-
// void go(boolean recurse) {
228+
// void go(boolean recur) {
229229
// go(false); // call to the "same method" on the same object but not infinite recursion
230230
// }
231231
// }
232232
//
233233
// class Child extends Parent {
234234
// @Override
235-
// void go(boolean recurse) {
236-
// if (recurse) {
235+
// void go(boolean recur) {
236+
// if (recur) {
237237
// super.go(true);
238238
// }
239239
// }

0 commit comments

Comments
 (0)