Uploaded image for project: 'DdlUtils'
  1. DdlUtils
  2. DDLUTILS-102

The interface PlatformImplBase throws an error [ java.lang.StringIndexOutOfBoundsException] when a default value is empty

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 1.0
    • 1.0 RC1
    • None
    • Win2k SP 4
      MySql 5

    Description

      The interface PlatformImplBase throws an error [ java.lang.StringIndexOutOfBoundsException] when a default value is empty
      in the method postprocessModelFromDatabase :

      1675 : if ((defaultValue != null) &&
      1676 : defaultValue.startsWith("'") && defaultValue.endsWith("'") )
      1677 :

      { 1678 : defaultValue = defaultValue.substring(1, defaultValue.length() - 1); 1679 : column.setDefaultValue(defaultValue); 1680 : }

      I was trying to get a model from my MySql database but for a column the default value is empty.
      ( !!! startsWith and endsWith return both true if the string is empty )

      Attachments

        1. DDLUTILS-102.patch
          4 kB
          Machiel Groeneveld

        Activity

          People

            tomdz Thomas Dudziak
            serge.tanpanza Serge Tan Panza
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: