Skip to content

Commit 95665ad

Browse files
author
xu.zhang
committed
Fix issue neoremind#25.
Purpose: Degrade log level from warn to debug in annotation based validator cache. Link: neoremind#25
1 parent c52bed2 commit 95665ad

6 files changed

Lines changed: 16 additions & 16 deletions

File tree

fluent-validator-demo/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
<groupId>com.baidu.unbiz</groupId>
88
<artifactId>fluent-validator-parent</artifactId>
99
<relativePath>../pom.xml</relativePath>
10-
<version>1.0.8</version>
10+
<version>1.0.9</version>
1111
</parent>
1212

1313
<groupId>com.baidu.unbiz</groupId>
1414
<artifactId>fluent-validator-demo</artifactId>
15-
<version>1.0.8</version>
15+
<version>1.0.9</version>
1616
<packaging>jar</packaging>
1717
<name>fluent-validator-demo</name>
1818
<description>A simple Java validation framework leveraging fluent interface style and JSR 303 specification
@@ -22,7 +22,7 @@
2222
<dependency>
2323
<groupId>com.baidu.unbiz</groupId>
2424
<artifactId>fluent-validator-spring</artifactId>
25-
<version>1.0.8</version>
25+
<version>1.0.9</version>
2626
</dependency>
2727

2828
<dependency>

fluent-validator-jsr303/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
<groupId>com.baidu.unbiz</groupId>
77
<artifactId>fluent-validator-parent</artifactId>
88
<relativePath>../pom.xml</relativePath>
9-
<version>1.0.8</version>
9+
<version>1.0.9</version>
1010
</parent>
1111

1212
<groupId>com.baidu.unbiz</groupId>
1313
<artifactId>fluent-validator-jsr303</artifactId>
14-
<version>1.0.8</version>
14+
<version>1.0.9</version>
1515
<packaging>jar</packaging>
1616
<name>fluent-validator-jsr303</name>
1717
<description>A simple Java validation framework leveraging fluent interface style and JSR 303 specification
@@ -21,7 +21,7 @@
2121
<dependency>
2222
<groupId>com.baidu.unbiz</groupId>
2323
<artifactId>fluent-validator</artifactId>
24-
<version>1.0.8</version>
24+
<version>1.0.9</version>
2525
</dependency>
2626

2727
<dependency>

fluent-validator-spring/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
<groupId>com.baidu.unbiz</groupId>
77
<artifactId>fluent-validator-parent</artifactId>
88
<relativePath>../pom.xml</relativePath>
9-
<version>1.0.8</version>
9+
<version>1.0.9</version>
1010
</parent>
1111

1212
<groupId>com.baidu.unbiz</groupId>
1313
<artifactId>fluent-validator-spring</artifactId>
14-
<version>1.0.8</version>
14+
<version>1.0.9</version>
1515
<packaging>jar</packaging>
1616
<name>fluent-validator-spring</name>
1717
<description>A simple Java validation framework leveraging fluent interface style and JSR 303 specification
@@ -21,13 +21,13 @@
2121
<dependency>
2222
<groupId>com.baidu.unbiz</groupId>
2323
<artifactId>fluent-validator</artifactId>
24-
<version>1.0.8</version>
24+
<version>1.0.9</version>
2525
</dependency>
2626

2727
<dependency>
2828
<groupId>com.baidu.unbiz</groupId>
2929
<artifactId>fluent-validator-jsr303</artifactId>
30-
<version>1.0.8</version>
30+
<version>1.0.9</version>
3131
</dependency>
3232

3333
<dependency>

fluent-validator/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
<groupId>com.baidu.unbiz</groupId>
77
<artifactId>fluent-validator-parent</artifactId>
88
<relativePath>../pom.xml</relativePath>
9-
<version>1.0.8</version>
9+
<version>1.0.9</version>
1010
</parent>
1111

1212
<groupId>com.baidu.unbiz</groupId>
1313
<artifactId>fluent-validator</artifactId>
14-
<version>1.0.8</version>
14+
<version>1.0.9</version>
1515
<packaging>jar</packaging>
1616
<name>fluent-validator</name>
1717
<description>A simple Java validation framework leveraging fluent interface style and JSR 303 specification

fluent-validator/src/main/java/com/baidu/unbiz/fluentvalidator/AnnotationValidatorCache.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ private static void addByClass(Registry registry, Class<?> clazz) {
8080
List<AnnotationValidator> annotationValidators = getAllAnnotationValidators(registry, clazz);
8181

8282
if (CollectionUtil.isEmpty(annotationValidators)) {
83-
LOGGER.warn(String.format("Annotation-based validation enabled for %s, and to-do validators are empty",
83+
LOGGER.debug(String.format("Annotation-based validation enabled for %s, and to-do validators are empty",
8484
clazz.getSimpleName()));
8585
} else {
8686
CLASS_2_ANNOTATION_VALIDATOR_MAP.putIfAbsent(clazz, annotationValidators);
@@ -112,7 +112,7 @@ private static List<AnnotationValidator> getAllAnnotationValidators(Registry reg
112112
Class<? extends Validator>[] validatorClasses = fluentValidateAnnt.value();
113113
Class<?>[] groups = fluentValidateAnnt.groups();
114114
if (validatorClasses == null || validatorClasses.length == 0) {
115-
LOGGER.warn(String.format("No validator annotation bound %s#%s", clazz.getSimpleName(),
115+
LOGGER.debug(String.format("No validator annotation bound %s#%s", clazz.getSimpleName(),
116116
field.getName()));
117117
continue;
118118
}
@@ -144,7 +144,7 @@ private static List<AnnotationValidator> getAllAnnotationValidators(Registry reg
144144
}
145145

146146
if (CollectionUtil.isEmpty(validators)) {
147-
LOGGER.warn(String.format("Annotation-based validation enabled but none of the validators is "
147+
LOGGER.debug(String.format("Annotation-based validation enabled but none of the validators is "
148148
+ "applicable for %s#%s", clazz.getSimpleName(), field.getName()));
149149
continue;
150150
}

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55
<groupId>com.baidu.unbiz</groupId>
66
<artifactId>fluent-validator-parent</artifactId>
7-
<version>1.0.8</version>
7+
<version>1.0.9</version>
88
<name>fluent-validator-parent</name>
99
<packaging>pom</packaging>
1010
<description>A simple Java validation framework leveraging fluent interface style and JSR 303 specification

0 commit comments

Comments
 (0)