Bug 837775 - Fix some UseValueOf lint warnings. r=bnicholson
authorKartikaya Gupta <kgupta@mozilla.com>
Mon, 04 Feb 2013 15:15:51 -0500
changeset 130669 aa0b91c746654dd34e67257b3ab6fd9055e5cf58
parent 130668 04617b9d49b33698360243090b2e44722258b94f
child 130670 17b8b22c24f89516062a27af9b2d434fc4d5314b
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbnicholson
bugs837775
milestone21.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 837775 - Fix some UseValueOf lint warnings. r=bnicholson
mobile/android/base/GeckoApp.java
mobile/android/base/INISection.java
--- a/mobile/android/base/GeckoApp.java
+++ b/mobile/android/base/GeckoApp.java
@@ -2268,17 +2268,17 @@ abstract public class GeckoApp
             refreshChrome();
         }
     }
 
     @Override
     public Object onRetainNonConfigurationInstance() {
         // Send a non-null value so that we can restart the application, 
         // when activity restarts due to configuration change.
-        return new Boolean(true);
+        return Boolean.TRUE;
     } 
 
     abstract public String getPackageName();
     abstract public String getContentProcessName();
 
     public void addEnvToIntent(Intent intent) {
         Map<String,String> envMap = System.getenv();
         Set<Map.Entry<String,String>> envSet = envMap.entrySet();
--- a/mobile/android/base/INISection.java
+++ b/mobile/android/base/INISection.java
@@ -43,20 +43,19 @@ public class INISection {
         getProperties(); // ensure that we have parsed the file
         return mProperties.get(key);
     }
 
     // get a global property out of the hash table. will return null if the property doesn't exist
     public int getIntProperty(String key) {
         Object val = getProperty(key);
         if (val == null)
-          return -1;
+            return -1;
 
-        Integer i = new Integer(val.toString());
-        return i.intValue();
+        return Integer.parseInt(val.toString());
     }
 
     // get a global property out of the hash table. will return null if the property doesn't exist
     public String getStringProperty(String key) {
         Object val = getProperty(key);
         if (val == null)
           return null;