Skip to content

Commit d7aa76b

Browse files
committed
HV-1513 Renaming static final logger fields from "log" to "LOG"
1 parent 7c0afb1 commit d7aa76b

File tree

66 files changed

+307
-307
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+307
-307
lines changed

engine/src/main/java/org/hibernate/validator/internal/cfg/context/DefaultConstraintMapping.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
*/
3939
public class DefaultConstraintMapping implements ConstraintMapping {
4040

41-
private static final Log log = LoggerFactory.make( MethodHandles.lookup() );
41+
private static final Log LOG = LoggerFactory.make( MethodHandles.lookup() );
4242

4343
private final AnnotationProcessingOptionsImpl annotationProcessingOptions;
4444
private final Set<Class<?>> configuredTypes;
@@ -59,7 +59,7 @@ public final <C> TypeConstraintMappingContext<C> type(Class<C> type) {
5959
Contracts.assertNotNull( type, MESSAGES.beanTypeMustNotBeNull() );
6060

6161
if ( configuredTypes.contains( type ) ) {
62-
throw log.getBeanClassHasAlreadyBeConfiguredViaProgrammaticApiException( type );
62+
throw LOG.getBeanClassHasAlreadyBeConfiguredViaProgrammaticApiException( type );
6363
}
6464

6565
TypeConstraintMappingContextImpl<C> typeContext = new TypeConstraintMappingContextImpl<>( this, type );
@@ -105,7 +105,7 @@ public <A extends Annotation> ConstraintDefinitionContext<A> constraintDefinitio
105105

106106
if ( definedConstraints.contains( annotationClass ) ) {
107107
// Fail fast for easy-to-detect definition conflicts; other conflicts are handled in ValidatorFactoryImpl
108-
throw log.getConstraintHasAlreadyBeenConfiguredViaProgrammaticApiException( annotationClass );
108+
throw LOG.getConstraintHasAlreadyBeenConfiguredViaProgrammaticApiException( annotationClass );
109109
}
110110

111111
ConstraintDefinitionContextImpl<A> constraintContext = new ConstraintDefinitionContextImpl<>( this, annotationClass );

engine/src/main/java/org/hibernate/validator/internal/cfg/context/ExecutableConstraintMappingContextImpl.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
*/
3939
abstract class ExecutableConstraintMappingContextImpl {
4040

41-
private static final Log log = LoggerFactory.make( MethodHandles.lookup() );
41+
private static final Log LOG = LoggerFactory.make( MethodHandles.lookup() );
4242

4343
protected final TypeConstraintMappingContextImpl<?> typeContext;
4444
protected final Executable executable;
@@ -54,13 +54,13 @@ protected ExecutableConstraintMappingContextImpl(TypeConstraintMappingContextImp
5454

5555
public ParameterConstraintMappingContext parameter(int index) {
5656
if ( index < 0 || index >= executable.getParameterTypes().length ) {
57-
throw log.getInvalidExecutableParameterIndexException( executable, index );
57+
throw LOG.getInvalidExecutableParameterIndexException( executable, index );
5858
}
5959

6060
ParameterConstraintMappingContextImpl context = parameterContexts[index];
6161

6262
if ( context != null ) {
63-
throw log.getParameterHasAlreadyBeConfiguredViaProgrammaticApiException(
63+
throw LOG.getParameterHasAlreadyBeConfiguredViaProgrammaticApiException(
6464
typeContext.getBeanClass(),
6565
executable,
6666
index
@@ -74,7 +74,7 @@ public ParameterConstraintMappingContext parameter(int index) {
7474

7575
public CrossParameterConstraintMappingContext crossParameter() {
7676
if ( crossParameterContext != null ) {
77-
throw log.getCrossParameterElementHasAlreadyBeConfiguredViaProgrammaticApiException(
77+
throw LOG.getCrossParameterElementHasAlreadyBeConfiguredViaProgrammaticApiException(
7878
typeContext.getBeanClass(),
7979
executable
8080
);
@@ -86,7 +86,7 @@ public CrossParameterConstraintMappingContext crossParameter() {
8686

8787
public ReturnValueConstraintMappingContext returnValue() {
8888
if ( returnValueContext != null ) {
89-
throw log.getReturnValueHasAlreadyBeConfiguredViaProgrammaticApiException(
89+
throw LOG.getReturnValueHasAlreadyBeConfiguredViaProgrammaticApiException(
9090
typeContext.getBeanClass(),
9191
executable
9292
);

engine/src/main/java/org/hibernate/validator/internal/cfg/context/TypeConstraintMappingContextImpl.java

+9-9
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
public final class TypeConstraintMappingContextImpl<C> extends ConstraintMappingContextImplBase
5858
implements TypeConstraintMappingContext<C> {
5959

60-
private static final Log log = LoggerFactory.make( MethodHandles.lookup() );
60+
private static final Log LOG = LoggerFactory.make( MethodHandles.lookup() );
6161

6262
private final Class<C> beanClass;
6363

@@ -115,11 +115,11 @@ public PropertyConstraintMappingContext property(String property, ElementType el
115115
);
116116

117117
if ( member == null || member.getDeclaringClass() != beanClass ) {
118-
throw log.getUnableToFindPropertyWithAccessException( beanClass, property, elementType );
118+
throw LOG.getUnableToFindPropertyWithAccessException( beanClass, property, elementType );
119119
}
120120

121121
if ( configuredMembers.contains( member ) ) {
122-
throw log.getPropertyHasAlreadyBeConfiguredViaProgrammaticApiException( beanClass, property );
122+
throw LOG.getPropertyHasAlreadyBeConfiguredViaProgrammaticApiException( beanClass, property );
123123
}
124124

125125
PropertyConstraintMappingContextImpl context = new PropertyConstraintMappingContextImpl(
@@ -139,11 +139,11 @@ public MethodConstraintMappingContext method(String name, Class<?>... parameterT
139139
Method method = run( GetDeclaredMethod.action( beanClass, name, parameterTypes ) );
140140

141141
if ( method == null || method.getDeclaringClass() != beanClass ) {
142-
throw log.getBeanDoesNotContainMethodException( beanClass, name, Arrays.asList( parameterTypes ) );
142+
throw LOG.getBeanDoesNotContainMethodException( beanClass, name, Arrays.asList( parameterTypes ) );
143143
}
144144

145145
if ( configuredMembers.contains( method ) ) {
146-
throw log.getMethodHasAlreadyBeConfiguredViaProgrammaticApiException(
146+
throw LOG.getMethodHasAlreadyBeConfiguredViaProgrammaticApiException(
147147
beanClass,
148148
ExecutableHelper.getExecutableAsString( name, parameterTypes )
149149
);
@@ -161,14 +161,14 @@ public ConstructorConstraintMappingContext constructor(Class<?>... parameterType
161161
Constructor<C> constructor = run( GetDeclaredConstructor.action( beanClass, parameterTypes ) );
162162

163163
if ( constructor == null || constructor.getDeclaringClass() != beanClass ) {
164-
throw log.getBeanDoesNotContainConstructorException(
164+
throw LOG.getBeanDoesNotContainConstructorException(
165165
beanClass,
166166
Arrays.asList( parameterTypes )
167167
);
168168
}
169169

170170
if ( configuredMembers.contains( constructor ) ) {
171-
throw log.getConstructorHasAlreadyBeConfiguredViaProgrammaticApiException(
171+
throw LOG.getConstructorHasAlreadyBeConfiguredViaProgrammaticApiException(
172172
beanClass,
173173
ExecutableHelper.getExecutableAsString( beanClass.getSimpleName(), parameterTypes )
174174
);
@@ -252,11 +252,11 @@ private Member getMember(Class<?> clazz, String property, ElementType elementTyp
252252
Contracts.assertNotNull( clazz, MESSAGES.classCannotBeNull() );
253253

254254
if ( property == null || property.length() == 0 ) {
255-
throw log.getPropertyNameCannotBeNullOrEmptyException();
255+
throw LOG.getPropertyNameCannotBeNullOrEmptyException();
256256
}
257257

258258
if ( !( ElementType.FIELD.equals( elementType ) || ElementType.METHOD.equals( elementType ) ) ) {
259-
throw log.getElementTypeHasToBeFieldOrMethodException();
259+
throw LOG.getElementTypeHasToBeFieldOrMethodException();
260260
}
261261

262262
Member member = null;

engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/bv/DecimalMaxValidatorForCharSequence.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*/
2424
public class DecimalMaxValidatorForCharSequence implements ConstraintValidator<DecimalMax, CharSequence> {
2525

26-
private static final Log log = LoggerFactory.make( MethodHandles.lookup() );
26+
private static final Log LOG = LoggerFactory.make( MethodHandles.lookup() );
2727

2828
private BigDecimal maxValue;
2929
private boolean inclusive;
@@ -34,7 +34,7 @@ public void initialize(DecimalMax maxValue) {
3434
this.maxValue = new BigDecimal( maxValue.value() );
3535
}
3636
catch (NumberFormatException nfe) {
37-
throw log.getInvalidBigDecimalFormatException( maxValue.value(), nfe );
37+
throw LOG.getInvalidBigDecimalFormatException( maxValue.value(), nfe );
3838
}
3939
this.inclusive = maxValue.inclusive();
4040
}

engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/bv/DecimalMinValidatorForCharSequence.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*/
2424
public class DecimalMinValidatorForCharSequence implements ConstraintValidator<DecimalMin, CharSequence> {
2525

26-
private static final Log log = LoggerFactory.make( MethodHandles.lookup() );
26+
private static final Log LOG = LoggerFactory.make( MethodHandles.lookup() );
2727

2828
private BigDecimal minValue;
2929
private boolean inclusive;
@@ -34,7 +34,7 @@ public void initialize(DecimalMin minValue) {
3434
this.minValue = new BigDecimal( minValue.value() );
3535
}
3636
catch (NumberFormatException nfe) {
37-
throw log.getInvalidBigDecimalFormatException( minValue.value(), nfe );
37+
throw LOG.getInvalidBigDecimalFormatException( minValue.value(), nfe );
3838
}
3939
this.inclusive = minValue.inclusive();
4040
}

engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/bv/DigitsValidatorForCharSequence.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*/
2525
public class DigitsValidatorForCharSequence implements ConstraintValidator<Digits, CharSequence> {
2626

27-
private static final Log log = LoggerFactory.make( MethodHandles.lookup() );
27+
private static final Log LOG = LoggerFactory.make( MethodHandles.lookup() );
2828

2929
private int maxIntegerLength;
3030
private int maxFractionLength;
@@ -67,10 +67,10 @@ private BigDecimal getBigDecimalValue(CharSequence charSequence) {
6767

6868
private void validateParameters() {
6969
if ( maxIntegerLength < 0 ) {
70-
throw log.getInvalidLengthForIntegerPartException();
70+
throw LOG.getInvalidLengthForIntegerPartException();
7171
}
7272
if ( maxFractionLength < 0 ) {
73-
throw log.getInvalidLengthForFractionPartException();
73+
throw LOG.getInvalidLengthForFractionPartException();
7474
}
7575
}
7676
}

engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/bv/DigitsValidatorForNumber.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*/
2525
public class DigitsValidatorForNumber implements ConstraintValidator<Digits, Number> {
2626

27-
private static final Log log = LoggerFactory.make( MethodHandles.lookup() );
27+
private static final Log LOG = LoggerFactory.make( MethodHandles.lookup() );
2828

2929
private int maxIntegerLength;
3030
private int maxFractionLength;
@@ -59,10 +59,10 @@ public boolean isValid(Number num, ConstraintValidatorContext constraintValidato
5959

6060
private void validateParameters() {
6161
if ( maxIntegerLength < 0 ) {
62-
throw log.getInvalidLengthForIntegerPartException();
62+
throw LOG.getInvalidLengthForIntegerPartException();
6363
}
6464
if ( maxFractionLength < 0 ) {
65-
throw log.getInvalidLengthForFractionPartException();
65+
throw LOG.getInvalidLengthForFractionPartException();
6666
}
6767
}
6868
}

engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/bv/PatternValidator.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*/
2424
public class PatternValidator implements ConstraintValidator<Pattern, CharSequence> {
2525

26-
private static final Log log = LoggerFactory.make( MethodHandles.lookup() );
26+
private static final Log LOG = LoggerFactory.make( MethodHandles.lookup() );
2727

2828
private java.util.regex.Pattern pattern;
2929
private String escapedRegexp;
@@ -40,7 +40,7 @@ public void initialize(Pattern parameters) {
4040
pattern = java.util.regex.Pattern.compile( parameters.regexp(), intFlag );
4141
}
4242
catch (PatternSyntaxException e) {
43-
throw log.getInvalidRegularExpressionException( e );
43+
throw LOG.getInvalidRegularExpressionException( e );
4444
}
4545

4646
escapedRegexp = InterpolationHelper.escapeMessageParameter( parameters.regexp() );

engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/bv/money/DecimalMaxValidatorForMonetaryAmount.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*/
2626
public class DecimalMaxValidatorForMonetaryAmount implements ConstraintValidator<DecimalMax, MonetaryAmount> {
2727

28-
private static final Log log = LoggerFactory.make( MethodHandles.lookup() );
28+
private static final Log LOG = LoggerFactory.make( MethodHandles.lookup() );
2929

3030
private BigDecimal maxValue;
3131
private boolean inclusive;
@@ -36,7 +36,7 @@ public void initialize(DecimalMax maxValue) {
3636
this.maxValue = new BigDecimal( maxValue.value() );
3737
}
3838
catch (NumberFormatException nfe) {
39-
throw log.getInvalidBigDecimalFormatException( maxValue.value(), nfe );
39+
throw LOG.getInvalidBigDecimalFormatException( maxValue.value(), nfe );
4040
}
4141
this.inclusive = maxValue.inclusive();
4242
}

engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/bv/money/DecimalMinValidatorForMonetaryAmount.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*/
2626
public class DecimalMinValidatorForMonetaryAmount implements ConstraintValidator<DecimalMin, MonetaryAmount> {
2727

28-
private static final Log log = LoggerFactory.make( MethodHandles.lookup() );
28+
private static final Log LOG = LoggerFactory.make( MethodHandles.lookup() );
2929

3030
private BigDecimal minValue;
3131
private boolean inclusive;
@@ -36,7 +36,7 @@ public void initialize(DecimalMin minValue) {
3636
this.minValue = new BigDecimal( minValue.value() );
3737
}
3838
catch (NumberFormatException nfe) {
39-
throw log.getInvalidBigDecimalFormatException( minValue.value(), nfe );
39+
throw LOG.getInvalidBigDecimalFormatException( minValue.value(), nfe );
4040
}
4141
this.inclusive = minValue.inclusive();
4242
}

engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/bv/size/SizeValidatorForArray.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*/
2323
public class SizeValidatorForArray implements ConstraintValidator<Size, Object[]> {
2424

25-
private static final Log log = LoggerFactory.make( MethodHandles.lookup() );
25+
private static final Log LOG = LoggerFactory.make( MethodHandles.lookup() );
2626

2727
private int min;
2828
private int max;
@@ -54,13 +54,13 @@ public boolean isValid(Object[] array, ConstraintValidatorContext constraintVali
5454

5555
private void validateParameters() {
5656
if ( min < 0 ) {
57-
throw log.getMinCannotBeNegativeException();
57+
throw LOG.getMinCannotBeNegativeException();
5858
}
5959
if ( max < 0 ) {
60-
throw log.getMaxCannotBeNegativeException();
60+
throw LOG.getMaxCannotBeNegativeException();
6161
}
6262
if ( max < min ) {
63-
throw log.getLengthCannotBeNegativeException();
63+
throw LOG.getLengthCannotBeNegativeException();
6464
}
6565
}
6666
}

engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/bv/size/SizeValidatorForArraysOfPrimitives.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*/
2121
public abstract class SizeValidatorForArraysOfPrimitives {
2222

23-
private static final Log log = LoggerFactory.make( MethodHandles.lookup() );
23+
private static final Log LOG = LoggerFactory.make( MethodHandles.lookup() );
2424

2525
protected int min;
2626
protected int max;
@@ -33,13 +33,13 @@ public void initialize(Size parameters) {
3333

3434
private void validateParameters() {
3535
if ( min < 0 ) {
36-
throw log.getMinCannotBeNegativeException();
36+
throw LOG.getMinCannotBeNegativeException();
3737
}
3838
if ( max < 0 ) {
39-
throw log.getMaxCannotBeNegativeException();
39+
throw LOG.getMaxCannotBeNegativeException();
4040
}
4141
if ( max < min ) {
42-
throw log.getLengthCannotBeNegativeException();
42+
throw LOG.getLengthCannotBeNegativeException();
4343
}
4444
}
4545
}

engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/bv/size/SizeValidatorForCharSequence.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*/
2525
public class SizeValidatorForCharSequence implements ConstraintValidator<Size, CharSequence> {
2626

27-
private static final Log log = LoggerFactory.make( MethodHandles.lookup() );
27+
private static final Log LOG = LoggerFactory.make( MethodHandles.lookup() );
2828

2929
private int min;
3030
private int max;
@@ -56,13 +56,13 @@ public boolean isValid(CharSequence charSequence, ConstraintValidatorContext con
5656

5757
private void validateParameters() {
5858
if ( min < 0 ) {
59-
throw log.getMinCannotBeNegativeException();
59+
throw LOG.getMinCannotBeNegativeException();
6060
}
6161
if ( max < 0 ) {
62-
throw log.getMaxCannotBeNegativeException();
62+
throw LOG.getMaxCannotBeNegativeException();
6363
}
6464
if ( max < min ) {
65-
throw log.getLengthCannotBeNegativeException();
65+
throw LOG.getLengthCannotBeNegativeException();
6666
}
6767
}
6868
}

engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/bv/size/SizeValidatorForCollection.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*/
2323
public class SizeValidatorForCollection implements ConstraintValidator<Size, Collection<?>> {
2424

25-
private static final Log log = LoggerFactory.make( MethodHandles.lookup() );
25+
private static final Log LOG = LoggerFactory.make( MethodHandles.lookup() );
2626

2727
private int min;
2828
private int max;
@@ -55,13 +55,13 @@ public boolean isValid(Collection<?> collection, ConstraintValidatorContext cons
5555

5656
private void validateParameters() {
5757
if ( min < 0 ) {
58-
throw log.getMinCannotBeNegativeException();
58+
throw LOG.getMinCannotBeNegativeException();
5959
}
6060
if ( max < 0 ) {
61-
throw log.getMaxCannotBeNegativeException();
61+
throw LOG.getMaxCannotBeNegativeException();
6262
}
6363
if ( max < min ) {
64-
throw log.getLengthCannotBeNegativeException();
64+
throw LOG.getLengthCannotBeNegativeException();
6565
}
6666
}
6767
}

0 commit comments

Comments
 (0)