You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "elharo (via GitHub)" <gi...@apache.org> on 2024/11/09 23:39:18 UTC
[PR] Use linefeed directly to avoid platform dependent code [maven-dependency-plugin]
elharo opened a new pull request, #454:
URL: https://github.com/apache/maven-dependency-plugin/pull/454
(no comment)
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Use linefeed directly to avoid platform dependent code [maven-dependency-plugin]
Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo commented on PR #454:
URL: https://github.com/apache/maven-dependency-plugin/pull/454#issuecomment-2517056953
The benefit is that the code does exactly the same thing and produces the same output on different platforms. This is especially important when writing files since files are not necessarily read on the same platform where they're written.
It's also simpler to write \n instead of System.lineSeparator(). Lines are shorter and it's less code to read.
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Use linefeed directly to avoid platform dependent code [maven-dependency-plugin]
Posted by "elharo (via GitHub)" <gi...@apache.org>.
elharo commented on PR #454:
URL: https://github.com/apache/maven-dependency-plugin/pull/454#issuecomment-2520156979
For example, consider this fragment from JavadocUtiltest:
```
// Other tests
version = "java full version \"1.5.0_07-164\"" + System.getProperty("line.separator");
assertEquals("1.5.0", JavadocUtil.extractJavadocVersion(version));
version = System.getProperty("line.separator") + "java full version \"1.5.0_07-164\"";
assertEquals("1.5.0", JavadocUtil.extractJavadocVersion(version));
version = System.getProperty("line.separator") + "java full version \"1.5.0_07-164\""
+ System.getProperty("line.separator");
assertEquals("1.5.0", JavadocUtil.extractJavadocVersion(version));
version = "java full" + System.getProperty("line.separator") + " version \"1.5.0_07-164\"";
assertEquals("1.5.0", JavadocUtil.extractJavadocVersion(version));
```
Here we test different strings depending on which platform the test runs on. We should instead run the same tests on all platforms.
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Use linefeed directly to avoid platform dependent code [maven-dependency-plugin]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #454:
URL: https://github.com/apache/maven-dependency-plugin/pull/454#issuecomment-2833892024
This pull request is stale because it has been waiting for feedback for 60 days. Remove the stale label or comment on this PR, or it will be automatically closed in 30 days.
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org