private void ensureSize(int idx) { while (idx >= size()) { add(REMOVED_MARKER); } }
private void ensureSize(int idx) { while (idx >= size()) { add(REMOVED_MARKER); } }
private void ensureSize(int idx) { while (idx >= size()) { add(REMOVED_MARKER); } }
private void ensureSize(int idx) { while (idx >= size()) { add(REMOVED_MARKER); } }
/** * Ensures that each part's content is in the right place in the content list. * <p/> * This is required because in some scenarios there are parts that were removed from * the part list. In that cases, the content list contains only the values for the * remaining parts, but the part's indexes could be wrong. This method fixes that * adding null values into the content list so the part's index matches the contentList * index. (Related to: MULE-5113.) */ protected void ensurePartIndexMatchListIndex(MessageContentsList contentList, List<MessagePartInfo> parts) { // In some circumstances, parts is a {@link UnmodifiableList} instance, so a new copy // is required in order to sort its content. List<MessagePartInfo> sortedParts = new LinkedList<MessagePartInfo>(); sortedParts.addAll(parts); sortPartsByIndex(sortedParts); int currentIndex = 0; for (MessagePartInfo part : sortedParts) { while (part.getIndex() > currentIndex) { contentList.add(currentIndex++, null); } // Skips the index for the current part because now is in the right place currentIndex = part.getIndex() + 1; } }
public void handleMessage(Message message) throws Fault { ReversibleXMLStreamReader reader = message.getContent(ReversibleXMLStreamReader.class); reader.reset(); // Replace the message contents because if you're using WSS4J, it leaves the // stream pointing to the body, when we want it pointing to the envelope. MessageContentsList parameters = new MessageContentsList(); parameters.add(reader); message.setContent(List.class, parameters); } }
params.add(null); message.setContent(List.class, params); if (op == null) {
params.add(null); message.setContent(List.class, params); if (op == null) {
if (forceDocLitBare && parameters.isEmpty()) { parameters.add(o); } else { parameters.put(p, o);
if (forceDocLitBare && parameters.isEmpty()) { parameters.add(o); } else { parameters.put(p, o);
if (forceDocLitBare && parameters.isEmpty()) { parameters.add(o); } else { parameters.put(p, o);