PMD: Enable and obey SingularField

This commit is contained in:
Daniel Martí 2016-04-23 17:25:04 +01:00
parent 68db3ae353
commit 50b2e6f7a5
3 changed files with 3 additions and 4 deletions

View File

@ -30,14 +30,13 @@ public class FileCompatTest {
private static final String TAG = "FileCompatTest";
private File dir;
private SanitizedFile sourceFile;
private SanitizedFile destFile;
@Before
public void setUp() {
Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation();
dir = TestUtils.getWriteableDir(instrumentation);
File dir = TestUtils.getWriteableDir(instrumentation);
sourceFile = SanitizedFile.knownSanitized(TestUtils.copyAssetToDir(instrumentation.getContext(), "simpleIndex.jar", dir));
destFile = new SanitizedFile(dir, "dest-" + UUID.randomUUID() + ".testproduct");
assertFalse(destFile.exists());

View File

@ -22,7 +22,6 @@ public final class BluetoothSwap extends SwapType {
@NonNull
private final BluetoothAdapter adapter;
private BroadcastReceiver receiver;
private boolean isDiscoverable;
@Nullable
@ -64,7 +63,7 @@ public final class BluetoothSwap extends SwapType {
return;
}
receiver = new BroadcastReceiver() {
BroadcastReceiver receiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
switch (intent.getIntExtra(BluetoothAdapter.EXTRA_SCAN_MODE, -1)) {

View File

@ -26,4 +26,5 @@
<rule ref="rulesets/java/design.xml/EqualsNull"/>
<rule ref="rulesets/java/design.xml/IdempotentOperations"/>
<rule ref="rulesets/java/design.xml/ImmutableField"/>
<rule ref="rulesets/java/design.xml/SingularField"/>
</ruleset>