codacy: utils classes are to be final with private constructor

This commit is contained in:
AndyScherzinger 2018-09-10 21:57:03 +02:00
parent ce4ce8db41
commit 65df2e82b3
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
4 changed files with 16 additions and 4 deletions

View file

@ -28,9 +28,12 @@ import com.owncloud.android.db.PreferenceManager;
import java.security.Key;
public class PushUtils {
public final class PushUtils {
public static final String KEY_PUSH = "push";
private PushUtils() {
}
public static void pushRegistrationToServer() {
// do nothing
}

View file

@ -71,7 +71,7 @@ import java.security.spec.PKCS8EncodedKeySpec;
import java.security.spec.X509EncodedKeySpec;
import java.util.Locale;
public class PushUtils {
public final class PushUtils {
public static final String KEY_PUSH = "push";
private static final String TAG = "PushUtils";
@ -81,6 +81,9 @@ public class PushUtils {
private static final String KEYPAIR_PUB_EXTENSION = ".pub";
private static ArbitraryDataProvider arbitraryDataProvider;
private PushUtils() {
}
public static String generateSHA512Hash(String pushToken) {
MessageDigest messageDigest = null;
try {

View file

@ -78,7 +78,7 @@ import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
/**
* Manager for concurrent access to thumbnails cache.
*/
public class ThumbnailsCacheManager {
public final class ThumbnailsCacheManager {
public static final String PREFIX_RESIZED_IMAGE = "r";
public static final String PREFIX_THUMBNAIL = "t";
@ -103,6 +103,9 @@ public class ThumbnailsCacheManager {
public static final Bitmap mDefaultVideo = BitmapFactory.decodeResource(MainApp.getAppContext().getResources(),
R.drawable.file_movie);
private ThumbnailsCacheManager() {
}
public static class InitDiskCacheTask extends AsyncTask<File, Void, Void> {
@Override

View file

@ -28,9 +28,12 @@ import com.owncloud.android.db.PreferenceManager;
import java.security.Key;
public class PushUtils {
public final class PushUtils {
public static final String KEY_PUSH = "push";
private PushUtils() {
}
public static void pushRegistrationToServer() {
// do nothing
}