fixed bug, which is cause of CannotCompileException during compiling primitive-type fields annotated by Nullable

This commit is contained in:
Muga Nishizawa
2011-08-09 18:35:42 +09:00
parent 4fa7cffc37
commit 3a5f676687

View File

@@ -142,7 +142,7 @@ public class FieldEntryReader implements IFieldEntryReader{
} else if(isAnnotated(field, Optional.class)) {
return FieldOption.OPTIONAL;
} else if(isAnnotated(field, Nullable.class)) {
if(field.getDeclaringClass().isPrimitive()) {
if(field.getType().isPrimitive()) {
return FieldOption.REQUIRED;
} else {
return FieldOption.NULLABLE;