These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: ArrayIndexOutOfBoundsException during update by rowid
PostPosted: Mon Mar 05, 2007 5:38 am 
Regular
Regular

Joined: Fri Dec 17, 2004 10:38 am
Posts: 54
Hibernate version:
3.2.2

I getting ArrayIndexOutOfBoundsException during update object by rowid, the cause is this method in AbstractEntityPersister
Code:
protected String[] getSQLUpdateByRowIdStrings() {
      if ( sqlUpdateByRowIdString == null ) {
         throw new AssertionFailure( "no update by row id" );
      }
      String[] result = new String[getTableSpan()];
      result[0] = sqlUpdateByRowIdString;
      System.arraycopy( sqlUpdateStrings, 1, result, 1, getTableSpan() );
      return result;
   }


this code always lead to AOOBE, and was introdused in 3.2.2. Am i right?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 07, 2007 2:30 pm 
Newbie

Joined: Thu Mar 01, 2007 5:45 pm
Posts: 2
I think it´s a bug in 3.2.2.

In 3.2.1 the array will be copied inside a for-loop only if the array.length is greater than 1.

With these parameters the System.arrayCopy must alway throw a AOOBE.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.