Skip to content

Commit

Permalink
Don't use sentinel for name
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Feb 13, 2024
1 parent 4929f8a commit 27e5746
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,17 @@ protected final RewriteRule rule() {
private final class MutableProcessingContext implements ClassProcessingContext {
private static final String NULL = "null";

private @NonNull String name = NULL;
private @MonotonicNonNull String name = null;
private @Nullable String superName = NULL;

@Override
public ClassInfoProvider classInfoProvider() {
return AbstractRewriteRuleVisitorFactory.this.classInfoProvider;
}

@SuppressWarnings("StringEquality")
@Override
public String processingClassName() {
if (this.name == NULL || this.name == null) {
if (this.name == null) {
throw new IllegalStateException("processingClassName is only available after the class header is visited.");
}
return this.name;
Expand Down

0 comments on commit 27e5746

Please sign in to comment.