mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Collapse try blocks
This commit is contained in:
parent
a99ae9e8bb
commit
6b75810f37
3 changed files with 3 additions and 10 deletions
|
|
@ -94,9 +94,7 @@ public class EventLog {
|
||||||
data.put("appversion", "Android/" + BuildConfig.VERSION_NAME);
|
data.put("appversion", "Android/" + BuildConfig.VERSION_NAME);
|
||||||
fullData.put("event", data);
|
fullData.put("event", data);
|
||||||
return new URL(CommonsApplication.EVENTLOG_URL + "?" + Utils.urlEncode(fullData.toString()) + ";");
|
return new URL(CommonsApplication.EVENTLOG_URL + "?" + Utils.urlEncode(fullData.toString()) + ";");
|
||||||
} catch (MalformedURLException e) {
|
} catch (MalformedURLException | JSONException e) {
|
||||||
throw new RuntimeException(e);
|
|
||||||
} catch (JSONException e) {
|
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -110,9 +110,7 @@ public class MediaDataExtractor {
|
||||||
doc = docBuilder.parse(new ByteArrayInputStream(source.getBytes("UTF-8")));
|
doc = docBuilder.parse(new ByteArrayInputStream(source.getBytes("UTF-8")));
|
||||||
} catch (ParserConfigurationException e) {
|
} catch (ParserConfigurationException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
} catch (IllegalStateException e) {
|
} catch (IllegalStateException | SAXException e) {
|
||||||
throw new IOException(e);
|
|
||||||
} catch (SAXException e) {
|
|
||||||
throw new IOException(e);
|
throw new IOException(e);
|
||||||
}
|
}
|
||||||
Node templateNode = findTemplate(doc.getDocumentElement(), "information");
|
Node templateNode = findTemplate(doc.getDocumentElement(), "information");
|
||||||
|
|
|
||||||
|
|
@ -122,10 +122,7 @@ public class Utils {
|
||||||
Transformer transformer = null;
|
Transformer transformer = null;
|
||||||
try {
|
try {
|
||||||
transformer = TransformerFactory.newInstance().newTransformer();
|
transformer = TransformerFactory.newInstance().newTransformer();
|
||||||
} catch (TransformerConfigurationException e) {
|
} catch (TransformerConfigurationException | TransformerFactoryConfigurationError e) {
|
||||||
// TODO Auto-generated catch block
|
|
||||||
e.printStackTrace();
|
|
||||||
} catch (TransformerFactoryConfigurationError e) {
|
|
||||||
// TODO Auto-generated catch block
|
// TODO Auto-generated catch block
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue