Source:
<code>private ProtocolResponseMessage createResponseMessage(final Message message) throws JMSException { final ResponseMessage responseMessage = (ResponseMessage) ((ObjectMessage) message).getObject(); final ObjectMessage objectMessage = (ObjectMessage) message; final OsgpException osgpException = responseMessage.getOsgpException() == null ? null : responseMessage .getOsgpException(); final String correlationUid = objectMessage.getJMSCorrelationID(); final String messageType = objectMessage.getJMSType(); final String domain = objectMessage.getStringProperty(Constants.DOMAIN); final String domainVersion = objectMessage.getStringProperty(Constants.DOMAIN_VERSION); final String organisationIdentification = objectMessage .getStringProperty(Constants.ORGANISATION_IDENTIFICATION); final String deviceIdentification = objectMessage.getStringProperty(Constants.DEVICE_IDENTIFICATION); final ResponseMessageResultType responseMessageResultType = ResponseMessageResultType.valueOf(objectMessage .getStringProperty(Constants.RESULT)); final Serializable dataObject = responseMessage.getDataObject() == null ? null : responseMessage <START> .getDataObject(); <END> final boolean scheduled = objectMessage.propertyExists(Constants.IS_SCHEDULED) ? objectMessage .getBooleanProperty(Constants.IS_SCHEDULED) : false; final int retryCount = objectMessage.getIntProperty(Constants.RETRY_COUNT); final int messagePriority = message.getJMSPriority(); return new ProtocolResponseMessage.Builder() .domain(domain) .domainVersion(domainVersion) .messageType(messageType) .correlationUid(correlationUid) .organisationIdentification(organisationIdentification) .deviceIdentification(deviceIdentification) .result(responseMessageResultType) .osgpException(osgpException) .dataObject(dataObject) .scheduled(scheduled) .retryCount(retryCount) .messagePriority(messagePriority) .build(); }</code><technical_language>just: final Serializable dataObject = responseMessage.getDataObject();</technical_language>

Target:
private ProtocolResponseMessage createResponseMessage(final Message message) throws JMSException { final ResponseMessage responseMessage = (ResponseMessage) ((ObjectMessage) message).getObject(); final OsgpException osgpException = responseMessage.getOsgpException() == null ? null : responseMessage .getOsgpException(); final String domain = message.getStringProperty(Constants.DOMAIN); final String domainVersion = message.getStringProperty(Constants.DOMAIN_VERSION); final ResponseMessageResultType responseMessageResultType = ResponseMessageResultType.valueOf(message .getStringProperty(Constants.RESULT)); final Serializable dataObject = responseMessage.getDataObject(); boolean scheduled = false; if (message.propertyExists(Constants.IS_SCHEDULED)) { scheduled = message.getBooleanProperty(Constants.IS_SCHEDULED); } final int retryCount = message.getIntProperty(Constants.RETRY_COUNT); final DeviceMessageMetadata deviceMessageMetadata = new DeviceMessageMetadata(message); return new ProtocolResponseMessage.Builder() .deviceMessageMetadata(deviceMessageMetadata) .domain(domain) .domainVersion(domainVersion) .result(responseMessageResultType) .osgpException(osgpException) .dataObject(dataObject) .scheduled(scheduled) .retryCount(retryCount) .build(); }