Bug 1258703 - avoid null pointer dereference on |subject|. r=sebastian
authorAndi-Bogdan Postelnicu <bogdan.postelnicu@softvision.ro>
Wed, 23 Mar 2016 13:21:55 +0200
changeset 290043 bc476c66d225412b0aaace0de9e06e3d1eaef15b
parent 290042 e8bbee9743bd8a8c5100bc7a1b5f235cdef7f80b
child 290044 2e636d5fcda8ec844e2fc917cccd4126b80f4137
push id30114
push usercbook@mozilla.com
push dateThu, 24 Mar 2016 15:15:54 +0000
treeherdermozilla-central@24c5fbde4488 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian
bugs1258703
milestone48.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 1258703 - avoid null pointer dereference on |subject|. r=sebastian MozReview-Commit-ID: 1LIxfWu7jEW
mobile/android/stumbler/java/org/mozilla/mozstumbler/service/stumblerthread/Reporter.java
--- a/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/stumblerthread/Reporter.java
+++ b/mobile/android/stumbler/java/org/mozilla/mozstumbler/service/stumblerthread/Reporter.java
@@ -101,17 +101,17 @@ public final class Reporter extends Broa
 
     private void receivedCellMessage(Intent intent) {
         List<CellInfo> results = intent.getParcelableArrayListExtra(CellScanner.ACTION_CELLS_SCANNED_ARG_CELLS);
         putCellResults(results);
     }
 
     private void receivedGpsMessage(Intent intent) {
         String subject = intent.getStringExtra(Intent.EXTRA_SUBJECT);
-        if (subject.equals(GPSScanner.SUBJECT_NEW_LOCATION)) {
+        if (GPSScanner.SUBJECT_NEW_LOCATION.equals(subject)) {
             reportCollectedLocation();
             Location newPosition = intent.getParcelableExtra(GPSScanner.NEW_LOCATION_ARG_LOCATION);
             mBundle = (newPosition != null) ? new StumblerBundle(newPosition, mPhoneType) : mBundle;
         }
     }
 
     @Override
     public void onReceive(Context context, Intent intent) {