Skip to content

Commit c117355

Browse files
committed
docs: remove recursive approach from comments
1 parent 2bf5470 commit c117355

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

sdk-platform-java/gax-java/gax/src/main/java/com/google/api/gax/tracing/ErrorTypeUtil.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ enum ErrorType {
9494
* error cause.
9595
* <li><b>Client-Side Network/Operational Errors:</b> For errors occurring within the client
9696
* library or network stack, mapping to specific enum representations from {@link
97-
* ErrorType}. This includes checking the cause chain for diagnostic markers (e.g., {@code
97+
* ErrorType}. This includes checking the exception for diagnostic markers (e.g., {@code
9898
* ConnectException} or {@code SocketTimeoutException}).
9999
* <li><b>Specific Server Error Code:</b> If no {@code ErrorInfo.reason} is available and it is
100100
* not a client-side failure, but a server error code was received:
@@ -222,11 +222,11 @@ private static boolean isClientAuthenticationError(Throwable e) {
222222
}
223223

224224
/**
225-
* Recursively checks the throwable and its cause chain for any of the specified error classes.
225+
* Checks if the throwable is an instance of any of the specified error classes.
226226
*
227227
* @param t The Throwable to check.
228228
* @param errorClasses A set of class objects to check against.
229-
* @return true if an error from the set is found in the cause chain, false otherwise.
229+
* @return true if the error is an instance of a class from the set, false otherwise.
230230
*/
231231
private static boolean hasErrorClass(Throwable t, Set<Class<? extends Throwable>> errorClasses) {
232232
for (Class<? extends Throwable> errorClass : errorClasses) {

0 commit comments

Comments
 (0)