Author: tchemit Date: 2009-12-22 10:15:56 +0100 (Tue, 22 Dec 2009) New Revision: 424 Modified: trunk/doxia-module-jrst/src/test/java/org/nuiton/jrst/JrstParserTest.java Log: fix possible NPE Modified: trunk/doxia-module-jrst/src/test/java/org/nuiton/jrst/JrstParserTest.java =================================================================== --- trunk/doxia-module-jrst/src/test/java/org/nuiton/jrst/JrstParserTest.java 2009-12-18 13:34:56 UTC (rev 423) +++ trunk/doxia-module-jrst/src/test/java/org/nuiton/jrst/JrstParserTest.java 2009-12-22 09:15:56 UTC (rev 424) @@ -45,7 +45,6 @@ return parser; } - /** @throws Exception */ public void testParseRst() throws Exception { StringWriter output = null; Reader reader = null; @@ -63,8 +62,12 @@ assertTrue(output.toString().indexOf("Title") != -1); assertTrue(output.toString().indexOf("blocks.") != -1);*/ } finally { - output.close(); - reader.close(); + if (output != null) { + output.close(); + } + if (reader != null) { + reader.close(); + } } }