Skip to content

Commit

Permalink
Merge pull request #12 from whimc/SQL-driver-fix
Browse files Browse the repository at this point in the history
Fixing SQL driver out of date error
  • Loading branch information
Geph committed Oct 19, 2021
2 parents df61a5f + 8c40a1f commit 450a5dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>edu.whimc</groupId>
<artifactId>WHIMC-PositionTracker</artifactId>
<version>2.1.0</version>
<version>2.1.1</version>
<name>WHIMC Position Tracker</name>
<description>Track player positions to a database</description>

Expand Down
Expand Up @@ -11,8 +11,6 @@
* Handles the connection to the SQL database.
*/
public class MySQLConnection {
/** The SQL Driver class package. */
public static final String DRIVER_CLASS = "com.mysql.jdbc.Driver";
/** The template for the URL. */
public static final String URL_TEMPLATE = "jdbc:mysql://%s:%s/%s";
/** The SQL command to create a table. */
Expand Down Expand Up @@ -88,9 +86,8 @@ public Connection getConnection() {
}

// try connecting if a connection doesn't currently exist
Class.forName(DRIVER_CLASS);
this.connection = DriverManager.getConnection(this.url, this.username, this.password);
} catch (SQLException | ClassNotFoundException e) {
} catch (SQLException ignored) {
return null;
}

Expand Down

0 comments on commit 450a5dc

Please sign in to comment.