applied patch 959995 to fix JavadocTypeCheck bug of not finding a
tag on the firt line of a comment
This commit is contained in:
parent
83bc4ecbc4
commit
e577b7ebb8
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -76,9 +76,9 @@ import java.util.Vector;
|
|||
* </module>
|
||||
* </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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,3 +31,12 @@ class InputJavadoc1
|
|||
class InputJavadoc2
|
||||
{
|
||||
}
|
||||
|
||||
//Testing tag on first comment line
|
||||
/**
|
||||
* @author ABC
|
||||
* @version 1.1
|
||||
*/
|
||||
class InputJavadocType
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue