From 8cd172c24cfa378c13241c0e36b91b42ceac3185 Mon Sep 17 00:00:00 2001 From: Rick Ossendrijver Date: Sat, 24 Sep 2022 10:40:54 +0200 Subject: [PATCH] Replace `which` in defining clauses with `that` --- CONTRIBUTING.md | 2 +- error-prone-contrib/README.md | 98 +++++++++---------- .../bugpatterns/AmbiguousJsonCreator.java | 2 +- .../errorprone/bugpatterns/AssertJIsNull.java | 2 +- .../bugpatterns/AutowiredConstructor.java | 2 +- .../CanonicalAnnotationSyntax.java | 2 +- .../bugpatterns/CollectorMutability.java | 2 +- .../errorprone/bugpatterns/EmptyMethod.java | 2 +- .../ErrorProneTestHelperSourceFormat.java | 2 +- .../bugpatterns/ExplicitEnumOrdering.java | 2 +- .../bugpatterns/FluxFlatMapUsage.java | 2 +- .../FormatStringConcatenation.java | 6 +- .../ImmutablesSortedSetComparator.java | 2 +- .../bugpatterns/JUnitMethodDeclaration.java | 4 +- ...cographicalAnnotationAttributeListing.java | 2 +- .../bugpatterns/MethodReferenceUsage.java | 2 +- .../bugpatterns/MockitoStubbing.java | 2 +- .../bugpatterns/NestedOptionals.java | 2 +- .../errorprone/bugpatterns/NonEmptyMono.java | 2 +- .../bugpatterns/PrimitiveComparison.java | 2 +- .../RedundantStringConversion.java | 6 +- .../bugpatterns/RefasterAnyOfUsage.java | 2 +- .../bugpatterns/RequestMappingAnnotation.java | 2 +- .../bugpatterns/RequestParamType.java | 2 +- .../ScheduledTransactionTrace.java | 4 +- .../bugpatterns/Slf4jLogStatement.java | 2 +- .../bugpatterns/SpringMvcAnnotation.java | 2 +- .../errorprone/bugpatterns/StaticImport.java | 5 +- .../errorprone/bugpatterns/TimeZoneUsage.java | 2 +- .../AssertJThrowingCallableTemplates.java | 4 +- .../ImmutableListTemplates.java | 8 +- .../ImmutableSetTemplates.java | 8 +- .../util/MethodMatcherFactoryTest.java | 2 +- .../errorprone/refaster/runner/Refaster.java | 2 +- .../errorprone/refaster/util/IsArrayTest.java | 2 +- .../refaster/util/IsCharacterTest.java | 2 +- .../util/ThrowsCheckedExceptionTest.java | 2 +- 37 files changed, 99 insertions(+), 100 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index caae184277..851b101078 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -51,7 +51,7 @@ Some pointers: - Checks should be _topical_: ideally they address a single concern. - Where possible checks should provide _fixes_, and ideally these are completely behavior-preserving. In order for a check to be adopted by users - it must not "get in the way". So for a check which addresses a relatively + it must not "get in the way". So for a check that addresses a relatively trivial stylistic concern it is doubly important that the violations it detects can be auto-patched. - Make sure you have read Error Prone's [criteria for new diff --git a/error-prone-contrib/README.md b/error-prone-contrib/README.md index cdf81d05d7..906ac78329 100644 --- a/error-prone-contrib/README.md +++ b/error-prone-contrib/README.md @@ -64,129 +64,129 @@ The following is a list of checks we'd like to see implemented: functionality. - A subset of the refactor operations provided by the Eclipse-specific [AutoRefactor][autorefactor] plugin. -- A check which replaces fully qualified types with simple types in contexts +- A check that replaces fully qualified types with simple types in contexts where this does not introduce ambiguity. Should consider both actual Java code and Javadoc `@link` references. -- A check which simplifies array expressions. It would replace empty array +- A check that simplifies array expressions. It would replace empty array expressions of the form `new int[] {}` with `new int[0]`. Statements of the form `byte[] arr = new byte[] {'c'};` would be shortened to `byte[] arr = {'c'};`. -- A check which replaces expressions of the form +- A check that replaces expressions of the form `String.format("some prefix %s", arg)` with `"some prefix " + arg`, and similar for simple suffixes. Can perhaps be generalized further, though it's unclear how far. (Well, a `String.format` call without arguments can certainly be simplified, too.) -- A check which replaces single-character strings with `char`s where possible. +- A check that replaces single-character strings with `char`s where possible. For example as argument to `StringBuilder.append` and in string concatenations. -- A check which adds or removes the first `Locale` argument to `String.format` +- A check that adds or removes the first `Locale` argument to `String.format` and similar calls as necessary. (For example, a format string containing only `%s` placeholders is locale-insensitive unless any of the arguments is a `Formattable`, while `%f` placeholders _are_ locale-sensitive.) -- A check which replaces `String.replaceAll` with `String.replace` if the first +- A check that replaces `String.replaceAll` with `String.replace` if the first argument is certainly not a regular expression. And if both arguments are single-character strings then the `(char, char)` overload can be invoked instead. -- A check which flags (and ideally, replaces) `try-finally` constructs with +- A check that flags (and ideally, replaces) `try-finally` constructs with equivalent `try-with-resources` constructs. -- A check which drops exceptions declared in `throws` clauses if they are (a) +- A check that drops exceptions declared in `throws` clauses if they are (a) not actually thrown and (b) the associated method cannot be overridden. -- A check which tries to statically import certain methods whenever used, if +- A check that tries to statically import certain methods whenever used, if possible. The set of targeted methods should be configurable, but may default to e.g. `java.util.Function.identity()`, the static methods exposed by `java.util.stream.Collectors` and the various Guava collector factory methods. -- A check which replaces `new Random().someMethod()` calls with +- A check that replaces `new Random().someMethod()` calls with `ThreadLocalRandom.current().someMethod()` calls, to avoid unnecessary synchronization. -- A check which drops `this.` from `this.someMethod()` calls and which +- A check that drops `this.` from `this.someMethod()` calls and which optionally does the same for fields, if no ambiguity arises. -- A check which replaces `Integer.valueOf` calls with `Integer.parseInt` or +- A check that replaces `Integer.valueOf` calls with `Integer.parseInt` or vice versa in order to prevent auto (un)boxing, and likewise for other number types. -- A check which flags nullable collections. -- A check which flags `AutoCloseable` resources not managed by a +- A check that flags nullable collections. +- A check that flags `AutoCloseable` resources not managed by a `try-with-resources` construct. Certain subtypes, such as jOOQ's `DSLContext` should be excluded. -- A check which flags `java.time` methods which implicitly consult the system +- A check that flags `java.time` methods which implicitly consult the system clock, suggesting that a passed-in `Clock` is used instead. -- A check which flags public methods on public classes which reference +- A check that flags public methods on public classes which reference non-public types. This can cause `IllegalAccessError`s and `BootstrapMethodError`s at runtime. -- A check which swaps the LHS and RHS in expressions of the form +- A check that swaps the LHS and RHS in expressions of the form `nonConstant.equals(someNonNullConstant)`. -- A check which annotates methods which only throw an exception with +- A check that annotates methods which only throw an exception with `@Deprecated` or ` @DoNotCall`. -- A check which flags imports from other test classes. -- A Guava-specific check which replaces `Joiner.join` calls with `String.join` +- A check that flags imports from other test classes. +- A Guava-specific check that replaces `Joiner.join` calls with `String.join` calls in those cases where the latter is a proper substitute for the former. -- A Guava-specific check which flags `{Immutable,}Multimap` type usages where +- A Guava-specific check that flags `{Immutable,}Multimap` type usages where `{Immutable,}{List,Set}Multimap` would be more appropriate. -- A Guava-specific check which rewrites +- A Guava-specific check that rewrites `if (conditional) { throw new IllegalArgumentException(); }` and variants to an equivalent `checkArgument` statement. Idem for other exception types. -- A Guava-specific check which replaces simple anonymous `CacheLoader` subclass +- A Guava-specific check that replaces simple anonymous `CacheLoader` subclass declarations with `CacheLoader.from(someLambda)`. -- A Spring-specific check which enforces that methods with the `@Scheduled` +- A Spring-specific check that enforces that methods with the `@Scheduled` annotation are also annotated with New Relic's `@Trace` annotation. Such methods should ideally not also represent Spring MVC endpoints. -- A Spring-specific check which enforces that `@RequestMapping` annotations, +- A Spring-specific check that enforces that `@RequestMapping` annotations, when applied to a method, explicitly specify one or more target HTTP methods. -- A Spring-specific check which looks for classes in which all - `@RequestMapping` annotations (and the various aliases) specify the same - `path`/`value` property and then moves that path to the class level. -- A Spring-specific check which flags `@Value("some.property")` annotations, as +- A Spring-specific check that looks for classes in which all `@RequestMapping` + annotations (and the various aliases) specify the same `path`/`value` + property and then moves that path to the class level. +- A Spring-specific check that flags `@Value("some.property")` annotations, as these almost certainly should be `@Value("${some.property}")`. -- A Spring-specific check which drops the `required` attribute from +- A Spring-specific check that drops the `required` attribute from `@RequestParam` annotations when the `defaultValue` attribute is also specified. -- A Spring-specific check which rewrites a class which uses field injection to +- A Spring-specific check that rewrites a class which uses field injection to one which uses constructor injection. This check wouldn't be strictly behavior preserving, but could be used for a one-off code base migration. -- A Spring-specific check which disallows field injection, except in +- A Spring-specific check that disallows field injection, except in `AbstractTestNGSpringContextTests` subclasses. (One known edge case: self-injections so that a bean can call itself through an implicit proxy.) -- A Spring-specific check which verifies that public methods on all classes +- A Spring-specific check that verifies that public methods on all classes whose name matches a certain pattern, e.g. `.*Service`, are annotated `@Secured`. -- A Spring-specific check which verifies that annotations such as +- A Spring-specific check that verifies that annotations such as `@RequestParam` are only present in `@RestController` classes. -- A Spring-specific check which disallows `@ResponseStatus` on MVC endpoint +- A Spring-specific check that disallows `@ResponseStatus` on MVC endpoint methods, as this prevents communication of error status codes. -- A Hibernate Validator-specific check which looks for `@UnwrapValidatedValue` +- A Hibernate Validator-specific check that looks for `@UnwrapValidatedValue` usages and migrates the associated constraint annotations to the generic type argument to which they (are presumed to) apply. -- A TestNG-specific check which drops method-level `@Test` annotations if a +- A TestNG-specific check that drops method-level `@Test` annotations if a matching/more specific annotation is already present at the class level. -- A TestNG-specific check which enforces that all tests are in a group. -- A TestNG-specific check which flags field assignments in +- A TestNG-specific check that enforces that all tests are in a group. +- A TestNG-specific check that flags field assignments in `@BeforeMethod`-annotated methods unless the class is annotated `@Test(singleThreaded = true)`. -- A TestNG-specific check which flags usages of the `expectedExceptions` +- A TestNG-specific check that flags usages of the `expectedExceptions` attribute of the `@Test` annotation, pointing to `assertThrows`. -- A Jongo-specific check which disallows the creation of sparse indices, in +- A Jongo-specific check that disallows the creation of sparse indices, in favour of partial indices. -- An Immutables-specific check which replaces +- An Immutables-specific check that replaces `checkState`/`IllegalStateException` usages inside a `@Value.Check`-annotated method with `checkArgument`/`IllegalArgument`, since the method is invoked when a caller attempts to create an immutable instance. -- An Immutables-specific check which disallows references to collection types +- An Immutables-specific check that disallows references to collection types other than the Guava immutable collections, including inside generic type arguments. -- An SLF4J-specific check which drops or adds a trailing dot from log messages, +- An SLF4J-specific check that drops or adds a trailing dot from log messages, as applicable. -- A Mockito-specific check which identifies sequences of statements which mock - a significant number of methods on a single object with "default data"; such +- A Mockito-specific check that identifies sequences of statements which mock a + significant number of methods on a single object with "default data"; such constructions can often benefit from a different type of default answer, such as `Answers.RETURNS_MOCKS`. -- An RxJava-specific check which flags `.toCompletable()` calls on expressions +- An RxJava-specific check that flags `.toCompletable()` calls on expressions of type `Single` etc., as most likely `.flatMapCompletable(Functions.identity())` was meant instead. Idem for other variations. -- An RxJava-specific check which flags `expr.firstOrError()` calls and suggests +- An RxJava-specific check that flags `expr.firstOrError()` calls and suggests `expr.switchIfEmpty(Single.error(...))`, so that an application-specific exception is thrown instead of `NoSuchElementException`. -- An RxJava-specific check which flags use of `#assertValueSet` without +- An RxJava-specific check that flags use of `#assertValueSet` without `#assertValueCount`, as the former method doesn't do what one may intuitively expect it to do. See ReactiveX/RxJava#6151. diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/AmbiguousJsonCreator.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/AmbiguousJsonCreator.java index 24b933467e..4e90b6a53c 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/AmbiguousJsonCreator.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/AmbiguousJsonCreator.java @@ -22,7 +22,7 @@ import java.util.Map; import javax.lang.model.element.AnnotationValue; -/** A {@link BugChecker} which flags ambiguous {@code @JsonCreator}s in enums. */ +/** A {@link BugChecker} that flags ambiguous {@code @JsonCreator}s in enums. */ @AutoService(BugChecker.class) @BugPattern( summary = "`JsonCreator.Mode` should be set for single-argument creators", diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/AssertJIsNull.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/AssertJIsNull.java index 3c217cdc3f..632e1eaa2a 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/AssertJIsNull.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/AssertJIsNull.java @@ -21,7 +21,7 @@ import com.sun.source.tree.MethodInvocationTree; /** - * A {@link BugChecker} which flags AssertJ {@code isEqualTo(null)} checks for simplification. + * A {@link BugChecker} that flags AssertJ {@code isEqualTo(null)} checks for simplification. * *

This bug checker cannot be replaced with a simple Refaster template, as the Refaster approach * would require that all overloads of {@link org.assertj.core.api.Assert#isEqualTo(Object)} (such diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/AutowiredConstructor.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/AutowiredConstructor.java index ba4f47b4ba..764a80909d 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/AutowiredConstructor.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/AutowiredConstructor.java @@ -24,7 +24,7 @@ import com.sun.source.tree.Tree; import java.util.List; -/** A {@link BugChecker} which flags redundant {@code @Autowired} constructor annotations. */ +/** A {@link BugChecker} that flags redundant {@code @Autowired} constructor annotations. */ @AutoService(BugChecker.class) @BugPattern( summary = "Omit `@Autowired` on a class' sole constructor, as it is redundant", diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/CanonicalAnnotationSyntax.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/CanonicalAnnotationSyntax.java index 718caa2865..a8deaf6fd3 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/CanonicalAnnotationSyntax.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/CanonicalAnnotationSyntax.java @@ -27,7 +27,7 @@ import java.util.regex.Pattern; import tech.picnic.errorprone.bugpatterns.util.SourceCode; -/** A {@link BugChecker} which flags annotations that could be written more concisely. */ +/** A {@link BugChecker} that flags annotations that could be written more concisely. */ @AutoService(BugChecker.class) @BugPattern( summary = "Omit redundant syntax from annotation declarations", diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/CollectorMutability.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/CollectorMutability.java index dba5a9758f..f59ac7bba7 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/CollectorMutability.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/CollectorMutability.java @@ -19,7 +19,7 @@ import java.util.stream.Collector; /** - * A {@link BugChecker} which flags {@link Collector Collectors} that don't clearly express + * A {@link BugChecker} that flags {@link Collector Collectors} that don't clearly express * (im)mutability. * *

Replacing such collectors with alternatives that produce immutable collections is preferred. diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/EmptyMethod.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/EmptyMethod.java index 9cd6ae0ece..ba75a9e836 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/EmptyMethod.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/EmptyMethod.java @@ -22,7 +22,7 @@ import com.sun.source.tree.Tree; import java.util.Optional; -/** A {@link BugChecker} which flags empty methods that seemingly can simply be deleted. */ +/** A {@link BugChecker} that flags empty methods that seemingly can simply be deleted. */ @AutoService(BugChecker.class) @BugPattern( summary = "Empty method can likely be deleted", diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/ErrorProneTestHelperSourceFormat.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/ErrorProneTestHelperSourceFormat.java index 5c2ed5c5a2..5a95703af8 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/ErrorProneTestHelperSourceFormat.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/ErrorProneTestHelperSourceFormat.java @@ -30,7 +30,7 @@ import java.util.Optional; /** - * A {@link BugChecker} which flags improperly formatted Error Prone test code. + * A {@link BugChecker} that flags improperly formatted Error Prone test code. * *

All test code should be formatted in accordance with Google Java Format's {@link Formatter} * output, and imports should be ordered according to the {@link Style#GOOGLE Google} style. diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/ExplicitEnumOrdering.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/ExplicitEnumOrdering.java index 97585f8c4a..85549ab9d3 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/ExplicitEnumOrdering.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/ExplicitEnumOrdering.java @@ -30,7 +30,7 @@ import java.util.stream.Stream; /** - * A {@link BugChecker} which flags {@link Ordering#explicit(Object, Object[])}} invocations listing + * A {@link BugChecker} that flags {@link Ordering#explicit(Object, Object[])}} invocations listing * a subset of an enum type's values. */ @AutoService(BugChecker.class) diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/FluxFlatMapUsage.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/FluxFlatMapUsage.java index 1ce9a5f6a7..5f03cecc00 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/FluxFlatMapUsage.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/FluxFlatMapUsage.java @@ -24,7 +24,7 @@ import reactor.core.publisher.Flux; /** - * A {@link BugChecker} which flags usages of {@link Flux#flatMap(Function)} and {@link + * A {@link BugChecker} that flags usages of {@link Flux#flatMap(Function)} and {@link * Flux#flatMapSequential(Function)}. * *

{@link Flux#flatMap(Function)} and {@link Flux#flatMapSequential(Function)} eagerly perform up diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/FormatStringConcatenation.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/FormatStringConcatenation.java index 54b5f53bb3..f071843e80 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/FormatStringConcatenation.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/FormatStringConcatenation.java @@ -35,8 +35,8 @@ import tech.picnic.errorprone.bugpatterns.util.SourceCode; /** - * A {@link BugChecker} which flags string concatenations that produce a format string; in such - * cases the string concatenation should instead be deferred to the invoked method. + * A {@link BugChecker} that flags string concatenations that produce a format string; in such cases + * the string concatenation should instead be deferred to the invoked method. * * @implNote This checker is based on the implementation of {@link * com.google.errorprone.bugpatterns.flogger.FloggerStringConcatenation}. @@ -46,7 +46,7 @@ // should introduce special handling of `Formattable` arguments, as this check would replace a // `Formattable#toString` invocation with a `Formattable#formatTo` invocation. But likely that // should be considered a bug fix, too. -// XXX: Introduce a separate check which adds/removes the `Locale` parameter to `String.format` +// XXX: Introduce a separate check that adds/removes the `Locale` parameter to `String.format` // invocations, as necessary. @AutoService(BugChecker.class) @BugPattern( diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/ImmutablesSortedSetComparator.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/ImmutablesSortedSetComparator.java index 5e8a3c2c71..7afbc09930 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/ImmutablesSortedSetComparator.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/ImmutablesSortedSetComparator.java @@ -26,7 +26,7 @@ import javax.lang.model.element.Modifier; /** - * A {@link BugChecker} which flags {@link SortedSet} property declarations inside + * A {@link BugChecker} that flags {@link SortedSet} property declarations inside * {@code @Value.Immutable}- and {@code @Value.Modifiable}-annotated types that lack a * {@code @Value.NaturalOrder} or {@code @Value.ReverseOrder} annotation. * diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/JUnitMethodDeclaration.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/JUnitMethodDeclaration.java index c342283008..419fc93de7 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/JUnitMethodDeclaration.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/JUnitMethodDeclaration.java @@ -38,8 +38,8 @@ import javax.lang.model.element.Name; import tech.picnic.errorprone.bugpatterns.util.SourceCode; -/** A {@link BugChecker} which flags non-canonical JUnit method declarations. */ -// XXX: Consider introducing a class-level check which enforces that test classes: +/** A {@link BugChecker} that flags non-canonical JUnit method declarations. */ +// XXX: Consider introducing a class-level check that enforces that test classes: // 1. Are named `*Test` or `Abstract*TestCase`. // 2. If not `abstract`, are package-private and don't have public methods and subclasses. // 3. Only have private fields. diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/LexicographicalAnnotationAttributeListing.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/LexicographicalAnnotationAttributeListing.java index cab0458736..7a57cc1fd7 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/LexicographicalAnnotationAttributeListing.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/LexicographicalAnnotationAttributeListing.java @@ -42,7 +42,7 @@ import tech.picnic.errorprone.bugpatterns.util.SourceCode; /** - * A {@link BugChecker} which flags annotation array listings which aren't sorted lexicographically. + * A {@link BugChecker} that flags annotation array listings which aren't sorted lexicographically. * *

The idea behind this checker is that maintaining a sorted sequence simplifies conflict * resolution, and can even avoid it if two branches add the same entry. diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/MethodReferenceUsage.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/MethodReferenceUsage.java index 3a7c1de49c..e9d086b82e 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/MethodReferenceUsage.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/MethodReferenceUsage.java @@ -35,7 +35,7 @@ import javax.lang.model.element.Name; /** - * A {@link BugChecker} which flags lambda expressions that can be replaced with method references. + * A {@link BugChecker} that flags lambda expressions that can be replaced with method references. */ // XXX: Other custom expressions we could rewrite: // - `a -> "str" + a` to `"str"::concat`. But only if `str` is provably non-null. diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/MockitoStubbing.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/MockitoStubbing.java index 4ce75c8a46..7c03a48f0c 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/MockitoStubbing.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/MockitoStubbing.java @@ -20,7 +20,7 @@ import tech.picnic.errorprone.bugpatterns.util.SourceCode; /** - * A {@link BugChecker} which flags method invocations for which all arguments are wrapped using + * A {@link BugChecker} that flags method invocations for which all arguments are wrapped using * {@link org.mockito.Mockito#eq}; this is redundant. */ @AutoService(BugChecker.class) diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/NestedOptionals.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/NestedOptionals.java index a10ae529e4..143fba87fb 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/NestedOptionals.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/NestedOptionals.java @@ -20,7 +20,7 @@ import com.sun.tools.javac.util.List; import java.util.Optional; -/** A {@link BugChecker} which flags nesting of {@link Optional Optionals}. */ +/** A {@link BugChecker} that flags nesting of {@link Optional Optionals}. */ @AutoService(BugChecker.class) @BugPattern( summary = diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/NonEmptyMono.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/NonEmptyMono.java index 8019039880..95564084cc 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/NonEmptyMono.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/NonEmptyMono.java @@ -22,7 +22,7 @@ import tech.picnic.errorprone.bugpatterns.util.SourceCode; /** - * A {@link BugChecker} which flags {@link Mono} operations that are known to be vacuous, given that + * A {@link BugChecker} that flags {@link Mono} operations that are known to be vacuous, given that * they are invoked on a {@link Mono} that is known not to complete empty. */ @AutoService(BugChecker.class) diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/PrimitiveComparison.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/PrimitiveComparison.java index 4851db0b54..3f3adfc271 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/PrimitiveComparison.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/PrimitiveComparison.java @@ -34,7 +34,7 @@ import tech.picnic.errorprone.bugpatterns.util.SourceCode; /** - * A {@link BugChecker} which flags {@code Comparator#comparing*} invocations that can be replaced + * A {@link BugChecker} that flags {@code Comparator#comparing*} invocations that can be replaced * with an equivalent alternative so as to avoid unnecessary (un)boxing. */ // XXX: Add more documentation. Explain how this is useful in the face of refactoring to more diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/RedundantStringConversion.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/RedundantStringConversion.java index 543a814671..bb5c06b101 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/RedundantStringConversion.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/RedundantStringConversion.java @@ -51,7 +51,7 @@ import tech.picnic.errorprone.bugpatterns.util.MethodMatcherFactory; import tech.picnic.errorprone.bugpatterns.util.SourceCode; -/** A {@link BugChecker} which flags redundant explicit string conversions. */ +/** A {@link BugChecker} that flags redundant explicit string conversions. */ @AutoService(BugChecker.class) @BugPattern( summary = "Avoid redundant string conversions when possible", @@ -224,7 +224,7 @@ private Optional tryFixPositionalConverter( .flatMap(args -> tryFix(args.get(index), state, ANY_EXPR)); } - // XXX: Write another check which checks that Formatter patterns don't use `{}` and have a + // XXX: Write another check that checks that Formatter patterns don't use `{}` and have a // matching number of arguments of the appropriate type. Also flag explicit conversions from // `Formattable` to string. private Optional tryFixFormatter( @@ -255,7 +255,7 @@ private Optional tryFixGuavaGuard( return tryFixFormatterArguments(arguments, state, ANY_EXPR, ANY_EXPR); } - // XXX: Write another check which checks that SLF4J patterns don't use `%s` and have a matching + // XXX: Write another check that checks that SLF4J patterns don't use `%s` and have a matching // number of arguments of the appropriate type. Also flag explicit conversions from `Throwable` to // string as the last logger argument. Suggests either dropping the conversion or going with // `Throwable#getMessage()` instead. diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/RefasterAnyOfUsage.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/RefasterAnyOfUsage.java index 9a47ba167c..24ee6cc211 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/RefasterAnyOfUsage.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/RefasterAnyOfUsage.java @@ -19,7 +19,7 @@ import tech.picnic.errorprone.bugpatterns.util.SourceCode; /** - * A {@link BugChecker} which flags unnecessary {@link Refaster#anyOf(Object[])} usages. + * A {@link BugChecker} that flags unnecessary {@link Refaster#anyOf(Object[])} usages. * *

Note that this logic can't be implemented as a Refaster template, as the {@link Refaster} * class is treated specially. diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/RequestMappingAnnotation.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/RequestMappingAnnotation.java index 257b0361e8..46d66511b2 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/RequestMappingAnnotation.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/RequestMappingAnnotation.java @@ -23,7 +23,7 @@ import com.sun.source.tree.Tree; /** - * A {@link BugChecker} which flags {@code @RequestMapping} methods that have one or more parameters + * A {@link BugChecker} that flags {@code @RequestMapping} methods that have one or more parameters * that appear to lack a relevant annotation. * *

Matched mappings are {@code @{Delete,Get,Patch,Post,Put,Request}Mapping}. diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/RequestParamType.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/RequestParamType.java index 7b69019782..2367f8518b 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/RequestParamType.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/RequestParamType.java @@ -21,7 +21,7 @@ import com.google.errorprone.matchers.Matcher; import com.sun.source.tree.VariableTree; -/** A {@link BugChecker} which flags {@code @RequestParam} parameters with an unsupported type. */ +/** A {@link BugChecker} that flags {@code @RequestParam} parameters with an unsupported type. */ @AutoService(BugChecker.class) @BugPattern( summary = "`@RequestParam` does not support `ImmutableCollection` and `ImmutableMap` subtypes", diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/ScheduledTransactionTrace.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/ScheduledTransactionTrace.java index 4b4071e7e7..65ca2b7094 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/ScheduledTransactionTrace.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/ScheduledTransactionTrace.java @@ -27,8 +27,8 @@ import com.sun.source.tree.Tree; /** - * A {@link BugChecker} which flags methods with Spring's {@code @Scheduled} annotation that lack - * New Relic Agent's {@code @Trace(dispatcher = true)}. + * A {@link BugChecker} that flags methods with Spring's {@code @Scheduled} annotation that lack New + * Relic Agent's {@code @Trace(dispatcher = true)}. */ @AutoService(BugChecker.class) @BugPattern( diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/Slf4jLogStatement.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/Slf4jLogStatement.java index 3374501d9f..21c03bf150 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/Slf4jLogStatement.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/Slf4jLogStatement.java @@ -24,7 +24,7 @@ import java.util.Optional; import tech.picnic.errorprone.bugpatterns.util.SourceCode; -/** A {@link BugChecker} which flags SLF4J usages that are likely to be in error. */ +/** A {@link BugChecker} that flags SLF4J usages that are likely to be in error. */ // XXX: The special-casing of Throwable applies only to SLF4J 1.6.0+; see // https://www.slf4j.org/faq.html#paramException. That should be documented. // XXX: Also simplify `LOG.error(String.format("Something %s", arg), throwable)`. diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/SpringMvcAnnotation.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/SpringMvcAnnotation.java index ef6b65375e..fcfd79e8d6 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/SpringMvcAnnotation.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/SpringMvcAnnotation.java @@ -29,7 +29,7 @@ import tech.picnic.errorprone.bugpatterns.util.SourceCode; /** - * A {@link BugChecker} which flags {@code @RequestMapping} annotations that can be written more + * A {@link BugChecker} that flags {@code @RequestMapping} annotations that can be written more * concisely. */ @AutoService(BugChecker.class) diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/StaticImport.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/StaticImport.java index cf0ee74e8e..bc4d2900b9 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/StaticImport.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/StaticImport.java @@ -27,15 +27,14 @@ import java.util.Optional; /** - * A {@link BugChecker} which flags methods and constants that can and should be statically - * imported. + * A {@link BugChecker} that flags methods and constants that can and should be statically imported. */ // XXX: Tricky cases: // - `org.springframework.http.HttpStatus` (not always an improvement, and `valueOf` must // certainly be excluded) // - `com.google.common.collect.Tables` // - `ch.qos.logback.classic.Level.{DEBUG, ERROR, INFO, TRACE, WARN"}` -// XXX: Also introduce a check which disallows static imports of certain methods. Candidates: +// XXX: Also introduce a check that disallows static imports of certain methods. Candidates: // - `com.google.common.base.Strings` // - `java.util.Optional.empty` // - `java.util.Locale.ROOT` diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/TimeZoneUsage.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/TimeZoneUsage.java index 86888b3c24..26748a38b3 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/TimeZoneUsage.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/bugpatterns/TimeZoneUsage.java @@ -26,7 +26,7 @@ import java.time.LocalDateTime; import java.time.LocalTime; -/** A {@link BugChecker} which flags illegal time-zone related operations. */ +/** A {@link BugChecker} that flags illegal time-zone related operations. */ @AutoService(BugChecker.class) @BugPattern( summary = diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/AssertJThrowingCallableTemplates.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/AssertJThrowingCallableTemplates.java index 3a0b0d5650..14ebac29d5 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/AssertJThrowingCallableTemplates.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/AssertJThrowingCallableTemplates.java @@ -429,7 +429,7 @@ static final class AssertThatThrownByHasMessageParameters { } } - // XXX: Drop this template in favour of a generic Error Prone check which flags + // XXX: Drop this template in favour of a generic Error Prone check that flags // `String.format(...)` arguments to a wide range of format methods. static final class AbstractThrowableAssertHasMessage { @BeforeTemplate @@ -449,7 +449,7 @@ static final class AbstractThrowableAssertHasMessage { } } - // XXX: Drop this template in favour of a generic Error Prone check which flags + // XXX: Drop this template in favour of a generic Error Prone check that flags // `String.format(...)` arguments to a wide range of format methods. static final class AbstractThrowableAssertWithFailMessage { @BeforeTemplate diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/ImmutableListTemplates.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/ImmutableListTemplates.java index 711426361b..082fadf231 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/ImmutableListTemplates.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/ImmutableListTemplates.java @@ -194,7 +194,7 @@ ImmutableList after(T e1) { * Prefer {@link ImmutableList#of(Object, Object)} over alternatives that don't communicate the * immutability of the resulting list at the type level. */ - // XXX: Consider writing an Error Prone check which also flags straightforward + // XXX: Consider writing an Error Prone check that also flags straightforward // `ImmutableList.builder()` usages. static final class ImmutableListOf2 { @BeforeTemplate @@ -212,7 +212,7 @@ ImmutableList after(T e1, T e2) { * Prefer {@link ImmutableList#of(Object, Object, Object)} over alternatives that don't * communicate the immutability of the resulting list at the type level. */ - // XXX: Consider writing an Error Prone check which also flags straightforward + // XXX: Consider writing an Error Prone check that also flags straightforward // `ImmutableList.builder()` usages. static final class ImmutableListOf3 { @BeforeTemplate @@ -230,7 +230,7 @@ ImmutableList after(T e1, T e2, T e3) { * Prefer {@link ImmutableList#of(Object, Object, Object, Object)} over alternatives that don't * communicate the immutability of the resulting list at the type level. */ - // XXX: Consider writing an Error Prone check which also flags straightforward + // XXX: Consider writing an Error Prone check that also flags straightforward // `ImmutableList.builder()` usages. static final class ImmutableListOf4 { @BeforeTemplate @@ -248,7 +248,7 @@ ImmutableList after(T e1, T e2, T e3, T e4) { * Prefer {@link ImmutableList#of(Object, Object, Object, Object, Object)} over alternatives that * don't communicate the immutability of the resulting list at the type level. */ - // XXX: Consider writing an Error Prone check which also flags straightforward + // XXX: Consider writing an Error Prone check that also flags straightforward // `ImmutableList.builder()` usages. static final class ImmutableListOf5 { @BeforeTemplate diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/ImmutableSetTemplates.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/ImmutableSetTemplates.java index a3ef63e71f..b710f4e7a1 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/ImmutableSetTemplates.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refastertemplates/ImmutableSetTemplates.java @@ -142,7 +142,7 @@ ImmutableSet after(T e1) { * Prefer {@link ImmutableSet#of(Object, Object)} over alternatives that don't communicate the * immutability of the resulting set at the type level. */ - // XXX: Consider writing an Error Prone check which also flags straightforward + // XXX: Consider writing an Error Prone check that also flags straightforward // `ImmutableSet.builder()` usages. static final class ImmutableSetOf2 { @BeforeTemplate @@ -160,7 +160,7 @@ ImmutableSet after(T e1, T e2) { * Prefer {@link ImmutableSet#of(Object, Object, Object)} over alternatives that don't communicate * the immutability of the resulting set at the type level. */ - // XXX: Consider writing an Error Prone check which also flags straightforward + // XXX: Consider writing an Error Prone check that also flags straightforward // `ImmutableSet.builder()` usages. static final class ImmutableSetOf3 { @BeforeTemplate @@ -178,7 +178,7 @@ ImmutableSet after(T e1, T e2, T e3) { * Prefer {@link ImmutableSet#of(Object, Object, Object, Object)} over alternatives that don't * communicate the immutability of the resulting set at the type level. */ - // XXX: Consider writing an Error Prone check which also flags straightforward + // XXX: Consider writing an Error Prone check that also flags straightforward // `ImmutableSet.builder()` usages. static final class ImmutableSetOf4 { @BeforeTemplate @@ -196,7 +196,7 @@ ImmutableSet after(T e1, T e2, T e3, T e4) { * Prefer {@link ImmutableSet#of(Object, Object, Object, Object, Object)} over alternatives that * don't communicate the immutability of the resulting set at the type level. */ - // XXX: Consider writing an Error Prone check which also flags straightforward + // XXX: Consider writing an Error Prone check that also flags straightforward // `ImmutableSet.builder()` usages. static final class ImmutableSetOf5 { @BeforeTemplate diff --git a/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/util/MethodMatcherFactoryTest.java b/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/util/MethodMatcherFactoryTest.java index 7bd24f2f9a..782b5f77c9 100644 --- a/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/util/MethodMatcherFactoryTest.java +++ b/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/util/MethodMatcherFactoryTest.java @@ -16,7 +16,7 @@ import org.junit.jupiter.api.Test; final class MethodMatcherFactoryTest { - /** A {@link BugChecker} which flags method invocations matched by {@link #TEST_MATCHER}. */ + /** A {@link BugChecker} that flags method invocations matched by {@link #TEST_MATCHER}. */ @BugPattern(severity = SUGGESTION, summary = "Flags methods matched by the test matcher.") public static final class MatchedMethodsFlagger extends BugChecker implements MethodInvocationTreeMatcher { diff --git a/refaster-runner/src/main/java/tech/picnic/errorprone/refaster/runner/Refaster.java b/refaster-runner/src/main/java/tech/picnic/errorprone/refaster/runner/Refaster.java index b6e7d19600..441897fc24 100644 --- a/refaster-runner/src/main/java/tech/picnic/errorprone/refaster/runner/Refaster.java +++ b/refaster-runner/src/main/java/tech/picnic/errorprone/refaster/runner/Refaster.java @@ -37,7 +37,7 @@ import java.util.stream.Stream; /** - * A {@link BugChecker} which flags code which can be simplified using Refaster templates located on + * A {@link BugChecker} that flags code which can be simplified using Refaster templates located on * the classpath. * *

This checker locates all {@code *.refaster} classpath resources and assumes they contain a diff --git a/refaster-support/src/test/java/tech/picnic/errorprone/refaster/util/IsArrayTest.java b/refaster-support/src/test/java/tech/picnic/errorprone/refaster/util/IsArrayTest.java index 847ca0931f..3b78d3e06f 100644 --- a/refaster-support/src/test/java/tech/picnic/errorprone/refaster/util/IsArrayTest.java +++ b/refaster-support/src/test/java/tech/picnic/errorprone/refaster/util/IsArrayTest.java @@ -48,7 +48,7 @@ void matches() { .doTest(); } - /** A {@link BugChecker} which simply delegates to {@link IsArray}. */ + /** A {@link BugChecker} that simply delegates to {@link IsArray}. */ @BugPattern(summary = "Flags expressions matched by `IsArray`", severity = ERROR) public static final class MatcherTestChecker extends AbstractMatcherTestChecker { private static final long serialVersionUID = 1L; diff --git a/refaster-support/src/test/java/tech/picnic/errorprone/refaster/util/IsCharacterTest.java b/refaster-support/src/test/java/tech/picnic/errorprone/refaster/util/IsCharacterTest.java index 247e1a3f89..d4534f227e 100644 --- a/refaster-support/src/test/java/tech/picnic/errorprone/refaster/util/IsCharacterTest.java +++ b/refaster-support/src/test/java/tech/picnic/errorprone/refaster/util/IsCharacterTest.java @@ -48,7 +48,7 @@ void matches() { .doTest(); } - /** A {@link BugChecker} which simply delegates to {@link IsCharacter}. */ + /** A {@link BugChecker} that simply delegates to {@link IsCharacter}. */ @BugPattern(summary = "Flags expressions matched by `IsCharacter`", severity = ERROR) public static final class MatcherTestChecker extends AbstractMatcherTestChecker { private static final long serialVersionUID = 1L; diff --git a/refaster-support/src/test/java/tech/picnic/errorprone/refaster/util/ThrowsCheckedExceptionTest.java b/refaster-support/src/test/java/tech/picnic/errorprone/refaster/util/ThrowsCheckedExceptionTest.java index 789e16c1e3..66811cb9e5 100644 --- a/refaster-support/src/test/java/tech/picnic/errorprone/refaster/util/ThrowsCheckedExceptionTest.java +++ b/refaster-support/src/test/java/tech/picnic/errorprone/refaster/util/ThrowsCheckedExceptionTest.java @@ -79,7 +79,7 @@ void matches() { .doTest(); } - /** A {@link BugChecker} which simply delegates to {@link ThrowsCheckedException}. */ + /** A {@link BugChecker} that simply delegates to {@link ThrowsCheckedException}. */ @BugPattern(summary = "Flags expressions matched by `ThrowsCheckedException`", severity = ERROR) public static final class MatcherTestChecker extends AbstractMatcherTestChecker { private static final long serialVersionUID = 1L;