diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 48a6d7e1..70588352 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -34,14 +34,14 @@ jobs: FLUSH PRIVILEGES; EOF - - name: Set up JDK 8 + - name: Set up JDK 17 uses: actions/setup-java@v2 with: - java-version: '8' + java-version: '17' distribution: 'adopt' - name: Build with Maven - run: mvn --batch-mode --update-snapshots -P '!checkerframework,!checkerframework-jdk8,!checkerframework-jdk9orlater' verify + run: mvn --batch-mode --update-snapshots -P '!checkerframework' verify - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 @@ -54,7 +54,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java_version: [8, 11, 14, 17] + java_version: [17, 21] fail-fast: false steps: @@ -92,7 +92,7 @@ jobs: distribution: 'adopt' - name: Run tests - run: mvn --batch-mode -Djacoco.skip=true -P '!checkerframework,!checkerframework-jdk8,!checkerframework-jdk9orlater' test + run: mvn --batch-mode -Djacoco.skip=true -P '!checkerframework' test static_analysis: runs-on: ubuntu-latest @@ -102,10 +102,10 @@ jobs: with: timezoneLinux: "Europe/Paris" - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v2 with: - java-version: 11 + java-version: 17 distribution: 'adopt' - name: Run tests diff --git a/pom.xml b/pom.xml index ad941393..b29aedd0 100644 --- a/pom.xml +++ b/pom.xml @@ -24,18 +24,17 @@ 4.0.0 - 1.8 - 1.8 + 17 + 17 UTF-8 UTF-8 - - ${com.google.errorprone:javac:jar} + 3.42.0 fr.quatrevieux.araknemu araknemu - 0.12-alpha + 0.13-SNAPSHOT io.netty @@ -55,7 +54,7 @@ args4j args4j - 2.33 + 2.37 org.apache.logging.log4j @@ -105,7 +104,7 @@ io.github.cdimascio dotenv-java - 2.3.2 + 3.0.1 org.checkerframework @@ -139,7 +138,7 @@ org.mockito mockito-core - 4.11.0 + 5.12.0 test @@ -276,7 +275,7 @@ checkerframework - [1.8,) + [17,) @@ -297,69 +296,9 @@ org.checkerframework.checker.nullness.NullnessChecker org.checkerframework.checker.index.IndexChecker - + -AskipDefs=(Test|BaseCase|DataSet|TestCase|PacketWithParser|OtherPacket|DummyGenerator|Accessors)$ - - - - - - - - org.checkerframework - checker - ${checkerframework.version} - - - - - - checkerframework-jdk8 - - 1.8 - - - - 9+181-r4173-1 - - - - com.google.errorprone - javac - 9+181-r4173-1 - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.13.0 - - true - - -J-Xbootclasspath/p:${settings.localRepository}/com/google/errorprone/javac/${javac.version}/javac-${javac.version}.jar - - - - - - - - - checkerframework-jdk9orlater - - [9,) - - - - - org.apache.maven.plugins - maven-compiler-plugin - - true - -J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED -J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED -J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED @@ -374,6 +313,13 @@ + + + org.checkerframework + checker + ${checkerframework.version} + + true diff --git a/src/main/java/fr/quatrevieux/araknemu/game/fight/castable/CastTargetResolver.java b/src/main/java/fr/quatrevieux/araknemu/game/fight/castable/CastTargetResolver.java index 38c1afed..b1e7fcb1 100644 --- a/src/main/java/fr/quatrevieux/araknemu/game/fight/castable/CastTargetResolver.java +++ b/src/main/java/fr/quatrevieux/araknemu/game/fight/castable/CastTargetResolver.java @@ -61,13 +61,13 @@ public static CastTargets resolveFromEffect(F caster, /** * Perform resolution from effect target and effect area */ - @SuppressWarnings("cast.unsafe") // @Nullable cast cause a compiler crash on java 8 + @SuppressWarnings("unchecked") private static CastTargets resolveFromEffectArea(F caster, BattlefieldCell from, BattlefieldCell target, SpellEffect effect) { // Do not use stream API to optimise memory allocations final CastTargets.Builder builder = new CastTargets.Builder<>(); for (BattlefieldCell cell : effect.area().resolve(target, from)) { - final @Nullable F resolvedTarget = (/*@Nullable*/ F) cell.fighter(); + final @Nullable F resolvedTarget = (@Nullable F) cell.fighter(); if (resolvedTarget == null || !effect.target().test(caster, resolvedTarget)) { continue;