Bug 714874 part 2 - Fix some Java warnings. r=dougt a=akeybl
authorChris Peterson <cpeterson@mozilla.com>
Fri, 20 Jan 2012 19:36:41 -0800
changeset 85042 254807e329410a88d7eb1dcca3d6fe09fa914cae
parent 85041 8aaa33c0d915883c57c3e97218196c500331fd7b
child 85043 007aa5c56b0ee6e4adbd6820aaa1a8fc4af7f4d4
push id519
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 00:38:35 +0000
treeherdermozilla-beta@788ea1ef610b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdougt, akeybl
bugs714874
milestone11.0a2
Bug 714874 part 2 - Fix some Java warnings. r=dougt a=akeybl
config/android-common.mk
mobile/android/base/AwesomeBar.java
mobile/android/base/db/BrowserProvider.java.in
--- a/config/android-common.mk
+++ b/config/android-common.mk
@@ -64,12 +64,11 @@ ifndef JAVA_VERSION
   JAVA_VERSION = 1.5
 endif
 
 JAVAC_FLAGS = \
   -target $(JAVA_VERSION) \
   -source $(JAVA_VERSION) \
   -classpath $(JAVA_CLASSPATH) \
   -bootclasspath $(JAVA_BOOTCLASSPATH) \
-  -encoding ascii \
+  -encoding UTF8 \
   -g \
   $(NULL)
-
--- a/mobile/android/base/AwesomeBar.java
+++ b/mobile/android/base/AwesomeBar.java
@@ -401,17 +401,17 @@ public class AwesomeBar extends Activity
 
         if (view == (ListView)findViewById(R.id.history_list)) {
             ExpandableListView.ExpandableListContextMenuInfo info = (ExpandableListView.ExpandableListContextMenuInfo) menuInfo;
             ExpandableListView exList = (ExpandableListView)list;
             int childPosition = exList.getPackedPositionChild(info.packedPosition);
             int groupPosition = exList.getPackedPositionGroup(info.packedPosition);
             selectedItem = exList.getExpandableListAdapter().getChild(groupPosition, childPosition);
 
-            Map<String, Object> map = (Map<String, Object>)selectedItem;
+            Map map = (Map)selectedItem;
             title = (String)map.get(URLColumns.TITLE);
         } else {
             AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) menuInfo;
             selectedItem = list.getItemAtPosition(info.position);
 
             Cursor cursor = (Cursor)selectedItem;
             title = cursor.getString(cursor.getColumnIndexOrThrow(URLColumns.TITLE));
         }
@@ -443,17 +443,17 @@ public class AwesomeBar extends Activity
         byte[] b = null;
         String title = "";
         if (mContextMenuSubject instanceof Cursor) {
             Cursor cursor = (Cursor)mContextMenuSubject;
             url = cursor.getString(cursor.getColumnIndexOrThrow(URLColumns.URL));
             b = (byte[]) cursor.getBlob(cursor.getColumnIndexOrThrow(URLColumns.FAVICON));
             title = cursor.getString(cursor.getColumnIndexOrThrow(URLColumns.TITLE));
         } else if (mContextMenuSubject instanceof Map) {
-            Map<String, Object> map = (Map<String, Object>)mContextMenuSubject;
+            Map map = (Map)mContextMenuSubject;
             url = (String)map.get(URLColumns.URL);
             b = (byte[]) map.get(URLColumns.FAVICON);
             title = (String)map.get(URLColumns.TITLE);
         } else {
             return false;
         }
 
         mContextMenuSubject = null;
--- a/mobile/android/base/db/BrowserProvider.java.in
+++ b/mobile/android/base/db/BrowserProvider.java.in
@@ -579,16 +579,17 @@ public class BrowserProvider extends Con
             }
         } else {
             deleted = deleteInTransaction(uri, selection, selectionArgs);
         }
 
         return deleted;
     }
 
+    @SuppressWarnings("fallthrough")
     public int deleteInTransaction(Uri uri, String selection, String[] selectionArgs) {
         Log.d(LOGTAG, "Calling delete in transaction on URI: " + uri);
 
         final int match = URI_MATCHER.match(uri);
         int deleted = 0;
 
         switch (match) {
             case BOOKMARKS_ID:
@@ -783,16 +784,17 @@ public class BrowserProvider extends Con
             }
         } else {
             updated = updateInTransaction(uri, values, selection, selectionArgs);
         }
 
         return updated;
     }
 
+    @SuppressWarnings("fallthrough")
     public int updateInTransaction(Uri uri, ContentValues values, String selection,
             String[] selectionArgs) {
         Log.d(LOGTAG, "Calling update in transaction on URI: " + uri);
 
         int match = URI_MATCHER.match(uri);
         int updated = 0;
 
         switch (match) {