Skip to content
Snippets Groups Projects
Commit 401b89b5 authored by Mamadu-lamarana Bah's avatar Mamadu-lamarana Bah :speech_balloon:
Browse files

utilisation d'un seul catch pour gérer plusieurs exceptions...

utilisation d'un seul catch pour gérer plusieurs exceptions (NumberFormatException heritant de IllegalArgumentException)
parent 6ad1bda8
No related branches found
No related tags found
No related merge requests found
......@@ -224,11 +224,7 @@ public final class UtcDateTypeAdapter extends TypeAdapter<Date> {
return calendar.getTime();
// If we get a ParseException it'll already have the right message/offset.
// Other exception types can convert here.
} catch (IndexOutOfBoundsException e) {
fail = e;
} catch (NumberFormatException e) {
fail = e;
} catch (IllegalArgumentException e) {
} catch (IndexOutOfBoundsException | IllegalArgumentException e){
fail = e;
}
String input = (date == null) ? null : ("'" + date + "'");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment