diff --git a/CHANGELOG.md b/CHANGELOG.md index df8ef296..6353ff91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # CheckStyle-IDEA Changelog +* **5.77.0** Fixed: Remove constructor injection from CheckerFactory for 2023.x compatibility (#604). * **5.77.0** New: Now built against IDEA 2022.1.4 (was 2021.3.3). * **5.77.0** New: Added Checkstyle 10.8.1. * **5.76.0** New: Added Checkstyle 10.7.0. diff --git a/src/main/java/org/infernus/idea/checkstyle/checker/CheckerFactory.java b/src/main/java/org/infernus/idea/checkstyle/checker/CheckerFactory.java index 535f84ee..2b953ff5 100644 --- a/src/main/java/org/infernus/idea/checkstyle/checker/CheckerFactory.java +++ b/src/main/java/org/infernus/idea/checkstyle/checker/CheckerFactory.java @@ -32,8 +32,8 @@ public class CheckerFactory { private static final Logger LOG = Logger.getInstance(CheckerFactory.class); private final Project project; - private final CheckstyleProjectService checkstyleProjectService; - private final CheckerFactoryCache cache; + private CheckstyleProjectService checkstyleProjectService; + private CheckerFactoryCache cache; @SuppressWarnings("unused") // IDEA's DI public CheckerFactory(@NotNull final Project project) { @@ -42,18 +42,13 @@ public CheckerFactory(@NotNull final Project project) { this.cache = project.getService(CheckerFactoryCache.class); } - private CheckerFactory(@NotNull final Project project, - @NotNull final CheckstyleProjectService checkstyleProjectService, - @NotNull final CheckerFactoryCache cache) { - this.project = project; - this.checkstyleProjectService = checkstyleProjectService; - this.cache = cache; - } - public static CheckerFactory create(@NotNull final Project project, - @NotNull final CheckstyleProjectService checkstyleProjectService, - @NotNull final CheckerFactoryCache cache) { - return new CheckerFactory(project, checkstyleProjectService, cache); + @NotNull final CheckstyleProjectService checkstyleProjectService, + @NotNull final CheckerFactoryCache cache) { + CheckerFactory checkerFactory = new CheckerFactory(project); + checkerFactory.checkstyleProjectService = checkstyleProjectService; + checkerFactory.cache = cache; + return checkerFactory; } public void verify(final ConfigurationLocation location) { diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index 421dbafb..c4350d3d 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -24,6 +24,7 @@ +
  • 5.77.0: Fixed: Remove constructor injection from CheckerFactory for 2023.x compatibility (#604).
  • 5.77.0: New: Now built against IDEA 2022.1.4 (was 2021.3.3).
  • 5.77.0: New: Added Checkstyle 10.8.1.
  • 5.76.0: New: Added Checkstyle 10.7.0.