PMD: Get closer to obeying unnecessary
Don't enable it just yet, it's way too pedantic with parenthesis.
This commit is contained in:
parent
b4dd9c857e
commit
fddce692db
@ -204,6 +204,7 @@ task pmd(type: Pmd, dependsOn: assembleDebug) {
|
||||
'java-finalizers',
|
||||
'java-imports',
|
||||
'java-migrating',
|
||||
//'java-unnecessary', // too nitpicky with parenthesis
|
||||
]
|
||||
source 'src/main/java'
|
||||
include '**/org/fdroid/**/*.java'
|
||||
|
@ -526,7 +526,7 @@ public class AppDetails extends AppCompatActivity implements ProgressListener, A
|
||||
|
||||
private void onAppChanged() {
|
||||
if (!reset(app.packageName)) {
|
||||
AppDetails.this.finish();
|
||||
this.finish();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -105,12 +105,10 @@ public final class PRNGFixes extends Compatibility {
|
||||
|
||||
// Install a Linux PRNG-based SecureRandom implementation as the
|
||||
// default, if not yet installed.
|
||||
Provider[] secureRandomProviders =
|
||||
Security.getProviders("SecureRandom.SHA1PRNG");
|
||||
if ((secureRandomProviders == null)
|
||||
|| (secureRandomProviders.length < 1)
|
||||
|| (!LinuxPRNGSecureRandomProvider.class.equals(
|
||||
secureRandomProviders[0].getClass()))) {
|
||||
Provider[] secureRandomProviders = Security.getProviders("SecureRandom.SHA1PRNG");
|
||||
if (secureRandomProviders == null
|
||||
|| secureRandomProviders.length < 1
|
||||
|| !LinuxPRNGSecureRandomProvider.class.equals(secureRandomProviders[0].getClass())) {
|
||||
Security.insertProviderAt(new LinuxPRNGSecureRandomProvider(), 1);
|
||||
}
|
||||
|
||||
|
@ -79,8 +79,8 @@ class BonjourFinder extends PeerFinder implements ServiceListener {
|
||||
}
|
||||
|
||||
Utils.debugLog(TAG, "Adding mDNS service listeners for " + HTTP_SERVICE_TYPE + " and " + HTTPS_SERVICE_TYPE);
|
||||
jmdns.addServiceListener(HTTP_SERVICE_TYPE, BonjourFinder.this);
|
||||
jmdns.addServiceListener(HTTPS_SERVICE_TYPE, BonjourFinder.this);
|
||||
jmdns.addServiceListener(HTTP_SERVICE_TYPE, this);
|
||||
jmdns.addServiceListener(HTTPS_SERVICE_TYPE, this);
|
||||
listServices();
|
||||
}
|
||||
|
||||
|
@ -197,11 +197,6 @@ public class InstallConfirmActivity extends Activity implements OnCancelListener
|
||||
startInstallConfirm();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
super.onBackPressed();
|
||||
}
|
||||
|
||||
// Generic handling when pressing back key
|
||||
public void onCancel(DialogInterface dialog) {
|
||||
finish();
|
||||
|
@ -199,7 +199,7 @@ public class AvailableAppsFragment extends AppListFragment implements
|
||||
private void setCurrentCategory(String category) {
|
||||
currentCategory = category;
|
||||
Utils.debugLog(TAG, "Category '" + currentCategory + "' selected.");
|
||||
getLoaderManager().restartLoader(0, null, AvailableAppsFragment.this);
|
||||
getLoaderManager().restartLoader(0, null, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -250,7 +250,7 @@ public class SwapAppsView extends ListView implements
|
||||
Apk apk = getApkToInstall();
|
||||
String broadcastUrl = intent.getStringExtra(Downloader.EXTRA_ADDRESS);
|
||||
|
||||
if (apk != null && apk.repoAddress != null && (!TextUtils.equals(Utils.getApkUrl(apk.repoAddress, apk), broadcastUrl))) {
|
||||
if (apk != null && apk.repoAddress != null && !TextUtils.equals(Utils.getApkUrl(apk.repoAddress, apk), broadcastUrl)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -795,7 +795,7 @@ public class SwapWorkflowActivity extends AppCompatActivity {
|
||||
private void handleDownloadComplete(File apkFile, String packageName) {
|
||||
|
||||
try {
|
||||
Installer.getActivityInstaller(SwapWorkflowActivity.this, new Installer.InstallerCallback() {
|
||||
Installer.getActivityInstaller(this, new Installer.InstallerCallback() {
|
||||
@Override
|
||||
public void onSuccess(int operation) {
|
||||
// TODO: Don't reload the view weely-neely, but rather get the view to listen
|
||||
|
Loading…
x
Reference in New Issue
Block a user