Same for e.g. LoanBrokerEsbTestCase. It outputs numerous warning about the deprecated api usage, however, replacing it with this (as per deprecation docs):
Set<?> attachmentNames = message.getOutboundAttachmentNames();
if (attachmentNames != null && !attachmentNames.isEmpty())
{
List<DataHandler> attachments = new ArrayList<DataHandler>();
for (Object attachmentName : attachmentNames)
{
attachments.add(message.getInboundAttachment((String) attachmentName));
}
List<Object> temp = new ArrayList<Object>(Arrays.asList(args));
temp.add(attachments.toArray(new DataHandler[attachments.size()]));
args = temp.toArray();
}
doesn't feel right (iterating over outbound attachmen names, but getting the from the inbound?)
Same for e.g. LoanBrokerEsbTestCase. It outputs numerous warning about the deprecated api usage, however, replacing it with this (as per deprecation docs):
Set<?> attachmentNames = message.getOutboundAttachmentNames(); if (attachmentNames != null && !attachmentNames.isEmpty()) { List<DataHandler> attachments = new ArrayList<DataHandler>(); for (Object attachmentName : attachmentNames) { attachments.add(message.getInboundAttachment((String) attachmentName)); } List<Object> temp = new ArrayList<Object>(Arrays.asList(args)); temp.add(attachments.toArray(new DataHandler[attachments.size()])); args = temp.toArray(); }doesn't feel right (iterating over outbound attachmen names, but getting the from the inbound?)
Set<?> attachmentNames = message.getOutboundAttachmentNames(); if (attachmentNames != null && !attachmentNames.isEmpty()) { List<DataHandler> attachments = new ArrayList<DataHandler>(); for (Object attachmentName : attachmentNames) { attachments.add(message.getInboundAttachment((String) attachmentName)); } List<Object> temp = new ArrayList<Object>(Arrays.asList(args)); temp.add(attachments.toArray(new DataHandler[attachments.size()])); args = temp.toArray(); }