Browse Source

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 <johan.granstrom@itec.se> but
I have not used his patch directly.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@267787 13f79535-47bb-0310-9956-ffa450edef68
master
Conor MacNeill 25 years ago
parent
commit
2ca1e77475
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      src/main/org/apache/tools/ant/taskdefs/Javadoc.java

+ 6
- 1
src/main/org/apache/tools/ant/taskdefs/Javadoc.java View File

@@ -859,7 +859,8 @@ public class Javadoc extends Exec {
log("Could not evaluate package for " + file, Project.MSG_WARN); log("Could not evaluate package for " + file, Project.MSG_WARN);
return null; return null;
} }
if (line.trim().startsWith("package ")) {
if (line.trim().startsWith("package ") ||
line.trim().startsWith("package\t")) {
name = line.substring(8, line.indexOf(";")).trim(); name = line.substring(8, line.indexOf(";")).trim();
break; break;
} }
@@ -931,6 +932,10 @@ public class Javadoc extends Exec {
c = in.read(); c = in.read();
if (c == '*') { if (c == '*') {
c = in.read(); c = in.read();
while (c == '*' && c != -1) {
c = in.read();
}
if (c == '/') { if (c == '/') {
c = read(); c = read();
break; break;


Loading…
Cancel
Save