db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/util/sequence SequenceManagerMySQLImpl.java
Date Wed, 07 Jan 2004 20:10:45 GMT
arminw      2004/01/07 12:10:45

  Modified:    src/java/org/apache/ojb/broker/util/sequence
                        SequenceManagerMySQLImpl.java
  Log:
  bug fix, avoid IndexOutOfBoundExc.
  
  Revision  Changes    Path
  1.17      +3 -3      db-ojb/src/java/org/apache/ojb/broker/util/sequence/SequenceManagerMySQLImpl.java
  
  Index: SequenceManagerMySQLImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/sequence/SequenceManagerMySQLImpl.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- SequenceManagerMySQLImpl.java	9 Dec 2003 17:19:58 -0000	1.16
  +++ SequenceManagerMySQLImpl.java	7 Jan 2004 20:10:45 -0000	1.17
  @@ -174,8 +174,8 @@
   
       public void afterStore(JdbcAccess dbAccess, ClassDescriptor cld, Object obj) throws
SequenceManagerException
       {
  -
  -        FieldDescriptor fd = cld.getAutoIncrementFields()[0];
  +        FieldDescriptor[] fldArr = cld.getAutoIncrementFields();
  +        FieldDescriptor fd = fldArr.length > 0 ? fldArr[0] : null;
           if(fd != null)
   		{ // an autoinc column exists
   			ResultSetAndStatement rsStmt = null;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message