Skip to content

Commit

Permalink
Restrict the inheritance of Fix.
Browse files Browse the repository at this point in the history
I believe we meant to do this after removing MinimalFix, then forgot.

PiperOrigin-RevId: 565481056
  • Loading branch information
graememorgan authored and Error Prone Team committed Sep 19, 2023
1 parent c9726da commit 9bea871
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions check_api/src/main/java/com/google/errorprone/fixes/Fix.java
Expand Up @@ -16,6 +16,7 @@

package com.google.errorprone.fixes;

import com.google.errorprone.annotations.RestrictedInheritance;
import com.sun.tools.javac.tree.EndPosTable;
import com.sun.tools.javac.tree.JCTree.JCCompilationUnit;
import java.util.Collection;
Expand All @@ -26,6 +27,11 @@
*
* @author eaftan@google.com (Eddie Aftandilian)
*/
@RestrictedInheritance(
explanation = "This should only be subclassed within ErrorProne.",
allowedOnPath =
".*/third_party/java_src/error_prone/project/check_api/src/main/java/com/google/errorprone/fixes/.*"
+ "|.*third_party/java_src/error_prone/project/check_api/src/main/java/com/google/errorprone/_javac/check_api/libcheck_api-class_sources/com/google/errorprone/fixes/.*")
public interface Fix {

String toString(JCCompilationUnit compilationUnit);
Expand Down

0 comments on commit 9bea871

Please sign in to comment.