Bug 734316 - Part 6: fix more PMD and checkstyle warnings. r=trivial
authorRichard Newman <rnewman@mozilla.com>
Fri, 20 Jul 2012 00:48:10 -0700
changeset 99927 b1b3e5c996c525f3181b5db0f2bc1f2dcb22c1b7
parent 99926 45f37b38a34a6aaf9ba0dfd12fcfeec7db34d1fd
child 99928 8ce551fb64cf24a3711cfef8f8f385332007dd08
push id12252
push userrnewman@mozilla.com
push dateFri, 20 Jul 2012 17:21:07 +0000
treeherdermozilla-inbound@8ce551fb64cf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstrivial
bugs734316
milestone17.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 734316 - Part 6: fix more PMD and checkstyle warnings. r=trivial
mobile/android/base/sync/config/AccountPickler.java
--- a/mobile/android/base/sync/config/AccountPickler.java
+++ b/mobile/android/base/sync/config/AccountPickler.java
@@ -73,17 +73,17 @@ public class AccountPickler {
    * @param context Android context.
    * @param filename name of file to persist to; must not contain path separators.
    * @param params the Sync account's parameters.
    * @param syncAutomatically whether the Android Account object is syncing automatically.
    */
   public static void pickle(final Context context, final String filename,
       final SyncAccountParameters params, final boolean syncAutomatically) {
     final ExtendedJSONObject o = params.asJSON();
-    o.put(Constants.JSON_KEY_SYNC_AUTOMATICALLY, new Boolean(syncAutomatically));
+    o.put(Constants.JSON_KEY_SYNC_AUTOMATICALLY, Boolean.valueOf(syncAutomatically));
     o.put(Constants.JSON_KEY_VERSION, new Long(VERSION));
     o.put(Constants.JSON_KEY_TIMESTAMP, new Long(System.currentTimeMillis()));
 
     PrintStream ps = null;
     try {
       final FileOutputStream fos = context.openFileOutput(filename, Context.MODE_PRIVATE);
       ps = new PrintStream(fos);
       ps.print(o.toJSONString());
@@ -128,17 +128,17 @@ public class AccountPickler {
     } catch (IllegalArgumentException e) {
       Logger.warn(LOG_TAG, "Un-pickled data included null username, password, or serverURL; aborting.", e);
       return null;
     }
 
     // Default to syncing automatically.
     boolean syncAutomatically = true;
     if (json.containsKey(Constants.JSON_KEY_SYNC_AUTOMATICALLY)) {
-      if ((new Boolean(false)).equals(json.get(Constants.JSON_KEY_SYNC_AUTOMATICALLY))) {
+      if (Boolean.FALSE.equals(json.get(Constants.JSON_KEY_SYNC_AUTOMATICALLY))) {
         syncAutomatically = false;
       }
     }
 
     final Account account = SyncAccounts.createSyncAccountPreservingExistingPreferences(params, syncAutomatically);
     if (account == null) {
       Logger.warn(LOG_TAG, "Failed to add Android Account; aborting.");
       return null;