diff options
author | aclement <aclement> | 2005-11-07 17:29:28 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-11-07 17:29:28 +0000 |
commit | 67ec9ca9ab089690ab376f1ed75006143f26fb84 (patch) | |
tree | fc8574376e90c06ec249b6707eb9377c35d92f81 /ajdoc | |
parent | d67c9bf91013300fc5ade239cdc8e1814ed9b458 (diff) | |
download | aspectj-67ec9ca9ab089690ab376f1ed75006143f26fb84.tar.gz aspectj-67ec9ca9ab089690ab376f1ed75006143f26fb84.zip |
Helens changes to ensure these tidy up after themselves and avoid synchronization being a pain.
Diffstat (limited to 'ajdoc')
-rw-r--r-- | ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java | 3 | ||||
-rw-r--r-- | ajdoc/src/org/aspectj/tools/ajdoc/Main.java | 3 | ||||
-rw-r--r-- | ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java | 14 |
3 files changed, 18 insertions, 2 deletions
diff --git a/ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java b/ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java index b43b2c3de..8752d2e24 100644 --- a/ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java +++ b/ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java @@ -224,6 +224,9 @@ class HtmlDecorator { file.delete(); FileOutputStream fos = new FileOutputStream( file ); fos.write( fileContents.toString().getBytes() ); + + reader.close(); + fos.close(); } static void addAspectDocumentation(IProgramElement node, StringBuffer fileBuffer, int index ) { diff --git a/ajdoc/src/org/aspectj/tools/ajdoc/Main.java b/ajdoc/src/org/aspectj/tools/ajdoc/Main.java index ed5b04339..6f7226966 100644 --- a/ajdoc/src/org/aspectj/tools/ajdoc/Main.java +++ b/ajdoc/src/org/aspectj/tools/ajdoc/Main.java @@ -275,6 +275,9 @@ public class Main implements Config { } FileOutputStream fos = new FileOutputStream( indexFile ); fos.write( indexFileBuffer.getBytes() ); + + indexFileReader.close(); + fos.close(); } } catch (IOException ioe) { diff --git a/ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java b/ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java index 316f03280..b6f03d3c7 100644 --- a/ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java +++ b/ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java @@ -15,6 +15,8 @@ import java.io.File; import junit.framework.TestCase; +import org.aspectj.util.FileUtil; + /** * A long way to go until full coverage, but this is the place to add more. * @@ -34,8 +36,8 @@ public class CoverageTestCase extends TestCase { protected File file8 = new File("../ajdoc/testdata/coverage/fluffy/bunny/rocks/UseThisAspectForLinkCheckToo.java"); protected File file9 = new File("../ajdoc/testdata/coverage/foo/PkgVisibleClass.java"); protected File file10 = new File("../ajdoc/testdata/coverage/foo/NoMembers.java"); - - protected File outdir = new File("testdata/coverage/doc"); + + protected File outdir; public void testOptions() { outdir.delete(); @@ -110,9 +112,17 @@ public class CoverageTestCase extends TestCase { protected void setUp() throws Exception { super.setUp(); + outdir = new File("testdata/coverage/doc"); } protected void tearDown() throws Exception { super.tearDown(); + + FileUtil.deleteContents(new File("ajdocworkingdir")); + (new File("ajdocworkingdir")).delete(); + + FileUtil.deleteContents(new File("testdata")); + (new File("testdata")).delete(); + } } |