Skip to content

Commit

Permalink
Moves createError to subclass
Browse files Browse the repository at this point in the history
  • Loading branch information
nimakarimipour committed Oct 3, 2024
1 parent 7cfb5c6 commit 093f590
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,25 +63,6 @@ public interface Checker<T extends Error> {
*/
void preprocess(AnnotationInjector injector);

/**
* Creates an {@link Error} instance from the given parameters.
*
* @param errorType Error type.
* @param errorMessage Error message.
* @param region Region where the error is reported,
* @param offset offset of program point in original version where error is reported.
* @param resolvingFixes Set of fixes that resolve the error.
* @param module Module where the error is reported.
* @return The corresponding error.
*/
T createError(
String errorType,
String errorMessage,
Region region,
int offset,
ImmutableSet<Fix> resolvingFixes,
ModuleInfo module);

/**
* Verifies that the checker representation in Annotator is compatible with the actual running
* checker on the target module.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,7 @@ public void preprocess(AnnotationInjector injector) {
injector.injectAnnotations(initializers);
}

@Override
public NullAwayError createError(
private NullAwayError createError(
String errorType,
String errorMessage,
Region region,
Expand Down

0 comments on commit 093f590

Please sign in to comment.