Merge pull request #28239 from polarbear567

* pr/28239:
  Polish contribution
  Polish

Closes gh-28239
pull/28308/head
Stephane Nicoll 3 years ago
commit 668513e740

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2019 the original author or authors. * Copyright 2012-2021 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -28,7 +28,7 @@ import org.springframework.boot.actuate.endpoint.Operation;
public interface ExposableServletEndpoint extends ExposableEndpoint<Operation>, PathMappedEndpoint { public interface ExposableServletEndpoint extends ExposableEndpoint<Operation>, PathMappedEndpoint {
/** /**
* Return details of the servlet that should registered. * Return details of the servlet that should be registered.
* @return the endpoint servlet * @return the endpoint servlet
*/ */
EndpointServlet getEndpointServlet(); EndpointServlet getEndpointServlet();

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2019 the original author or authors. * Copyright 2012-2021 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -63,7 +63,7 @@ public class SourceOptions {
* specify non-existent sources, but the default paths are allowed not to exist (the * specify non-existent sources, but the default paths are allowed not to exist (the
* paths are tested before use). If default paths are provided and the option set * paths are tested before use). If default paths are provided and the option set
* contains no source file arguments it is not an error even if none of the default * contains no source file arguments it is not an error even if none of the default
* paths exist). * paths exist.
* @param optionSet the source option set * @param optionSet the source option set
* @param classLoader an optional classloader used to try and load files that are not * @param classLoader an optional classloader used to try and load files that are not
* found in the local filesystem * found in the local filesystem

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2019 the original author or authors. * Copyright 2012-2021 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -70,7 +70,7 @@ class ConnectionInputStream extends FilterInputStream {
/** /**
* Read a single byte from the stream (checking that the end of the stream hasn't been * Read a single byte from the stream (checking that the end of the stream hasn't been
* reached. * reached).
* @return the content * @return the content
* @throws IOException in case of I/O errors * @throws IOException in case of I/O errors
*/ */

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2019 the original author or authors. * Copyright 2012-2021 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -32,7 +32,7 @@ import org.springframework.http.client.ClientHttpResponse;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**
* {@link Runnable} that waits to triggers live reload until the remote server has * {@link Runnable} that waits to trigger live reload until the remote server has
* restarted. * restarted.
* *
* @author Phillip Webb * @author Phillip Webb

@ -56,7 +56,7 @@ class AutoConfigureMockRestServiceServerWithRootUriIntegrationTests {
MeterRegistry meterRegistry; MeterRegistry meterRegistry;
@Test @Test
void whenRestTemplateAppliesARootUriThenMockServerExpecationsAreStillMatched() { void whenRestTemplateAppliesARootUriThenMockServerExpectationsAreStillMatched() {
this.server.expect(requestTo("/test")).andRespond(withSuccess("hello", MediaType.TEXT_HTML)); this.server.expect(requestTo("/test")).andRespond(withSuccess("hello", MediaType.TEXT_HTML));
ResponseEntity<String> entity = this.restTemplate.getForEntity("/test", String.class); ResponseEntity<String> entity = this.restTemplate.getForEntity("/test", String.class);
assertThat(entity.getBody()).isEqualTo("hello"); assertThat(entity.getBody()).isEqualTo("hello");

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2019 the original author or authors. * Copyright 2012-2021 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -23,7 +23,7 @@ import org.springframework.core.ResolvableType;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**
* JSON content created usually from a JSON tester. Generally used only to * JSON content usually created from a JSON tester. Generally used only to
* {@link AssertProvider provide} {@link JsonContentAssert} to AssertJ {@code assertThat} * {@link AssertProvider provide} {@link JsonContentAssert} to AssertJ {@code assertThat}
* calls. * calls.
* *

@ -682,7 +682,7 @@ public class TestRestTemplate {
* <p> * <p>
* URI Template variables are expanded using the given URI variables, if any. * URI Template variables are expanded using the given URI variables, if any.
* @param url the URL * @param url the URL
* @param method the HTTP method (GET, POST, etc) * @param method the HTTP method (GET, POST, etc.)
* @param requestEntity the entity (headers and/or body) to write to the request, may * @param requestEntity the entity (headers and/or body) to write to the request, may
* be {@code null} * be {@code null}
* @param responseType the type of the return value * @param responseType the type of the return value
@ -703,7 +703,7 @@ public class TestRestTemplate {
* <p> * <p>
* URI Template variables are expanded using the given URI variables, if any. * URI Template variables are expanded using the given URI variables, if any.
* @param url the URL * @param url the URL
* @param method the HTTP method (GET, POST, etc) * @param method the HTTP method (GET, POST, etc.)
* @param requestEntity the entity (headers and/or body) to write to the request, may * @param requestEntity the entity (headers and/or body) to write to the request, may
* be {@code null} * be {@code null}
* @param responseType the type of the return value * @param responseType the type of the return value
@ -722,7 +722,7 @@ public class TestRestTemplate {
* Execute the HTTP method to the given URI template, writing the given request entity * Execute the HTTP method to the given URI template, writing the given request entity
* to the request, and returns the response as {@link ResponseEntity}. * to the request, and returns the response as {@link ResponseEntity}.
* @param url the URL * @param url the URL
* @param method the HTTP method (GET, POST, etc) * @param method the HTTP method (GET, POST, etc.)
* @param requestEntity the entity (headers and/or body) to write to the request, may * @param requestEntity the entity (headers and/or body) to write to the request, may
* be {@code null} * be {@code null}
* @param responseType the type of the return value * @param responseType the type of the return value
@ -745,7 +745,7 @@ public class TestRestTemplate {
* ResponseEntity&lt;List&lt;MyBean&gt;&gt; response = template.exchange(&quot;https://example.com&quot;,HttpMethod.GET, null, myBean); * ResponseEntity&lt;List&lt;MyBean&gt;&gt; response = template.exchange(&quot;https://example.com&quot;,HttpMethod.GET, null, myBean);
* </pre> * </pre>
* @param url the URL * @param url the URL
* @param method the HTTP method (GET, POST, etc) * @param method the HTTP method (GET, POST, etc.)
* @param requestEntity the entity (headers and/or body) to write to the request, may * @param requestEntity the entity (headers and/or body) to write to the request, may
* be {@code null} * be {@code null}
* @param responseType the type of the return value * @param responseType the type of the return value
@ -770,7 +770,7 @@ public class TestRestTemplate {
* ResponseEntity&lt;List&lt;MyBean&gt;&gt; response = template.exchange(&quot;https://example.com&quot;,HttpMethod.GET, null, myBean); * ResponseEntity&lt;List&lt;MyBean&gt;&gt; response = template.exchange(&quot;https://example.com&quot;,HttpMethod.GET, null, myBean);
* </pre> * </pre>
* @param url the URL * @param url the URL
* @param method the HTTP method (GET, POST, etc) * @param method the HTTP method (GET, POST, etc.)
* @param requestEntity the entity (headers and/or body) to write to the request, may * @param requestEntity the entity (headers and/or body) to write to the request, may
* be {@code null} * be {@code null}
* @param responseType the type of the return value * @param responseType the type of the return value
@ -795,7 +795,7 @@ public class TestRestTemplate {
* ResponseEntity&lt;List&lt;MyBean&gt;&gt; response = template.exchange(&quot;https://example.com&quot;,HttpMethod.GET, null, myBean); * ResponseEntity&lt;List&lt;MyBean&gt;&gt; response = template.exchange(&quot;https://example.com&quot;,HttpMethod.GET, null, myBean);
* </pre> * </pre>
* @param url the URL * @param url the URL
* @param method the HTTP method (GET, POST, etc) * @param method the HTTP method (GET, POST, etc.)
* @param requestEntity the entity (headers and/or body) to write to the request, may * @param requestEntity the entity (headers and/or body) to write to the request, may
* be {@code null} * be {@code null}
* @param responseType the type of the return value * @param responseType the type of the return value
@ -854,7 +854,7 @@ public class TestRestTemplate {
* <p> * <p>
* URI Template variables are expanded using the given URI variables, if any. * URI Template variables are expanded using the given URI variables, if any.
* @param url the URL * @param url the URL
* @param method the HTTP method (GET, POST, etc) * @param method the HTTP method (GET, POST, etc.)
* @param requestCallback object that prepares the request * @param requestCallback object that prepares the request
* @param responseExtractor object that extracts the return value from the response * @param responseExtractor object that extracts the return value from the response
* @param urlVariables the variables to expand in the template * @param urlVariables the variables to expand in the template
@ -875,7 +875,7 @@ public class TestRestTemplate {
* <p> * <p>
* URI Template variables are expanded using the given URI variables map. * URI Template variables are expanded using the given URI variables map.
* @param url the URL * @param url the URL
* @param method the HTTP method (GET, POST, etc) * @param method the HTTP method (GET, POST, etc.)
* @param requestCallback object that prepares the request * @param requestCallback object that prepares the request
* @param responseExtractor object that extracts the return value from the response * @param responseExtractor object that extracts the return value from the response
* @param urlVariables the variables to expand in the template * @param urlVariables the variables to expand in the template
@ -894,7 +894,7 @@ public class TestRestTemplate {
* Execute the HTTP method to the given URL, preparing the request with the * Execute the HTTP method to the given URL, preparing the request with the
* {@link RequestCallback}, and reading the response with a {@link ResponseExtractor}. * {@link RequestCallback}, and reading the response with a {@link ResponseExtractor}.
* @param url the URL * @param url the URL
* @param method the HTTP method (GET, POST, etc) * @param method the HTTP method (GET, POST, etc.)
* @param requestCallback object that prepares the request * @param requestCallback object that prepares the request
* @param responseExtractor object that extracts the return value from the response * @param responseExtractor object that extracts the return value from the response
* @param <T> the type of the return value * @param <T> the type of the return value

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2019 the original author or authors. * Copyright 2012-2021 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -15,7 +15,7 @@
*/ */
/** /**
* Classes and interfaces to allows random access to a block of data. * Classes and interfaces to allow random access to a block of data.
* *
* @see org.springframework.boot.loader.data.RandomAccessData * @see org.springframework.boot.loader.data.RandomAccessData
*/ */

@ -222,7 +222,7 @@ public class RepackageMojo extends AbstractPackagerMojo {
} }
private FileTime parseOutputTimestamp() { private FileTime parseOutputTimestamp() {
// Maven ignore a single-character timestamp as it is "useful to override a full // Maven ignores a single-character timestamp as it is "useful to override a full
// value during pom inheritance" // value during pom inheritance"
if (this.outputTimestamp == null || this.outputTimestamp.length() < 2) { if (this.outputTimestamp == null || this.outputTimestamp.length() < 2) {
return null; return null;

@ -229,7 +229,7 @@ public class SpringApplication {
/** /**
* Create a new {@link SpringApplication} instance. The application context will load * Create a new {@link SpringApplication} instance. The application context will load
* beans from the specified primary sources (see {@link SpringApplication class-level} * beans from the specified primary sources (see {@link SpringApplication class-level}
* documentation for details. The instance can be customized before calling * documentation for details). The instance can be customized before calling
* {@link #run(String...)}. * {@link #run(String...)}.
* @param primarySources the primary bean sources * @param primarySources the primary bean sources
* @see #run(Class, String[]) * @see #run(Class, String[])
@ -243,7 +243,7 @@ public class SpringApplication {
/** /**
* Create a new {@link SpringApplication} instance. The application context will load * Create a new {@link SpringApplication} instance. The application context will load
* beans from the specified primary sources (see {@link SpringApplication class-level} * beans from the specified primary sources (see {@link SpringApplication class-level}
* documentation for details. The instance can be customized before calling * documentation for details). The instance can be customized before calling
* {@link #run(String...)}. * {@link #run(String...)}.
* @param resourceLoader the resource loader to use * @param resourceLoader the resource loader to use
* @param primarySources the primary bean sources * @param primarySources the primary bean sources
@ -675,7 +675,7 @@ public class SpringApplication {
/** /**
* Either the ClassLoader that will be used in the ApplicationContext (if * Either the ClassLoader that will be used in the ApplicationContext (if
* {@link #setResourceLoader(ResourceLoader) resourceLoader} is set, or the context * {@link #setResourceLoader(ResourceLoader) resourceLoader} is set), or the context
* class loader (if not null), or the loader of the Spring {@link ClassUtils} class. * class loader (if not null), or the loader of the Spring {@link ClassUtils} class.
* @return a ClassLoader (never null) * @return a ClassLoader (never null)
*/ */

@ -20,7 +20,7 @@ import org.springframework.context.ApplicationContext;
/** /**
* Interface that can be used to add or remove code that should run when the JVM is * Interface that can be used to add or remove code that should run when the JVM is
* shutdown. Shutdown handers are similar to JVM {@link Runtime#addShutdownHook(Thread) * shutdown. Shutdown handlers are similar to JVM {@link Runtime#addShutdownHook(Thread)
* shutdown hooks} except that they run sequentially rather than concurrently. * shutdown hooks} except that they run sequentially rather than concurrently.
* <p> * <p>
* Shutdown handlers are guaranteed to be called only after registered * Shutdown handlers are guaranteed to be called only after registered

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2020 the original author or authors. * Copyright 2012-2021 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -53,7 +53,7 @@ public interface ApplicationAvailability {
* @param <S> the state type * @param <S> the state type
* @param stateType the state type * @param stateType the state type
* @param defaultState the default state to return if no event of the given type has * @param defaultState the default state to return if no event of the given type has
* been published yet (must not be {@code null}. * been published yet (must not be {@code null}).
* @return the readiness state * @return the readiness state
* @see #getState(Class) * @see #getState(Class)
*/ */

@ -85,7 +85,7 @@ class ConfigDataEnvironmentContributors implements Iterable<ConfigDataEnvironmen
* {@link ConfigDataEnvironmentContributors} instance. * {@link ConfigDataEnvironmentContributors} instance.
* @param importer the importer used to import {@link ConfigData} * @param importer the importer used to import {@link ConfigData}
* @param activationContext the current activation context or {@code null} if the * @param activationContext the current activation context or {@code null} if the
* context has not get been created * context has not yet been created
* @return a {@link ConfigDataEnvironmentContributors} instance with all relevant * @return a {@link ConfigDataEnvironmentContributors} instance with all relevant
* imports have been processed * imports have been processed
*/ */

@ -63,7 +63,7 @@ public final class ConfigDataLocation implements OriginProvider {
/** /**
* Return the value of the location (always excluding any user specified * Return the value of the location (always excluding any user specified
* {@code optional:} prefix. * {@code optional:} prefix).
* @return the location value * @return the location value
*/ */
public String getValue() { public String getValue() {

@ -34,7 +34,7 @@ import org.springframework.util.StringUtils;
* equivalent. * equivalent.
* <p> * <p>
* The "{@code [}" and "{@code ]}" characters may be used to indicate an associative * The "{@code [}" and "{@code ]}" characters may be used to indicate an associative
* index(i.e. a {@link Map} key or a {@link Collection} index. Indexes names are not * index(i.e. a {@link Map} key or a {@link Collection} index). Indexes names are not
* restricted and are considered case-sensitive. * restricted and are considered case-sensitive.
* <p> * <p>
* Here are some typical examples: * Here are some typical examples:

@ -100,7 +100,8 @@ public class NettyReactiveWebServerFactory extends AbstractReactiveWebServerFact
} }
/** /**
* Add {@link NettyServerCustomizer}s that should applied while building the server. * Add {@link NettyServerCustomizer}s that should be applied while building the
* server.
* @param serverCustomizers the customizers to add * @param serverCustomizers the customizers to add
*/ */
public void addServerCustomizers(NettyServerCustomizer... serverCustomizers) { public void addServerCustomizers(NettyServerCustomizer... serverCustomizers) {

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2019 the original author or authors. * Copyright 2012-2021 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -40,7 +40,7 @@ import org.springframework.web.filter.DelegatingFilterProxy;
* <p> * <p>
* Registrations can be associated with {@link #setUrlPatterns URL patterns} and/or * Registrations can be associated with {@link #setUrlPatterns URL patterns} and/or
* servlets (either by {@link #setServletNames name} or via a * servlets (either by {@link #setServletNames name} or via a
* {@link #setServletRegistrationBeans ServletRegistrationBean}s. When no URL pattern or * {@link #setServletRegistrationBeans ServletRegistrationBean}s). When no URL pattern or
* servlets are specified the filter will be associated to '/*'. The targetBeanName will * servlets are specified the filter will be associated to '/*'. The targetBeanName will
* be used as the filter name if not otherwise specified. * be used as the filter name if not otherwise specified.
* *

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2019 the original author or authors. * Copyright 2012-2021 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -29,7 +29,7 @@ import org.springframework.util.Assert;
* The {@link #setFilter(Filter) Filter} must be specified before calling * The {@link #setFilter(Filter) Filter} must be specified before calling
* {@link #onStartup(ServletContext)}. Registrations can be associated with * {@link #onStartup(ServletContext)}. Registrations can be associated with
* {@link #setUrlPatterns URL patterns} and/or servlets (either by {@link #setServletNames * {@link #setUrlPatterns URL patterns} and/or servlets (either by {@link #setServletNames
* name} or via a {@link #setServletRegistrationBeans ServletRegistrationBean}s. When no * name} or via a {@link #setServletRegistrationBeans ServletRegistrationBean}s). When no
* URL pattern or servlets are specified the filter will be associated to '/*'. The filter * URL pattern or servlets are specified the filter will be associated to '/*'. The filter
* name will be deduced if not specified. * name will be deduced if not specified.
* *

@ -251,7 +251,7 @@ class ConfigFileApplicationListenerTests {
@Test @Test
void randomValue() { void randomValue() {
// dont need // don't need
this.initializer.postProcessEnvironment(this.environment, this.application); this.initializer.postProcessEnvironment(this.environment, this.application);
String property = this.environment.getProperty("random.value"); String property = this.environment.getProperty("random.value");
assertThat(property).isNotNull(); assertThat(property).isNotNull();

@ -163,7 +163,7 @@ class SpringConfigurationPropertySourcesTests {
} }
@Test // gh-21659 @Test // gh-21659
void shouldAdaptRandomePropertySource() { void shouldAdaptRandomPropertySource() {
MutablePropertySources sources = new MutablePropertySources(); MutablePropertySources sources = new MutablePropertySources();
sources.addFirst(new RandomValuePropertySource()); sources.addFirst(new RandomValuePropertySource());
Iterator<ConfigurationPropertySource> iterator = new SpringConfigurationPropertySources(sources).iterator(); Iterator<ConfigurationPropertySource> iterator = new SpringConfigurationPropertySources(sources).iterator();

@ -43,7 +43,7 @@ class DataSourceScriptDatabaseInitializerTests
private final HikariDataSource embeddedDataSource = DataSourceBuilder.create().type(HikariDataSource.class) private final HikariDataSource embeddedDataSource = DataSourceBuilder.create().type(HikariDataSource.class)
.url("jdbc:h2:mem:" + UUID.randomUUID()).build(); .url("jdbc:h2:mem:" + UUID.randomUUID()).build();
private final HikariDataSource standloneDataSource = DataSourceBuilder.create().type(HikariDataSource.class) private final HikariDataSource standaloneDataSource = DataSourceBuilder.create().type(HikariDataSource.class)
.url("jdbc:h2:file:" + new BuildOutput(DataSourceScriptDatabaseInitializerTests.class).getRootLocation() .url("jdbc:h2:file:" + new BuildOutput(DataSourceScriptDatabaseInitializerTests.class).getRootLocation()
.getAbsolutePath() + "/" + UUID.randomUUID()) .getAbsolutePath() + "/" + UUID.randomUUID())
.build(); .build();
@ -51,7 +51,7 @@ class DataSourceScriptDatabaseInitializerTests
@AfterEach @AfterEach
void closeDataSource() { void closeDataSource() {
this.embeddedDataSource.close(); this.embeddedDataSource.close();
this.standloneDataSource.close(); this.standaloneDataSource.close();
} }
@Test @Test
@ -70,7 +70,7 @@ class DataSourceScriptDatabaseInitializerTests
@Override @Override
protected DataSourceScriptDatabaseInitializer createStandaloneDatabaseInitializer( protected DataSourceScriptDatabaseInitializer createStandaloneDatabaseInitializer(
DatabaseInitializationSettings settings) { DatabaseInitializationSettings settings) {
return new DataSourceScriptDatabaseInitializer(this.standloneDataSource, settings); return new DataSourceScriptDatabaseInitializer(this.standaloneDataSource, settings);
} }
@Override @Override
@ -80,7 +80,7 @@ class DataSourceScriptDatabaseInitializerTests
@Override @Override
protected int numberOfStandaloneRows(String sql) { protected int numberOfStandaloneRows(String sql) {
return numberOfRows(this.standloneDataSource, sql); return numberOfRows(this.standaloneDataSource, sql);
} }
private int numberOfRows(DataSource dataSource, String sql) { private int numberOfRows(DataSource dataSource, String sql) {

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2020 the original author or authors. * Copyright 2012-2021 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -180,7 +180,7 @@ class OriginTrackedResourceTests {
} }
@Test @Test
void ofWhenWritableReturnsOriginTrackedWrtiableResource() { void ofWhenWritableReturnsOriginTrackedWritableResource() {
Resource resource = mock(WritableResource.class); Resource resource = mock(WritableResource.class);
Resource tracked = OriginTrackedResource.of(resource, this.origin); Resource tracked = OriginTrackedResource.of(resource, this.origin);
assertThat(tracked).isInstanceOf(WritableResource.class) assertThat(tracked).isInstanceOf(WritableResource.class)

Loading…
Cancel
Save