Skip to content

Commit

Permalink
added required=false for RESPONSE_TYPE in @Header annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
markfisher committed Oct 28, 2010
1 parent 2d730d4 commit 5d1c093
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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<LoanQuote> quotes, @Header("RESPONSE_TYPE") String responseType) {
public Object aggregateQuotes(List<LoanQuote> quotes, @Header(value="RESPONSE_TYPE", required=false) String responseType) {
Collections.sort(quotes);
return ("BEST".equals(responseType)) ? quotes.get(0) : quotes;
}
Expand Down

0 comments on commit 5d1c093

Please sign in to comment.