Some minor changes based on feedback
This commit is contained in:
@@ -16,6 +16,9 @@
|
||||
|
||||
package org.springframework.cloud.contract.spec.internal;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
* Contains Http Methods.
|
||||
*
|
||||
@@ -25,6 +28,13 @@ package org.springframework.cloud.contract.spec.internal;
|
||||
*/
|
||||
public final class HttpMethods {
|
||||
|
||||
private static final Log log = LogFactory.getLog(HttpMethods.class);
|
||||
|
||||
public HttpMethods() {
|
||||
log.warn(
|
||||
"WARNING: HttpMethods shouldn't be instantiated. Use its static methods instead.");
|
||||
}
|
||||
|
||||
/**
|
||||
* The HTTP {@code GET} method.
|
||||
*/
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
|
||||
package org.springframework.cloud.contract.spec.internal;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
* Helper functions for HTTP statuses.
|
||||
*
|
||||
@@ -25,6 +28,13 @@ package org.springframework.cloud.contract.spec.internal;
|
||||
*/
|
||||
public final class HttpStatus {
|
||||
|
||||
private static final Log log = LogFactory.getLog(HttpStatus.class);
|
||||
|
||||
public HttpStatus() {
|
||||
log.warn(
|
||||
"WARNING: HttpStatus shouldn't be instantiated. Use its static methods instead.");
|
||||
}
|
||||
|
||||
/**
|
||||
* The HTTP {@code 100 Continue} status code.
|
||||
* @see <a href="https://tools.ietf.org/html/rfc7231#section-6.2.1">HTTP/1.1:
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
|
||||
package org.springframework.cloud.contract.spec.internal;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
* Contains most commonly used media types.
|
||||
*
|
||||
@@ -25,6 +28,13 @@ package org.springframework.cloud.contract.spec.internal;
|
||||
*/
|
||||
public class MediaTypes {
|
||||
|
||||
private static final Log log = LogFactory.getLog(MediaTypes.class);
|
||||
|
||||
public MediaTypes() {
|
||||
log.warn(
|
||||
"WARNING: MediaTypes shouldn't be instantiated. Use its static methods instead.");
|
||||
}
|
||||
|
||||
/**
|
||||
* Public constant for that includes all media ranges (i.e. "*/*").
|
||||
*/
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
|
||||
package org.springframework.cloud.contract.spec.internal;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
* Contains most commonly used messaging headers.
|
||||
*
|
||||
@@ -25,6 +28,13 @@ package org.springframework.cloud.contract.spec.internal;
|
||||
*/
|
||||
public class MessagingHeaders {
|
||||
|
||||
private static final Log log = LogFactory.getLog(MessagingHeaders.class);
|
||||
|
||||
public MessagingHeaders() {
|
||||
log.warn(
|
||||
"WARNING: MessagingHeaders shouldn't be instantiated. Use its static methods instead.");
|
||||
}
|
||||
|
||||
/**
|
||||
* The Content-Type header name of a message.
|
||||
*/
|
||||
|
||||
@@ -20,6 +20,9 @@ import java.util.Arrays;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
* Contains most common regular expression patterns.
|
||||
*
|
||||
@@ -29,8 +32,11 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
public final class RegexPatterns {
|
||||
|
||||
private static final Log log = LogFactory.getLog(RegexPatterns.class);
|
||||
|
||||
public RegexPatterns() {
|
||||
System.out.println("WARNING: RegexPatterns shouldn't be instantiated");
|
||||
log.warn(
|
||||
"WARNING: RegexPatterns shouldn't be instantiated. Use its static methods instead.");
|
||||
}
|
||||
|
||||
protected static final Pattern TRUE_OR_FALSE = Pattern.compile("(true|false)");
|
||||
|
||||
Reference in New Issue
Block a user