heyile commented on a change in pull request #1688: [SCB-1828] Support
@JSONVIEW
URL:
https://github.com/apache/servicecomb-java-chassis/pull/1688#discussion_r404504400
##########
File path:
common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/param/BodyProcessorCreator.java
##########
@@ -64,16 +67,34 @@
public static class BodyProcessor implements ParamValueProcessor {
protected JavaType targetType;
+ protected Class<?> serialViewClass;
+
private boolean isString;
protected boolean isRequired;
public BodyProcessor(JavaType targetType, boolean isString, boolean
isRequired) {
+ this(targetType, null, isString, isRequired);
+ }
+
+ public BodyProcessor(JavaType targetType, String serialViewClass, boolean
isString, boolean isRequired) {
+ if (serialViewClass != null) {
+ try {
+ this.serialViewClass = Class.forName(serialViewClass);
+ } catch (Throwable e) {
+ //ignore
Review comment:
If there is sth wrong when gets **serialViewClass**, it shouldn't affect the
operation of the main process, so just add a log is enough?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services