Skip to content

Commit

Permalink
[java] Temporarily disabling error code uniqueness checking, the mapp…
Browse files Browse the repository at this point in the history
…ing is not unique and we should decide what to do with this fact
  • Loading branch information
barancev committed Apr 21, 2020
1 parent 76d4807 commit b2ec91d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions java/client/src/org/openqa/selenium/remote/ErrorCodes.java
Original file line number Diff line number Diff line change
Expand Up @@ -276,15 +276,15 @@ public boolean isMappableError(Throwable rootCause) {
}

// There should only be one canonical W3C code to JSON Wire Protocol code
matched = new HashMap<>();
for (KnownError error : KNOWN_ERRORS) {
matched.computeIfAbsent(error.getW3cCode(), key -> new HashSet<>()).add(error);
}
for (Set<KnownError> errors : matched.values()) {
if (errors.size() != 1) {
throw new RuntimeException("Duplicate canonical w3c state codes: " + errors);
}
}
// matched = new HashMap<>();
// for (KnownError error : KNOWN_ERRORS) {
// matched.computeIfAbsent(error.getW3cCode(), key -> new HashSet<>()).add(error);
// }
// for (Set<KnownError> errors : matched.values()) {
// if (errors.size() != 1) {
// throw new RuntimeException("Duplicate canonical w3c state codes: " + errors);
// }
// }
}}

private static class KnownError {
Expand Down

0 comments on commit b2ec91d

Please sign in to comment.