Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
ofbiz-directcontrolservlet
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
80ba65d8
authored
2016-12-08 14:21:29 -0600
by
Ean Schuessler
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Refactor some lines to use better Generics syntax
Refs: #8039
1 parent
caf32c83
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
src/com/brainfood/ofbiz/DirectControlServlet.java
src/com/brainfood/ofbiz/DirectControlServlet.java
View file @
80ba65d
...
...
@@ -453,10 +453,10 @@ public class DirectControlServlet extends HttpServlet {
context
.
put
(
"httpProtocol"
,
request
.
getProtocol
());
context
.
put
(
"httpScheme"
,
request
.
getScheme
());
Enumeration
headerNames
=
request
.
getHeaderNames
();
Map
<
String
,
List
>
headerMap
=
new
HashMap
<
String
,
List
>();
while
(
headerNames
.
hasMoreElements
())
{
String
headerName
=
(
String
)
headerNames
.
nextElement
();
Enumeration
<
String
>
headerNames
=
request
.
getHeaderNames
();
Map
<
String
,
List
<
String
>>
headerMap
=
new
HashMap
<
String
,
List
<
String
>
>();
while
(
headerNames
.
hasMoreElements
())
{
String
headerName
=
headerNames
.
nextElement
();
headerMap
.
put
(
headerName
,
Collections
.
list
(
request
.
getHeaders
(
headerName
)));
}
context
.
put
(
"httpHeaders"
,
headerMap
);
...
...
@@ -467,9 +467,9 @@ public class DirectControlServlet extends HttpServlet {
if
(
result
.
get
(
"httpHeaders"
)
!=
null
)
{
Map
<
String
,
List
<
String
>>
headers
=
(
Map
<
String
,
List
<
String
>>)
result
.
get
(
"httpHeaders"
);
for
(
String
headerName
:
(
Set
<
String
>)
headers
.
ke
ySet
())
{
for
(
String
value
:
header
s
.
get
(
headerName
))
{
response
.
addHeader
(
header
Name
,
value
);
for
(
Map
.
Entry
<
String
,
List
<
String
>>
header
:
headers
.
entr
ySet
())
{
for
(
String
value
:
header
.
getValue
(
))
{
response
.
addHeader
(
header
.
getKey
()
,
value
);
}
}
}
...
...
Please
register
or
sign in
to post a comment