Bug 873338 - JavaDoc and checkstyle warnings. r=trivial, a=lsblakk
authorRichard Newman <rnewman@mozilla.com>
Wed, 22 May 2013 10:23:29 -0700
changeset 142914 b79211aa232d7146dd0adbd02c5ce7e995fa7893
parent 142913 b4716fe1ccbe83300ddcb78e7c1368c287126062
child 142915 17c339776b9fe10441db27067d7cd7eb7bfdfaa2
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstrivial, lsblakk
bugs873338
milestone23.0a2
Bug 873338 - JavaDoc and checkstyle warnings. r=trivial, a=lsblakk
mobile/android/base/background/announcements/AnnouncementsService.java
mobile/android/base/background/bagheera/DeflateHelper.java
mobile/android/base/background/healthreport/HealthReportGenerator.java
mobile/android/base/sync/ExtendedJSONObject.java
--- a/mobile/android/base/background/announcements/AnnouncementsService.java
+++ b/mobile/android/base/background/announcements/AnnouncementsService.java
@@ -123,21 +123,16 @@ public class AnnouncementsService extend
       return;
     }
 
     // Otherwise, grab our announcements URL and process the contents.
     AnnouncementsFetcher.fetchAndProcessAnnouncements(getLastLaunch(), this);
   }
 
   @Override
-  public void onDestroy() {
-    super.onDestroy();
-  }
-
-  @Override
   public IBinder onBind(Intent intent) {
     return null;
   }
 
   protected long getLastLaunch() {
     return getSharedPreferences().getLong(AnnouncementsConstants.PREF_LAST_LAUNCH, 0);
   }
 
--- a/mobile/android/base/background/bagheera/DeflateHelper.java
+++ b/mobile/android/base/background/bagheera/DeflateHelper.java
@@ -38,28 +38,27 @@ public class DeflateHelper {
     return length;
   }
 
   /**
    * Deflate the input, returning an HttpEntity that offers an accurate window
    * on the output.
    *
    * Note that this method does not trim the output array. (Test code can use
-   * {@link TestDeflation#deflateTrimmed(byte[])}.)
+   * TestDeflation#deflateTrimmed(byte[]).)
    *
    * Trimming would be more efficient for long-term space use, but we expect this
    * entity to be transient.
    *
    * Note also that deflate can require <b>more</b> space than the input.
    * {@link #deflateBound(int)} tells us the most it will use.
    *
    * @param bytes the input to deflate.
    * @return the deflated input as an entity.
    */
-  @SuppressWarnings("javadoc")
   public static HttpEntity deflateBytes(final byte[] bytes) {
     // We would like to use DeflaterInputStream here, but it's minSDK=9, and we
     // still target 8. It would also force us to use chunked Transfer-Encoding,
     // so perhaps it's for the best!
 
     final byte[] out = new byte[deflateBound(bytes.length)];
     final int outLength = deflate(bytes, out);
     return new BoundedByteArrayEntity(out, 0, outLength);
--- a/mobile/android/base/background/healthreport/HealthReportGenerator.java
+++ b/mobile/android/base/background/healthreport/HealthReportGenerator.java
@@ -129,16 +129,17 @@ public class HealthReportGenerator {
             measurement.put(field.fieldName, discrete);
           }
           if (field.isStringField()) {
             discrete.add(cursor.getString(3));
           } else if (field.isIntegerField()) {
             discrete.add(cursor.getLong(3));
           } else {
             // Uh oh!
+            throw new IllegalStateException("Unknown field type: " + field.flags);
           }
         } else {
           if (field.isStringField()) {
             measurement.put(field.fieldName, cursor.getString(3));
           } else {
             measurement.put(field.fieldName, cursor.getLong(3));
           }
         }
--- a/mobile/android/base/sync/ExtendedJSONObject.java
+++ b/mobile/android/base/sync/ExtendedJSONObject.java
@@ -110,17 +110,17 @@ public class ExtendedJSONObject {
     }
 
     throw new NonArrayJSONException(o);
   }
 
   /**
    * Helper method to get a JSON object from a stream.
    *
-   * @param jsonString input.
+   * @param in input {@link Reader}.
    * @throws ParseException
    * @throws IOException
    * @throws NonArrayJSONException if the object is valid JSON, but not an object.
    */
   public static ExtendedJSONObject parseJSONObject(Reader in)
       throws IOException, ParseException, NonObjectJSONException {
     return new ExtendedJSONObject(in);
   }