elharo opened a new pull request, #258:
URL: https://github.com/apache/maven-artifact-plugin/pull/258

   Fixes https://github.com/apache/maven-artifact-plugin/issues/257
   
   `BuildInfoWriter` used a `PrintWriter`, which swallows I/O errors and never 
calls `checkError()`. This replaces it with a plain `Writer` so write failures 
surface as `IOException`.
   
   Changes:
   - `BuildInfoWriter` now takes a `Writer`, and every `println(...)` is 
written via `write(...)` with an explicit `\n`.
   - `AbstractBuildinfoMojo.generateBuildinfo()` and the reference-buildinfo 
generation in `ReferenceBuildinfoUtil` open the target file with 
`Files.newBufferedWriter`, and their `checkError()` blocks are removed since 
write failures now propagate naturally.
   - Write methods thread `throws IOException`; write errors are no longer 
conflated with artifact-processing errors in `printFile`.
   
   Note: buildinfo output now always uses `\n` line endings regardless of 
platform, matching the reproducible-builds spec; IT assertions use `contains()` 
and are unaffected.
   
   ### Test
   Added `BuildInfoWriterTest` verifying that a write failure on the underlying 
writer is rethrown as an `IOException`. All unit tests pass; checkstyle, 
spotless and RAT are clean.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to