Who uses resteasy profile arquillian.remote ?
by Rebecca Searls
Module testsuite/arquillian-utils has profile arquillian.remote. This
profile
uses archive org.wildfly.arquillian:wildfly-arquillian-container-remote
when
running tests within the module. The default profile in arquillian-utils
uses
archive org.wildfly.arquillian:wildfly-arquillian-container-managed. Both
profiles have existed since the creation of module
testsuite/arquillian-utils
7/12/16 (RESTEASY-1361).
Is this still used? Who uses it? I am inclined to remove it if no one
vouches for its use.
4 years, 6 months
XmlSeeAlso question
by Stephane Epardaud
Hi,
I was trying to test @XmlSeeAlso, which is intended to work as such:
@XmlSeeAlso(SubType.class)
public class SuperType {}
public class SubType extends SuperType {}
@Path("/")
public class Controller {
@GET
public SuperType get() {
return new SubType();
}
}
So that the marshaller knows to serialise it as a SubType instead of the
declared SuperType. But I can't get the JAXBXmlSeeAlsoProvider provider
to be invoked, because in ServerResponseWriter we do this:
Class type = jaxrsResponse.getEntityClass();
Type generic = jaxrsResponse.getGenericType();
MessageBodyWriter writer = providerFactory.getMessageBodyWriter(
type, generic, annotations, mt);
And `type` is obtained by doing entity.getClass() (so it is SubType)
while `generic` comes from the method declaration (it is SuperType). And
JAXBXmlSeeAlsoProvider.isReadWritable() uses the Class to ask if it has
the @XmlSeeAlso annotation (it does not, because it's the SubType class).
All in all, it works, because we fall back to not needing @XmlSeeAlso
since the class points to the subtype, but the generic type will point
to the superclass and so they're really two different types.
Is this a bug?
4 years, 7 months