if (type.isAnnotationPresent(XmlRootElement.class)) {
if (isBadgerFishConventionUsed) {
xsr = new BadgerFishXMLInputFactory().createXMLStreamReader(entityStream);
} else {
xsr =
new MappedXMLInputFactory(inputConfiguration)
.createXMLStreamReader(entityStream);
}
unmarshaledResource = unmarshaller.unmarshal(xsr);
} else {
if (isBadgerFishConventionUsed) {
xsr = new BadgerFishXMLInputFactory().createXMLStreamReader(entityStream);
} else {
xsr =
new MappedXMLInputFactory(inputConfiguration)
.createXMLStreamReader(entityStream);
}
unmarshaledResource = unmarshaller.unmarshal(xsr, type).getValue();
}
} catch (JAXBException e) {