On Tue, 2006-04-18 at 17:13 -0400, Lillian Angel wrote:
> On Mon, 2006-04-17 at 09:11 +0100, Chris Burdess wrote:
> > Lillian Angel wrote:
> > > More bug fixes for the parser and related classes.
> > >
> > > 2006-04-12 Lillian Angel <[EMAIL PROTECTED]>
> > >
> > > * gnu/xml/dom/DomDocument.java
> > > (checkNCName): Removed unneeded part of check.
> >
> > Hi Lillian,
> >
> > --- gnu/xml/dom/DomDocument.java 12 Jan 2006 16:35:52 -0000 1.8
> > +++ gnu/xml/dom/DomDocument.java 12 Apr 2006 16:04:42 -0000
> > @@ -535,8 +535,7 @@
> > int index = name.indexOf(':');
> > if (index != -1)
> > {
> > - if (index == 0 || index == (len - 1) ||
> > - name.lastIndexOf(':') != index)
> > + if (index == 0 || name.lastIndexOf(':') != index)
> > {
> > throw new DomDOMException(DOMException.NAMESPACE_ERR,
> > name, null, 0);
> >
> > That's wrong. The colon is not permitted to appear as the last
> > character in the string. You removed a valid check.
>
> Sun does permit a ':' to be the last character in a string.
>
I was rather quick to assume that I was correct. I retested the applets
that posed to be a problem, and they now work with this part of the
patch reverted.
2006-04-18 Lillian Angel <[EMAIL PROTECTED]>
* gnu/xml/dom/DomDocument.java
(checkNCName): Reverted last patch. Added check for colon at
last position back in.
Thanks for pointing this out, I have changed it back.
Lillian
? lib/classes.2
Index: gnu/xml/dom/DomDocument.java
===================================================================
RCS file: /cvsroot/classpath/classpath/gnu/xml/dom/DomDocument.java,v
retrieving revision 1.9
diff -u -r1.9 DomDocument.java
--- gnu/xml/dom/DomDocument.java 12 Apr 2006 16:10:25 -0000 1.9
+++ gnu/xml/dom/DomDocument.java 18 Apr 2006 21:23:12 -0000
@@ -535,10 +535,9 @@
int index = name.indexOf(':');
if (index != -1)
{
- if (index == 0 || name.lastIndexOf(':') != index)
+ if (index == 0 || index == (len - 1) || name.lastIndexOf(':') != index)
{
- throw new DomDOMException(DOMException.NAMESPACE_ERR,
- name, null, 0);
+ throw new DomDOMException(DOMException.NAMESPACE_ERR, name, null, 0);
}
}
}