Fix minor checkstyle issues
- Add JavaDoc where checkstyle expects it - Fix line too long issues - ...
This commit is contained in:
@@ -3,7 +3,7 @@ package fr.xephi.authme.datasource;
|
||||
/**
|
||||
* Wraps a value and allows to specify whether a value is missing or the player is not registered.
|
||||
*/
|
||||
public class DataSourceResult<T> {
|
||||
public final class DataSourceResult<T> {
|
||||
|
||||
/** Instance used when a player does not exist. */
|
||||
private static final DataSourceResult UNKNOWN_PLAYER = new DataSourceResult<>(null);
|
||||
|
||||
@@ -89,6 +89,11 @@ public class MySQL implements DataSource {
|
||||
setParameters(settings);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves various settings.
|
||||
*
|
||||
* @param settings the settings to read properties from
|
||||
*/
|
||||
private void setParameters(Settings settings) {
|
||||
this.host = settings.getProperty(DatabaseSettings.MYSQL_HOST);
|
||||
this.port = settings.getProperty(DatabaseSettings.MYSQL_PORT);
|
||||
@@ -112,6 +117,9 @@ public class MySQL implements DataSource {
|
||||
this.useSsl = settings.getProperty(DatabaseSettings.MYSQL_USE_SSL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets up the connection arguments to the database.
|
||||
*/
|
||||
private void setConnectionArguments() {
|
||||
ds = new HikariDataSource();
|
||||
ds.setPoolName("AuthMeMYSQLPool");
|
||||
@@ -159,6 +167,9 @@ public class MySQL implements DataSource {
|
||||
return ds.getConnection();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the table or any of its required columns if they don't exist.
|
||||
*/
|
||||
private void checkTablesAndColumns() throws SQLException {
|
||||
try (Connection con = getConnection(); Statement st = con.createStatement()) {
|
||||
// Create table with ID column if it doesn't exist
|
||||
|
||||
@@ -42,8 +42,9 @@ public class VAuthConverter implements Converter {
|
||||
} catch (Exception | NoSuchMethodError e) {
|
||||
pname = getName(UUID.fromString(name));
|
||||
}
|
||||
if (pname == null)
|
||||
if (pname == null) {
|
||||
continue;
|
||||
}
|
||||
auth = PlayerAuth.builder()
|
||||
.name(pname.toLowerCase())
|
||||
.realName(pname)
|
||||
|
||||
Reference in New Issue
Block a user