use of com.rabbitmq.jms.util.WhiteListObjectInputStream in project rabbitmq-jms-client by rabbitmq.
the class RMQObjectMessage method getObject.
public Serializable getObject(List<String> trustedPackages) throws JMSException {
if (buf == null) {
return null;
} else {
this.loggerDebugByteArray("Deserialising object from buffer {} for {}", this.buf, "RMQObjectMessage");
ByteArrayInputStream bin = new ByteArrayInputStream(buf);
try {
WhiteListObjectInputStream in = new WhiteListObjectInputStream(bin, trustedPackages);
return (Serializable) in.readObject();
} catch (ClassNotFoundException x) {
throw new RMQJMSException(x);
} catch (IOException x) {
throw new RMQJMSException(x);
}
}
}
Aggregations