Permalink
Browse files

pmd: enable migrating rules

  • Loading branch information...
mvdan authored and QuantumBadger committed Dec 5, 2016
1 parent 0471612 commit 62099e05c8618dbb7428275fa233f3071dac3dda
View
@@ -15,6 +15,7 @@
<rule ref="rulesets/java/android.xml"/>
<rule ref="rulesets/java/clone.xml"/>
<rule ref="rulesets/java/finalizers.xml"/>
<rule ref="rulesets/java/migrating.xml"/>
<rule ref="rulesets/java/unnecessary.xml">
<exclude name="UselessParentheses"/> <!--Too nitpicky-->
</rule>
@@ -23,6 +24,9 @@
<rule ref="rulesets/java/optimizations.xml/UseArraysAsList"/>
<rule ref="rulesets/java/optimizations.xml/UnnecessaryWrapperObjectCreation"/>
<rule ref="rulesets/java/controversial.xml/UnnecessaryConstructor"/>
<rule ref="rulesets/java/controversial.xml/UnnecessaryParentheses"/>
<rule ref="rulesets/java/design.xml/FinalFieldCouldBeStatic"/>
<rule ref="rulesets/java/design.xml/CloseResource"/>
<rule ref="rulesets/java/design.xml/DefaultLabelNotLastInSwitchStmt"/>
@@ -21,7 +21,8 @@
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.Hashtable;
import java.util.HashMap;
import java.util.Map;
public final class RedditThing {
@@ -30,10 +31,10 @@
POST, USER, COMMENT, MESSAGE, SUBREDDIT, MORE_COMMENTS, LISTING
}
private static final Hashtable<String, Kind> kinds;
private static final Map<String, Kind> kinds;
static {
kinds = new Hashtable<>();
kinds = new HashMap<>();
kinds.put("t1", Kind.COMMENT);
kinds.put("t2", Kind.USER);
kinds.put("t3", Kind.POST);
@@ -45,7 +45,8 @@
import java.io.IOException;
import java.io.InputStream;
import java.util.Map;
import java.util.Vector;
import java.util.List;
import java.util.ArrayList;
/**
* Created by vishna on 22/07/15.
@@ -162,7 +163,7 @@ public void onPrepared(MediaPlayer mp) {
}
}
};
private Vector<Pair<InputStream, MediaFormat>> mPendingSubtitleTracks;
private List<Pair<InputStream, MediaFormat>> mPendingSubtitleTracks;
private final MediaPlayer.OnCompletionListener mCompletionListener =
new MediaPlayer.OnCompletionListener() {
public void onCompletion(MediaPlayer mp) {
@@ -379,7 +380,7 @@ private void initVideoView() {
setFocusable(true);
setFocusableInTouchMode(true);
requestFocus();
mPendingSubtitleTracks = new Vector<>();
mPendingSubtitleTracks = new ArrayList<>();
mCurrentState = STATE_IDLE;
mTargetState = STATE_IDLE;
}

0 comments on commit 62099e0

Please sign in to comment.