8000 Minor cleanup. · Silent-Fred/iTrySQL@aa56163 · GitHub
[go: up one dir, main page]

Skip to content

Commit aa56163

Browse files
committed
Minor cleanup.
1 parent f0ddc8c commit aa56163

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/main/java/de/kuehweg/sqltool/database/ConnectionHolder.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
*/
2626
package de.kuehweg.sqltool.database;
2727

28+
import java.lang.reflect.InvocationTargetException;
2829
import java.sql.Connection;
2930
import java.sql.DriverManager;
3031
import java.sql.SQLException;
@@ -70,7 +71,7 @@ private void connect(final Connection connection) {
7071
*/
7172
public void connect(final ConnectionSetting connectionSetting) throws DatabaseConnectionException {
7273
try {
73-
Class.forName(connectionSetting.getType().getDriverClass()).newInstance();
74+
Class.forName(connectionSetting.getType().getDriverClass()).getDeclaredConstructor().newInstance();
7475
final Properties properties = new Properties();
7576
properties.setProperty("user", connectionSetting.getUser() != null ? connectionSetting.getUser() : "");
7677
properties.setProperty("password",
@@ -100,7 +101,7 @@ public void connect(final ConnectionSetting connectionSetting) throws DatabaseCo
100101
connect(DriverManager.getConnection(connectionSetting.getUrl(), properties));
101102
connectedProperty.set(true);
102103
} catch (NullPointerException | ClassNotFoundException | InstantiationException | IllegalAccessException
103-
| SQLException ex) {
104+
| SQLException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException ex) {
104105
connectedProperty.set(false);
105106
throw new DatabaseConnectionException(ex);
106107
}

src/main/java/de/kuehweg/sqltool/dialog/util/WebViewWithHSQLDBBugfix.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@
2525
*/
2626
package de.kuehweg.sqltool.dialog.util;
2727

28-
import java.util.logging.Level;
29-
import java.util.logging.Logger;
30-
3128
/**
3229
* Bugfix für die in der Kombination von HSQLDB mit WebViews auftretenden
3330
* Probleme, dass wegen des von HSQLDB umgestellten Log-Levels die WebViews in

src/main/java/de/kuehweg/sqltool/itrysql/ResourceLocator.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@
2626

2727
package de.kuehweg.sqltool.itrysql;
2828

29-
import java.io.File;
3029
import java.net.MalformedURLException;
31-
import java.net.ProtocolFamily;
3230
import java.net.URL;
3331

3432
/**

src/main/java/module-info.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
module itrysql {
2+
3+
requires transitive javafx.base;
4+
requires transitive javafx.graphics;
5+
26
requires javafx.controls;
37
requires javafx.fxml;
48
requires javafx.web;

0 commit comments

Comments
 (0)
0