You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ddlutils-dev@db.apache.org by "Serge Tan Panza (JIRA)" <ji...@apache.org> on 2006/04/22 22:06:06 UTC
[jira] Created: (DDLUTILS-102) The interface PlatformImplBase
throws an error [ java.lang.StringIndexOutOfBoundsException] when a default
value is empty
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
[jira] Commented: (DDLUTILS-102) The interface PlatformImplBase
throws an error [ java.lang.StringIndexOutOfBoundsException] when a default
value is empty
Posted by "Machiel Groeneveld (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/DDLUTILS-102?page=comments#action_12414726 ]
Machiel Groeneveld commented on DDLUTILS-102:
---------------------------------------------
Can you post the table definition (or create table statement) for mysql? I can only reproduce an error with one single quote in the string.
> 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
>
> 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
[jira] Updated: (DDLUTILS-102) The interface PlatformImplBase
throws an error [ java.lang.StringIndexOutOfBoundsException] when a default
value is empty
Posted by "Machiel Groeneveld (JIRA)" <ji...@apache.org>.
[ 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
[jira] Resolved: (DDLUTILS-102) The interface PlatformImplBase
throws an error [ java.lang.StringIndexOutOfBoundsException] when a default
value is empty
Posted by "Thomas Dudziak (JIRA)" <ji...@apache.org>.
[ 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