if(fpPlan.hasNewPatches()) { for(FPID patchId : fpPlan.getNewPatches()) { fpBuilder.addPatch(patchId); if(fpPlan.hasNewPatches()) { for(FPID patchId : fpPlan.getNewPatches()) { fpBuilder.addPatch(patchId); if (update.hasNewPatches()) { for (FPID patchId : update.getNewPatches()) { fpBuilder.addPatch(patchId);
private static void readPatches(XMLExtendedStreamReader reader, FeaturePackConfig.Builder fpConfigBuilder, FeaturePackDepsConfigBuilder<?> depsBuilder) throws XMLStreamException { ParsingUtils.parseNoAttributes(reader); while (reader.hasNext()) { switch (reader.nextTag()) { case XMLStreamConstants.END_ELEMENT: { return; } case XMLStreamConstants.START_ELEMENT: { final Element element = Element.of(reader.getLocalName()); switch (element) { case PATCH: final FPID patchId = readPatch(reader, depsBuilder); try { fpConfigBuilder.addPatch(patchId); } catch (ProvisioningDescriptionException e) { throw new XMLStreamException("Failed to add patch " + patchId + " to config", e); } break; default: throw ParsingUtils.unexpectedContent(reader); } break; } default: { throw ParsingUtils.unexpectedContent(reader); } } } throw ParsingUtils.endOfDocument(reader.getLocation()); }
private static void readPatches(XMLExtendedStreamReader reader, FeaturePackConfig.Builder fpConfigBuilder, FeaturePackDepsConfigBuilder<?> depsBuilder) throws XMLStreamException { ParsingUtils.parseNoAttributes(reader); while (reader.hasNext()) { switch (reader.nextTag()) { case XMLStreamConstants.END_ELEMENT: { return; } case XMLStreamConstants.START_ELEMENT: { final Element element = Element.of(reader.getLocalName()); switch (element) { case PATCH: final FPID patchId = readPatch(reader, depsBuilder); try { fpConfigBuilder.addPatch(patchId); } catch (ProvisioningDescriptionException e) { throw new XMLStreamException("Failed to add patch " + patchId + " to config", e); } break; default: throw ParsingUtils.unexpectedContent(reader); } break; } default: { throw ParsingUtils.unexpectedContent(reader); } } } throw ParsingUtils.endOfDocument(reader.getLocation()); }