Fixes failure of TypeOracleMediator to resolve primitive arrays.

Review by: jat

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@7285 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/dev/javac/TypeOracleMediator.java b/dev/core/src/com/google/gwt/dev/javac/TypeOracleMediator.java
index cf11d66..3d828a5 100644
--- a/dev/core/src/com/google/gwt/dev/javac/TypeOracleMediator.java
+++ b/dev/core/src/com/google/gwt/dev/javac/TypeOracleMediator.java
@@ -597,6 +597,10 @@
             + value.getClass().getCanonicalName());
         return null;
       }
+      if (componentType.isPrimitive()) {
+        // primitive arrays are already resolved
+        return value;
+      }
       // resolve each element in the array
       int n = Array.getLength(value);
       Object newArray = Array.newInstance(componentType, n);
diff --git a/dev/core/test/com/google/gwt/core/ext/typeinfo/TypeOracleAnnotationSupportTest.java b/dev/core/test/com/google/gwt/core/ext/typeinfo/TypeOracleAnnotationSupportTest.java
index 6a2f27d..5784e4d 100644
--- a/dev/core/test/com/google/gwt/core/ext/typeinfo/TypeOracleAnnotationSupportTest.java
+++ b/dev/core/test/com/google/gwt/core/ext/typeinfo/TypeOracleAnnotationSupportTest.java
@@ -251,5 +251,11 @@
 
     short s = annotation.s();
     assertTrue(s > 0);
+    
+    int[] ia = annotation.ia();
+    assertEquals(3, ia.length);
+    for (int it = 0; it < 3; ++it) {
+      assertEquals(it, ia[it]);
+    }
   }
 }
diff --git a/dev/core/test/com/google/gwt/core/ext/typeinfo/test/PrimitivesAnnotatedClass.java b/dev/core/test/com/google/gwt/core/ext/typeinfo/test/PrimitivesAnnotatedClass.java
index bd4b377..74e9237 100644
--- a/dev/core/test/com/google/gwt/core/ext/typeinfo/test/PrimitivesAnnotatedClass.java
+++ b/dev/core/test/com/google/gwt/core/ext/typeinfo/test/PrimitivesAnnotatedClass.java
@@ -21,7 +21,8 @@
  */
 @PrimitiveValuesAnnotation(b = PrimitivesAnnotatedClass.byteAsInt,
     c = (byte) 12, s = 'a', i = (short) 1452,
-    l = 12345, f = (byte) 15, d = 123412312L)
+    l = 12345, f = (byte) 15, d = 123412312L, ia = {
+    0, 1, 2})
 public class PrimitivesAnnotatedClass {
   static final int byteAsInt = 123;
 }