[seam-commits] Seam SVN: r13963 - branches/community/Seam_2_2/src/main/org/jboss/seam/mock.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Fri Dec 17 08:55:34 EST 2010
Author: manaRH
Date: 2010-12-17 08:55:34 -0500 (Fri, 17 Dec 2010)
New Revision: 13963
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/MockHttpServletRequest.java
Log:
rolling back changes for 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-17 13:20:20 UTC (rev 13962)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/mock/MockExternalContext.java 2010-12-17 13:55:34 UTC (rev 13963)
@@ -228,17 +228,13 @@
while (en.hasMoreElements())
{
String header = en.nextElement();
- Enumeration requestHeaders = request.getHeaders(header);
- if (requestHeaders != null)
+ List<String> headerList = Collections.list(request.getHeaders(header));
+ String[] headers = new String[headerList.size()];
+ for (int i = 0; i < headerList.size(); 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);
+ headers[i] = headerList.get(i);
}
+ result.put(header, headers);
}
return result;
}
Modified: branches/community/Seam_2_2/src/main/org/jboss/seam/mock/MockHttpServletRequest.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/mock/MockHttpServletRequest.java 2010-12-17 13:20:20 UTC (rev 13962)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/mock/MockHttpServletRequest.java 2010-12-17 13:55:34 UTC (rev 13963)
@@ -178,9 +178,8 @@
}
public Enumeration getHeaders(String header)
- {
- String[] values = headers.get(header);
- return values==null || values.length==0 ? null : new IteratorEnumeration( Arrays.asList( values ).iterator() );
+ {
+ return new IteratorEnumeration( Arrays.asList( headers.get(header) ).iterator() );
}
public Enumeration getHeaderNames()
More information about the seam-commits
mailing list