graftJar

private fun graftJar(jar: File, items: List<Pair<String, String?>>, jos: JarOutputStream): Int

A failing jar costs only its own targets — what it already wrote stays, and the caller's count reports the shortfall against the plan.