cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject [cayenne] branch master updated: minor cleanup, no change
Date Sat, 16 May 2020 12:08:06 GMT
This is an automated email from the ASF dual-hosted git repository.

aadamchik pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cayenne.git


The following commit(s) were added to refs/heads/master by this push:
     new 2354e0e  minor cleanup, no change
2354e0e is described below

commit 2354e0ea14c60fe3306728a28eb91488a6c007da
Author: Andrus Adamchik <andrus@objectstyle.com>
AuthorDate: Sat May 16 15:07:55 2020 +0300

    minor cleanup, no change
---
 .../access/types/DefaultValueObjectTypeRegistry.java        | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/cayenne-server/src/main/java/org/apache/cayenne/access/types/DefaultValueObjectTypeRegistry.java
b/cayenne-server/src/main/java/org/apache/cayenne/access/types/DefaultValueObjectTypeRegistry.java
index 0f545ae..400b095 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/access/types/DefaultValueObjectTypeRegistry.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/access/types/DefaultValueObjectTypeRegistry.java
@@ -31,7 +31,7 @@ import org.apache.cayenne.di.Inject;
  */
 public class DefaultValueObjectTypeRegistry implements ValueObjectTypeRegistry {
 
-    final Map<String, ValueObjectType<?,?>> typeCache;
+    final Map<String, ValueObjectType> typeCache;
 
     public DefaultValueObjectTypeRegistry(@Inject List<ValueObjectType<?, ?>>
valueObjectTypeList) {
         typeCache = new ConcurrentHashMap<>();
@@ -43,17 +43,10 @@ public class DefaultValueObjectTypeRegistry implements ValueObjectTypeRegistry
{
             typeCache.put(valueObjectType.getValueType().getName(), valueObjectType);
         }
     }
-
-    /**
-     * @inheritDoc
-     */
+    
     @SuppressWarnings("unchecked")
     @Override
     public <T> ValueObjectType<T, ?> getValueType(Class<? extends T> valueClass)
{
-        ValueObjectType type = typeCache.get(valueClass.getName());
-        if(type == null) {
-            return null;
-        }
-        return type;
+        return typeCache.get(valueClass.getName());
     }
 }


Mime
View raw message