Upgrade to Checkstyle 10.12.4

This commit is contained in:
Andy Wilkinson
2024-01-24 14:25:44 +00:00
parent ee8a68bd9a
commit 9b9cc208b5
6 changed files with 15 additions and 14 deletions

View File

@@ -76,11 +76,12 @@ subprojects { subproject ->
checkstyle {
configFile = rootProject.file("config/checkstyle/checkstyle.xml")
configProperties = [ "checkstyle.config.dir" : rootProject.file("config/checkstyle") ]
toolVersion = "10.11.0"
toolVersion = "10.12.4"
}
dependencies {
checkstyle("io.spring.javaformat:spring-javaformat-checkstyle:$javaFormatVersion")
checkstyle("com.puppycrawl.tools:checkstyle:${checkstyle.toolVersion}")
checkstyle("io.spring.javaformat:spring-javaformat-checkstyle:${javaFormatVersion}")
}
plugins.withType(MavenPublishPlugin) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2023 the original author or authors.
* Copyright 2014-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -58,7 +58,7 @@ public class ConstraintDescriptionsTests {
assertThat(this.constraintDescriptions.descriptionsForProperty("foo").size()).isEqualTo(0);
}
private static class Constrained {
private static final class Constrained {
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2023 the original author or authors.
* Copyright 2014-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -310,7 +310,7 @@ public class ResourceBundleConstraintDescriptionResolverTests {
AnnotationUtils.getAnnotationAttributes(annotations[0]));
}
private static class Constrained {
private static final class Constrained {
@AssertFalse
private boolean assertFalse;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2022 the original author or authors.
* Copyright 2014-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -79,7 +79,7 @@ public class ValidatorConstraintResolverTests {
return new ConstraintCondition(annotation);
}
private static class ConstrainedFields {
private static final class ConstrainedFields {
@NotNull
private String single;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2023 the original author or authors.
* Copyright 2014-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -120,7 +120,7 @@ public class StandardTemplateResourceResolverTests {
}
}
private static class TestClassLoader extends ClassLoader {
private static final class TestClassLoader extends ClassLoader {
private Map<String, URL> resources = new HashMap<>();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2023 the original author or authors.
* Copyright 2014-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -642,9 +642,9 @@ public class MockMvcRestDocumentationIntegrationTests {
/**
* Test configuration that enables Spring MVC.
*/
@Configuration
@EnableWebMvc
static class TestConfiguration {
@Configuration(proxyBeanMethods = false)
static final class TestConfiguration {
@Bean
TestController testController() {
@@ -654,7 +654,7 @@ public class MockMvcRestDocumentationIntegrationTests {
}
@RestController
private static class TestController {
private static final class TestController {
@RequestMapping(value = "/", produces = "application/json;charset=UTF-8")
ResponseEntity<Map<String, Object>> foo() {