Commits

Anonymous committed 34e08cb
  • Participants
  • Parent commits af728f0

Comments (0)

Files changed (1)

File java/com/opensymphony/xwork/validator/DelegatingValidatorContext.java

     }
 
     public static TextProvider makeTextProvider(Object object, LocaleProvider localeProvider) {
-        if (object instanceof TextProvider) {
-            return (TextProvider) object;
-        } else {
-            // the object argument passed through here will most probably be an ActionSupport decendant which does
-            // implements TextProvider.
-            if ((object != null) && (object instanceof TextProvider)) {
-                 return new CompositeTextProvider(new TextProvider[] {
+        // the object argument passed through here will most probably be an ActionSupport decendant which does
+        // implements TextProvider.
+        if ((object != null) && (object instanceof TextProvider)) {
+             return new CompositeTextProvider(new TextProvider[] {
                                 ((TextProvider) object),
                                 new TextProviderSupport(object.getClass(), localeProvider)
                             });
-            }
-            else {
-                return new TextProviderSupport(object.getClass(), localeProvider);
-            }
+        } else {
+             return new TextProviderSupport(object.getClass(), localeProvider);
         }
     }