----- Original Message -----
From: "Peter Kelley" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 22, 2003 3:16 AM
Subject: [OS-webwork] WW1.3 Null Values Not Read from Properties


> I have just finished looking at a bug in our product code that uses
> WW1.3 and I have tracked it down to the Value Stack. On the value stack
> are two objects each with a property of the same name. The property in
> the object on the top of the stack is null. When the code in the
> ValueStack class runs the method and gets the null value correctly it
> then runs the following code:
>
>          // if we didn't find the value, then move one down the stack
> and
>          // try again.
>          if (value == null && stackIdx > 0) {
>             stackIdx--;
>             value = workList.get(stackIdx);
>
>             // reset the segment index to reset the search
>             segmentIdx = saveSegmentIdx;
>             segment = segments[segmentIdx - 1];
>          } else {
>             break;
>          }
>
> If the value is legitimately null from the object the Value Stack goes
> ahead and looks for the value further down the stack anyway. As the next
> object on the stack in our case has a property of the same name this is
> the value that gets returned, not what we want at all.
>
> The solution would be to use a special object constant to signal no
> value found instead of null. I could go ahead and change this but I just
> wanted to check that my inderstanding of how this should work is correct
> before I do so.
>
> Comments ?
>

Yes, this is a bug! Really great that you found it!!
Please, go ahead and fix it using a NOT_FOUND constant object as you
suggested. That'll be great I think!

Best regards,

Dick Zetterberg
[EMAIL PROTECTED]





-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to