mirror of https://github.com/apache/lucene.git
SOLR-619 -- switch to System.arraycopy() for array copy
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@678096 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bed156e2e1
commit
3c33837cbd
|
@ -689,14 +689,10 @@ public final class IndexSchema {
|
|||
dynamicCopyFields = new DynamicCopy[] {dcopy};
|
||||
}
|
||||
else {
|
||||
int i=0;
|
||||
DynamicCopy[] old = dynamicCopyFields;
|
||||
dynamicCopyFields = new DynamicCopy[dynamicCopyFields.length+1];
|
||||
for( DynamicCopy dc : old ) {
|
||||
dynamicCopyFields[i++] = dc;
|
||||
}
|
||||
dynamicCopyFields[i++] = dcopy;
|
||||
old = null;
|
||||
DynamicCopy[] temp = new DynamicCopy[dynamicCopyFields.length+1];
|
||||
System.arraycopy(dynamicCopyFields,0,temp,0,dynamicCopyFields.length);
|
||||
temp[temp.length -1] = dcopy;
|
||||
dynamicCopyFields = temp;
|
||||
}
|
||||
log.finest("Dynamic Copy Field:" + dcopy );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue