diff options
Diffstat (limited to 'projects/net.wotonomy.web/src/main/java/net/wotonomy/web/WORequest.java')
| -rw-r--r-- | projects/net.wotonomy.web/src/main/java/net/wotonomy/web/WORequest.java | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/projects/net.wotonomy.web/src/main/java/net/wotonomy/web/WORequest.java b/projects/net.wotonomy.web/src/main/java/net/wotonomy/web/WORequest.java index 3991b34..b0acfff 100644 --- a/projects/net.wotonomy.web/src/main/java/net/wotonomy/web/WORequest.java +++ b/projects/net.wotonomy.web/src/main/java/net/wotonomy/web/WORequest.java @@ -330,9 +330,9 @@ public class WORequest extends WOResponse { /** * Returns a dictionary containing all the key-value mappings in the request. */ - public NSDictionary formValues() { - NSMutableDictionary result = new NSMutableDictionary(); - java.util.Enumeration e = request.getParameterNames(); + public NSDictionary<String, NSArray<String>> formValues() { + NSMutableDictionary<String, NSArray<String>> result = new NSMutableDictionary<>(); + java.util.Enumeration<String> e = request.getParameterNames(); String key; while (e.hasMoreElements()) { key = e.nextElement().toString(); @@ -353,9 +353,9 @@ public class WORequest extends WOResponse { * Returns an array of cookie values for the specified key in no particular * order. */ - public NSArray cookieValuesForKey(String aKey) { + public NSArray<String> cookieValuesForKey(String aKey) { // TODO: Test this logic. - NSMutableArray result = new NSMutableArray(); + NSMutableArray<String> result = new NSMutableArray<>(); Cookie[] cookies = request.getCookies(); if (cookies == null) return result; @@ -391,19 +391,19 @@ public class WORequest extends WOResponse { /** * Returns a dictionary of cookie key-value mappings. */ - public NSDictionary cookieValues() { + public NSDictionary<String, NSArray<String>> cookieValues() { // TODO: Test this logic. - NSMutableDictionary result = new NSMutableDictionary(); + NSMutableDictionary<String, NSArray<String>> result = new NSMutableDictionary<>(); Cookie[] cookies = request.getCookies(); if (cookies == null) return result; - NSMutableArray value; + NSMutableArray<String> value; for (int i = 0; i < cookies.length; i++) { - value = (NSMutableArray) result.objectForKey(cookies[i].getName()); + value = (NSMutableArray<String>) result.objectForKey(cookies[i].getName()); if (value == null) { - value = new NSMutableArray(); - result.setObjectForKey(cookies[i].getValue(), cookies[i].getName()); + value = new NSMutableArray<>(); + result.setObjectForKey(value, cookies[i].getName()); } value.addObject(cookies[i].getValue()); } |
