From 211966ef3d57931b9c1f5399c0ac9f62a2abbb76 Mon Sep 17 00:00:00 2001 From: Rick Ossendrijver Date: Fri, 15 Apr 2022 11:03:01 +0200 Subject: [PATCH] Drop obsolete `@BugPattern` `linkType` and `name` declarations --- .../bugpatterns/MissingRefasterAnnotation.java | 13 +++++-------- .../bugpatterns/MissingRefasterAnnotationTest.java | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/core/src/main/java/com/google/errorprone/bugpatterns/MissingRefasterAnnotation.java b/core/src/main/java/com/google/errorprone/bugpatterns/MissingRefasterAnnotation.java index 5c24cdffbd6..eba10f201ea 100644 --- a/core/src/main/java/com/google/errorprone/bugpatterns/MissingRefasterAnnotation.java +++ b/core/src/main/java/com/google/errorprone/bugpatterns/MissingRefasterAnnotation.java @@ -1,5 +1,5 @@ /* - * Copyright 2021 The Error Prone Authors. + * Copyright 2022 The Error Prone Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,15 +16,14 @@ package com.google.errorprone.bugpatterns; +import static com.google.errorprone.BugPattern.SeverityLevel.WARNING; +import static com.google.errorprone.BugPattern.StandardTags.LIKELY_ERROR; import static com.google.errorprone.matchers.ChildMultiMatcher.MatchType.AT_LEAST_ONE; import static com.google.errorprone.matchers.Matchers.annotations; import static com.google.errorprone.matchers.Matchers.anyOf; import static com.google.errorprone.matchers.Matchers.isType; import com.google.errorprone.BugPattern; -import com.google.errorprone.BugPattern.LinkType; -import com.google.errorprone.BugPattern.SeverityLevel; -import com.google.errorprone.BugPattern.StandardTags; import com.google.errorprone.VisitorState; import com.google.errorprone.bugpatterns.BugChecker.ClassTreeMatcher; import com.google.errorprone.matchers.Description; @@ -37,11 +36,9 @@ /** A {@link BugChecker}; see the associated {@link BugPattern} annotation for details. */ @BugPattern( - name = "MissingRefasterAnnotation", summary = "The Refaster template contains a method without any Refaster annotations", - linkType = LinkType.NONE, - severity = SeverityLevel.WARNING, - tags = StandardTags.LIKELY_ERROR) + severity = WARNING, + tags = LIKELY_ERROR) public final class MissingRefasterAnnotation extends BugChecker implements ClassTreeMatcher { private static final MultiMatcher HAS_REFASTER_ANNOTATION = annotations( diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/MissingRefasterAnnotationTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/MissingRefasterAnnotationTest.java index 585d9cc0c90..29f8ccb9ba4 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/MissingRefasterAnnotationTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/MissingRefasterAnnotationTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2021 The Error Prone Authors. + * Copyright 2022 The Error Prone Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.