From 02bc52037e9ccccca672d6156d9c325c74fe28b3 Mon Sep 17 00:00:00 2001 From: Benjamin Culkin Date: Mon, 1 Jul 2024 17:27:48 -0400 Subject: Update a whole bunch of things Yeah... not a great commit message. t.b.h, I could maybe've split the commit into more parts; but that would be quite a lot off effort and would have a pretty decent chance of at least one of the commits leaving the repository in a non-working state. For the future, will want to try and commit more often so there aren't these mega-commits where it's just "a whole bunch of stuff changed" --- .../src/main/java/net/wotonomy/web/WODirectAction.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'projects/net.wotonomy.web/src/main/java/net/wotonomy/web/WODirectAction.java') diff --git a/projects/net.wotonomy.web/src/main/java/net/wotonomy/web/WODirectAction.java b/projects/net.wotonomy.web/src/main/java/net/wotonomy/web/WODirectAction.java index 0ad4181..002e2a3 100644 --- a/projects/net.wotonomy.web/src/main/java/net/wotonomy/web/WODirectAction.java +++ b/projects/net.wotonomy.web/src/main/java/net/wotonomy/web/WODirectAction.java @@ -90,6 +90,7 @@ public class WODirectAction { */ public WOSession existingSession() { // FIXME: this is incorrect + // To do this correctly, probably want to use WOSessionStore HttpSession session = request.servletRequest().getSession(); if (session == null) return null; @@ -156,7 +157,7 @@ public class WODirectAction { Method m; Object key; Object value; - java.util.Enumeration e = anArray.objectEnumerator(); + java.util.Enumeration e = anArray.objectEnumerator(); while (e.hasMoreElements()) { key = e.nextElement(); value = request.formValuesForKey(key.toString()); @@ -167,7 +168,7 @@ public class WODirectAction { if (m != null) { // if value isn't null, try to convert it to type if (value != null) { - Class[] paramTypes = m.getParameterTypes(); + Class[] paramTypes = m.getParameterTypes(); if (!paramTypes[0].isAssignableFrom(value.getClass())) { // TODO: find a constructor whose parameter // is assignable from value.getClass() @@ -196,7 +197,7 @@ public class WODirectAction { Method m; Object key; Object value; - java.util.Enumeration e = anArray.objectEnumerator(); + java.util.Enumeration e = anArray.objectEnumerator(); while (e.hasMoreElements()) { key = e.nextElement(); value = request.formValueForKey(key.toString()); @@ -207,7 +208,7 @@ public class WODirectAction { if (m != null) { // if value isn't null, try to convert it to type if (value != null) { - Class[] paramTypes = m.getParameterTypes(); + Class[] paramTypes = m.getParameterTypes(); Object convertedValue = ValueConverter.convertObjectToClass(value, paramTypes[0]); if (convertedValue != null) { value = convertedValue; -- cgit v1.2.3