From 26279130b7d8f017d0528c8da07b7bcacd71c9b3 Mon Sep 17 00:00:00 2001 From: Lukas Heiligenbrunner Date: Fri, 17 Apr 2020 18:36:05 +0200 Subject: [PATCH] logintodb nonstatic --- src/java/com/wasteinformationserver/db/JDBC.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/java/com/wasteinformationserver/db/JDBC.java b/src/java/com/wasteinformationserver/db/JDBC.java index cd4784f..309f6b8 100644 --- a/src/java/com/wasteinformationserver/db/JDBC.java +++ b/src/java/com/wasteinformationserver/db/JDBC.java @@ -70,7 +70,7 @@ public class JDBC { */ public static JDBC getInstance() { if (!loggedin) { - logintodb(usernamec, passwordc, dbnamec, ipc, portc); + JDBC = new JDBC(usernamec, passwordc, dbnamec, ipc, portc); } return JDBC; } @@ -85,7 +85,7 @@ public class JDBC { * @param port Server port * @throws IOException thrown if no connection to db is possible. */ - private static boolean logintodb(String username, String password, String dbname, String ip, int port) { + private boolean logintodb(String username, String password, String dbname, String ip, int port) { try { DriverManager.setLoginTimeout(1); conn = DriverManager.getConnection(