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/accesslayer JdbcAccessImpl.java
Date Sat, 22 Oct 2005 12:19:32 GMT
arminw      2005/10/22 05:19:31

  Modified:    src/java/org/apache/ojb/broker/accesslayer
                        JdbcAccessImpl.java
  Log:
  minor improvement, add 'null' check
  
  Revision  Changes    Path
  1.41      +11 -4     db-ojb/src/java/org/apache/ojb/broker/accesslayer/JdbcAccessImpl.java
  
  Index: JdbcAccessImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/JdbcAccessImpl.java,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- JdbcAccessImpl.java	7 Oct 2005 14:34:12 -0000	1.40
  +++ JdbcAccessImpl.java	22 Oct 2005 12:19:31 -0000	1.41
  @@ -887,9 +887,16 @@
           ValueContainer[] newArray;
           if(source != null && source.length > 0)
           {
  -            newArray = new ValueContainer[target.length + source.length];
  -            System.arraycopy(target, 0, newArray, 0, target.length);
  -            System.arraycopy(source, 0, newArray, target.length, source.length);
  +            if(target != null)
  +            {
  +                newArray = new ValueContainer[target.length + source.length];
  +                System.arraycopy(target, 0, newArray, 0, target.length);
  +                System.arraycopy(source, 0, newArray, target.length, source.length);
  +            }
  +            else
  +            {
  +                newArray = source;
  +            }
           }
           else
           {
  
  
  

---------------------------------------------------------------------
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