Skip to content

Commit

Permalink
Fix issue gephi#505
Browse files Browse the repository at this point in the history
  • Loading branch information
mbastian committed Jan 11, 2012
1 parent aea5ec8 commit 7b6c813
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DBDrivers/manifest.mf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Manifest-Version: 1.0
OpenIDE-Module: org.gephi.io.database.drivers
OpenIDE-Module-Localizing-Bundle: org/gephi/io/database/drivers/Bundle.properties
OpenIDE-Module-Specification-Version: 0.8.0.2
OpenIDE-Module-Specification-Version: 0.8.0.3

Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ public Connection getConnection(String connectionUrl, String username, String pa
if (!connectionUrl.contains("database=")) {
String dbname = connectionUrl.substring(connectionUrl.lastIndexOf('/') + 1);
String url = connectionUrl.substring(0, connectionUrl.lastIndexOf('/'));
connectionUrl = url + "database=" + dbname + ",charset=UTF8";
String port = url.substring(url.lastIndexOf(":") + 1);
port = port.isEmpty() ? "" : ",dbs_port=" + port;
url = url.substring(0, url.lastIndexOf(":"));
connectionUrl = url + "/database=" + dbname + ",charset=UTF8" + port;
}

return DriverManager.getConnection(connectionUrl, username, passwd);
Expand Down

0 comments on commit 7b6c813

Please sign in to comment.