summaryrefslogtreecommitdiff
path: root/projects/net.wotonomy.web/src/main/java/net/wotonomy/web/WORequest.java
diff options
context:
space:
mode:
authorBenjamin Culkin <scorpress@gmail.com>2024-07-05 12:43:13 -0400
committerBenjamin Culkin <scorpress@gmail.com>2024-07-05 12:43:13 -0400
commit6d46c473d41c6c47e6b8bd8c676d925e544bd378 (patch)
tree796d51bfff52f8f3fa383b2d26847b7c8160677b /projects/net.wotonomy.web/src/main/java/net/wotonomy/web/WORequest.java
parent02bc52037e9ccccca672d6156d9c325c74fe28b3 (diff)
More cleanup
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.java22
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());
}