mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-22 18:25:27 +01:00
Fix some Checkstyle issues
- Remove unused imports - Fix issues relating to line length / whitespace - Update Checkstyle suppression in matcher classes with new check name
This commit is contained in:
parent
97dd9964f3
commit
571c6106a7
@ -149,7 +149,9 @@
|
||||
<property name="allowSamelineMultipleAnnotations" value="true"/>
|
||||
</module>
|
||||
<module name="NonEmptyAtclauseDescription"/>
|
||||
<module name="JavadocTagContinuationIndentation"/>
|
||||
<module name="JavadocTagContinuationIndentation">
|
||||
<property name="offset" value="2"/>
|
||||
</module>
|
||||
<module name="AtclauseOrder">
|
||||
<property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
|
||||
<property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
|
||||
|
@ -105,7 +105,8 @@ public class MySQL extends AbstractSqlDataSource {
|
||||
Class.forName(this.className);
|
||||
} catch (ClassNotFoundException e) {
|
||||
this.className = DatabaseSettings.MYSQL_DRIVER_CLASS_NAME.getDefaultValue();
|
||||
logger.info("Driver class '" + this.className + "' not found! Falling back to the built-in MySQL driver (" + this.className + ")");
|
||||
logger.info("Driver class '" + this.className + "' not found! Falling back to the built-in MySQL driver ("
|
||||
+ this.className + ")");
|
||||
}
|
||||
this.database = settings.getProperty(DatabaseSettings.MYSQL_DATABASE);
|
||||
this.tableName = settings.getProperty(DatabaseSettings.MYSQL_TABLE);
|
||||
|
@ -43,7 +43,8 @@ public class AsyncAddEmail implements AsynchronousProcess {
|
||||
@Inject
|
||||
private BukkitService bukkitService;
|
||||
|
||||
AsyncAddEmail() { }
|
||||
AsyncAddEmail() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the request to add the given email to the player's account.
|
||||
|
@ -11,8 +11,6 @@ import fr.xephi.authme.util.AtomicIntervalCounter;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import java.time.Instant;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
import static fr.xephi.authme.service.BukkitService.TICKS_PER_MINUTE;
|
||||
|
@ -14,9 +14,7 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
import org.bukkit.scheduler.BukkitScheduler;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
@ -304,12 +304,12 @@ public class GeoIpService {
|
||||
*
|
||||
* @param ip textual IP address to lookup
|
||||
* @return the wrapped Country model or {@link Optional#empty()} if
|
||||
* <ul>
|
||||
* <ul>
|
||||
* <li>Database reader isn't initialized</li>
|
||||
* <li>MaxMind has no record about this IP address</li>
|
||||
* <li>IP address is local</li>
|
||||
* <li>Textual representation is not a valid IP address</li>
|
||||
* </ul>
|
||||
* </ul>
|
||||
*/
|
||||
private Optional<Country> getCountry(String ip) {
|
||||
if (ip == null || ip.isEmpty() || !isDataAvailable()) {
|
||||
|
@ -67,7 +67,8 @@ public class SettingsMigrationService extends PlainMigrationService {
|
||||
}
|
||||
String driverClass = reader.getString(DatabaseSettings.MYSQL_DRIVER_CLASS_NAME.getPath());
|
||||
if ("com.mysql.jdbc.Driver".equals(driverClass) || "com.mysql.cj.jdbc.Driver".equals(driverClass)) {
|
||||
configurationData.setValue(DatabaseSettings.MYSQL_DRIVER_CLASS_NAME, DatabaseSettings.MYSQL_DRIVER_CLASS_NAME.getDefaultValue());
|
||||
configurationData.setValue(DatabaseSettings.MYSQL_DRIVER_CLASS_NAME,
|
||||
DatabaseSettings.MYSQL_DRIVER_CLASS_NAME.getDefaultValue());
|
||||
changes = true;
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,8 @@ import java.util.Objects;
|
||||
/**
|
||||
* Custom matchers for AuthMe entities.
|
||||
*/
|
||||
@SuppressWarnings("checkstyle:JavadocMethod") // Justification: Javadoc would be huge because of the many parameters
|
||||
// Justification: Javadoc would be huge because of the many parameters
|
||||
@SuppressWarnings("checkstyle:MissingJavadocMethod")
|
||||
public final class AuthMeMatchers {
|
||||
|
||||
private AuthMeMatchers() {
|
||||
|
@ -17,7 +17,8 @@ import static org.hamcrest.collection.IsIterableContainingInOrder.contains;
|
||||
/**
|
||||
* Contains matchers for LimboPlayer.
|
||||
*/
|
||||
@SuppressWarnings("checkstyle:JavadocMethod") // Justification: Javadoc would be huge because of the many parameters
|
||||
// Justification: Javadoc would be huge because of the many parameters
|
||||
@SuppressWarnings("checkstyle:MissingJavadocMethod")
|
||||
public final class LimboPlayerMatchers {
|
||||
|
||||
private LimboPlayerMatchers() {
|
||||
|
Loading…
Reference in New Issue
Block a user