Modified:
struts/struts2/trunk/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/DefaultOValValidationManager.java
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/DefaultOValValidationManager.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==
---
struts/struts2/trunk/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/DefaultOValValidationManager.java
(original)
+++
struts/struts2/trunk/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/DefaultOValValidationManager.java
Tue May 3 17:53:55 2011
@@ -55,8 +55,9 @@ public class DefaultOValValidationManage
configurers.add(annotationsConfigurer);
if (validateJPAAnnotations) {
-if (LOG.isDebugEnabled())
+if (LOG.isDebugEnabled()) {
LOG.debug("Adding support for JPA annotations validations in
OVal");
+}
configurers.add(new JPAAnnotationsConfigurer());
}
}
@@ -139,8 +140,9 @@ public class DefaultOValValidationManage
is = FileManager.loadFile(fileName, clazz);
if (is != null) {
-if (LOG.isDebugEnabled())
+if (LOG.isDebugEnabled()) {
LOG.debug("Loading validation xml file [#0]",
fileName);
+}
XMLConfigurer configurer = new XMLConfigurer();
configurer.fromXML(is);
validatorFileCache.put(fileName, configurer);
@@ -161,4 +163,4 @@ public class DefaultOValValidationManage
return null;
}
-}
\ No newline at end of file
+}
Modified:
struts/struts2/trunk/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/OValValidationInterceptor.java
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/OValValidationInterceptor.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==
---
struts/struts2/trunk/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/OValValidationInterceptor.java
(original)
+++
struts/struts2/trunk/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/OValValidationInterceptor.java
Tue May 3 17:53:55 2011
@@ -128,7 +128,9 @@ public class OValValidationInterceptor e
} catch (Exception e) {
// If any exception occurred while doing reflection, we want
// validate() to be executed
-LOG.warn("An exception occured while executing the prefix
method", e);
+if (LOG.isWarnEnabled()) {
+LOG.warn("An exception occured while executing the prefix
method", e);
+}
exception = e;
}
@@ -157,8 +159,9 @@ public class OValValidationInterceptor e
String[] profileNames = profiles.value();
if (profileNames != null && profileNames.length > 0) {
validator.disableAllProfiles();
-if (LOG.isDebugEnabled())
+if (LOG.isDebugEnabled()) {
LOG.debug("Enabling profiles [#0]",
StringUtils.join(profileNames, ","));
+}
for (String profileName : profileNames)
validator.enableProfile(profileName);
}
@@ -187,7 +190,9 @@ public class OValValidationInterceptor e
}
if (isActionError(violation)) {
+if (LOG.isDebugEnabled()) {
LOG.debug("Adding action error '#0'", message);
+}
validatorContext.addActionError(message);
} else {
ValidationError validationError =
buildValidationError(violation, message);
@@ -198,7 +203,9 @@ public class OValValidationInterceptor e
fieldName = parentFieldname + "." + fieldName;
}
-LOG.debug("Adding field error [#0] with message '#1'",
fieldName, validationError.getMessage());
+if (LOG.isDebugEnabled()) {
+ LOG.debug("Adding field error [#0] with message '#1'",
fieldName, validationError.getMessage());
+}
validatorContext.addFieldError(fieldName,
validationError.getMessage());
// don't add "model." prefix to fields of model in model
driven action
Modified:
struts/struts2/trunk/plugins/pell-multipart/src/main/java/org/apache/struts2/dispatcher/multipart/PellMultiPartRequest.java
URL:
http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/pell-multipart/src/main/java/org/apache/struts2/dispatcher/multipart/PellMultiPartRequest.java?rev=1099157&r