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 { try {
eventType = xml.next(); eventType = xml.next();
} catch (XmlPullParserException e) { } catch (XmlPullParserException | IOException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
} }

View File

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