[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-6789) StringIndexOutOfBoundsException at TemplatedViolatedConstraintNameExtracter.extractUsingTemplate
Shaun Appleton (JIRA)
noreply at atlassian.com
Thu Nov 3 17:49:19 EDT 2011
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-6789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44234#comment-44234 ]
Shaun Appleton commented on HHH-6789:
-------------------------------------
see https://github.com/hibernate/hibernate-core/pull/209
> StringIndexOutOfBoundsException at TemplatedViolatedConstraintNameExtracter.extractUsingTemplate
> ------------------------------------------------------------------------------------------------
>
> Key: HHH-6789
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6789
> Project: Hibernate Core
> Issue Type: Bug
> Components: core
> Affects Versions: 4.0.0.CR5
> Environment: PostgreSQL
> Reporter: Dimitris Zenios
> Fix For: 4.0.0.next
>
>
> TemplatedViolatedConstraintNameExtracter.extractUsingTemplate throws java.lang.StringIndexOutOfBoundsException: String index out of range: -1
> Example values
> templateStart = "violates check constraint \""
> templateEnd = "\""
> message = "new row for relation \"user_balance\" violates check constraint \"balance_check_constraint\""
> This function broke from the last commit
> https://hibernate.onjira.com/browse/HHH-4854
> In order to fix it, we have to change this on the function
> int end = message.lastIndexOf( templateEnd, start );
> to
> int end = message.indexOf( templateEnd, start );
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list