Skip to content

Commit

Permalink
Suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan202 authored and rickie committed Oct 23, 2022
1 parent 9dde68e commit 5ecf901
Show file tree
Hide file tree
Showing 38 changed files with 39 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public final class AmbiguousJsonCreator extends BugChecker implements Annotation
private static final Matcher<AnnotationTree> IS_JSON_CREATOR_ANNOTATION =
isType("com.fasterxml.jackson.annotation.JsonCreator");

/** Instantiates the default {@link AmbiguousJsonCreator}. */
/** Instantiates a new {@link AmbiguousJsonCreator} instance. */
public AmbiguousJsonCreator() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public final class AssertJIsNull extends BugChecker implements MethodInvocationT
argumentCount(1),
argument(0, nullLiteral()));

/** Instantiates the default {@link AssertJIsNull}. */
/** Instantiates a new {@link AssertJIsNull} instance. */
public AssertJIsNull() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public final class AutowiredConstructor extends BugChecker implements ClassTreeM
private static final MultiMatcher<Tree, AnnotationTree> AUTOWIRED_ANNOTATION =
annotations(AT_LEAST_ONE, isType("org.springframework.beans.factory.annotation.Autowired"));

/** Instantiates the default {@link AutowiredConstructor}. */
/** Instantiates a new {@link AutowiredConstructor} instance. */
public AutowiredConstructor() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public final class CanonicalAnnotationSyntax extends BugChecker implements Annot
CanonicalAnnotationSyntax::dropRedundantValueAttribute,
CanonicalAnnotationSyntax::dropRedundantCurlies);

/** Instantiates the default {@link CanonicalAnnotationSyntax}. */
/** Instantiates a new {@link CanonicalAnnotationSyntax} instance. */
public CanonicalAnnotationSyntax() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public final class CollectorMutability extends BugChecker implements MethodInvoc
private static final Matcher<ExpressionTree> SET_COLLECTOR =
staticMethod().anyClass().named("toSet");

/** Instantiates the default {@link CollectorMutability}. */
/** Instantiates a new {@link CollectorMutability} instance. */
public CollectorMutability() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public final class EmptyMethod extends BugChecker implements MethodTreeMatcher {
AT_LEAST_ONE,
anyOf(isType("java.lang.Override"), isType("org.aspectj.lang.annotation.Pointcut")));

/** Instantiates the default {@link EmptyMethod}. */
/** Instantiates a new {@link EmptyMethod} instance. */
public EmptyMethod() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public final class ErrorProneTestHelperSourceFormat extends BugChecker
.onDescendantOf("com.google.errorprone.BugCheckerRefactoringTestHelper.ExpectOutput")
.named("addOutputLines");

/** Instantiates the default {@link ErrorProneTestHelperSourceFormat}. */
/** Instantiates a new {@link ErrorProneTestHelperSourceFormat} instance. */
public ErrorProneTestHelperSourceFormat() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public final class ExplicitEnumOrdering extends BugChecker implements MethodInvo
private static final Matcher<ExpressionTree> EXPLICIT_ORDERING =
staticMethod().onClass(Ordering.class.getName()).named("explicit");

/** Instantiates the default {@link ExplicitEnumOrdering}. */
/** Instantiates a new {@link ExplicitEnumOrdering} instance. */
public ExplicitEnumOrdering() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public final class FluxFlatMapUsage extends BugChecker
.namedAnyOf("flatMap", "flatMapSequential")
.withParameters(Function.class.getName());

/** Instantiates the default {@link FluxFlatMapUsage}. */
/** Instantiates a new {@link FluxFlatMapUsage} instance. */
public FluxFlatMapUsage() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public final class FormatStringConcatenation extends BugChecker
.onDescendantOf("org.slf4j.Logger")
.namedAnyOf("debug", "error", "info", "trace", "warn");

/** Instantiates the default {@link FormatStringConcatenation}. */
/** Instantiates a new {@link FormatStringConcatenation} instance. */
public FormatStringConcatenation() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public final class IdentityConversion extends BugChecker implements MethodInvoca
.namedAnyOf("concat", "firstWithSignal", "from", "merge"),
staticMethod().onClass("reactor.core.publisher.Mono").namedAnyOf("from", "fromDirect"));

/** Instantiates the default {@link IdentityConversion}. */
/** Instantiates a new {@link IdentityConversion} instance. */
public IdentityConversion() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public final class ImmutablesSortedSetComparator extends BugChecker implements M
hasAnnotation("org.immutables.value.Value.NaturalOrder"),
hasAnnotation("org.immutables.value.Value.ReverseOrder"))));

