From 5d1c0933fa400e7c1863f68b515713345d594aec Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Thu, 28 Oct 2010 16:47:38 -0400 Subject: [PATCH] added required=false for RESPONSE_TYPE in @header annotation --- .../integration/samples/loanbroker/LoanQuoteAggregator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/LoanQuoteAggregator.java b/applications/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/LoanQuoteAggregator.java index cc3338f84..def671863 100644 --- a/applications/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/LoanQuoteAggregator.java +++ b/applications/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/LoanQuoteAggregator.java @@ -40,7 +40,7 @@ public class LoanQuoteAggregator { * @param responseType header that indicates the response type * @return the best {@link LoanQuote} if the 'RESPONSE_TYPE' header value is 'BEST' else all quotes */ - public Object aggregateQuotes(List quotes, @Header("RESPONSE_TYPE") String responseType) { + public Object aggregateQuotes(List quotes, @Header(value="RESPONSE_TYPE", required=false) String responseType) { Collections.sort(quotes); return ("BEST".equals(responseType)) ? quotes.get(0) : quotes; }