public <T> T readPayloadAsJAXB(Bridge<T> bridge) throws JAXBException {
   cacheMessage();
   if (!hasPayload()) {
     return null;
   }
   assert unconsumed();
   T r =
       bridge.unmarshal(
           reader, hasAttachments() ? new AttachmentUnmarshallerImpl(getAttachments()) : null);
   XMLStreamReaderUtil.close(reader);
   XMLStreamReaderFactory.recycle(reader);
   return r;
 }
Ejemplo n.º 2
0
 /** @deprecated */
 public <T> T readAsJAXB(Bridge<T> bridge) throws JAXBException {
   return bridge.unmarshal(node);
 }