Woonsan Ko pushed to branch feature/HSTTWO-3917 at cms-community / hippo-site-toolkit
Commits: 936d5a5b by Woonsan Ko at 2017-02-13T13:57:24-05:00 HSTTWO-3917: Fixing unit test. - - - - - 2 changed files: - client-modules/page-composer/src/test/java/org/hippoecm/hst/pagecomposer/jaxrs/services/RootResourceTest.java - cms-restapi/src/main/java/org/hippoecm/hst/rest/custom/AnnotationJsonSerializer.java Changes: ===================================== client-modules/page-composer/src/test/java/org/hippoecm/hst/pagecomposer/jaxrs/services/RootResourceTest.java ===================================== --- a/client-modules/page-composer/src/test/java/org/hippoecm/hst/pagecomposer/jaxrs/services/RootResourceTest.java +++ b/client-modules/page-composer/src/test/java/org/hippoecm/hst/pagecomposer/jaxrs/services/RootResourceTest.java @@ -49,6 +49,7 @@ import org.hippoecm.hst.configuration.channel.ChannelException; import org.hippoecm.hst.configuration.channel.exceptions.ChannelNotFoundException; import org.hippoecm.hst.configuration.hosting.Mount; import org.hippoecm.hst.core.parameters.DropDownList; +import org.hippoecm.hst.core.parameters.EmptyValueListProvider; import org.hippoecm.hst.core.parameters.HstValueType; import org.hippoecm.hst.core.parameters.ValueListProvider; import org.hippoecm.hst.core.request.HstRequestContext; @@ -404,7 +405,7 @@ public class RootResourceTest extends AbstractResourceTest { @Override public Class<? extends ValueListProvider> valueListProvider() { - return null; + return EmptyValueListProvider.class; } }; } ===================================== cms-restapi/src/main/java/org/hippoecm/hst/rest/custom/AnnotationJsonSerializer.java ===================================== --- a/cms-restapi/src/main/java/org/hippoecm/hst/rest/custom/AnnotationJsonSerializer.java +++ b/cms-restapi/src/main/java/org/hippoecm/hst/rest/custom/AnnotationJsonSerializer.java @@ -160,6 +160,8 @@ public class AnnotationJsonSerializer extends StdSerializer<Annotation> { serializeCharArray(method, value, jgen); } else if (method.getReturnType() == String[].class) { serializeStringArray(method, value, jgen); + } else if (method.getReturnType() == Class.class) { + jgen.writeStringField(method.getName(), method.getReturnType().toString()); } else { throw new IllegalArgumentException("Unrecognized attribute value type " + method.getReturnType().getName() + " for annotation " + value.annotationType().getName()); View it on GitLab: https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/936d5a5b3515d727119e24154a1cfb20b24fea22
_______________________________________________ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn