Hide utility class constructors

Update all utility classes so that they have a private constructor. This
prevents users from accidentally creating an instance, when they should
just use the static methods directly.

Issue gh-8945
This commit is contained in:
Phillip Webb
2020-07-29 15:15:15 -07:00
committed by Rob Winch
parent 8559447357
commit 01d90c9881
61 changed files with 213 additions and 52 deletions

View File

@@ -34,7 +34,10 @@ import org.springframework.web.server.WebFilter;
* @since 5.0
*
*/
public class WebTestClientBuilder {
public final class WebTestClientBuilder {
private WebTestClientBuilder() {
}
public static Builder bindToWebFilters(WebFilter... webFilters) {
return WebTestClient.bindToController(new Http200RestController()).webFilter(webFilters).configureClient();

View File

@@ -25,7 +25,10 @@ import java.security.cert.X509Certificate;
*
* @author Luke Taylor
*/
public class X509TestUtils {
public final class X509TestUtils {
private X509TestUtils() {
}
/**
* Builds an X.509 certificate. In human-readable form it is: