PMD: Enable and obey SingularField
This commit is contained in:
parent
68db3ae353
commit
50b2e6f7a5
@ -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());
|
||||
|
@ -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)) {
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user