Hallo,

we found two small bugs in webwork (and more important, two fixes):
- in class NodeWalker all attributes of the XML are delete:
  contentHandler.startElement("", attributeName, "", EMPTY_ATTRS);
  In my opinion the right way to do this is:
  contentHandler.startElement("", attributeName, "", saxAttributes);
- In class ValueStack the program rely on a final null-value in the
  segments array:

            // always have the next segment ready to go
            segment = segments[segmentIdx++];

            // if we don't need to search through the stack then return the
value
            // this is very unlikely to happen, but we have account for it
anyway
            if (segment == null)
               return value;

  But the final null-value is not allways there. In Query the array is only
  extended when there is no more space for a new value:

     private void add(QuerySegment qs) {
      if (segmentsIdx == segments.length) {
         QuerySegment[] resize = new QuerySegment[segments.length + 5];
         System.arraycopy(segments, 0, resize, 0, segments.length);
         segments = resize;
      }

      segments[segmentsIdx++] = qs;
   }

   The easiest solution is to extend the array in advance:
      if (segmentsIdx == segments.length - 1) { ...

It would be very helpful if someone could commit those changes to the CVS.

Regards,
Tom

BEGIN:VCARD
VERSION:2.1
N:Quellenberg;Tom
FN:Tom Quellenberg
ORG:subshell GmbH
TEL;WORK;VOICE:+49 40 431362 10
TEL;WORK;FAX:+49 40 431362 29
ADR;WORK:;;Weidenallee 1;Hamburg;;20357;D
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Weidenallee 1=0D=0AHamburg 20357=0D=0AD
URL;WORK:http://www.subshell.com
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:20020522T065938Z
END:VCARD

Reply via email to