From 26aae6e29874dce780870d6b4a8198eb692265e6 Mon Sep 17 00:00:00 2001 From: Amit Kumar Deohoria Date: Wed, 16 Jul 2025 10:35:16 +0530 Subject: [PATCH] Issue #369: Migrate repo to jdk17 --- .github/workflows/maven.yml | 4 ++-- pom.xml | 4 ++-- .../checkstyle/generatepatchfile/GeneratePatchFile.java | 2 +- .../generatepatchfile/GeneratePatchFileLauncher.java | 2 +- .../GeneratePatchFileWithGitCommandLauncher.java | 2 +- .../java/com/github/checkstyle/generatepatchfile/Utils.java | 2 +- .../com/github/checkstyle/generatepatchfile/package-info.java | 2 +- .../tools/checkstyle/filters/CrFilterInputStream.java | 2 +- .../tools/checkstyle/filters/JavaPatchFilterElement.java | 2 +- .../tools/checkstyle/filters/LoadPatchFileUtils.java | 2 +- .../puppycrawl/tools/checkstyle/filters/PatchFilterSet.java | 2 +- .../com/puppycrawl/tools/checkstyle/filters/Strategy.java | 2 +- .../tools/checkstyle/filters/SuppressionJavaPatchFilter.java | 2 +- .../tools/checkstyle/filters/SuppressionPatchFilter.java | 2 +- .../checkstyle/filters/SuppressionPatchFilterElement.java | 2 +- .../com/puppycrawl/tools/checkstyle/filters/package-info.java | 2 +- .../checkstyle/generatepatchfile/GeneratePatchFileTest.java | 2 +- .../checkstyle/filters/AbstractPatchFilterEvaluationTest.java | 3 +-- .../checkstyle/filters/SuppressionJavaPatchFilterTest.java | 2 +- .../tools/checkstyle/filters/SuppressionPatchFilterTest.java | 2 +- .../jgit/AbstractJgitPatchParserEvaluationTest.java | 2 +- .../tools/checkstyle/jgit/GitDiffOnOpenSourceTest.java | 2 +- .../checkstyle/jgit/GitDiffWithContextSizeDefaultTest.java | 2 +- .../tools/checkstyle/jgit/GitDiffWithContextSizeZeroTest.java | 2 +- 24 files changed, 26 insertions(+), 27 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index f5ef7e25..3c82ad9f 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -19,11 +19,11 @@ jobs: path: ~/.m2/repository key: maven-cache-${{ hashFiles('**/pom.xml') }} - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v3 with: distribution: corretto - java-version: 11 + java-version: 17 - name: Build with Maven run: mvn -e --no-transfer-progress install diff --git a/pom.xml b/pom.xml index 4a3f3cdc..bd96bc25 100644 --- a/pom.xml +++ b/pom.xml @@ -35,8 +35,8 @@ UTF-8 10.4 3.2.0 - 11 - 11 + 17 + 17 5.9.1 diff --git a/src/main/java/com/github/checkstyle/generatepatchfile/GeneratePatchFile.java b/src/main/java/com/github/checkstyle/generatepatchfile/GeneratePatchFile.java index 0ce8e66a..fae97fb2 100644 --- a/src/main/java/com/github/checkstyle/generatepatchfile/GeneratePatchFile.java +++ b/src/main/java/com/github/checkstyle/generatepatchfile/GeneratePatchFile.java @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////////////////////// // checkstyle: Checks Java source code and other text files for adherence to a set of rules. -// Copyright (C) 2001-2022 the original author or authors. +// Copyright (C) 2001-2025 the original author or authors. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public diff --git a/src/main/java/com/github/checkstyle/generatepatchfile/GeneratePatchFileLauncher.java b/src/main/java/com/github/checkstyle/generatepatchfile/GeneratePatchFileLauncher.java index eeecd2fd..d94dd37c 100644 --- a/src/main/java/com/github/checkstyle/generatepatchfile/GeneratePatchFileLauncher.java +++ b/src/main/java/com/github/checkstyle/generatepatchfile/GeneratePatchFileLauncher.java @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////////////////////// // checkstyle: Checks Java source code and other text files for adherence to a set of rules. -// Copyright (C) 2001-2022 the original author or authors. +// Copyright (C) 2001-2025 the original author or authors. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public diff --git a/src/main/java/com/github/checkstyle/generatepatchfile/GeneratePatchFileWithGitCommandLauncher.java b/src/main/java/com/github/checkstyle/generatepatchfile/GeneratePatchFileWithGitCommandLauncher.java index c5ea7b31..e7dc8152 100644 --- a/src/main/java/com/github/checkstyle/generatepatchfile/GeneratePatchFileWithGitCommandLauncher.java +++ b/src/main/java/com/github/checkstyle/generatepatchfile/GeneratePatchFileWithGitCommandLauncher.java @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////////////////////// // checkstyle: Checks Java source code and other text files for adherence to a set of rules. -// Copyright (C) 2001-2022 the original author or authors. +// Copyright (C) 2001-2025 the original author or authors. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public diff --git a/src/main/java/com/github/checkstyle/generatepatchfile/Utils.java b/src/main/java/com/github/checkstyle/generatepatchfile/Utils.java index 9d964547..3859564b 100644 --- a/src/main/java/com/github/checkstyle/generatepatchfile/Utils.java +++ b/src/main/java/com/github/checkstyle/generatepatchfile/Utils.java @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////////////////////// // checkstyle: Checks Java source code and other text files for adherence to a set of rules. -// Copyright (C) 2001-2022 the original author or authors. +// Copyright (C) 2001-2025 the original author or authors. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public diff --git a/src/main/java/com/github/checkstyle/generatepatchfile/package-info.java b/src/main/java/com/github/checkstyle/generatepatchfile/package-info.java index a96cabca..d36dbd0f 100644 --- a/src/main/java/com/github/checkstyle/generatepatchfile/package-info.java +++ b/src/main/java/com/github/checkstyle/generatepatchfile/package-info.java @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////////////////////// // checkstyle: Checks Java source code and other text files for adherence to a set of rules. -// Copyright (C) 2001-2022 the original author or authors. +// Copyright (C) 2001-2025 the original author or authors. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/CrFilterInputStream.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/CrFilterInputStream.java index 666fef86..97d26e96 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/filters/CrFilterInputStream.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/CrFilterInputStream.java @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////////////////////// // checkstyle: Checks Java source code and other text files for adherence to a set of rules. -// Copyright (C) 2001-2022 the original author or authors. +// Copyright (C) 2001-2025 the original author or authors. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/JavaPatchFilterElement.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/JavaPatchFilterElement.java index aed99495..ed03e279 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/filters/JavaPatchFilterElement.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/JavaPatchFilterElement.java @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////////////////////// // checkstyle: Checks Java source code and other text files for adherence to a set of rules. -// Copyright (C) 2001-2022 the original author or authors. +// Copyright (C) 2001-2025 the original author or authors. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/LoadPatchFileUtils.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/LoadPatchFileUtils.java index 7688d2ed..5c590151 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/filters/LoadPatchFileUtils.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/LoadPatchFileUtils.java @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////////////////////// // checkstyle: Checks Java source code and other text files for adherence to a set of rules. -// Copyright (C) 2001-2022 the original author or authors. +// Copyright (C) 2001-2025 the original author or authors. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/PatchFilterSet.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/PatchFilterSet.java index ddbb76e8..5dd4829c 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/filters/PatchFilterSet.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/PatchFilterSet.java @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////////////////////// // checkstyle: Checks Java source code and other text files for adherence to a set of rules. -// Copyright (C) 2001-2022 the original author or authors. +// Copyright (C) 2001-2025 the original author or authors. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/Strategy.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/Strategy.java index d7a9c7c2..8dbf1aa5 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/filters/Strategy.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/Strategy.java @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////////////////////// // checkstyle: Checks Java source code and other text files for adherence to a set of rules. -// Copyright (C) 2001-2022 the original author or authors. +// Copyright (C) 2001-2025 the original author or authors. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionJavaPatchFilter.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionJavaPatchFilter.java index 25ac7156..b48fb443 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionJavaPatchFilter.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionJavaPatchFilter.java @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////////////////////// // checkstyle: Checks Java source code and other text files for adherence to a set of rules. -// Copyright (C) 2001-2022 the original author or authors. +// Copyright (C) 2001-2025 the original author or authors. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionPatchFilter.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionPatchFilter.java index 73d34b61..61737798 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionPatchFilter.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionPatchFilter.java @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////////////////////// // checkstyle: Checks Java source code and other text files for adherence to a set of rules. -// Copyright (C) 2001-2022 the original author or authors. +// Copyright (C) 2001-2025 the original author or authors. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionPatchFilterElement.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionPatchFilterElement.java index 3bbc2176..066036ad 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionPatchFilterElement.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionPatchFilterElement.java @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////////////////////// // checkstyle: Checks Java source code and other text files for adherence to a set of rules. -// Copyright (C) 2001-2022 the original author or authors. +// Copyright (C) 2001-2025 the original author or authors. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/filters/package-info.java b/src/main/java/com/puppycrawl/tools/checkstyle/filters/package-info.java index 8c799b69..01d9ed03 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/filters/package-info.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/filters/package-info.java @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////////////////////// // checkstyle: Checks Java source code and other text files for adherence to a set of rules. -// Copyright (C) 2001-2022 the original author or authors. +// Copyright (C) 2001-2025 the original author or authors. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public diff --git a/src/test/java/com/github/checkstyle/generatepatchfile/GeneratePatchFileTest.java b/src/test/java/com/github/checkstyle/generatepatchfile/GeneratePatchFileTest.java index 783c8c57..5bd59b0c 100644 --- a/src/test/java/com/github/checkstyle/generatepatchfile/GeneratePatchFileTest.java +++ b/src/test/java/com/github/checkstyle/generatepatchfile/GeneratePatchFileTest.java @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////////////////////// // checkstyle: Checks Java source code and other text files for adherence to a set of rules. -// Copyright (C) 2001-2022 the original author or authors. +// Copyright (C) 2001-2025 the original author or authors. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/filters/AbstractPatchFilterEvaluationTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/filters/AbstractPatchFilterEvaluationTest.java index 9685488b..c2aaaac1 100644 --- a/src/test/java/com/puppycrawl/tools/checkstyle/filters/AbstractPatchFilterEvaluationTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/filters/AbstractPatchFilterEvaluationTest.java @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////////////////////// // checkstyle: Checks Java source code and other text files for adherence to a set of rules. -// Copyright (C) 2001-2024 the original author or authors. +// Copyright (C) 2001-2025 the original author or authors. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -53,7 +53,6 @@ abstract class AbstractPatchFilterEvaluationTest extends AbstractModuleTestSuppo protected void testByConfig(String configPath) throws Exception { Locale.setDefault(Locale.ENGLISH); - final String inputFile = configPath.replaceFirst( "(default|zero)ContextConfig.xml", ""); // we can add here any variable to provide path to patch name by PropertiesExpander diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/filters/SuppressionJavaPatchFilterTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/filters/SuppressionJavaPatchFilterTest.java index 59fa2f17..fc77a30c 100644 --- a/src/test/java/com/puppycrawl/tools/checkstyle/filters/SuppressionJavaPatchFilterTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/filters/SuppressionJavaPatchFilterTest.java @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////////////////////// // checkstyle: Checks Java source code and other text files for adherence to a set of rules. -// Copyright (C) 2001-2022 the original author or authors. +// Copyright (C) 2001-2025 the original author or authors. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/filters/SuppressionPatchFilterTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/filters/SuppressionPatchFilterTest.java index af106298..39dfe725 100644 --- a/src/test/java/com/puppycrawl/tools/checkstyle/filters/SuppressionPatchFilterTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/filters/SuppressionPatchFilterTest.java @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////////////////////// // checkstyle: Checks Java source code and other text files for adherence to a set of rules. -// Copyright (C) 2001-2022 the original author or authors. +// Copyright (C) 2001-2025 the original author or authors. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/jgit/AbstractJgitPatchParserEvaluationTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/jgit/AbstractJgitPatchParserEvaluationTest.java index 3aee5447..60c0e25f 100644 --- a/src/test/java/com/puppycrawl/tools/checkstyle/jgit/AbstractJgitPatchParserEvaluationTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/jgit/AbstractJgitPatchParserEvaluationTest.java @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////////////////////// // checkstyle: Checks Java source code and other text files for adherence to a set of rules. -// Copyright (C) 2001-2022 the original author or authors. +// Copyright (C) 2001-2025 the original author or authors. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/jgit/GitDiffOnOpenSourceTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/jgit/GitDiffOnOpenSourceTest.java index 888be8fb..39237bcd 100644 --- a/src/test/java/com/puppycrawl/tools/checkstyle/jgit/GitDiffOnOpenSourceTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/jgit/GitDiffOnOpenSourceTest.java @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////////////////////// // checkstyle: Checks Java source code and other text files for adherence to a set of rules. -// Copyright (C) 2001-2022 the original author or authors. +// Copyright (C) 2001-2025 the original author or authors. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/jgit/GitDiffWithContextSizeDefaultTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/jgit/GitDiffWithContextSizeDefaultTest.java index 55150bb0..25fd6abd 100644 --- a/src/test/java/com/puppycrawl/tools/checkstyle/jgit/GitDiffWithContextSizeDefaultTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/jgit/GitDiffWithContextSizeDefaultTest.java @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////////////////////// // checkstyle: Checks Java source code and other text files for adherence to a set of rules. -// Copyright (C) 2001-2022 the original author or authors. +// Copyright (C) 2001-2025 the original author or authors. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/jgit/GitDiffWithContextSizeZeroTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/jgit/GitDiffWithContextSizeZeroTest.java index df2706d7..8bff6c0e 100644 --- a/src/test/java/com/puppycrawl/tools/checkstyle/jgit/GitDiffWithContextSizeZeroTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/jgit/GitDiffWithContextSizeZeroTest.java @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////////////////////// // checkstyle: Checks Java source code and other text files for adherence to a set of rules. -// Copyright (C) 2001-2022 the original author or authors. +// Copyright (C) 2001-2025 the original author or authors. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public