mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-01 02:12:58 +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 {
|
try {
|
||||||
eventType = xml.next();
|
eventType = xml.next();
|
||||||
} catch (XmlPullParserException e) {
|
} catch (XmlPullParserException | IOException e) {
|
||||||
e.printStackTrace();
|
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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 "";
|
||||||
|
Loading…
Reference in New Issue
Block a user