mirror of
https://github.com/nextcloud/android.git
synced 2024-11-22 21:25:35 +03:00
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:
parent
628c80fa9d
commit
37165b2ac5
4 changed files with 19 additions and 0 deletions
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue