Skip to content

Commit 8d76e73

Browse files
authored
Use getNumber instead of ordinal to get DatastoreException code (#1140)
1 parent e1309f0 commit 8d76e73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gcloud-java-datastore/src/main/java/com/google/cloud/datastore/spi/DefaultDatastoreRpc.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ private static DatastoreException translate(
100100
}
101101
}
102102
return new DatastoreException(
103-
exception.getCode().ordinal(), exception.getMessage(), reason, exception);
103+
exception.getCode().getNumber(), exception.getMessage(), reason, exception);
104104
}
105105

106106
@Override

0 commit comments

Comments
 (0)