comparison src/main/java/nl/cwi/monetdb/jdbc/MonetDriver.java.in @ 180:fdf4c888d5b7

Small code and layout improvements
author Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
date Thu, 05 Oct 2017 17:01:17 +0200 (2017-10-05)
parents 8700d9ef2ace
children 1296dbcc4958
comparison
equal deleted inserted replaced
179:f0a704e33fe4 180:fdf4c888d5b7
142 throw new SQLNonTransientConnectionException("Invalid URL: no hostname given or unparsable in '" + url + "'", "08M26"); 142 throw new SQLNonTransientConnectionException("Invalid URL: no hostname given or unparsable in '" + url + "'", "08M26");
143 info.put("host", uri_host); 143 info.put("host", uri_host);
144 144
145 int uri_port = uri.getPort(); 145 int uri_port = uri.getPort();
146 if (uri_port > 0) 146 if (uri_port > 0)
147 info.put("port", "" + uri_port); 147 info.put("port", Integer.toString(uri_port));
148 148
149 // check the database 149 // check the database
150 String uri_path = uri.getPath(); 150 String uri_path = uri.getPath();
151 if (uri_path != null && uri_path.length() != 0) { 151 if (uri_path != null && uri_path.length() != 0) {
152 uri_path = uri_path.substring(1); 152 uri_path = uri_path.substring(1);
402 * Returns a touched up identifying version string of this driver. 402 * Returns a touched up identifying version string of this driver.
403 * 403 *
404 * @return the version string 404 * @return the version string
405 */ 405 */
406 public static String getDriverVersion() { 406 public static String getDriverVersion() {
407 return "" + DRIVERMAJOR + "." + DRIVERMINOR + " (" + DRIVERVERSIONSUFFIX + ")"; 407 return DRIVERMAJOR + "." + DRIVERMINOR + " (" + DRIVERVERSIONSUFFIX + ")";
408 } 408 }
409 409
410 public static int getDriverMajorVersion() { 410 public static int getDriverMajorVersion() {
411 return DRIVERMAJOR; 411 return DRIVERMAJOR;
412 } 412 }