[ http://issues.apache.org/jira/browse/DDLUTILS-102?page=all ]

Machiel Groeneveld updated DDLUTILS-102:
----------------------------------------

    Attachment: DDLUTILS-102.patch

A test for a string with a single quote and changed implementation to a 
StringUtils call.

> 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
>     Assignee: Thomas Dudziak
>     Priority: Blocker
>  Attachments: DDLUTILS-102.patch
>
> 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

Reply via email to