Skip to content

AbstractHelpMojo.LS uses System.getProperty instead of System.lineSeparator() #391

Closed

Description

@elharo

In src/main/java/org/apache/maven/plugins/help/AbstractHelpMojo.java:55:

protected static final String LS = System.getProperty("line.separator");

Should use System.lineSeparator() (Java 7+), which falls back to "\n" if the property is missing. DescribeMojoTest inconsistently uses both System.getProperty("line.separator") (line 88) and System.lineSeparator() (line 110).

Activity

  1. added
    bug
    on Jul 1, 2026
  2. Neil-Tomar commented on Aug 4, 2026

    @Neil-Tomar
    Contributor

    I’d like to take this issue. I have one doubt: should I change the occurrences in the src/it/verify.groovy scripts as well?

  3. elharo commented on Aug 4, 2026

    @elharo
    ContributorAuthor

    probably

  4. added this to the 3.5.3 milestone on Aug 25, 2026
  5. added a commit that references this issue on Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions