Revision: 6625
Author: j...@google.com
Date: Tue Nov  3 14:15:06 2009
Log: Avoid use of Arrays.copyOf since that was added in JDK1.6.

Patch by: jat
Review by: rice (desk)

http://code.google.com/p/google-web-toolkit/source/detail?r=6625

Modified:
  /trunk/dev/core/src/com/google/gwt/dev/GwtVersion.java

=======================================
--- /trunk/dev/core/src/com/google/gwt/dev/GwtVersion.java      Tue Nov  3  
13:02:30 2009
+++ /trunk/dev/core/src/com/google/gwt/dev/GwtVersion.java      Tue Nov  3  
14:15:06 2009
@@ -92,7 +92,10 @@
     * @return a copy of the array of version components, always exactly  
length 3.
     */
    public int[] getComponents() {
-    return Arrays.copyOf(components, COMPONENT_COUNT);
+    // Avoid Arrays.copyOf since it was added in JDK1.6
+    int[] returnVal = new int[COMPONENT_COUNT];
+    System.arraycopy(components, 0, returnVal, 0, COMPONENT_COUNT);
+    return returnVal;
    }

    /**

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to