refactor: java 7 migration aid - collapse identical catch

This commit is contained in:
エリス 2024-12-05 18:25:56 +09:00
parent 63834a362d
commit 7ed491cf4d
No known key found for this signature in database
GPG Key ID: 2E5FF17FB26AF7F2
2 changed files with 3 additions and 9 deletions

View File

@ -105,9 +105,7 @@ public class ConfigXmlParser {
}
try {
eventType = xml.next();
} catch (XmlPullParserException e) {
e.printStackTrace();
} catch (IOException e) {
} catch (XmlPullParserException | IOException e) {
e.printStackTrace();
}
}

View File

@ -136,9 +136,7 @@ public class CordovaBridge {
String callbackId = array.getString(3);
String r = jsExec(bridgeSecret, service, action, callbackId, message);
return r == null ? "" : r;
} catch (JSONException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
} catch (JSONException | IllegalAccessException e) {
e.printStackTrace();
}
return "";
@ -148,9 +146,7 @@ public class CordovaBridge {
try {
int bridgeSecret = Integer.parseInt(defaultValue.substring(16));
jsSetNativeToJsBridgeMode(bridgeSecret, Integer.parseInt(message));
} catch (NumberFormatException e){
e.printStackTrace();
} catch (IllegalAccessException e) {
} catch (NumberFormatException | IllegalAccessException e){
e.printStackTrace();
}
return "";