Collapse identical catch blocks.

This commit is contained in:
Andreas Schildbach 2019-10-16 00:05:52 +02:00
parent f5c475cf0b
commit 12ef4f8039
2 changed files with 6 additions and 18 deletions

View file

@ -415,10 +415,8 @@ public abstract class AbstractNavitiaProvider extends AbstractNetworkProvider {
} else {
return null;
}
} catch (final JSONException jsonExc) {
} catch (final JSONException | ParseException jsonExc) {
throw new ParserException(jsonExc);
} catch (final ParseException parseExc) {
throw new ParserException(parseExc);
}
}
@ -471,10 +469,8 @@ public abstract class AbstractNavitiaProvider extends AbstractNetworkProvider {
return new Stop(location, plannedArrivalTime, plannedArrivalPosition, plannedDepartureTime,
plannedDeparturePosition);
} catch (final JSONException jsonExc) {
} catch (final JSONException | ParseException jsonExc) {
throw new ParserException(jsonExc);
} catch (final ParseException parseExc) {
throw new ParserException(parseExc);
}
}
@ -829,10 +825,8 @@ public abstract class AbstractNavitiaProvider extends AbstractNetworkProvider {
}
return result;
} catch (final JSONException jsonExc) {
} catch (final JSONException | ParseException jsonExc) {
throw new ParserException(jsonExc);
} catch (final ParseException parseExc) {
throw new ParserException(parseExc);
} catch (final NotFoundException fnfExc) {
try {
final JSONObject head = new JSONObject(fnfExc.getBodyPeek().toString());