Closed Bug 1081397 Opened 10 years ago Closed 10 years ago

Declare lots of effectively-final fields as final.

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 35

People

(Reporter: ckitching, Assigned: ckitching)

Details

Attachments

(1 file, 1 obsolete file)

Because why not?
Attached patch Finalise large numbers of fields (obsolete) — Splinter Review
Attachment #8503489 - Flags: review?(rnewman)
Comment on attachment 8503489 [details] [diff] [review]
Finalise large numbers of fields

Review of attachment 8503489 [details] [diff] [review]:
-----------------------------------------------------------------

rs=me.

Don't forget to upstream.

If this lands before 35 merges, I'll be happy -- makes it easier to uplift patches from 36.

::: mobile/android/base/gfx/Axis.java
@@ +129,5 @@
>      private float mFirstTouchPos;           /* Position of the first touch event on the current drag. */
>      private float mTouchPos;                /* Position of the most recent touch event on the current drag. */
>      private float mLastTouchPos;            /* Position of the touch event before touchPos. */
>      private float mVelocity;                /* Velocity in this direction; pixels per animation frame. */
> +    private final float[] mRecentVelocities;      /* Circular buffer of recent velocities since last touch start. */

Cursed alignment.

::: mobile/android/base/preferences/AndroidImport.java
@@ +21,5 @@
>  
>  import java.util.ArrayList;
>  
>  class AndroidImport implements Runnable {
>      static final private String LOGTAG = "AndroidImport";

Change this to private static final.

::: mobile/android/base/preferences/AndroidImportPreference.java
@@ +15,5 @@
>  import android.util.AttributeSet;
>  import android.util.Log;
>  
>  class AndroidImportPreference extends MultiPrefMultiChoicePreference {
>      static final private String LOGTAG = "AndroidImport";

Same.

::: mobile/android/base/sync/jpake/JPakeClient.java
@@ +37,5 @@
>  import ch.boye.httpclientandroidlib.entity.StringEntity;
>  
>  public class JPakeClient {
>  
> +  private static final String       LOG_TAG                 = "JPakeClient";

Eliminate the block indenting here.
Attachment #8503489 - Flags: review?(rnewman) → review+
What, *all* of the block indenting? Well, okay. It's certainly nicer if we get rid of it.
Attachment #8503489 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/e925a610e68d
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 35
Upstreamed.
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: