Bug 807994 - Get rid of IME code raw type usage to prevent javac 1.7 compile errors. r=cpeterson
authorJim Chen <nchen@mozilla.com>
Fri, 02 Nov 2012 10:21:19 -0400
changeset 112156 7f8be1085fdfe20d1f9453d5a9507ec813b7ab05
parent 112155 911fd57f1db2142d4d0e10ecfce92fa6a5d60d1b
child 112157 34137da41cbb0aa9bba8461ae4af13dc4fbe409b
push id17447
push userwjohnston@mozilla.com
push dateFri, 02 Nov 2012 19:59:36 +0000
treeherdermozilla-inbound@34137da41cbb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpeterson
bugs807994
milestone19.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 807994 - Get rid of IME code raw type usage to prevent javac 1.7 compile errors. r=cpeterson
mobile/android/base/GeckoEditable.java
mobile/android/base/GeckoInputConnection.java
--- a/mobile/android/base/GeckoEditable.java
+++ b/mobile/android/base/GeckoEditable.java
@@ -224,17 +224,17 @@ final class GeckoEditable
 
     GeckoEditable() {
         mActionQueue = new ActionQueue();
         mSavedSelectionStart = -1;
         mUpdateGecko = true;
 
         mText = new SpannableStringBuilder();
 
-        final Class[] PROXY_INTERFACES = { Editable.class };
+        final Class<?>[] PROXY_INTERFACES = { Editable.class };
         mProxy = (Editable)Proxy.newProxyInstance(
                 Editable.class.getClassLoader(),
                 PROXY_INTERFACES, this);
     }
 
     private static void geckoPostToUI(Runnable runnable) {
         GeckoApp.mAppContext.mMainHandler.post(runnable);
     }
@@ -570,30 +570,29 @@ final class GeckoEditable
             sb.append("null");
         } else if (obj instanceof GeckoEditable) {
             sb.append("GeckoEditable");
         } else if (Proxy.isProxyClass(obj.getClass())) {
             debugAppend(sb, Proxy.getInvocationHandler(obj));
         } else if (obj instanceof CharSequence) {
             sb.append("\"").append(obj.toString().replace('\n', '\u21b2')).append("\"");
         } else if (obj.getClass().isArray()) {
-            Class cls = obj.getClass();
-            sb.append(cls.getComponentType().getSimpleName()).append("[")
+            sb.append(obj.getClass().getComponentType().getSimpleName()).append("[")
               .append(java.lang.reflect.Array.getLength(obj)).append("]");
         } else {
             sb.append(obj.toString());
         }
         return sb;
     }
 
     @Override
     public Object invoke(Object proxy, Method method, Object[] args)
                          throws Throwable {
         Object target;
-        final Class methodInterface = method.getDeclaringClass();
+        final Class<?> methodInterface = method.getDeclaringClass();
         if (DEBUG) {
             // Editable methods should all be called from the UI thread
             GeckoApp.assertOnUiThread();
         }
         if (methodInterface == Editable.class ||
                 methodInterface == Appendable.class ||
                 methodInterface == Spannable.class) {
             // Method alters the Editable; route calls to our implementation
@@ -781,16 +780,17 @@ final class GeckoEditable
     }
 
     @Override
     public <T> T[] getSpans(int start, int end, Class<T> type) {
         throw new UnsupportedOperationException();
     }
 
     @Override
+    @SuppressWarnings("rawtypes") // nextSpanTransition uses raw Class in its Android declaration
     public int nextSpanTransition(int start, int limit, Class type) {
         throw new UnsupportedOperationException();
     }
 
     /* CharSequence interface */
 
     @Override
     public char charAt(int index) {
--- a/mobile/android/base/GeckoInputConnection.java
+++ b/mobile/android/base/GeckoInputConnection.java
@@ -588,18 +588,17 @@ final class DebugGeckoInputConnection
             sb.append("null");
         } else if (obj instanceof GeckoEditable) {
             sb.append("GeckoEditable");
         } else if (Proxy.isProxyClass(obj.getClass())) {
             debugAppend(sb, Proxy.getInvocationHandler(obj));
         } else if (obj instanceof CharSequence) {
             sb.append("\"").append(obj.toString().replace('\n', '\u21b2')).append("\"");
         } else if (obj.getClass().isArray()) {
-            Class cls = obj.getClass();
-            sb.append(cls.getComponentType().getSimpleName()).append("[")
+            sb.append(obj.getClass().getComponentType().getSimpleName()).append("[")
               .append(java.lang.reflect.Array.getLength(obj)).append("]");
         } else {
             sb.append(obj.toString());
         }
         return sb;
     }
 
     public Object invoke(Object proxy, Method method, Object[] args)