Update order of SuppressWarnings & other annotations
This commit is contained in:
parent
d406fa0e3d
commit
a261d7914e
48 changed files with 46 additions and 50 deletions
|
@ -16,8 +16,6 @@
|
|||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import java.nio.file.Files
|
||||
// Plugins
|
||||
plugins {
|
||||
id("java")
|
||||
|
|
|
@ -57,8 +57,8 @@ public class AnsiLoggerImplementation implements LoggerImplementation {
|
|||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@SuppressWarnings({ "resource" }) // Using try-with-resources will cause issues here
|
||||
@Override
|
||||
@SuppressWarnings({ "resource" }) // Using try-with-resources will cause issues here
|
||||
public void print(@NotNull LogLevel level, @NotNull Class<?> issuerClass, @NotNull String issuerOrigin, @Nullable String issuerMetadata, @NotNull String message, @NotNull String format) {
|
||||
// Convert to Ansi
|
||||
Ansi output = new AnsiShortcodeConverter(format, true).getAnsi();
|
||||
|
|
|
@ -33,8 +33,8 @@ import org.jetbrains.annotations.NotNull;
|
|||
*
|
||||
* @since v1-alpha2
|
||||
*/
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
@EngineSubsystem
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
public final class AnsiSubsystem extends SubsystemClass {
|
||||
/**
|
||||
* Contains the class instance.
|
||||
|
|
|
@ -52,8 +52,8 @@ import java.util.*;
|
|||
* @see EngineConfiguration
|
||||
* @since v1-alpha0
|
||||
*/
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
@EngineSubsystem
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
public final class Engine extends SubsystemClass {
|
||||
/**
|
||||
* Contains the class instance.
|
||||
|
@ -175,7 +175,7 @@ public final class Engine extends SubsystemClass {
|
|||
* @see CrashHandler#getCrashContent()
|
||||
* @since v1-alpha0
|
||||
*/
|
||||
@SuppressWarnings("ExtractMethodRecommender")
|
||||
@SuppressWarnings({ "ExtractMethodRecommender" })
|
||||
private void populateCrashContent() {
|
||||
// Issuer
|
||||
Map<@NotNull String, @NotNull String> crashContentIssuer = new LinkedHashMap<>();
|
||||
|
|
|
@ -48,8 +48,8 @@ import java.util.Properties;
|
|||
*
|
||||
* @since v1-alpha0
|
||||
*/
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
@Getter
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
public final class EngineConfiguration extends Configuration {
|
||||
/**
|
||||
* Contains the class instance.
|
||||
|
|
|
@ -30,8 +30,8 @@ import java.lang.annotation.*;
|
|||
* @see SubsystemClass
|
||||
* @since v1-alpha1
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE)
|
||||
@Documented
|
||||
@SuppressWarnings("unused")
|
||||
public @interface EngineSubsystem {}
|
||||
|
|
|
@ -31,10 +31,10 @@ import java.lang.annotation.*;
|
|||
*
|
||||
* @since v1-alpha0
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.METHOD)
|
||||
@Documented
|
||||
@SuppressWarnings("unused")
|
||||
public @interface EventListener {
|
||||
/**
|
||||
* Specifies the event to listen for.
|
||||
|
|
|
@ -32,8 +32,8 @@ import org.jetbrains.annotations.Range;
|
|||
*
|
||||
* @since v1-alpha1
|
||||
*/
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
@Getter
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
public final class FourNumberVersioningSystem implements VersioningSystem {
|
||||
/**
|
||||
* Contains the first number vector.
|
||||
|
|
|
@ -31,8 +31,8 @@ import org.jetbrains.annotations.Range;
|
|||
*
|
||||
* @since v1-alpha1
|
||||
*/
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
@Getter
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
public final class OneNumberVersioningSystem implements VersioningSystem {
|
||||
/**
|
||||
* Contains the number vector.
|
||||
|
|
|
@ -39,8 +39,8 @@ import java.util.List;
|
|||
*
|
||||
* @since v1-alpha1
|
||||
*/
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
@Getter
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
public final class SemanticVersioningSystem implements VersioningSystem {
|
||||
/**
|
||||
* Contains the {@code MAJOR} vector.
|
||||
|
|
|
@ -40,8 +40,8 @@ import java.util.Locale;
|
|||
*
|
||||
* @since v1-alpha1
|
||||
*/
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
@Getter
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
public final class StarOpenSourceVersioningSystem implements VersioningSystem {
|
||||
/**
|
||||
* Contains the {@code VERSION} vector.
|
||||
|
|
|
@ -32,8 +32,8 @@ import org.jetbrains.annotations.Range;
|
|||
*
|
||||
* @since v1-alpha1
|
||||
*/
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
@Getter
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
public final class ThreeNumberVersioningSystem implements VersioningSystem {
|
||||
/**
|
||||
* Contains the first number vector.
|
||||
|
|
|
@ -32,8 +32,8 @@ import org.jetbrains.annotations.Range;
|
|||
*
|
||||
* @since v1-alpha1
|
||||
*/
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
@Getter
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
public final class TwoNumberVersioningSystem implements VersioningSystem {
|
||||
/**
|
||||
* Contains the first number vector.
|
||||
|
|
|
@ -27,8 +27,8 @@ import org.jetbrains.annotations.NotNull;
|
|||
*
|
||||
* @since v1-alpha1
|
||||
*/
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
@Getter
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
public class UnexpectedThrowableException extends Exception {
|
||||
/**
|
||||
* Contains the throwable supplied to the constructor.
|
||||
|
|
|
@ -32,8 +32,8 @@ import java.util.Map;
|
|||
*
|
||||
* @since v1-alpha1
|
||||
*/
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
@Getter
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
public class UnmetDependenciesException extends Exception {
|
||||
/**
|
||||
* Contains the unmet dependencies list supplied to the constructor.
|
||||
|
|
|
@ -34,8 +34,8 @@ import java.util.List;
|
|||
*
|
||||
* @since v1-alpha1
|
||||
*/
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
@Getter
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
public final class DependencySubsystemVector extends DependencyVector {
|
||||
/**
|
||||
* Contains the associated {@link SubsystemClass}.
|
||||
|
|
|
@ -28,8 +28,8 @@ import org.jetbrains.annotations.Nullable;
|
|||
*
|
||||
* @since v1-alpha0
|
||||
*/
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
@Getter
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
public final class LoggerInstance {
|
||||
/**
|
||||
* Contains the {@link Class} of the issuer.
|
||||
|
|
|
@ -37,8 +37,8 @@ import java.lang.reflect.Modifier;
|
|||
*
|
||||
* @since v1-alpha2
|
||||
*/
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
@Getter
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
public final class ReflectionField {
|
||||
|
||||
/**
|
||||
|
|
|
@ -42,8 +42,8 @@ import java.lang.reflect.Modifier;
|
|||
*
|
||||
* @since v1-alpha2
|
||||
*/
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
@Getter
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
public final class ReflectionMethod {
|
||||
/**
|
||||
* Contains a reference to the parent class.
|
||||
|
|
|
@ -32,8 +32,8 @@ import java.util.List;
|
|||
*
|
||||
* @since v1-alpha1
|
||||
*/
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
@Getter
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
public class DependencyVector {
|
||||
/**
|
||||
* Contains the identifier of this vector.
|
||||
|
|
|
@ -28,8 +28,8 @@ import org.jetbrains.annotations.Nullable;
|
|||
*
|
||||
* @since v1-alpha1
|
||||
*/
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
@Getter
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
public abstract class LogRule {
|
||||
/**
|
||||
* Contains if the log rule should disallow or permit matching log calls.
|
||||
|
|
|
@ -30,9 +30,9 @@ import org.jetbrains.annotations.NotNull;
|
|||
*
|
||||
* @since v1-alpha0
|
||||
*/
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
@Getter
|
||||
@Setter
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
public class Vec2d {
|
||||
/**
|
||||
* The X axis value.
|
||||
|
|
|
@ -30,9 +30,9 @@ import org.jetbrains.annotations.NotNull;
|
|||
*
|
||||
* @since v1-alpha0
|
||||
*/
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
@Getter
|
||||
@Setter
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
public class Vec2f {
|
||||
/**
|
||||
* The X axis value.
|
||||
|
|
|
@ -30,9 +30,9 @@ import org.jetbrains.annotations.NotNull;
|
|||
*
|
||||
* @since v1-alpha0
|
||||
*/
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
@Getter
|
||||
@Setter
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
public class Vec2i implements Cloneable {
|
||||
/**
|
||||
* The X axis value.
|
||||
|
|
|
@ -30,9 +30,9 @@ import org.jetbrains.annotations.NotNull;
|
|||
*
|
||||
* @since v1-alpha0
|
||||
*/
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
@Getter
|
||||
@Setter
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
public class Vec3d {
|
||||
/**
|
||||
* The X axis value.
|
||||
|
|
|
@ -30,9 +30,9 @@ import org.jetbrains.annotations.NotNull;
|
|||
*
|
||||
* @since v1-alpha0
|
||||
*/
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
@Getter
|
||||
@Setter
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
public class Vec3f {
|
||||
/**
|
||||
* The X axis value.
|
||||
|
|
|
@ -30,9 +30,9 @@ import org.jetbrains.annotations.NotNull;
|
|||
*
|
||||
* @since v1-alpha0
|
||||
*/
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
@Getter
|
||||
@Setter
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
public class Vec3i {
|
||||
/**
|
||||
* The X axis value.
|
||||
|
|
|
@ -69,8 +69,8 @@ public final class PlaceholderEngine {
|
|||
* @return list of all global placeholders
|
||||
* @since v1-alpha0
|
||||
*/
|
||||
@SuppressWarnings("FieldMayBeFinal")
|
||||
@Getter
|
||||
@SuppressWarnings("FieldMayBeFinal")
|
||||
private @NotNull List<@NotNull Placeholder> placeholders = new ArrayList<>();
|
||||
|
||||
/**
|
||||
|
|
|
@ -33,7 +33,6 @@ import java.util.Properties;
|
|||
* @since v1-alpha0
|
||||
*/
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
@NotNull
|
||||
public final class PropertyParser {
|
||||
/**
|
||||
* Contains an instance providing access to the system properties.
|
||||
|
|
|
@ -30,8 +30,8 @@ import org.jetbrains.annotations.NotNull;
|
|||
* @see Throwable
|
||||
* @since v1-alpha0
|
||||
*/
|
||||
@SuppressWarnings({ "unused" })
|
||||
// TODO deprecate """parser""" and move getHeader() to Miscellaneous class
|
||||
@SuppressWarnings({ "unused" })
|
||||
public final class StackTraceParser {
|
||||
/**
|
||||
* Contains the {@link Throwable} to parse.
|
||||
|
|
|
@ -34,8 +34,8 @@ import static org.junit.jupiter.api.Assertions.*;
|
|||
/**
|
||||
* Tests the class {@link EngineConfiguration}.
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
@DisplayName("EngineConfiguration")
|
||||
@SuppressWarnings({ "unused" })
|
||||
class EngineConfigurationTest extends TestBase {
|
||||
/**
|
||||
* Tests the method {@code loadConfiguration}.
|
||||
|
|
|
@ -32,8 +32,8 @@ import static org.junit.jupiter.api.Assertions.fail;
|
|||
/**
|
||||
* Tests the class {@link FourNumberVersioningSystem}.
|
||||
*/
|
||||
@SuppressWarnings({ "unused" })
|
||||
@DisplayName("FourNumberVersioningSystem")
|
||||
@SuppressWarnings({ "unused" })
|
||||
public class FourNumberVersioningSystemTest extends TestBase {
|
||||
/**
|
||||
* Tests the method {@code compare}.
|
||||
|
|
|
@ -33,8 +33,8 @@ import static org.junit.jupiter.api.Assertions.fail;
|
|||
/**
|
||||
* Tests the class {@link TwoNumberVersioningSystem}.
|
||||
*/
|
||||
@SuppressWarnings({ "unused" })
|
||||
@DisplayName("OneNumberVersioningSystem")
|
||||
@SuppressWarnings({ "unused" })
|
||||
public class OneNumberVersioningSystemTest extends TestBase {
|
||||
/**
|
||||
* Tests the method {@code compare}.
|
||||
|
|
|
@ -32,8 +32,8 @@ import static org.junit.jupiter.api.Assertions.fail;
|
|||
/**
|
||||
* Tests the class {@link SemanticVersioningSystem}.
|
||||
*/
|
||||
@SuppressWarnings({ "unused" })
|
||||
@DisplayName("SemanticVersioningSystem")
|
||||
@SuppressWarnings({ "unused" })
|
||||
public class SemanticVersioningSystemTest extends TestBase {
|
||||
/**
|
||||
* Tests the method {@code compare}.
|
||||
|
|
|
@ -33,8 +33,8 @@ import static org.junit.jupiter.api.Assertions.fail;
|
|||
/**
|
||||
* Tests the class {@link SemanticVersioningSystem}.
|
||||
*/
|
||||
@SuppressWarnings({ "unused" })
|
||||
@DisplayName("StarOpenSourceVersioningSystem")
|
||||
@SuppressWarnings({ "unused" })
|
||||
public class StarOpenSourceVersioningSystemTest extends TestBase {
|
||||
/**
|
||||
* Tests the method {@code compare}.
|
||||
|
|
|
@ -32,8 +32,8 @@ import static org.junit.jupiter.api.Assertions.fail;
|
|||
/**
|
||||
* Tests the class {@link ThreeNumberVersioningSystem}.
|
||||
*/
|
||||
@SuppressWarnings({ "unused" })
|
||||
@DisplayName("ThreeNumberVersioningSystem")
|
||||
@SuppressWarnings({ "unused" })
|
||||
public class ThreeNumberVersioningSystemTest extends TestBase {
|
||||
/**
|
||||
* Tests the method {@code compare}.
|
||||
|
|
|
@ -32,8 +32,8 @@ import static org.junit.jupiter.api.Assertions.fail;
|
|||
/**
|
||||
* Tests the class {@link TwoNumberVersioningSystem}.
|
||||
*/
|
||||
@SuppressWarnings({ "unused" })
|
||||
@DisplayName("TwoNumberVersioningSystem")
|
||||
@SuppressWarnings({ "unused" })
|
||||
public class TwoNumberVersioningSystemTest extends TestBase {
|
||||
/**
|
||||
* Tests the method {@code compare}.
|
||||
|
|
|
@ -42,8 +42,8 @@ import static org.junit.jupiter.api.Assertions.*;
|
|||
/**
|
||||
* Tests the class {@link Miscellaneous}.
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
@DisplayName("Miscellaneous")
|
||||
@SuppressWarnings({ "unused" })
|
||||
public class MiscellaneousTest extends TestBase {
|
||||
/**
|
||||
* Used for testing the method {@code executeSafely}.
|
||||
|
|
|
@ -35,8 +35,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
/**
|
||||
* Tests the class {@link PlaceholderEngine}.
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
@DisplayName("PlaceholderEngine")
|
||||
@SuppressWarnings({ "unused" })
|
||||
class PlaceholderEngineTest extends TestBase {
|
||||
/**
|
||||
* Tests the method {@code process}.
|
||||
|
|
|
@ -43,8 +43,8 @@ import static org.lwjgl.glfw.GLFW.*;
|
|||
*
|
||||
* @since v1-alpha2
|
||||
*/
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
@EngineSubsystem
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
public final class GlfwSubsystem extends SubsystemClass {
|
||||
/**
|
||||
* Contains the class instance.
|
||||
|
|
|
@ -31,8 +31,8 @@ import org.jetbrains.annotations.Nullable;
|
|||
*
|
||||
* @since v1-alpha2
|
||||
*/
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
@Getter
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
public final class GlfwSubsystemConfiguration extends Configuration {
|
||||
/**
|
||||
* Contains the class instance.
|
||||
|
|
|
@ -46,8 +46,8 @@ import static org.lwjgl.glfw.GLFW.*;
|
|||
*
|
||||
* @since v1-alpha0
|
||||
*/
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
@EngineSubsystem
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
public final class OpenGlSubsystem extends ApiClass {
|
||||
/**
|
||||
* Contains the class instance.
|
||||
|
|
|
@ -48,8 +48,8 @@ import java.util.Map;
|
|||
*
|
||||
* @since v1-alpha0
|
||||
*/
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
@EngineSubsystem
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
public final class GraphicsSubsystem extends SubsystemClass {
|
||||
/**
|
||||
* Contains the class instance.
|
||||
|
|
|
@ -32,8 +32,8 @@ import org.jetbrains.annotations.Nullable;
|
|||
*
|
||||
* @since v1-alpha0
|
||||
*/
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
@Getter
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
public final class GraphicsSubsystemConfiguration extends Configuration {
|
||||
/**
|
||||
* Contains the class instance.
|
||||
|
|
|
@ -37,8 +37,8 @@ import static org.lwjgl.glfw.GLFW.glfwTerminate;
|
|||
*
|
||||
* @since v1-alpha0
|
||||
*/
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
@EngineSubsystem
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
public final class VulkanSubsystem extends SubsystemClass {
|
||||
/**
|
||||
* Contains the class instance.
|
||||
|
|
|
@ -146,7 +146,6 @@ public class CompatibilityLogger extends LegacyAbstractLogger {
|
|||
* @see #forwardLogCall(Level, String, Object[], Throwable)
|
||||
* @since v1-alpha0
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public void log(@NotNull LoggingEvent event) {
|
||||
NormalizedParameters np = NormalizedParameters.normalize(event);
|
||||
forwardLogCall(event.getLevel(), np.getMessage(), np.getArguments(), event.getThrowable());
|
||||
|
|
|
@ -34,8 +34,8 @@ import org.slf4j.spi.SLF4JServiceProvider;
|
|||
*
|
||||
* @since v1-alpha0
|
||||
*/
|
||||
@SuppressWarnings({ "unused" })
|
||||
@Getter
|
||||
@SuppressWarnings({ "unused" })
|
||||
public class CompatibilityLoggerProvider implements SLF4JServiceProvider {
|
||||
/**
|
||||
* Contains a {@link CompatibilityLoggerFactory}.
|
||||
|
|
|
@ -40,8 +40,8 @@ import org.slf4j.LoggerFactory;
|
|||
*
|
||||
* @since v1-alpha0
|
||||
*/
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
@EngineSubsystem
|
||||
@SuppressWarnings({ "unused", "JavadocDeclaration" })
|
||||
public class Slf4jCompatSubsystem extends SubsystemClass {
|
||||
/**
|
||||
* Contains the class instance.
|
||||
|
|
Loading…
Reference in a new issue