[hg] main-silver: Minor changes.

  • From: Tomas Zezula < >
  • To:
  • Subject: [hg] main-silver: Minor changes.
  • Date: Tue, 05 Feb 2013 12:15:38 -0800

changeset c589e5afe17d in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/c589e5afe17d
description:
        Minor changes.

diffstat:

 
parsing.api/src/org/netbeans/modules/parsing/impl/indexing/ClusteredIndexables.java
 |  14 ++-------
 1 files changed, 4 insertions(+), 10 deletions(-)

diffs (41 lines):

diff --git 
a/parsing.api/src/org/netbeans/modules/parsing/impl/indexing/ClusteredIndexables.java
 
b/parsing.api/src/org/netbeans/modules/parsing/impl/indexing/ClusteredIndexables.java
--- 
a/parsing.api/src/org/netbeans/modules/parsing/impl/indexing/ClusteredIndexables.java
+++ 
b/parsing.api/src/org/netbeans/modules/parsing/impl/indexing/ClusteredIndexables.java
@@ -739,23 +739,19 @@
                 index = (index << 3) | (stored ? 4 : 0) | (indexed ? 2 : 0) 
| 1;
 
                 if (docs.length < docsPointer + 2) {
-                    int[] newdocs = new int[docs.length << 1];
-                    System.arraycopy(docs, 0, newdocs, 0, docs.length);
-                    docs = newdocs;
+                    docs = Arrays.copyOf(docs, docs.length << 1);
                 }
                 docs[docsPointer] = index;
                 docs[docsPointer + 1] = dataPointer;
                 docsPointer += 2;
                 if (data.length < dataPointer + fldValue.length()) {
-                    char[] newdata = new 
char[newLength(data.length,dataPointer + fldValue.length())];
-                    System.arraycopy(data, 0, newdata, 0, data.length);
-                    data = newdata;
+                    data = Arrays.copyOf(data, 
newLength(data.length,dataPointer + fldValue.length()));
                     res = data.length<<1 > DATA_CACHE_SIZE;
                     LOG.log(
                         Level.FINE,
                         "New data size: {0}, flush: {1}",   //NOI18N
                         new Object[] {
-                            newdata.length,
+                            data.length,
                             res
                         });
                 }
@@ -763,9 +759,7 @@
                 dataPointer += fldValue.length();
             }
             if (docs.length < docsPointer + 1) {
-                int[] newdocs = new int[docs.length << 1];
-                System.arraycopy(docs, 0, newdocs, 0, docs.length);
-                docs = newdocs;
+                docs = Arrays.copyOf(docs, docs.length << 1);
             }
             docs[docsPointer++] = 0;
             size++;

[hg] main-silver: Minor changes.

Tomas Zezula 02/05/2013

Project Features

About this Project

Editor was started in November 2009, is owned by Martin Ryzl, and has 147 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close