Formatting
This commit is contained in:
@@ -344,6 +344,7 @@ public class ConfigurationPropertiesReportEndpoint
|
||||
}
|
||||
super.serializeAsField(pojo, jgen, provider, writer);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -395,4 +396,5 @@ public class ConfigurationPropertiesReportEndpoint
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -104,8 +104,8 @@ public class DataSourcePublicMetrics implements PublicMetrics {
|
||||
if (primary) {
|
||||
return "datasource.primary";
|
||||
}
|
||||
if (name.length() > DATASOURCE_SUFFIX.length()
|
||||
&& name.toLowerCase(Locale.ENGLISH).endsWith(DATASOURCE_SUFFIX.toLowerCase())) {
|
||||
if (name.length() > DATASOURCE_SUFFIX.length() && name.toLowerCase(Locale.ENGLISH)
|
||||
.endsWith(DATASOURCE_SUFFIX.toLowerCase())) {
|
||||
name = name.substring(0, name.length() - DATASOURCE_SUFFIX.length());
|
||||
}
|
||||
return "datasource." + name;
|
||||
|
||||
@@ -73,6 +73,7 @@ public class FlywayEndpoint extends AbstractEndpoint<List<FlywayReport>> {
|
||||
public static class FlywayReport {
|
||||
|
||||
private final String name;
|
||||
|
||||
private final List<FlywayMigration> migrations;
|
||||
|
||||
public FlywayReport(String name, List<FlywayMigration> migrations) {
|
||||
|
||||
@@ -142,6 +142,7 @@ public class MvcEndpointSecurityInterceptor extends HandlerInterceptorAdapter {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -325,6 +325,7 @@ public class EndpointWebMvcManagementContextConfigurationTests {
|
||||
TestMetricsMvcEndpoint(MetricsEndpoint delegate) {
|
||||
super(delegate);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static class TestAuditEventsMvcEndpoint extends AuditEventsMvcEndpoint {
|
||||
@@ -332,6 +333,7 @@ public class EndpointWebMvcManagementContextConfigurationTests {
|
||||
TestAuditEventsMvcEndpoint(AuditEventRepository auditEventRepository) {
|
||||
super(auditEventRepository);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static class TestShutdownMvcEndpoint extends ShutdownMvcEndpoint {
|
||||
@@ -339,6 +341,7 @@ public class EndpointWebMvcManagementContextConfigurationTests {
|
||||
TestShutdownMvcEndpoint(ShutdownEndpoint delegate) {
|
||||
super(delegate);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -277,4 +277,5 @@ public class HealthMvcEndpointTests {
|
||||
Health health = ((ResponseEntity<Health>) result).getBody();
|
||||
assertThat(health.getStatus() == Status.DOWN).isTrue();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -75,8 +75,7 @@ public class CacheAutoConfiguration {
|
||||
|
||||
@Bean
|
||||
public CacheManagerValidator cacheAutoConfigurationValidator(
|
||||
CacheProperties cacheProperties,
|
||||
ObjectProvider<CacheManager> cacheManager) {
|
||||
CacheProperties cacheProperties, ObjectProvider<CacheManager> cacheManager) {
|
||||
return new CacheManagerValidator(cacheProperties, cacheManager);
|
||||
}
|
||||
|
||||
|
||||
@@ -115,8 +115,8 @@ public class CassandraDataAutoConfiguration {
|
||||
session.setKeyspaceName(this.properties.getKeyspaceName());
|
||||
String name = this.propertyResolver.getProperty("schemaAction",
|
||||
SchemaAction.NONE.name());
|
||||
SchemaAction schemaAction = SchemaAction.valueOf(
|
||||
name.toUpperCase(Locale.ENGLISH));
|
||||
SchemaAction schemaAction = SchemaAction
|
||||
.valueOf(name.toUpperCase(Locale.ENGLISH));
|
||||
session.setSchemaAction(schemaAction);
|
||||
return session;
|
||||
}
|
||||
|
||||
@@ -120,6 +120,7 @@ public class IntegrationAutoConfiguration {
|
||||
@Configuration
|
||||
@EnableIntegrationManagement(defaultCountsEnabled = "true", defaultStatsEnabled = "true")
|
||||
protected static class EnableIntegrationManagementConfiguration {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -77,6 +77,7 @@ class IntegrationAutoConfigurationScanRegistrar extends IntegrationComponentScan
|
||||
}
|
||||
return attributes;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@IntegrationComponentScan
|
||||
|
||||
@@ -185,6 +185,7 @@ public class OAuth2RestOperationsConfiguration {
|
||||
|
||||
@Conditional(ClientCredentialsCondition.class)
|
||||
static class ClientCredentialsActivated {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -200,10 +201,12 @@ public class OAuth2RestOperationsConfiguration {
|
||||
|
||||
@ConditionalOnProperty(prefix = "security.oauth2.client", name = "grant-type", havingValue = "client_credentials", matchIfMissing = false)
|
||||
static class ClientCredentialsConfigured {
|
||||
|
||||
}
|
||||
|
||||
@ConditionalOnNotWebApplication
|
||||
static class NoWebApplication {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -292,6 +292,7 @@ public class ResourceServerProperties implements Validator, BeanFactoryAware {
|
||||
public void setKeySetUri(String keySetUri) {
|
||||
this.keySetUri = keySetUri;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -234,6 +234,7 @@ public class ResourceServerTokenServicesConfiguration {
|
||||
public TokenStore jwkTokenStore() {
|
||||
return new JwkTokenStore(this.resource.getJwk().getKeySetUri());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@@ -415,6 +416,7 @@ public class ResourceServerTokenServicesConfiguration {
|
||||
static class HasJwkConfiguration {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static class AcceptJsonRequestInterceptor implements ClientHttpRequestInterceptor {
|
||||
|
||||
@@ -75,6 +75,7 @@ public class TransactionAutoConfiguration {
|
||||
public TransactionTemplate transactionTemplate() {
|
||||
return new TransactionTemplate(this.transactionManager);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
|
||||
@@ -776,8 +776,8 @@ public class CacheAutoConfigurationTests {
|
||||
public void autoConfiguredCacheManagerCanBeSwapped() {
|
||||
load(CacheManagerPostProcessorConfiguration.class, "spring.cache.type=caffeine");
|
||||
validateCacheManager(SimpleCacheManager.class);
|
||||
CacheManagerPostProcessor postProcessor = this.context.getBean(
|
||||
CacheManagerPostProcessor.class);
|
||||
CacheManagerPostProcessor postProcessor = this.context
|
||||
.getBean(CacheManagerPostProcessor.class);
|
||||
assertThat(postProcessor.cacheManagers).hasSize(1);
|
||||
assertThat(postProcessor.cacheManagers.get(0))
|
||||
.isInstanceOf(CaffeineCacheManager.class);
|
||||
@@ -1193,14 +1193,14 @@ public class CacheAutoConfigurationTests {
|
||||
private final List<CacheManager> cacheManagers = new ArrayList<CacheManager>();
|
||||
|
||||
@Override
|
||||
public Object postProcessBeforeInitialization(Object bean,
|
||||
String beanName) throws BeansException {
|
||||
public Object postProcessBeforeInitialization(Object bean, String beanName)
|
||||
throws BeansException {
|
||||
return bean;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object postProcessAfterInitialization(Object bean,
|
||||
String beanName) throws BeansException {
|
||||
public Object postProcessAfterInitialization(Object bean, String beanName)
|
||||
throws BeansException {
|
||||
if (bean instanceof CacheManager) {
|
||||
this.cacheManagers.add((CacheManager) bean);
|
||||
return new SimpleCacheManager();
|
||||
|
||||
@@ -185,6 +185,7 @@ public class CouchbaseDataAutoConfigurationTests {
|
||||
public Boolean convert(CouchbaseProperties value) {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -203,6 +203,7 @@ public class TransactionAutoConfigurationTests {
|
||||
public AnotherServiceImpl anotherService() {
|
||||
return new AnotherServiceImpl();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
|
||||
@@ -304,6 +304,7 @@ public class ValidationAutoConfigurationTests {
|
||||
interface AnotherSampleService {
|
||||
|
||||
void doSomething(@Min(42) Integer counter);
|
||||
|
||||
}
|
||||
|
||||
@Validated
|
||||
@@ -313,6 +314,7 @@ public class ValidationAutoConfigurationTests {
|
||||
public void doSomething(Integer counter) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@@ -382,6 +384,7 @@ public class ValidationAutoConfigurationTests {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -131,9 +131,10 @@ abstract class ArchiveCommand extends OptionParsingCommand {
|
||||
|
||||
File output = new File((String) nonOptionArguments.remove(0));
|
||||
Assert.isTrue(
|
||||
output.getName().toLowerCase(Locale.ENGLISH).endsWith("." + this.type),
|
||||
"The output '" + output + "' is not a " + this.type.toUpperCase(
|
||||
Locale.ENGLISH) + " file.");
|
||||
output.getName().toLowerCase(Locale.ENGLISH)
|
||||
.endsWith("." + this.type),
|
||||
"The output '" + output + "' is not a "
|
||||
+ this.type.toUpperCase(Locale.ENGLISH) + " file.");
|
||||
deleteIfExists(output);
|
||||
|
||||
GroovyCompiler compiler = createCompiler(options);
|
||||
|
||||
@@ -360,7 +360,8 @@ class ProjectGenerationRequest {
|
||||
return builder.build();
|
||||
}
|
||||
catch (URISyntaxException ex) {
|
||||
throw new ReportableException("Invalid service URL (" + ex.getMessage() + ")");
|
||||
throw new ReportableException(
|
||||
"Invalid service URL (" + ex.getMessage() + ")");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,4 +42,5 @@ public class JestClientCustomizationExample {
|
||||
|
||||
}
|
||||
// end::customizer[]
|
||||
|
||||
}
|
||||
|
||||
@@ -55,9 +55,7 @@ public class SampleWebClientTests {
|
||||
|
||||
@Bean
|
||||
public RestTemplateBuilder restTemplateBuilder() {
|
||||
return new RestTemplateBuilder()
|
||||
.setConnectTimeout(1000)
|
||||
.setReadTimeout(1000);
|
||||
return new RestTemplateBuilder().setConnectTimeout(1000).setReadTimeout(1000);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -354,6 +354,7 @@ class ImportsContextCustomizer implements ContextCustomizer {
|
||||
public String toString() {
|
||||
return this.key.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -30,4 +30,5 @@ public class TestMethodConfiguration {
|
||||
public Object method() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -29,4 +29,5 @@ import java.io.OutputStream;
|
||||
@TestConditionalOnClass(name = "java.io.InputStream", value = OutputStream.class)
|
||||
@TestAutoConfigureOrder(123)
|
||||
public class TestOrderedClassConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@@ -549,8 +549,8 @@ public class ConfigurationMetadataAnnotationProcessorTests {
|
||||
"java.lang.String", null, null, null, null, null);
|
||||
writeAdditionalMetadata(property);
|
||||
ConfigurationMetadata metadata = compile(SimpleProperties.class);
|
||||
assertThat(metadata).has(Metadata.withGroup("simple")
|
||||
.fromSource(SimpleProperties.class));
|
||||
assertThat(metadata)
|
||||
.has(Metadata.withGroup("simple").fromSource(SimpleProperties.class));
|
||||
assertThat(metadata).has(Metadata.withProperty("simple", String.class));
|
||||
}
|
||||
|
||||
|
||||
@@ -160,6 +160,7 @@ public final class Layouts {
|
||||
|
||||
/**
|
||||
* Module layout (designed to be used as a "plug-in").
|
||||
*
|
||||
* @deprecated as of 1.5 in favor of a custom {@link LayoutFactory}
|
||||
*/
|
||||
@Deprecated
|
||||
|
||||
@@ -108,7 +108,7 @@ public class JarFile extends java.util.jar.JarFile {
|
||||
|
||||
private JarFile(RandomAccessDataFile rootFile, String pathFromRoot,
|
||||
RandomAccessData data, JarEntryFilter filter, JarFileType type)
|
||||
throws IOException {
|
||||
throws IOException {
|
||||
super(rootFile.getFile());
|
||||
this.rootFile = rootFile;
|
||||
this.pathFromRoot = pathFromRoot;
|
||||
|
||||
@@ -54,8 +54,8 @@ import org.springframework.validation.Validator;
|
||||
* @param <T> the target type
|
||||
* @author Dave Syer
|
||||
*/
|
||||
public class PropertiesConfigurationFactory<T>
|
||||
implements FactoryBean<T>, ApplicationContextAware, MessageSourceAware, InitializingBean {
|
||||
public class PropertiesConfigurationFactory<T> implements FactoryBean<T>,
|
||||
ApplicationContextAware, MessageSourceAware, InitializingBean {
|
||||
|
||||
private static final char[] EXACT_DELIMITERS = { '_', '.', '[' };
|
||||
|
||||
|
||||
@@ -42,8 +42,8 @@ public class AnsiOutputApplicationListener
|
||||
event.getEnvironment(), "spring.output.ansi.");
|
||||
if (resolver.containsProperty("enabled")) {
|
||||
String enabled = resolver.getProperty("enabled");
|
||||
AnsiOutput.setEnabled(Enum.valueOf(Enabled.class,
|
||||
enabled.toUpperCase(Locale.ENGLISH)));
|
||||
AnsiOutput.setEnabled(
|
||||
Enum.valueOf(Enabled.class, enabled.toUpperCase(Locale.ENGLISH)));
|
||||
}
|
||||
|
||||
if (resolver.containsProperty("console-available")) {
|
||||
|
||||
@@ -130,7 +130,6 @@ public abstract class AbstractEmbeddedServletContainerFactory
|
||||
|
||||
/**
|
||||
* Converts the given {@code url} into a decoded file path.
|
||||
*
|
||||
* @param url the url to convert
|
||||
* @return the file path
|
||||
* @deprecated Since 1.5.13 in favor of {@link File#File(java.net.URI)}
|
||||
|
||||
@@ -102,7 +102,6 @@ import org.springframework.util.StringUtils;
|
||||
* @author Venil Noronha
|
||||
* @author Henri Kerola
|
||||
* @author Henrich Krämer
|
||||
*
|
||||
* @see #setPort(int)
|
||||
* @see #setConfigurations(Collection)
|
||||
* @see JettyEmbeddedServletContainer
|
||||
|
||||
@@ -701,6 +701,7 @@ public class UndertowEmbeddedServletContainerFactory
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -722,6 +723,7 @@ public class UndertowEmbeddedServletContainerFactory
|
||||
initializer.onStartup(servletContext);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -112,6 +112,7 @@ public class Jetty8JettyEmbeddedServletContainerFactoryTests {
|
||||
resp.getWriter().print("An error occurred");
|
||||
resp.flushBuffer();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -554,6 +554,7 @@ public class ConfigurationPropertiesBindingPostProcessorTests {
|
||||
interface ValidatedProperties {
|
||||
|
||||
String getFoo();
|
||||
|
||||
}
|
||||
|
||||
@ConfigurationProperties("test")
|
||||
@@ -890,6 +891,7 @@ public class ConfigurationPropertiesBindingPostProcessorTests {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -117,5 +117,7 @@ public class JsonComponentModuleTests {
|
||||
static class ConcreteSerializer extends AbstractSerializer {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user