You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2006/11/05 12:29:25 UTC
svn commit: r471406 -
/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/validator/SubmittedValueLengthValidator.java
Author: bommel
Date: Sun Nov 5 03:29:25 2006
New Revision: 471406
URL: http://svn.apache.org/viewvc?view=rev&rev=471406
Log:
avoid unchecked cast
Modified:
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/validator/SubmittedValueLengthValidator.java
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/validator/SubmittedValueLengthValidator.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/validator/SubmittedValueLengthValidator.java?view=diff&rev=471406&r1=471405&r2=471406
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/validator/SubmittedValueLengthValidator.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/validator/SubmittedValueLengthValidator.java Sun Nov 5 03:29:25 2006
@@ -77,7 +77,7 @@
}
public void validate(FacesContext facesContext, UIComponent uiComponent, Object value) throws ValidatorException {
- if (value != null) {
+ if (value != null && uiComponent instanceof EditableValueHolder) {
String submittedValue = ((EditableValueHolder) uiComponent).getSubmittedValue().toString();
if (maximum != null && submittedValue.length() > maximum) {
Object[] args = {maximum, uiComponent.getId()};