applied patch 959995 to fix JavadocTypeCheck bug of not finding a

tag on the firt line of a comment
This commit is contained in:
Rick Giles 2004-05-26 11:44:06 +00:00
parent 83bc4ecbc4
commit e577b7ebb8
4 changed files with 15 additions and 5 deletions

View File

@ -94,6 +94,8 @@
<li class="body">JUnitTestCaseCheck erroneously mentions tearDown
instead of setUp. (bug 955925, patch by Paul Guyot)</li>
<li class="body">JavadocTypeCheck does not find a tag on the
first comment line. (patch 959995, patch by Michael Tamm)</li>
</ul>
<p class="body">

View File

@ -76,9 +76,9 @@ import java.util.Vector;
* &lt;/module&gt;
* </pre>
*
* @author Oliver Burn
* @version 1.0
* @author Michael Tamm
* @version 1.1
*/
public class JavadocTypeCheck
extends Check
@ -219,9 +219,7 @@ public class JavadocTypeCheck
tagName,
content.trim()));
}
if (i != 0) {
tagRE = Utils.getRE("^\\s*\\**\\s*@([:alpha:]+)\\s");
}
tagRE = Utils.getRE("^\\s*\\**\\s*@([:alpha:]+)\\s");
}
return tags;
}

View File

@ -31,3 +31,12 @@ class InputJavadoc1
class InputJavadoc2
{
}
//Testing tag on first comment line
/**
* @author ABC
* @version 1.1
*/
class InputJavadocType
{
}

View File

@ -195,6 +195,7 @@ public class JavadocTypeCheckTest extends BaseCheckTestCase
"13: Type Javadoc tag @version must match pattern '\\$Revision.*\\$'.",
"22: Type Javadoc comment is missing an @version tag.",
"31: Type Javadoc tag @version must match pattern '\\$Revision.*\\$'.",
"40: Type Javadoc tag @version must match pattern '\\$Revision.*\\$'.",
};
verify(checkConfig, getPath("InputJavadoc.java"), expected);
}