eclipse-ee4j / jakartaee-tck-tools

Other
7 stars 15 forks source link

issue 105, Truncate output files when using tck-rewrite overwriteExistingTests #106

Closed scottmarlow closed 4 weeks ago

scottmarlow commented 4 weeks ago

Interesting that order is important as this doesn't truncate the output file:

Files.writeString(testClientJavaFile, testClient.getContent(), StandardOpenOption.CREATE, StandardOpenOption.WRITE, StandardOpenOption.TRUNCATE_EXISTING)

But this does truncate the output file:

Files.writeString(testClientJavaFile, testClient.getContent(), StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING, StandardOpenOption.WRITE)

^ makes sense that the parameters are processed in order

Addresses https://github.com/eclipse-ee4j/jakartaee-tck-tools/issues/105