mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-13 06:42:57 +00:00
#2093 - Refactor remove isJava7Present() ... we are Java 8+ so Java 7 types are always present - Removing effectively redundant code
This commit is contained in:
1 parent
c6e33ba3ac
commit
53f4739c8f
2 files changed
+1
-21
No files matched your search
@@ -146,8 +146,6 @@ public final class DefaultTypeManager implements TypeManager {
|
||||
|
||||
private final Object objectMapper;
|
||||
|
||||
private final boolean java7Present;
|
||||
|
||||
private final boolean objectMapperPresent;
|
||||
|
||||
private final boolean postgres;
|
||||
@@ -187,8 +185,6 @@ public final class DefaultTypeManager implements TypeManager {
|
||||
* Create the DefaultTypeManager.
|
||||
*/
|
||||
public DefaultTypeManager(DatabaseConfig config, BootupClasses bootupClasses) {
|
||||
|
||||
this.java7Present = config.getClassLoadConfig().isJava7Present();
|
||||
this.jsonDateTime = config.getJsonDateTime();
|
||||
this.jsonDate = config.getJsonDate();
|
||||
this.typeMap = new ConcurrentHashMap<>();
|
||||
@@ -345,13 +341,6 @@ public final class DefaultTypeManager implements TypeManager {
|
||||
}
|
||||
|
||||
private ScalarType<?> checkInterfaceTypes(Class<?> type) {
|
||||
if (java7Present) {
|
||||
return checkJava7InterfaceTypes(type);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private ScalarType<?> checkJava7InterfaceTypes(Class<?> type) {
|
||||
if (java.nio.file.Path.class.isAssignableFrom(type)) {
|
||||
return typeMap.get(java.nio.file.Path.class);
|
||||
}
|
||||
@@ -897,9 +886,7 @@ public final class DefaultTypeManager implements TypeManager {
|
||||
}
|
||||
|
||||
private void initialiseJavaTimeTypes(DatabaseConfig config) {
|
||||
if (java7Present) {
|
||||
typeMap.put(java.nio.file.Path.class, new ScalarTypePath());
|
||||
}
|
||||
typeMap.put(java.nio.file.Path.class, new ScalarTypePath());
|
||||
if (config.getClassLoadConfig().isJavaTimePresent()) {
|
||||
logger.debug("Registering java.time data types");
|
||||
addType(java.time.Period.class, new ScalarTypePeriod());
|
||||
|
||||
Reference in new issue
Block a user