/** Instantiates the default {@link ImmutablesSortedSetComparator}. */
/** Instantiates a new {@link ImmutablesSortedSetComparator} instance. */
public ImmutablesSortedSetComparator() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public final class JUnitMethodDeclaration extends BugChecker implements MethodTr
isType("org.junit.jupiter.api.BeforeAll"),
isType("org.junit.jupiter.api.BeforeEach")));

/** Instantiates the default {@link JUnitMethodDeclaration}. */
/** Instantiates a new {@link JUnitMethodDeclaration} instance. */
public JUnitMethodDeclaration() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public final class LexicographicalAnnotationAttributeListing extends BugChecker

private final AnnotationAttributeMatcher matcher;

/** Instantiates the default {@link LexicographicalAnnotationAttributeListing}. */
/** Instantiates a default {@link LexicographicalAnnotationAttributeListing} instance. */
public LexicographicalAnnotationAttributeListing() {
this(ErrorProneFlags.empty());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public final class LexicographicalAnnotationListing extends BugChecker
implements MethodTreeMatcher {
private static final long serialVersionUID = 1L;

/** Instantiates the default {@link LexicographicalAnnotationListing}. */
/** Instantiates a new {@link LexicographicalAnnotationListing} instance. */
public LexicographicalAnnotationListing() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
public final class MethodReferenceUsage extends BugChecker implements LambdaExpressionTreeMatcher {
private static final long serialVersionUID = 1L;

/** Instantiates the default {@link MethodReferenceUsage}. */
/** Instantiates a new {@link MethodReferenceUsage} instance. */
public MethodReferenceUsage() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public final class MissingRefasterAnnotation extends BugChecker implements Class
isType("com.google.errorprone.refaster.annotation.BeforeTemplate"),
isType("com.google.errorprone.refaster.annotation.AfterTemplate")));

/** Instantiates the default {@link MissingRefasterAnnotation}. */
/** Instantiates a new {@link MissingRefasterAnnotation} instance. */
public MissingRefasterAnnotation() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public final class MockitoStubbing extends BugChecker implements MethodInvocatio
private static final Matcher<ExpressionTree> MOCKITO_EQ_METHOD =
staticMethod().onClass("org.mockito.ArgumentMatchers").named("eq");

/** Instantiates the default {@link MockitoStubbing}. */
/** Instantiates a new {@link MockitoStubbing} instance. */
public MockitoStubbing() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public final class NestedOptionals extends BugChecker implements MethodInvocatio
private static final long serialVersionUID = 1L;
private static final Supplier<Type> OPTIONAL = Suppliers.typeFromClass(Optional.class);

/** Instantiates the default {@link NestedOptionals}. */
/** Instantiates a new {@link NestedOptionals} instance. */
public NestedOptionals() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public final class NonEmptyMono extends BugChecker implements MethodInvocationTr
.onDescendantOf("reactor.core.publisher.Mono")
.namedAnyOf("defaultIfEmpty", "hasElement", "single"));

/** Instantiates the default {@link NonEmptyMono}. */
/** Instantiates a new {@link NonEmptyMono} instance. */
public NonEmptyMono() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public final class PrimitiveComparison extends BugChecker implements MethodInvoc
.named("thenComparing")
.withParameters(Function.class.getName()));

/** Instantiates the default {@link PrimitiveComparison}. */
/** Instantiates a new {@link PrimitiveComparison} instance. */
public PrimitiveComparison() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public final class RedundantStringConversion extends BugChecker

private final Matcher<MethodInvocationTree> conversionMethodMatcher;

/** Instantiates the default {@link RedundantStringConversion}. */
/** Instantiates a default {@link RedundantStringConversion} instance. */
public RedundantStringConversion() {
this(ErrorProneFlags.empty());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public final class RefasterAnyOfUsage extends BugChecker implements MethodInvoca
private static final Matcher<ExpressionTree> REFASTER_ANY_OF =
staticMethod().onClass(Refaster.class.getName()).named("anyOf");

/** Instantiates the default {@link RefasterAnyOfUsage}. */
/** Instantiates a new {@link RefasterAnyOfUsage} instance. */
public RefasterAnyOfUsage() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public final class RefasterRuleModifiers extends BugChecker
private static final Matcher<Tree> REFASTER_METHOD =
anyOf(BEFORE_TEMPLATE_METHOD, AFTER_TEMPLATE_METHOD, PLACEHOLDER_METHOD);

/** Instantiates the default {@link RefasterRuleModifiers}. */
/** Instantiates a new {@link RefasterRuleModifiers} instance. */
public RefasterRuleModifiers() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public final class RequestMappingAnnotation extends BugChecker implements Method
isSameType("org.springframework.web.util.UriBuilder"),
isSameType("org.springframework.web.util.UriComponentsBuilder"))));

