db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Serge Tan Panza (JIRA)" <j...@apache.org>
Subject [jira] Created: (DDLUTILS-102) The interface PlatformImplBase throws an error [ java.lang.StringIndexOutOfBoundsException] when a default value is empty
Date Sat, 22 Apr 2006 20:06:06 GMT
The interface PlatformImplBase throws an error [ java.lang.StringIndexOutOfBoundsException]
when a default value is empty

---------------------------------------------------------------------------------------------------------------------------

         Key: DDLUTILS-102
         URL: http://issues.apache.org/jira/browse/DDLUTILS-102
     Project: DdlUtils
        Type: Bug

  Components: Core  
    Versions: 1.0    
 Environment: Win2k SP 4
MySql 5
    Reporter: Serge  Tan Panza
 Assigned to: Thomas Dudziak 
    Priority: Blocker


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 )

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message