diff --git a/google-ads-stubs-v10/src/main/java/com/google/ads/googleads/v10/utils/ErrorUtils.java b/google-ads-stubs-v10/src/main/java/com/google/ads/googleads/v10/utils/ErrorUtils.java index d6977ae67a..2f88656d6c 100644 --- a/google-ads-stubs-v10/src/main/java/com/google/ads/googleads/v10/utils/ErrorUtils.java +++ b/google-ads-stubs-v10/src/main/java/com/google/ads/googleads/v10/utils/ErrorUtils.java @@ -36,7 +36,7 @@ public ErrorPath createErrorPath( return new ErrorPath( error, pathElement.getFieldName(), - Optional.ofNullable(pathElement.hasIndex() ? (long) pathElement.getIndex() : null)); + pathElement.hasIndex() ? Optional.of(pathElement.getIndex()) : Optional.empty()); } @Override