[hibernate-issues] [Hibernate-JIRA] Commented: (HBX-1030) Mixed eol chars in generated pojos

Dmitry Geraskov (JIRA) noreply at atlassian.com
Wed Mar 12 04:32:34 EDT 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-1030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_29769 ] 

Dmitry Geraskov commented on HBX-1030:
--------------------------------------

That is mean that if file have only one line delimiter all works fine. 
In this case i don't understand why patch is a fix. 
As I see in BasicPOJOClass it uses hardcoded "\n" line delimitter, but in ImportContextImpl (to which BasicPOJOClass delegates generating impotrts) we use system line delimiter (with patch). As I understand it works fine only if system line delimiter is "\n", but, for example for Windows,  it is "\r\n"...
Simon, can you please correct me if I don't right?


> Mixed eol chars in generated pojos
> ----------------------------------
>
>                 Key: HBX-1030
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1030
>             Project: Hibernate Tools
>          Issue Type: Patch
>          Components: hbm2java
>    Affects Versions: 3.2.0.GA
>         Environment: java
>            Reporter: Simon Toens
>            Priority: Minor
>         Attachments: DocExporterpatch.txt, eol.patch, sysEOL.txt
>
>
> org.hibernate.tool.hbm2x.pojo.ImportContextImpl hardcodes "\r\n" as eol characters for import statements.  This is kind of lame, and a problem when using svn with svn:eol-style=native:
> $ svn add revengtest/
> ...
> A         revengtest/src//test/Actor.hbm.xml
> svn: File 'revengtest/src/test/Actor.java' has inconsistent new lines
> svn: Inconsistent line ending style
> Since the rest of the generated pojo uses "\n", why not just use that?
> Attached is the trivial patch.

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

        



More information about the hibernate-issues mailing list