diff --git a/src/main/java/io/ebean/config/CurrentTenantProvider.java b/src/main/java/io/ebean/config/CurrentTenantProvider.java index 682f4401d..c1be77eeb 100644 --- a/src/main/java/io/ebean/config/CurrentTenantProvider.java +++ b/src/main/java/io/ebean/config/CurrentTenantProvider.java @@ -3,6 +3,7 @@ package io.ebean.config; /** * Provides the Tenant Id for the current request based on the current user. */ +@FunctionalInterface public interface CurrentTenantProvider { /** diff --git a/src/main/java/io/ebean/config/CurrentUserProvider.java b/src/main/java/io/ebean/config/CurrentUserProvider.java index 87387c3d1..45f7b9d1a 100644 --- a/src/main/java/io/ebean/config/CurrentUserProvider.java +++ b/src/main/java/io/ebean/config/CurrentUserProvider.java @@ -3,6 +3,7 @@ package io.ebean.config; /** * Provides the current user in order to support 'Who created', 'Who modified' and other audit features. */ +@FunctionalInterface public interface CurrentUserProvider { /** diff --git a/src/main/java/io/ebean/config/EncryptDeployManager.java b/src/main/java/io/ebean/config/EncryptDeployManager.java index 78823bed7..7abf971e5 100644 --- a/src/main/java/io/ebean/config/EncryptDeployManager.java +++ b/src/main/java/io/ebean/config/EncryptDeployManager.java @@ -3,6 +3,7 @@ package io.ebean.config; /** * Programmatically define which database columns are encrypted. */ +@FunctionalInterface public interface EncryptDeployManager { /** diff --git a/src/main/java/io/ebean/config/EncryptKey.java b/src/main/java/io/ebean/config/EncryptKey.java index b5d72c662..f49357ce5 100644 --- a/src/main/java/io/ebean/config/EncryptKey.java +++ b/src/main/java/io/ebean/config/EncryptKey.java @@ -6,6 +6,7 @@ package io.ebean.config; * For simple cases this often represent a simple String key but depending on * the encryption method this could contain other details. */ +@FunctionalInterface public interface EncryptKey { /** diff --git a/src/main/java/io/ebean/config/EncryptKeyManager.java b/src/main/java/io/ebean/config/EncryptKeyManager.java index dac0cfd21..0917ed052 100644 --- a/src/main/java/io/ebean/config/EncryptKeyManager.java +++ b/src/main/java/io/ebean/config/EncryptKeyManager.java @@ -3,6 +3,7 @@ package io.ebean.config; /** * Determine keys used for encryption and decryption. */ +@FunctionalInterface public interface EncryptKeyManager { /** @@ -11,7 +12,7 @@ public interface EncryptKeyManager { * This gives the EncryptKeyManager the opportunity to get keys etc. *
*/ - void initialise(); + default void initialise() {}; /** * Return the key used to encrypt and decrypt a property mapping to the given diff --git a/src/main/java/io/ebean/config/TenantDataSourceProvider.java b/src/main/java/io/ebean/config/TenantDataSourceProvider.java index fdb895caf..cd4a7e27e 100644 --- a/src/main/java/io/ebean/config/TenantDataSourceProvider.java +++ b/src/main/java/io/ebean/config/TenantDataSourceProvider.java @@ -5,6 +5,7 @@ import javax.sql.DataSource; /** * For multi-tenancy via DB supply the DataSource given the tenantId. */ +@FunctionalInterface public interface TenantDataSourceProvider { /** @@ -15,5 +16,5 @@ public interface TenantDataSourceProvider { /** * Shutdown all the DataSources. */ - void shutdown(boolean deregisterDriver); + default void shutdown(boolean deregisterDriver) {}; } diff --git a/src/main/java/io/ebean/config/TenantSchemaProvider.java b/src/main/java/io/ebean/config/TenantSchemaProvider.java index 7e1fc58b5..063b43631 100644 --- a/src/main/java/io/ebean/config/TenantSchemaProvider.java +++ b/src/main/java/io/ebean/config/TenantSchemaProvider.java @@ -3,6 +3,7 @@ package io.ebean.config; /** * For multi-tenancy via DB SCHEMA supply the schema given the tenantId. */ +@FunctionalInterface public interface TenantSchemaProvider { /** diff --git a/src/main/java/io/ebean/config/dbplatform/DbPlatformTypeMapping.java b/src/main/java/io/ebean/config/dbplatform/DbPlatformTypeMapping.java index c85fef105..6ad6f9e95 100644 --- a/src/main/java/io/ebean/config/dbplatform/DbPlatformTypeMapping.java +++ b/src/main/java/io/ebean/config/dbplatform/DbPlatformTypeMapping.java @@ -13,6 +13,7 @@ public class DbPlatformTypeMapping { private static DbPlatformTypeLookup lookup = new DbPlatformTypeLookup(); private static final DbPlatformType UUID_NATIVE = new DbPlatformType("uuid", false); + @SuppressWarnings("unused") private static final DbPlatformType UUID_PLACEHOLDER = new DbPlatformType("uuidPlaceholder"); private static final DbPlatformType JSON_CLOB_PLACEHOLDER = new DbPlatformType("jsonClobPlaceholder"); private static final DbPlatformType JSON_BLOB_PLACEHOLDER = new DbPlatformType("jsonBlobPlaceholder"); diff --git a/src/main/java/io/ebeaninternal/server/deploy/BeanDescriptor.java b/src/main/java/io/ebeaninternal/server/deploy/BeanDescriptor.java index a29ffcfa7..f37d870be 100644 --- a/src/main/java/io/ebeaninternal/server/deploy/BeanDescriptor.java +++ b/src/main/java/io/ebeaninternal/server/deploy/BeanDescriptor.java @@ -1642,7 +1642,6 @@ public class BeanDescriptor