/** Instantiates the default {@link RequestMappingAnnotation}. */
/** Instantiates a new {@link RequestMappingAnnotation} instance. */
public RequestMappingAnnotation() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public final class RequestParamType extends BugChecker implements VariableTreeMa
annotations(AT_LEAST_ONE, isType("org.springframework.web.bind.annotation.RequestParam")),
anyOf(isSubtypeOf(ImmutableCollection.class), isSubtypeOf(ImmutableMap.class)));

/** Instantiates the default {@link RequestParamType}. */
/** Instantiates a new {@link RequestParamType} instance. */
public RequestParamType() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public final class ScheduledTransactionTrace extends BugChecker implements Metho
private static final MultiMatcher<Tree, AnnotationTree> TRACE_ANNOTATION =
annotations(AT_LEAST_ONE, isType(TRACE_ANNOTATION_FQCN));

/** Instantiates the default {@link ScheduledTransactionTrace}. */
/** Instantiates a new {@link ScheduledTransactionTrace} instance. */
public ScheduledTransactionTrace() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public final class Slf4jLogStatement extends BugChecker implements MethodInvocat
.onDescendantOf("org.slf4j.Logger")
.namedAnyOf("trace", "debug", "info", "warn", "error");

/** Instantiates the default {@link Slf4jLogStatement}. */
/** Instantiates a new {@link Slf4jLogStatement} instance. */
public Slf4jLogStatement() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public final class SpringMvcAnnotation extends BugChecker implements AnnotationT
.put("PUT", "PutMapping")
.build();

/** Instantiates the default {@link SpringMvcAnnotation}. */
/** Instantiates a new {@link SpringMvcAnnotation} instance. */
public SpringMvcAnnotation() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public final class StaticImport extends BugChecker implements MemberSelectTreeMa
"of",
"valueOf");

/** Instantiates the default {@link StaticImport}. */
/** Instantiates a new {@link StaticImport} instance. */
public StaticImport() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public final class StringJoin extends BugChecker implements MethodInvocationTree
Suppliers.typeFromClass(CharSequence.class);
private static final Supplier<Type> FORMATTABLE_TYPE = Suppliers.typeFromClass(Formattable.class);

/** Instantiates the default {@link StringJoin}. */
/** Instantiates a new {@link StringJoin} instance. */
public StringJoin() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public final class TimeZoneUsage extends BugChecker implements MethodInvocationT
.named("now"),
staticMethod().onClassAny(Instant.class.getName()).named("now").withNoParameters());

/** Instantiates the default {@link TimeZoneUsage}. */
/** Instantiates a new {@link TimeZoneUsage} instance. */
public TimeZoneUsage() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public final class MethodMatcherFactory {
private static final Pattern METHOD_SIGNATURE =
Pattern.compile("([^\\s#(,)]+)#([^\\s#(,)]+)\\(((?:[^\\s#(,)]+(?:,[^\\s#(,)]+)*)?)\\)");

/** Instantiates the default {@link MethodMatcherFactory}. */
/** Instantiates a new {@link MethodMatcherFactory} instance. */
public MethodMatcherFactory() {}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
@AutoService(Plugin.class)
public final class RefasterRuleCompiler implements Plugin {
/** Instantiates the default {@link RefasterRuleCompiler}. */
/** Instantiates a new {@link RefasterRuleCompiler} instance. */
public RefasterRuleCompiler() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,10 @@ public final class Refaster extends BugChecker implements CompilationUnitTreeMat

private static final long serialVersionUID = 1L;

// For more details, see https://bugs.openjdk.org/browse/JDK-8274336.
@SuppressWarnings("serial")
@SuppressWarnings("serial" /* Concrete instance will be `Serializable`. */)
private final CodeTransformer codeTransformer;

/** Instantiates the default {@link Refaster}. */
/** Instantiates a default {@link Refaster} instance. */
public Refaster() {
this(ErrorProneFlags.empty());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public final class IsArray implements Matcher<ExpressionTree> {
private static final long serialVersionUID = 1L;
private static final Matcher<ExpressionTree> DELEGATE = isArrayType();

/** Instantiates the default {@link IsArray}. */
/** Instantiates a new {@link IsArray} instance. */
public IsArray() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public final class IsCharacter implements Matcher<ExpressionTree> {
private static final Matcher<ExpressionTree> DELEGATE =
anyOf(isSameType(CHAR_TYPE), isSameType(Character.class));

/** Instantiates the default {@link IsCharacter}. */
/** Instantiates a new {@link IsCharacter} instance. */
public IsCharacter() {}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
public final class ThrowsCheckedException implements Matcher<ExpressionTree> {
private static final long serialVersionUID = 1L;

/** Instantiates the default {@link ThrowsCheckedException}. */
/** Instantiates a new {@link ThrowsCheckedException} instance. */
public ThrowsCheckedException() {}

@Override
Expand Down

0 comments on commit 5ecf901

Please sign in to comment.