use of jgnash.util.Nullable in project jgnash by ccavanaugh.
the class ConnectionFactory method openConnection.
@Nullable
private static synchronized URLConnection openConnection(final URL url) {
URLConnection connection = null;
try {
connection = url.openConnection();
} catch (final IOException ex) {
logSevere(ConnectionFactory.class, ex);
}
/* Set the connection timeout */
if (connection != null) {
connection.setConnectTimeout(getConnectionTimeout() * 1000);
connection.setReadTimeout(getConnectionTimeout() * 1000);
}
return connection;
}
Aggregations