|
0 |
Author: gregor herrmann <gregoa@debian.org>
|
|
1 |
Description: enum is a keyword since 1.5, so let's rename the variable
|
|
2 |
|
|
3 |
--- a/src/java/org/onemind/commons/java/util/ServletUtils.java
|
|
4 |
+++ b/src/java/org/onemind/commons/java/util/ServletUtils.java
|
|
5 |
@@ -58,10 +58,10 @@
|
|
6 |
m.put("REQUEST_AUTH_TYPE", req.getAuthType());
|
|
7 |
//m.put("REQUEST_CONTEXT_PATH", req.getContextPath());
|
|
8 |
m.put("REQUEST_COOKIES", req.getCookies());
|
|
9 |
- Enumeration enum = req.getHeaderNames();
|
|
10 |
- while (enum.hasMoreElements())
|
|
11 |
+ Enumeration enumeration = req.getHeaderNames();
|
|
12 |
+ while (enumeration.hasMoreElements())
|
|
13 |
{
|
|
14 |
- String header = (String) enum.nextElement();
|
|
15 |
+ String header = (String) enumeration.nextElement();
|
|
16 |
String value = req.getHeader(header);
|
|
17 |
m.put(header, value);
|
|
18 |
}
|
|
19 |
@@ -89,10 +89,10 @@
|
|
20 |
public static Map getExtraRequestEnvironment(HttpServletRequest req)
|
|
21 |
{
|
|
22 |
Map m = new HashMap();
|
|
23 |
- Enumeration enum = req.getAttributeNames();
|
|
24 |
- while (enum.hasMoreElements())
|
|
25 |
+ Enumeration enumeration = req.getAttributeNames();
|
|
26 |
+ while (enumeration.hasMoreElements())
|
|
27 |
{
|
|
28 |
- String attr = (String) enum.nextElement();
|
|
29 |
+ String attr = (String) enumeration.nextElement();
|
|
30 |
m.put(attr, req.getAttribute(attr));
|
|
31 |
}
|
|
32 |
m.put("CHARACTER_ENCODING", req.getCharacterEncoding());
|
|
33 |
@@ -146,10 +146,10 @@
|
|
34 |
}
|
|
35 |
} else
|
|
36 |
{
|
|
37 |
- Enumeration enum = req.getParameterNames();
|
|
38 |
- while (enum.hasMoreElements())
|
|
39 |
+ Enumeration enumeration = req.getParameterNames();
|
|
40 |
+ while (enumeration.hasMoreElements())
|
|
41 |
{
|
|
42 |
- String key = (String) enum.nextElement();
|
|
43 |
+ String key = (String) enumeration.nextElement();
|
|
44 |
String[] value = req.getParameterValues(key);
|
|
45 |
if (value.length == 0)
|
|
46 |
{
|
|
47 |
@@ -165,4 +165,4 @@
|
|
48 |
}
|
|
49 |
return m;
|
|
50 |
}
|
|
51 |
-}
|
|
52 |
\ No newline at end of file
|
|
53 |
+}
|