Skip to content
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.

When attributes to export are set, exclude everything else: not only *.class #111

Open
wants to merge 1 commit into
base: spring-roo.1.3.1
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ private MethodMetadataBuilder getToJsonArrayMethod(boolean includeParams) {
bodyBuilder
.appendFormalLine(
(!includeParams ? "" : ".include(fields)")
+ ".exclude(\"*.class\")"
+ (!includeParams ? ".exclude(\"*.class\")": ".exclude(\"*\")")
+ (annotationValues.isDeepSerialize() ? ".deepSerialize(collection)"
: ".serialize(collection)") + ";");

Expand Down Expand Up @@ -306,7 +306,7 @@ private MethodMetadataBuilder getToJsonMethod(boolean includeParams) {
}
bodyBuilder.appendFormalLine(
(!includeParams ? "" : ".include(fields)")
+ ".exclude(\"*.class\")"
+ (!includeParams ? ".exclude(\"*.class\")": ".exclude(\"*\")")
+ (annotationValues.isDeepSerialize() ? ".deepSerialize(this)"
: ".serialize(this)") + ";");

Expand Down