Skip to content

Commit

Permalink
Annotate asserting methods
Browse files Browse the repository at this point in the history
  • Loading branch information
findepi committed Feb 13, 2024
1 parent 8d6e81e commit 0e6b885
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
import io.trino.cache.SafeCaches;
import io.trino.client.ErrorInfo;
import io.trino.client.FailureException;
Expand Down Expand Up @@ -112,6 +113,7 @@ private TrinoExceptionAssert(Throwable actual, FailureInfo failureInfo)
this.failureInfo = requireNonNull(failureInfo, "failureInfo is null");
}

@CanIgnoreReturnValue
public TrinoExceptionAssert hasErrorCode(ErrorCodeSupplier... errorCodeSupplier)
{
ErrorCode errorCode = null;
Expand All @@ -133,6 +135,7 @@ public TrinoExceptionAssert hasErrorCode(ErrorCodeSupplier... errorCodeSupplier)
return myself;
}

@CanIgnoreReturnValue
public TrinoExceptionAssert hasLocation(int lineNumber, int columnNumber)
{
try {
Expand Down

0 comments on commit 0e6b885

Please sign in to comment.