checkstyle: enable ModifierOrder and apply it

This commit is contained in:
Daniel Martí 2015-10-08 18:59:41 +02:00
parent 7c6888b5d4
commit 2b0e6dade1
12 changed files with 23 additions and 22 deletions

View File

@ -27,9 +27,9 @@ public abstract class FDroidProvider extends ContentProvider {
private boolean isApplyingBatch = false; private boolean isApplyingBatch = false;
abstract protected String getTableName(); protected abstract String getTableName();
abstract protected String getProviderName(); protected abstract String getProviderName();
/** /**
* Should always be the same as the provider:name in the AndroidManifest * Should always be the same as the provider:name in the AndroidManifest
@ -97,7 +97,7 @@ public abstract class FDroidProvider extends ContentProvider {
return "vnd.android.cursor." + type + "/vnd." + AUTHORITY + "." + getProviderName(); return "vnd.android.cursor." + type + "/vnd." + AUTHORITY + "." + getProviderName();
} }
abstract protected UriMatcher getMatcher(); protected abstract UriMatcher getMatcher();
protected String generateQuestionMarksForInClause(int num) { protected String generateQuestionMarksForInClause(int num) {
StringBuilder sb = new StringBuilder(num * 2); StringBuilder sb = new StringBuilder(num * 2);

View File

@ -36,7 +36,7 @@ import java.util.List;
* Abstract Installer class. Also provides static methods to automatically * Abstract Installer class. Also provides static methods to automatically
* instantiate a working Installer based on F-Droids granted permissions. * instantiate a working Installer based on F-Droids granted permissions.
*/ */
abstract public class Installer { public abstract class Installer {
protected final Context mContext; protected final Context mContext;
protected final PackageManager mPm; protected final PackageManager mPm;
protected final InstallerCallback mCallback; protected final InstallerCallback mCallback;

View File

@ -139,7 +139,7 @@ public class SwapService extends Service {
*/ */
public static final int STEP_INITIAL_LOADING = 9; public static final int STEP_INITIAL_LOADING = 9;
private @SwapStep int step = STEP_INTRO; @SwapStep private int step = STEP_INTRO;
/** /**
* Current screen that the swap process is up to. * Current screen that the swap process is up to.
@ -155,7 +155,7 @@ public class SwapService extends Service {
return this; return this;
} }
public @NonNull Set<String> getAppsToSwap() { @NonNull public Set<String> getAppsToSwap() {
return appsToSwap; return appsToSwap;
} }
@ -490,7 +490,7 @@ public class SwapService extends Service {
private BonjourFinder bonjourFinder; private BonjourFinder bonjourFinder;
private BluetoothFinder bluetoothFinder; private BluetoothFinder bluetoothFinder;
private final static int TIMEOUT = 900000; // 15 mins private static final int TIMEOUT = 900000; // 15 mins
/** /**
* Used to automatically turn of swapping after a defined amount of time (15 mins). * Used to automatically turn of swapping after a defined amount of time (15 mins).

View File

@ -15,7 +15,7 @@ public class BluetoothFinder extends PeerFinder<BluetoothPeer> {
private static final String TAG = "BluetoothFinder"; private static final String TAG = "BluetoothFinder";
public final static int DISCOVERABLE_TIMEOUT = 3600; public static final int DISCOVERABLE_TIMEOUT = 3600;
private final BluetoothAdapter adapter; private final BluetoothAdapter adapter;

View File

@ -16,7 +16,7 @@ import org.fdroid.fdroid.net.bluetooth.BluetoothServer;
public class BluetoothSwap extends SwapType { public class BluetoothSwap extends SwapType {
private static final String TAG = "BluetoothSwap"; private static final String TAG = "BluetoothSwap";
public final static String BLUETOOTH_NAME_TAG = "FDroid:"; public static final String BLUETOOTH_NAME_TAG = "FDroid:";
private static BluetoothSwap mInstance = null; private static BluetoothSwap mInstance = null;

View File

@ -17,7 +17,7 @@ import org.fdroid.fdroid.localrepo.SwapService;
*/ */
public abstract class SwapType { public abstract class SwapType {
private final static String TAG = "SwapType"; private static final String TAG = "SwapType";
private boolean isConnected; private boolean isConnected;
@ -28,11 +28,11 @@ public abstract class SwapType {
this.context = context; this.context = context;
} }
abstract public void start(); public abstract void start();
abstract public void stop(); public abstract void stop();
abstract protected String getBroadcastAction(); protected abstract String getBroadcastAction();
public boolean isDiscoverable() { public boolean isDiscoverable() {
return isConnected(); return isConnected();

View File

@ -63,11 +63,12 @@ import java.util.Set;
*/ */
public class AppSecurityPermissions { public class AppSecurityPermissions {
private static final String TAG = "AppSecurityPermissions";
public static final int WHICH_PERSONAL = 1<<0; public static final int WHICH_PERSONAL = 1<<0;
public static final int WHICH_DEVICE = 1<<1; public static final int WHICH_DEVICE = 1<<1;
public static final int WHICH_NEW = 1<<2; public static final int WHICH_NEW = 1<<2;
private final static String TAG = "AppSecurityPermissions";
private final Context mContext; private final Context mContext;
private final LayoutInflater mInflater; private final LayoutInflater mInflater;
private final PackageManager mPm; private final PackageManager mPm;

View File

@ -32,8 +32,8 @@ abstract class PackageReceiver extends BroadcastReceiver {
private static final String TAG = "PackageReceiver"; private static final String TAG = "PackageReceiver";
abstract protected boolean toDiscard(Intent intent); protected abstract boolean toDiscard(Intent intent);
abstract protected void handle(Context context, String appId); protected abstract void handle(Context context, String appId);
protected PackageInfo getPackageInfo(Context context, String appId) { protected PackageInfo getPackageInfo(Context context, String appId) {
for (PackageInfo info : context.getPackageManager().getInstalledPackages(0)) { for (PackageInfo info : context.getPackageManager().getInstalledPackages(0)) {

View File

@ -18,7 +18,7 @@ import org.fdroid.fdroid.R;
import org.fdroid.fdroid.Utils; import org.fdroid.fdroid.Utils;
import org.fdroid.fdroid.data.App; import org.fdroid.fdroid.data.App;
abstract public class AppListAdapter extends CursorAdapter { public abstract class AppListAdapter extends CursorAdapter {
private Context mContext; private Context mContext;
private LayoutInflater mInflater; private LayoutInflater mInflater;
@ -52,9 +52,9 @@ abstract public class AppListAdapter extends CursorAdapter {
} }
abstract protected boolean showStatusUpdate(); protected abstract boolean showStatusUpdate();
abstract protected boolean showStatusInstalled(); protected abstract boolean showStatusInstalled();
private static class ViewHolder { private static class ViewHolder {
TextView name; TextView name;

View File

@ -24,7 +24,7 @@ import org.fdroid.fdroid.data.App;
import org.fdroid.fdroid.data.AppProvider; import org.fdroid.fdroid.data.AppProvider;
import org.fdroid.fdroid.views.AppListAdapter; import org.fdroid.fdroid.views.AppListAdapter;
abstract public class AppListFragment extends ThemeableListFragment implements public abstract class AppListFragment extends ThemeableListFragment implements
AdapterView.OnItemClickListener, AdapterView.OnItemClickListener,
Preferences.ChangeListener, Preferences.ChangeListener,
LoaderManager.LoaderCallbacks<Cursor> { LoaderManager.LoaderCallbacks<Cursor> {

View File

@ -25,7 +25,7 @@ import org.fdroid.fdroid.localrepo.SwapService;
public class SwapConnecting extends LinearLayout implements SwapWorkflowActivity.InnerView { public class SwapConnecting extends LinearLayout implements SwapWorkflowActivity.InnerView {
@SuppressWarnings("unused") @SuppressWarnings("unused")
private final static String TAG = "SwapConnecting"; private static final String TAG = "SwapConnecting";
public SwapConnecting(Context context) { public SwapConnecting(Context context) {
super(context); super(context);

View File

@ -45,7 +45,7 @@
<!--<module name="WhitespaceAfter" />--> <!--<module name="WhitespaceAfter" />-->
<!--<module name="WhitespaceAround" />--> <!--<module name="WhitespaceAround" />-->
<!--<module name="ModifierOrder" />--> <module name="ModifierOrder" />
<module name="RedundantModifier" /> <module name="RedundantModifier" />
<module name="AvoidNestedBlocks" /> <module name="AvoidNestedBlocks" />