Author: epbernard
Date: 2007-10-29 17:28:37 -0400 (Mon, 29 Oct 2007)
New Revision: 14157
Modified:
annotations/trunk/src/java/org/hibernate/cfg/AnnotationConfiguration.java
Log:
ANN-671 log Validator not present only once
Modified: annotations/trunk/src/java/org/hibernate/cfg/AnnotationConfiguration.java
===================================================================
--- annotations/trunk/src/java/org/hibernate/cfg/AnnotationConfiguration.java 2007-10-28
16:51:03 UTC (rev 14156)
+++ annotations/trunk/src/java/org/hibernate/cfg/AnnotationConfiguration.java 2007-10-29
21:28:37 UTC (rev 14157)
@@ -93,6 +93,7 @@
private boolean inSecondPass = false;
private transient ReflectionManager reflectionManager;
private boolean isDefaultProcessed = false;
+ private boolean isValidatorNotPresentLogged;
public AnnotationConfiguration() {
super();
@@ -338,6 +339,7 @@
"true" )
.equalsIgnoreCase( "true" );
+ //TODO search for the method only once and cache it?
Constructor validatorCtr = null;
Method applyMethod = null;
try {
@@ -350,7 +352,10 @@
applyMethod = classValidator.getMethod( "apply", PersistentClass.class );
}
catch (ClassNotFoundException e) {
- log.info( "Hibernate Validator not found: ignoring" );
+ if ( !isValidatorNotPresentLogged ) {
+ log.info( "Hibernate Validator not found: ignoring" );
+ }
+ isValidatorNotPresentLogged = true;
}
catch (NoSuchMethodException e) {
throw new AnnotationException( e );
Show replies by date