Bug 1081276: Don't use Java assertions. r=rnewman
authorChris Kitching <chriskitching@linux.com>
Fri, 10 Oct 2014 20:40:20 +0100
changeset 209921 1ef3c935199a778ce6591003a480b07bfd846849
parent 209920 f216320d85384686c3fd8b8b2867d2d3349bb837
child 209922 611ffa760b443c10e1d558a2250749c97b6ebc47
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersrnewman
bugs1081276
milestone35.0a1
Bug 1081276: Don't use Java assertions. r=rnewman
mobile/android/base/webapp/InstallListener.java
--- a/mobile/android/base/webapp/InstallListener.java
+++ b/mobile/android/base/webapp/InstallListener.java
@@ -5,16 +5,17 @@
 
 package org.mozilla.gecko.webapp;
 
 import java.io.File;
 import java.io.IOException;
 
 import org.json.JSONException;
 import org.json.JSONObject;
+import org.mozilla.gecko.Assert;
 import org.mozilla.gecko.GeckoThread;
 
 import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.Intent;
 import android.content.pm.PackageManager.NameNotFoundException;
 import android.text.TextUtils;
 import android.util.Log;
@@ -26,18 +27,18 @@ public class InstallListener extends Bro
     private String mManifestUrl;
     private boolean mReceived;
     private File mApkFile;
 
     public InstallListener(String manifestUrl, JSONObject data, File apkFile) {
         mData = data;
         mApkFile = apkFile;
         mManifestUrl = manifestUrl;
-        assert mManifestUrl != null;
-        assert mApkFile != null && mApkFile.exists();
+        Assert.isNotNull(mManifestUrl);
+        Assert.isTrue(mApkFile != null && mApkFile.exists());
     }
 
     public boolean isReceived() {
         return mReceived;
     }
 
     @Override
     public void onReceive(Context context, Intent intent) {