Skip to content

Commit

Permalink
Update TargetPatternErrorFunction.Key to use @AutoCodec.Interner
Browse files Browse the repository at this point in the history
…instead of `@AutoCodec.Instantiator`.

PiperOrigin-RevId: 602397793
Change-Id: I535162c6521fc3d96800f2d936e242ac4db3b9f0
  • Loading branch information
Googler authored and copybara-github committed Jan 29, 2024
1 parent 711ef77 commit 3bd6e42
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,16 @@ private Key(String message, DetailedExitCode detailedExitCode) {
this.detailedExitCode = detailedExitCode;
}

@VisibleForSerialization
@AutoCodec.Instantiator
static Key create(String message, DetailedExitCode detailedExitCode) {
private static Key create(String message, DetailedExitCode detailedExitCode) {
return interner.intern(new Key(message, detailedExitCode));
}

@VisibleForSerialization
@AutoCodec.Interner
static Key intern(Key key) {
return interner.intern(key);
}

@Override
public SkyFunctionName functionName() {
return SkyFunctions.TARGET_PATTERN_ERROR;
Expand Down

0 comments on commit 3bd6e42

Please sign in to comment.