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:
@@ -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();
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user