From 624c41c80e77e0dd5de87f2cb18e2b0db9541ca9 Mon Sep 17 00:00:00 2001 From: izeye Date: Wed, 4 May 2022 22:55:33 +0900 Subject: [PATCH] Polish See gh-30862 --- .../boot/build/mavenplugin/MavenPluginPlugin.java | 12 ++++++------ ...OAuth2ResourceServerOpaqueTokenConfiguration.java | 2 +- .../context/logging/LoggingApplicationListener.java | 4 ++-- .../boot/origin/OriginTrackedResource.java | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/buildSrc/src/main/java/org/springframework/boot/build/mavenplugin/MavenPluginPlugin.java b/buildSrc/src/main/java/org/springframework/boot/build/mavenplugin/MavenPluginPlugin.java index b41df2abb3..ab9e10e2bf 100644 --- a/buildSrc/src/main/java/org/springframework/boot/build/mavenplugin/MavenPluginPlugin.java +++ b/buildSrc/src/main/java/org/springframework/boot/build/mavenplugin/MavenPluginPlugin.java @@ -212,10 +212,10 @@ public class MavenPluginPlugin implements Plugin { File generatedHelpMojoDir = new File(project.getBuildDir(), "generated/sources/helpMojo"); SourceSet mainSourceSet = getMainSourceSet(project); project.getTasks().withType(Javadoc.class, this::setJavadocOptions); - FormatHelpMojoSource copyFormattedHelpMojoSourceTask = createFormatHelpMojoSourceTask(project, - generateHelpMojoTask, generatedHelpMojoDir); - project.getTasks().getByName(mainSourceSet.getCompileJavaTaskName()).dependsOn(copyFormattedHelpMojoSourceTask); - mainSourceSet.java((javaSources) -> javaSources.srcDir(copyFormattedHelpMojoSourceTask)); + FormatHelpMojoSource formattedHelpMojoSource = createFormatHelpMojoSource(project, generateHelpMojoTask, + generatedHelpMojoDir); + project.getTasks().getByName(mainSourceSet.getCompileJavaTaskName()).dependsOn(formattedHelpMojoSource); + mainSourceSet.java((javaSources) -> javaSources.srcDir(formattedHelpMojoSource)); Sync pluginDescriptorInputs = createSyncPluginDescriptorInputs(project, pluginDescriptorDir, mainSourceSet); pluginDescriptorInputs.dependsOn(mainSourceSet.getClassesTaskName()); MavenExec task = createGeneratePluginDescriptorTask(project, pluginDescriptorDir); @@ -234,7 +234,7 @@ public class MavenPluginPlugin implements Plugin { options.addMultilineStringsOption("tag").setValue(Arrays.asList("goal:X", "requiresProject:X", "threadSafe:X")); } - private FormatHelpMojoSource createFormatHelpMojoSourceTask(Project project, MavenExec generateHelpMojoTask, + private FormatHelpMojoSource createFormatHelpMojoSource(Project project, MavenExec generateHelpMojoTask, File generatedHelpMojoDir) { FormatHelpMojoSource formatHelpMojoSource = project.getTasks().create("formatHelpMojoSource", FormatHelpMojoSource.class); @@ -244,7 +244,7 @@ public class MavenPluginPlugin implements Plugin { } private Sync createSyncPluginDescriptorInputs(Project project, File destination, SourceSet sourceSet) { - Sync pluginDescriptorInputs = project.getTasks().create("copyPluginDescriptorInputs", Sync.class); + Sync pluginDescriptorInputs = project.getTasks().create("syncPluginDescriptorInputs", Sync.class); pluginDescriptorInputs.setDestinationDir(destination); File pomFile = new File(project.getProjectDir(), "src/maven/resources/pom.xml"); pluginDescriptorInputs.from(pomFile, (copy) -> replaceVersionPlaceholder(copy, project)); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/servlet/OAuth2ResourceServerOpaqueTokenConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/servlet/OAuth2ResourceServerOpaqueTokenConfiguration.java index d5be309d31..bb5606a83f 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/servlet/OAuth2ResourceServerOpaqueTokenConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/servlet/OAuth2ResourceServerOpaqueTokenConfiguration.java @@ -30,7 +30,7 @@ import org.springframework.security.oauth2.server.resource.introspection.OpaqueT import org.springframework.security.web.SecurityFilterChain; /** - * Configures a {@link OpaqueTokenIntrospector} when a token introspection endpoint is + * Configures an {@link OpaqueTokenIntrospector} when a token introspection endpoint is * available. Also configures a {@link SecurityFilterChain} if a * {@link OpaqueTokenIntrospector} bean is found. * diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/logging/LoggingApplicationListener.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/logging/LoggingApplicationListener.java index a2bb0ffc3a..64ba5168c4 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/logging/LoggingApplicationListener.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/logging/LoggingApplicationListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2022 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. @@ -131,7 +131,7 @@ public class LoggingApplicationListener implements GenericApplicationListener { public static final String LOG_FILE_BEAN_NAME = "springBootLogFile"; /** - * The name of the{@link LoggerGroups} bean. + * The name of the {@link LoggerGroups} bean. * @since 2.2.0 */ public static final String LOGGER_GROUPS_BEAN_NAME = "springBootLoggerGroups"; diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/origin/OriginTrackedResource.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/origin/OriginTrackedResource.java index bb49d7035b..b31a8ef33b 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/origin/OriginTrackedResource.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/origin/OriginTrackedResource.java @@ -165,7 +165,7 @@ public class OriginTrackedResource implements Resource, OriginProvider { * {@link WritableResource}. * @param resource the tracked resource * @param origin the origin of the resource - * @return a {@link OriginTrackedWritableResource} instance + * @return an {@link OriginTrackedWritableResource} instance */ public static OriginTrackedWritableResource of(WritableResource resource, Origin origin) { return (OriginTrackedWritableResource) of((Resource) resource, origin); @@ -176,7 +176,7 @@ public class OriginTrackedResource implements Resource, OriginProvider { * {@link Resource}. * @param resource the tracked resource * @param origin the origin of the resource - * @return a {@link OriginTrackedResource} instance + * @return an {@link OriginTrackedResource} instance */ public static OriginTrackedResource of(Resource resource, Origin origin) { if (resource instanceof WritableResource) {