Return-Path: Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 15199 invoked by uid 500); 15 Jul 2000 20:10:37 -0000 Delivered-To: apmail-jakarta-ant-cvs@apache.org Received: (qmail 15195 invoked from network); 15 Jul 2000 20:10:37 -0000 Received: from unknown (HELO odo.i2.com) (64.26.226.21) by locus.apache.org with SMTP; 15 Jul 2000 20:10:37 -0000 Received: from i2.com ([10.20.81.92]) by odo.i2.com (8.9.0/8.9.0) with ESMTP id PAA18644; Sat, 15 Jul 2000 15:08:51 -0500 (CDT) Message-ID: <3970C504.EFDCC73D@i2.com> Date: Sat, 15 Jul 2000 15:09:41 -0500 From: Ken Wood Organization: RCP X-Mailer: Mozilla 4.72 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 To: ant-dev@jakarta.apache.org CC: jakarta-ant-cvs@apache.org Subject: Re: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Javadoc.java References: <20000714150237.33477.qmail@locus.apache.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Javadoc still doesn't work for me (I grabbed the lastest copy today) When running, I get this: [javadoc] Generating Javadoc [javadoc] Parsing source files for packages [javadoc] Could not evaluate package for /view/kww_test_432/dvobs/gpm/com/i2/gs/ui/plaf/test/RolloverButtonUITest.java [javadoc] Could not evaluate package for /view/kww_test_432/dvobs/gpm/com/i2/gs/ui/plaf/win97/test/Win97DesktopManagerTest.java [javadoc] Could not evaluate package for /view/kww_test_432/dvobs/gpm/com/i2/gs/ui/plaf/win97/test/Win97LookAndFeelTest.java [javadoc] Could not evaluate package for /view/kww_test_432/dvobs/gpm/com/i2/gs/web_archive/firewall/HTMLServlet.java [javadoc] Could not evaluate package for /view/kww_test_432/dvobs/gpm/com/i2/rcp/web/util/test/WorkflowReaderTest.java [javadoc] Could not evaluate package for /view/kww_test_432/dvobs/gpm/com/i2/rcp/spoke/util/TmxEncrypt.java [javadoc] Could not evaluate package for /view/kww_test_432/dvobs/gpm/com/i2/rcp/spoke/util/UserScreen.java [javadoc] Javadoc execution [javadoc] javadoc: No packages or classes specified. Now, actually, I don't think these should cause any problem because it appears that the javadoc task's code looks at the null that returns when the package can't be evaluated, and does NOT add the package to the list it is building up. But, for some reason, the final list of package names ends up empty, or not being passed to javadoc because this is what I see with -verbose turned on (and edited for readability....) [javadoc] Javadoc args: [-J-Xmx1024m, -classpath, /opt/jdk1.2.1/jre/lib/rt.jar: ..., -sourcepath, com/i2/gs:com/i2/rcp, -d, /view/kww_test_432/dvobs/gpm/doc/api, -version, -author, -package, -use, -windowtitle, bla bla bla, -doctitle, bla bla bal, -header, bla bla bla -bottom bla bla bla] [javadoc] Javadoc execution [javadoc] Myos = SunOS [javadoc] /u/kwood/ant_project/build/ant/bin/antRun /view/kww_test_432/dvobs/gpm javadoc -J-Xmx1024m -classpath "/opt/jdk1.2.1/jre/lib/rt.jar:..." -sourcepath "com/i2/gs:com/i2/rcp" -d "" -version -author -package -use -windowtitle "" -doctitle "" -header "" -bottom "" [javadoc] javadoc: No packages or classes specified. Notice that javadoc was invoked without any packagenames, and so it croaks.... I think the parsing of files to get packages is still somewhat funky, but the real bug seems to be in the calling method which is handling the 'null'... it doesn't seem to be building up the list of package names correctly if errors occur. conor@locus.apache.org wrote: > conor 00/07/14 08:02:36 > > Modified: src/main/org/apache/tools/ant/taskdefs Javadoc.java > Log: > Minor bug fixes in Javadoc. > > 1. handle package statements that use tabs. > 2. Fix minor bug in comment parsing. > > The parsing bug was pointed out by Johan Granstrom but > I have not used his patch directly. > > Revision Changes Path > 1.17 +6 -1 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java > > Index: Javadoc.java > =================================================================== > RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java,v > retrieving revision 1.16 > retrieving revision 1.17 > diff -u -r1.16 -r1.17 > --- Javadoc.java 2000/07/14 08:25:52 1.16 > +++ Javadoc.java 2000/07/14 15:02:33 1.17 > @@ -859,7 +859,8 @@ > log("Could not evaluate package for " + file, Project.MSG_WARN); > return null; > } > - if (line.trim().startsWith("package ")) { > + if (line.trim().startsWith("package ") || > + line.trim().startsWith("package\t")) { > name = line.substring(8, line.indexOf(";")).trim(); > break; > } > @@ -931,6 +932,10 @@ > c = in.read(); > if (c == '*') { > c = in.read(); > + while (c == '*' && c != -1) { > + c = in.read(); > + } > + > if (c == '/') { > c = read(); > break; > > >