[hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-6789) StringIndexOutOfBoundsException at TemplatedViolatedConstraintNameExtracter.extractUsingTemplate
Strong Liu (JIRA)
noreply at atlassian.com
Thu Nov 3 18:10:19 EDT 2011
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-6789?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Strong Liu resolved HHH-6789.
-----------------------------
Resolution: Fixed
Assignee: Strong Liu
patch applied, but i didn't use the pull request, since that pull request contains another commit
> 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
> Assignee: Strong Liu
> 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