Skip to content

Commit aaaed19

Browse files
committed
Fix GenericJavaBeanMarshaller includes/excludes for methods
1 parent 5a103ab commit aaaed19

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

grails-plugin-converters/src/main/groovy/org/grails/web/converters/marshaller/json/GenericJavaBeanMarshaller.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ public void marshalObject(Object o, JSON json) throws ConverterException {
5555
for (PropertyDescriptor property : BeanUtils.getPropertyDescriptors(o.getClass())) {
5656
String name = property.getName();
5757
Method readMethod = property.getReadMethod();
58+
59+
if(!shouldInclude(includeExcludeSupport, includes, excludes, o, name)) continue;
60+
5861
if (readMethod != null && !(name.equals("metaClass"))&& !(name.equals("class"))) {
5962
if(readMethod.getAnnotation(PersistenceMethod.class) != null) continue;
6063
if(readMethod.getAnnotation(ControllerMethod.class) != null) continue;

0 commit comments

Comments
 (0)