[seam-commits] Seam SVN: r13951 - branches/community/Seam_2_2/src/main/org/jboss/seam/mock.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Wed Dec 15 06:45:18 EST 2010
Author: manaRH
Date: 2010-12-15 06:45:18 -0500 (Wed, 15 Dec 2010)
New Revision: 13951
Modified:
branches/community/Seam_2_2/src/main/org/jboss/seam/mock/MockExternalContext.java
Log:
JBSEAM-3770
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/mock/MockExternalContext.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/mock/MockExternalContext.java 2010-12-15 11:15:23 UTC (rev 13950)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/mock/MockExternalContext.java 2010-12-15 11:45:18 UTC (rev 13951)
@@ -228,13 +228,17 @@
while (en.hasMoreElements())
{
String header = en.nextElement();
- List<String> headerList = Collections.list(request.getHeaders(header));
- String[] headers = new String[headerList.size()];
- for (int i = 0; i < headerList.size(); i++)
+ Enumeration requestHeaders = request.getHeaders(header);
+ if (requestHeaders != null)
{
- headers[i] = headerList.get(i);
+ List<String> headerList = Collections.list(requestHeaders);
+ String[] headers = new String[headerList.size()];
+ for (int i = 0; i < headerList.size(); i++)
+ {
+ headers[i] = headerList.get(i);
+ }
+ result.put(header, headers);
}
- result.put(header, headers);
}
return result;
}
More information about the seam-commits
mailing list