diff options
author | mkersten <mkersten> | 2004-07-05 18:19:15 +0000 |
---|---|---|
committer | mkersten <mkersten> | 2004-07-05 18:19:15 +0000 |
commit | 2cc4826419d8c08e3879e600b82354fac2596241 (patch) | |
tree | a204004f9760565c97c0192cf2e35f0d2392e90b /ajdoc | |
parent | 3707411c2b5fdd0294c2ab5305c32766644241f1 (diff) | |
download | aspectj-2cc4826419d8c08e3879e600b82354fac2596241.tar.gz aspectj-2cc4826419d8c08e3879e600b82354fac2596241.zip |
Fixed bug#69011 "ajdoc fails when using default package"
Diffstat (limited to 'ajdoc')
-rw-r--r-- | ajdoc/src/org/aspectj/tools/ajdoc/StubFileGenerator.java | 2 | ||||
-rw-r--r-- | ajdoc/testdata/coverage/InDefaultPackage.java | 13 | ||||
-rw-r--r-- | ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java | 4 |
3 files changed, 17 insertions, 2 deletions
diff --git a/ajdoc/src/org/aspectj/tools/ajdoc/StubFileGenerator.java b/ajdoc/src/org/aspectj/tools/ajdoc/StubFileGenerator.java index 330029099..ef5fdbf8d 100644 --- a/ajdoc/src/org/aspectj/tools/ajdoc/StubFileGenerator.java +++ b/ajdoc/src/org/aspectj/tools/ajdoc/StubFileGenerator.java @@ -46,7 +46,7 @@ class StubFileGenerator { String packageName = StructureUtil.getPackageDeclarationFromFile(inputFile); - if (packageName != null ) { + if (packageName != null && packageName != "") { writer.println( "package " + packageName + ";" ); } diff --git a/ajdoc/testdata/coverage/InDefaultPackage.java b/ajdoc/testdata/coverage/InDefaultPackage.java new file mode 100644 index 000000000..46c48b088 --- /dev/null +++ b/ajdoc/testdata/coverage/InDefaultPackage.java @@ -0,0 +1,13 @@ + +/** + * Test class. This is a comment. + */ +public abstract class InDefaultPackage { + + /** + * Mumble field. + */ + public String mumble = "xxx"; + public int pubfield; + private String privfield = "mumble"; +}
\ No newline at end of file diff --git a/ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java b/ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java index b3382ca0e..8b7df063e 100644 --- a/ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java +++ b/ajdoc/testsrc/org/aspectj/tools/ajdoc/CoverageTestCase.java @@ -25,6 +25,7 @@ public class CoverageTestCase extends TestCase { public void testCoverage() { // System.err.println(new File("testdata/figures-demo").exists()); + File file0 = new File("testdata/coverage/InDefaultPackage.java"); File file1 = new File("testdata/coverage/foo/ClassA.java"); File aspect1 = new File("testdata/coverage/foo/UseThisAspectForLinkCheck.aj"); File file2 = new File("testdata/coverage/foo/InterfaceI.java"); @@ -43,7 +44,8 @@ public class CoverageTestCase extends TestCase { "-private", "-d", outdir.getAbsolutePath(), - aspect1.getAbsolutePath(), + aspect1.getAbsolutePath(), + file0.getAbsolutePath(), file1.getAbsolutePath(), file2.getAbsolutePath(), file3.getAbsolutePath(), |