mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-31 17:32:51 +08:00
refactor: java 7 migration aid - collapse identical catch
This commit is contained in:
parent
63834a362d
commit
7ed491cf4d
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -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 "";
|
||||
|
Loading…
Reference in New Issue
Block a user