From 8e4a5b07208381038b11828b467a2bd5d749ba03 Mon Sep 17 00:00:00 2001 From: Keith Donald Date: Wed, 14 May 2008 11:50:29 +0000 Subject: [PATCH] jdk 1.4 compat --- .../java/org/springframework/webflow/execution/Event.java | 2 +- .../webflow/mvc/builder/DelegatingFlowViewResolver.java | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/spring-webflow/src/main/java/org/springframework/webflow/execution/Event.java b/spring-webflow/src/main/java/org/springframework/webflow/execution/Event.java index acf1a62f..5719b34c 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/execution/Event.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/execution/Event.java @@ -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; } /** diff --git a/spring-webflow/src/main/java/org/springframework/webflow/mvc/builder/DelegatingFlowViewResolver.java b/spring-webflow/src/main/java/org/springframework/webflow/mvc/builder/DelegatingFlowViewResolver.java index ea19163c..a951b945 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/mvc/builder/DelegatingFlowViewResolver.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/mvc/builder/DelegatingFlowViewResolver.java @@ -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;