Skip to content

Commit

Permalink
Fix issue #25.
Browse files Browse the repository at this point in the history
Purpose: Degrade log level from warn to debug in annotation based validator cache.
Link: #25
  • Loading branch information
xu.zhang committed Sep 12, 2017
1 parent c52bed2 commit 95665ad
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions fluent-validator-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
<groupId>com.baidu.unbiz</groupId>
<artifactId>fluent-validator-parent</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.0.8</version>
<version>1.0.9</version>
</parent>

<groupId>com.baidu.unbiz</groupId>
<artifactId>fluent-validator-demo</artifactId>
<version>1.0.8</version>
<version>1.0.9</version>
<packaging>jar</packaging>
<name>fluent-validator-demo</name>
<description>A simple Java validation framework leveraging fluent interface style and JSR 303 specification
Expand All @@ -22,7 +22,7 @@
<dependency>
<groupId>com.baidu.unbiz</groupId>
<artifactId>fluent-validator-spring</artifactId>
<version>1.0.8</version>
<version>1.0.9</version>
</dependency>

<dependency>
Expand Down
6 changes: 3 additions & 3 deletions fluent-validator-jsr303/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<groupId>com.baidu.unbiz</groupId>
<artifactId>fluent-validator-parent</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.0.8</version>
<version>1.0.9</version>
</parent>

<groupId>com.baidu.unbiz</groupId>
<artifactId>fluent-validator-jsr303</artifactId>
<version>1.0.8</version>
<version>1.0.9</version>
<packaging>jar</packaging>
<name>fluent-validator-jsr303</name>
<description>A simple Java validation framework leveraging fluent interface style and JSR 303 specification
Expand All @@ -21,7 +21,7 @@
<dependency>
<groupId>com.baidu.unbiz</groupId>
<artifactId>fluent-validator</artifactId>
<version>1.0.8</version>
<version>1.0.9</version>
</dependency>

<dependency>
Expand Down
8 changes: 4 additions & 4 deletions fluent-validator-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<groupId>com.baidu.unbiz</groupId>
<artifactId>fluent-validator-parent</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.0.8</version>
<version>1.0.9</version>
</parent>

<groupId>com.baidu.unbiz</groupId>
<artifactId>fluent-validator-spring</artifactId>
<version>1.0.8</version>
<version>1.0.9</version>
<packaging>jar</packaging>
<name>fluent-validator-spring</name>
<description>A simple Java validation framework leveraging fluent interface style and JSR 303 specification
Expand All @@ -21,13 +21,13 @@
<dependency>
<groupId>com.baidu.unbiz</groupId>
<artifactId>fluent-validator</artifactId>
<version>1.0.8</version>
<version>1.0.9</version>
</dependency>

<dependency>
<groupId>com.baidu.unbiz</groupId>
<artifactId>fluent-validator-jsr303</artifactId>
<version>1.0.8</version>
<version>1.0.9</version>
</dependency>

<dependency>
Expand Down
4 changes: 2 additions & 2 deletions fluent-validator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<groupId>com.baidu.unbiz</groupId>
<artifactId>fluent-validator-parent</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.0.8</version>
<version>1.0.9</version>
</parent>

<groupId>com.baidu.unbiz</groupId>
<artifactId>fluent-validator</artifactId>
<version>1.0.8</version>
<version>1.0.9</version>
<packaging>jar</packaging>
<name>fluent-validator</name>
<description>A simple Java validation framework leveraging fluent interface style and JSR 303 specification
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private static void addByClass(Registry registry, Class<?> clazz) {
List<AnnotationValidator> annotationValidators = getAllAnnotationValidators(registry, clazz);

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

if (CollectionUtil.isEmpty(validators)) {
LOGGER.warn(String.format("Annotation-based validation enabled but none of the validators is "
LOGGER.debug(String.format("Annotation-based validation enabled but none of the validators is "
+ "applicable for %s#%s", clazz.getSimpleName(), field.getName()));
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.baidu.unbiz</groupId>
<artifactId>fluent-validator-parent</artifactId>
<version>1.0.8</version>
<version>1.0.9</version>
<name>fluent-validator-parent</name>
<packaging>pom</packaging>
<description>A simple Java validation framework leveraging fluent interface style and JSR 303 specification
Expand Down

1 comment on commit 95665ad

@neoremind
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ddacxhs I have degrade log level from warn to debug. Please review.

Please sign in to comment.