summaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/amazon/carbonado/info/StorableIntrospector.java9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/main/java/com/amazon/carbonado/info/StorableIntrospector.java b/src/main/java/com/amazon/carbonado/info/StorableIntrospector.java
index 1ec0575..66276e1 100644
--- a/src/main/java/com/amazon/carbonado/info/StorableIntrospector.java
+++ b/src/main/java/com/amazon/carbonado/info/StorableIntrospector.java
@@ -1010,13 +1010,6 @@ public class StorableIntrospector {
("Must define proper 'get' method for property: " + property.getName());
}
} else {
- if (readMethod.getReturnType() != property.getType()) {
- errorMessages.add
- ("Property type doesn't match accessor method return type: " +
- property.getType().getName() + " != " + readMethod.getReturnType().getName() +
- " for " + readMethod);
- }
-
nullable = readMethod.getAnnotation(Nullable.class);
alias = readMethod.getAnnotation(Alias.class);
version = readMethod.getAnnotation(Version.class);
@@ -1072,7 +1065,7 @@ public class StorableIntrospector {
Class[] writeParams = writeMethod.getParameterTypes();
if (writeParams == null || writeParams.length != 1) {
errorMessages.add("Mutator method must contain one parameter: " + writeMethod);
- } else if (writeParams[0] != property.getType()) {
+ } else if (!writeParams[0].isAssignableFrom(property.getType())) {
errorMessages.add
("Property type doesn't match mutator method parameter: " +
property.getType().getName() + " != " + writeParams[0].getName() +