A small service builds a temporary preview archive for a single request. After a recent change, the result sometimes retains extra entries between runs, and when a write error occurs, the temporary file remains on disk.
build(PreviewRequest request) method must return an archive for only one input request.requestId must not depend on the previous invocation.build() twice in a row with different PreviewRequest objects, but with the same set of lines.build() with a request where one of the lines causes a write error.javac + java without additional frameworkssrc/main/javaUse line comments to explain the problem, its impact, the fix and how to test it.