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/metadata ClassDescriptor.java
Date Thu, 11 Nov 2004 14:17:47 GMT
arminw      2004/11/11 06:17:47

  Modified:    src/java/org/apache/ojb/broker/metadata Tag: OJB_1_0_RELEASE
                        ClassDescriptor.java
  Log:
  use arraycopy instead of for-loop
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.88.2.1  +3 -13     db-ojb/src/java/org/apache/ojb/broker/metadata/ClassDescriptor.java
  
  Index: ClassDescriptor.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/metadata/ClassDescriptor.java,v
  retrieving revision 1.88
  retrieving revision 1.88.2.1
  diff -u -r1.88 -r1.88.2.1
  --- ClassDescriptor.java	21 Jun 2004 21:16:26 -0000	1.88
  +++ ClassDescriptor.java	11 Nov 2004 14:17:46 -0000	1.88.2.1
  @@ -826,18 +826,8 @@
           // take the 2 arrays and add them into one
           int size = fieldDescriptions.length + fieldDescriptorsInHeirarchy.length;
           FieldDescriptor[] newArray = new FieldDescriptor[size];
  -        int i;
  -        int j = 0;
  -        for (i = 0; i < fieldDescriptions.length; i++, j++)
  -        {
  -            FieldDescriptor fieldDescription = fieldDescriptions[i];
  -            newArray[j] = fieldDescription;
  -        }
  -        for (i = 0; i < fieldDescriptorsInHeirarchy.length; i++, j++)
  -        {
  -            FieldDescriptor fieldDescription = fieldDescriptorsInHeirarchy[i];
  -            newArray[j] = fieldDescription;
  -        }
  +        System.arraycopy(fieldDescriptions, 0, newArray, 0, fieldDescriptions.length);
  +        System.arraycopy(fieldDescriptorsInHeirarchy, 0, newArray, fieldDescriptions.length,
fieldDescriptorsInHeirarchy.length);
           return newArray;
       }
   
  
  
  

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