~ubuntu-branches/ubuntu/vivid/doxia/vivid-proposed

« back to all changes in this revision

Viewing changes to doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptReaderSource.java

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2009-10-08 14:20:22 UTC
  • mfrom: (2.3.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091008142022-f6ccxganfr2tbaig
Tags: 1.1-3build1
Upload to karmic, avoiding new version from unstable. LP: #443292.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
import java.io.LineNumberReader;
24
24
import java.io.Reader;
25
25
 
26
 
/** Reader for apt source documents. */
 
26
import org.codehaus.plexus.util.IOUtil;
 
27
 
 
28
/**
 
29
 * Reader for apt source documents.
 
30
 *
 
31
 * @version $Id: AptReaderSource.java 746982 2009-02-23 12:25:50Z vsiveton $
 
32
 */
27
33
public class AptReaderSource
28
34
    implements AptSource
29
35
{
71
77
        }
72
78
        catch ( IOException e )
73
79
        {
74
 
            throw new AptParseException( e );
 
80
            // TODO handle column number
 
81
            throw new AptParseException( "IOException: " + e.getMessage(), e, lineNumber, -1 );
75
82
        }
76
83
 
77
84
        return line;
89
96
        return lineNumber;
90
97
    }
91
98
 
92
 
    /** Closes the reader associated with this AptReaderSource. */
 
99
    /**
 
100
     * Closes the reader associated with this AptReaderSource.
 
101
     */
93
102
    public void close()
94
103
    {
95
 
        if ( reader != null )
96
 
        {
97
 
            try
98
 
            {
99
 
                reader.close();
100
 
            }
101
 
            catch ( IOException ignored )
102
 
            {
103
 
                // TODO: log
104
 
            }
105
 
        }
 
104
        IOUtil.close( reader );
106
105
        reader = null;
107
106
    }
108
107
}