[ http://issues.apache.org/jira/browse/DDLUTILS-102?page=all ]
Thomas Dudziak resolved DDLUTILS-102:
-------------------------------------
Resolution: Fixed
I've fixed this in SVN and also added two database roundtrip tests for this.
However, I did not use StringUtils simply because the existing code already
worked except that a length check was missing (so that only strings with a
length >= 2 are checked).
> 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