From 1f2fed928c87a548588278fe4333688e40b31ffe Mon Sep 17 00:00:00 2001 From: cushon Date: Fri, 22 Feb 2019 10:27:34 -0800 Subject: [PATCH] Remove @BugPattern.category RELNOTES: @BugPattern.category is no longer supported; prefer @BugPattern.tags as a means to apply general tags to checks. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=235214723 --- .../com/google/errorprone/BugPattern.java | 37 ------------------- .../bugpatterns/TruthAssertExpected.java | 1 - 2 files changed, 38 deletions(-) diff --git a/annotation/src/main/java/com/google/errorprone/BugPattern.java b/annotation/src/main/java/com/google/errorprone/BugPattern.java index f476b75d4ea..47db40a9e22 100644 --- a/annotation/src/main/java/com/google/errorprone/BugPattern.java +++ b/annotation/src/main/java/com/google/errorprone/BugPattern.java @@ -145,43 +145,6 @@ public String displayInfo() { } } - /** - * The class of bug this bug checker detects. - * - * @deprecated This category field hasn't provided much value, as the 'problem domain' of each - * BugChecker is evident from the checker itself. We've introduced {@link #tags} as a means to - * apply general tags to checks. - */ - @Deprecated - Category category() default Category.ONE_OFF; - - public enum Category { - /** General Java or JDK errors. */ - JDK, - /** Errors specific to Google Guava. */ - GUAVA, - /** Errors specific to Google Guice. */ - GUICE, - /** Errors specific to Dagger. */ - DAGGER, - /** Errors specific to JUnit. */ - JUNIT, - /** One-off matchers that are not general errors. */ - ONE_OFF, - /** JSR-330 errors not specific to Guice. */ - INJECT, - /** Errors specific to Mockito. */ - MOCKITO, - /** Errors specific to JMock. */ - JMOCK, - /** Errors specific to Android. */ - ANDROID, - /** Errors specific to Protocol Buffers. */ - PROTOBUF, - /** Errors specific to Truth. */ - TRUTH; - } - /** * A short summary of the problem that this checker detects. Used for the default compiler error * message and for the short description in the generated docs. Should not end with a period, to diff --git a/core/src/main/java/com/google/errorprone/bugpatterns/TruthAssertExpected.java b/core/src/main/java/com/google/errorprone/bugpatterns/TruthAssertExpected.java index f4e178249c2..44f4a517fd4 100644 --- a/core/src/main/java/com/google/errorprone/bugpatterns/TruthAssertExpected.java +++ b/core/src/main/java/com/google/errorprone/bugpatterns/TruthAssertExpected.java @@ -17,7 +17,6 @@ package com.google.errorprone.bugpatterns; import static com.google.common.collect.Iterables.getOnlyElement; -import static com.google.errorprone.BugPattern.Category.TRUTH; import static com.google.errorprone.BugPattern.SeverityLevel.WARNING; import static com.google.errorprone.matchers.Matchers.allOf; import static com.google.errorprone.matchers.Matchers.anyOf;