Skip to content

Conversation

@nahsra
Copy link
Contributor

@nahsra nahsra commented Jul 18, 2023

No description provided.

@nahsra nahsra requested a review from aldrinleal July 18, 2023 01:54
Copy link
Contributor

@aldrinleal aldrinleal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Focus on the feature/multi-pom-support as it adds a bit more complexity - bear in mind most of the formatting aspects, pom-wise, are actually covered to the point we only hand you back byte[]s to write back - if you see something missing let me know.

});

var finalPomContents = Files.readAllLines(newPomFile, Charset.defaultCharset());
var finalPomContents = Files.readAllLines(newPomFile, charset);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's the kicker: POMOperator itself also detects both charsets and newlines (and trailing newline if thats the case) - for each and every file. They're held inside an instance of POMDocument - at the codemodder level, we only return bytes to be written

there's another problem: In the newer version of POMOperator, it might output several files at once - I suggest you target against the feature/multi-pom-support branch instead.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nahsra
Copy link
Contributor Author

nahsra commented Jul 18, 2023

Closing this PR as the pom-operator upgrade helped solves this problem and we added tests to cover as well.

@nahsra nahsra closed this Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants