Update order of SuppressWarnings & other annotations

This commit is contained in:
JeremyStar™ 2024-07-31 04:20:05 +02:00
parent d406fa0e3d
commit a261d7914e
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D
48 changed files with 46 additions and 50 deletions

View file

@ -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")

View file

@ -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();

View file

@ -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.

View file

@ -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<>();

View file

@ -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.

View file

@ -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 {}

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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}.

View file

@ -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.

View file

@ -37,8 +37,8 @@ import java.lang.reflect.Modifier;
*
* @since v1-alpha2
*/
@SuppressWarnings({ "unused", "JavadocDeclaration" })
@Getter
@SuppressWarnings({ "unused", "JavadocDeclaration" })
public final class ReflectionField {
/**

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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<>();
/**

View file

@ -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.

View file

@ -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.

View file

@ -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}.

View file

@ -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}.

View file

@ -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}.

View file

@ -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}.

View file

@ -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}.

View file

@ -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}.

View file

@ -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}.

View file

@ -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}.

View file

@ -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}.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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());

View file

@ -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}.

View file

@ -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.