jdk 1.4 compat

This commit is contained in:
Keith Donald
2008-05-14 11:50:29 +00:00
parent 15514946b9
commit 8e4a5b0720
2 changed files with 7 additions and 3 deletions

View File

@@ -73,7 +73,7 @@ public class Event extends EventObject {
super(source);
Assert.hasText(id, "The event id is required: please set this event's id to a non-blank string identifier");
this.id = id;
this.attributes = (attributes != null ? attributes : CollectionUtils.EMPTY_ATTRIBUTE_MAP);
this.attributes = attributes != null ? attributes : CollectionUtils.EMPTY_ATTRIBUTE_MAP;
}
/**

View File

@@ -15,6 +15,7 @@
*/
package org.springframework.webflow.mvc.builder;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
@@ -39,7 +40,7 @@ public class DelegatingFlowViewResolver implements FlowViewResolver {
* @param viewResolvers the Spring MVC view resolver chain to delegate to
*/
public DelegatingFlowViewResolver(List viewResolvers) {
this.viewResolvers = viewResolvers;
this.viewResolvers = viewResolvers != null ? viewResolvers : Collections.EMPTY_LIST;
}
public View resolveView(String viewId, RequestContext context) {
@@ -51,7 +52,10 @@ public class DelegatingFlowViewResolver implements FlowViewResolver {
return view;
}
} catch (Exception e) {
throw new IllegalStateException("Exception resolving view with name '" + viewId + "'", e);
IllegalStateException ise = new IllegalStateException("Exception resolving view with name '" + viewId
+ "'");
ise.initCause(e);
throw ise;
}
}
return null;