Not a contribution ... just an observation...

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Not a contribution ... just an observation...

Steve Jerman
Hi,

I can't make a contributions,  but I assume I can observe that

tycho-release/tycho-versions-plugin/src/test/java/org/sonatype/tycho/versions/engine/tests/VersionsEngineTest.java

doesn't close a buffered reader and for some reason this causes builds on Linux to fail (at least when I do it). They stop failing with the close added.

Steve

    private String toAsciiString( File file )
        throws IOException
    {
        BufferedReader r = new BufferedReader( new InputStreamReader( new FileInputStream( file ) ) );
        StringBuilder sb = new StringBuilder();
        String str;
        while ( ( str = r.readLine() ) != null )
        {
            sb.append( str ).append( '\n' );
        }
     **   r.close(); ***
        return sb.toString();
    }
Reply | Threaded
Open this post in threaded view
|

RE: Not a contribution ... just an observation...

Sievers, Jan
fixed with
https://github.com/sonatype/sonatype-tycho/commit/4b106769983a2b960ee0dd16bc0417394d524e01 

Jan

-----Original Message-----
From: Steve Jerman [mailto:[hidden email]]
Sent: Freitag, 28. Januar 2011 21:39
To: [hidden email]
Subject: [Tycho Users] Not a contribution ... just an observation...

Hi,

I can't make a contributions,  but I assume I can observe that

tycho-release/tycho-versions-plugin/src/test/java/org/sonatype/tycho/versions/engine/tests/VersionsEngineTest.java

doesn't close a buffered reader and for some reason this causes builds on Linux to fail (at least when I do it). They stop failing with the close added.

Steve

    private String toAsciiString( File file )
        throws IOException
    {
        BufferedReader r = new BufferedReader( new InputStreamReader( new FileInputStream( file ) ) );
        StringBuilder sb = new StringBuilder();
        String str;
        while ( ( str = r.readLine() ) != null )
        {
            sb.append( str ).append( '\n' );
        }
     **   r.close(); ***
        return sb.toString();
    }