Skip to content

Commit f8fd570

Browse files
committed
Fix deprecated class usages
1 parent 0fcd35e commit f8fd570

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/main/java/com/laytonsmith/database/MySQLProfile.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public String getPassword() {
7171
@Override
7272
public String getConnectionString() throws SQLException {
7373
try {
74-
Class.forName(com.mysql.jdbc.Driver.class.getName());
74+
Class.forName(com.mysql.cj.jdbc.Driver.class.getName());
7575
} catch(ClassNotFoundException ex) {
7676
throw new SQLException("Cannot load MySQL. Check your installation and try again");
7777
}

src/main/java/com/laytonsmith/persistence/MySQLDataSource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ private MySQLDataSource() {
3838
public MySQLDataSource(URI uri, ConnectionMixinFactory.ConnectionMixinOptions options) throws DataSourceException {
3939
super(uri, options);
4040
try {
41-
Class.forName(com.mysql.jdbc.Driver.class.getName());
41+
Class.forName(com.mysql.cj.jdbc.Driver.class.getName());
4242
} catch(ClassNotFoundException ex) {
4343
throw new DataSourceException("Could not instantiate a MySQL data source, no driver appears to exist.", ex);
4444
}

src/test/java/com/laytonsmith/core/functions/PlayerManangementTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@
2424
import org.junit.Before;
2525
import org.junit.BeforeClass;
2626
import org.junit.Test;
27-
import static org.mockito.Matchers.anyInt;
28-
import static org.mockito.Matchers.eq;
27+
28+
import static org.mockito.ArgumentMatchers.anyInt;
29+
import static org.mockito.ArgumentMatchers.eq;
2930
import static org.mockito.Mockito.mock;
3031
import static org.mockito.Mockito.times;
3132
import static org.mockito.Mockito.verify;

0 commit comments

Comments
 (0)