Added private constructors to hide implicit public ones.

Utility classes, which are collections of static members, are not meant to be instantiated. Even abstract utility classes, which can be extended, should not have public constructors.

Java adds an implicit public constructor to every class which does not define at least one explicitly. Hence, at least one non-public constructor should be defined.

Signed-off-by: ardevd <edvard.holst@gmail.com>
This commit is contained in:
ardevd 2019-03-26 22:32:25 +01:00
parent 628c80fa9d
commit 37165b2ac5
No known key found for this signature in database
GPG key ID: C30729EE3C9A3CCE
4 changed files with 19 additions and 0 deletions

View file

@ -2,6 +2,10 @@ package com.nextcloud.android.sso;
public class Constants {
private Constants() {
// No instance
}
// Authenticator related constants
public static final String SSO_USERNAME = "username";
public static final String SSO_TOKEN = "token";

View file

@ -27,6 +27,10 @@ package com.owncloud.android.authentication;
*/
public class OAuth2Constants {
private OAuth2Constants() {
// No instance
}
/// Parameters to send to the Authorization Endpoint
public static final String KEY_RESPONSE_TYPE = "response_type";

View file

@ -35,9 +35,15 @@ public class ProviderMeta {
public static final int DB_VERSION = 44;
private ProviderMeta() {
// No instance
}
static public class ProviderTableMeta implements BaseColumns {
private ProviderTableMeta() {
// No instance
}
public static final String FILE_TABLE_NAME = "filelist";
public static final String OCSHARES_TABLE_NAME = "ocshares";
public static final String CAPABILITIES_TABLE_NAME = "capabilities";

View file

@ -21,6 +21,11 @@ package com.owncloud.android.utils;
* Class containing the mime types.
*/
public class MimeType {
private MimeType() {
// No instance
}
public static final String DIRECTORY = "DIR";
public static final String JPEG = "image/jpeg";
public static final String TIFF = "image/tiff";