#10 Exception thrown when no SQL command is given

closed
Nikita
Bug (17)
5
2011-10-08
2011-10-04
Michael
No

An StringIndexOutOfBoundsException is thrown if you put a comment or simply don't write a command in the attribute "text" for a <command> element for an SQL type command in a schema xml file.

i.e for this in schema xml:
<command>
<attr name="type" value="SQL"/>
<attr name="signal" value="PRE_GEN"/>
<attr name="label" value="Alter Table"/>
<attr name="text">

</attr>
</command>

you get:
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.charAt(String.java:694)
at com.ibm.dg.parsing.commands.SQLCommand.<init>(SQLCommand.java:40)
at com.ibm.dg.parsing.XMLParser.parseCommands(XMLParser.java:341)
at com.ibm.dg.parsing.XMLParser.parse(XMLParser.java:159)
at com.ibm.dg.DataGenerator.generatorRun(DataGenerator.java:270)
at com.ibm.dg.DataGeneratorCLI.main(DataGeneratorCLI.java:24)

Discussion

  • Nikita

    Nikita - 2011-10-04
    • assigned_to: nobody --> npchelin
     
  • Nikita

    Nikita - 2011-10-08

    fixed

     
  • Nikita

    Nikita - 2011-10-08
    • status: open --> closed