Share

Matra - an XML DTD Parser

Tracker: Bugs

5 AttList toString bug - ID: 994694
Last Update: Comment added ( derupe )

I am adapting the Matra code for my own uses and I came
across this bug. In the AttList.toString method (line
323) it has attlist += enums[enums.length - 1] + ") ";


When the enums array is empty this line causes a
java.lang.ArrayIndexOutOfBoundsException to be thrown.
I switched this line in my version of the code to:

if (enums.length > 0) {
attlist += enums[enums.length - 1] + ") ";
} else {
attlist += ") ";
}

Andrea Goethals
goethal@ufl.edu


Nobody/Anonymous ( nobody ) - 2004-07-20 18:05

5

Closed

None

derupe

None

matra-java-0.8.2b

Public


Comment ( 1 )




Date: 2005-06-10 18:38
Sender: derupeProject Admin

Logged In: YES
user_id=213929

Thanks for the input Andrea. Again sorry about the delay in
replying to you.

I'll do a bug-fix release with this change.


Log in to comment.

Attached File

No Files Currently Attached

Changes ( 3 )

Field Old Value Date By
status_id Open 2005-06-10 18:38 derupe
assigned_to nobody 2005-06-10 18:38 derupe
close_date - 2005-06-10 18:38 derupe