You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org> on 2008/02/18 00:52:29 UTC

[jira] Created: (DOXIA-223) Decouple end-of-line detection in LineBreaker from OS

Decouple end-of-line detection in LineBreaker from OS
-----------------------------------------------------

                 Key: DOXIA-223
                 URL: http://jira.codehaus.org/browse/DOXIA-223
             Project: Maven Doxia
          Issue Type: Improvement
          Components: Core
    Affects Versions: 1.0-beta-1
            Reporter: Benjamin Bentmann
            Priority: Trivial
         Attachments: end-of-line.patch

To my knowledge, all proper text formats accepts "\r\n" as a single line terminator upon input, regardless of the operating system a parser is run on. The difference about line terminators usually only manifests itself when it comes to writing text. Hence, {{LineBreaker}} should not try to detect a Win box but check for the char sequence "\r\n".

If you insist on OS-based behaviour, {{Os.isFamily( Os.FAMILY_WINDOWS )}} from plexus-utils should be used and its return value should be cached in an instance variable of LineBreaker instead of querying the system property "os.name" for every single character.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (DOXIA-223) Decouple end-of-line detection in LineBreaker from OS

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/DOXIA-223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukas Theussl closed DOXIA-223.
-------------------------------

         Assignee: Lukas Theussl
       Resolution: Fixed
    Fix Version/s: 1.0-beta-1

Fixed in r628850. Thanks!

> Decouple end-of-line detection in LineBreaker from OS
> -----------------------------------------------------
>
>                 Key: DOXIA-223
>                 URL: http://jira.codehaus.org/browse/DOXIA-223
>             Project: Maven Doxia
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.0-beta-1
>            Reporter: Benjamin Bentmann
>            Assignee: Lukas Theussl
>            Priority: Trivial
>             Fix For: 1.0-beta-1
>
>         Attachments: end-of-line.patch
>
>
> To my knowledge, all proper text formats accepts "\r\n" as a single line terminator upon input, regardless of the operating system a parser is run on. The difference about line terminators usually only manifests itself when it comes to writing text. Hence, {{LineBreaker}} should not try to detect a Win box but check for the char sequence "\r\n".
> If you insist on OS-based behaviour, {{Os.isFamily( Os.FAMILY_WINDOWS )}} from plexus-utils should be used and its return value should be cached in an instance variable of LineBreaker instead of querying the system property "os.name" for every single character.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira