mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Move the internal serviceObjectKey() methods back into DatabaseConfig
They were incorrectly extracted to the interface as default methods
This commit is contained in:
@@ -79,15 +79,6 @@ public interface DatabaseBuilder {
|
||||
*/
|
||||
void putServiceObject(Object configObject);
|
||||
|
||||
default String serviceObjectKey(Object configObject) {
|
||||
return serviceObjectKey(configObject.getClass());
|
||||
}
|
||||
|
||||
default String serviceObjectKey(Class<?> cls) {
|
||||
String simpleName = cls.getSimpleName();
|
||||
return Character.toLowerCase(simpleName.charAt(0)) + simpleName.substring(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Jackson JsonFactory to use.
|
||||
* <p>
|
||||
|
||||
@@ -386,7 +386,7 @@ public class DatabaseConfig implements DatabaseBuilder.Settings {
|
||||
* Note: It is possible that multiple servers are sharing the same state file as
|
||||
* long as they are in the <b>same</b> JVM/ClassLoader scope. In this case it is
|
||||
* recommended to use the same uuidNodeId configuration.
|
||||
*
|
||||
* <p>
|
||||
* If you have multiple servers in different JVMs, do <b>not</b> share the state
|
||||
* files!
|
||||
*/
|
||||
@@ -610,6 +610,15 @@ public class DatabaseConfig implements DatabaseBuilder.Settings {
|
||||
return (P) serviceObject.get(serviceObjectKey(cls));
|
||||
}
|
||||
|
||||
private String serviceObjectKey(Object configObject) {
|
||||
return serviceObjectKey(configObject.getClass());
|
||||
}
|
||||
|
||||
private String serviceObjectKey(Class<?> cls) {
|
||||
String simpleName = cls.getSimpleName();
|
||||
return Character.toLowerCase(simpleName.charAt(0)) + simpleName.substring(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonFactory getJsonFactory() {
|
||||
return jsonFactory;
|
||||
|
||||
Reference in New Issue
Block a user