Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_langtools
提交
562e9975
D
dragonwell8_langtools
项目概览
openanolis
/
dragonwell8_langtools
通知
0
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_langtools
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
562e9975
编写于
9月 24, 2013
作者:
J
jjg
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8002154: [doclint] doclint should check for issues which are errors in javadoc
Reviewed-by: bpatel
上级
b2489b93
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
27 addition
and
2 deletion
+27
-2
src/share/classes/com/sun/tools/doclint/Checker.java
src/share/classes/com/sun/tools/doclint/Checker.java
+4
-0
src/share/classes/com/sun/tools/doclint/resources/doclint.properties
...lasses/com/sun/tools/doclint/resources/doclint.properties
+1
-0
test/tools/doclint/ReferenceTest.java
test/tools/doclint/ReferenceTest.java
+9
-1
test/tools/doclint/ReferenceTest.out
test/tools/doclint/ReferenceTest.out
+13
-1
未找到文件。
src/share/classes/com/sun/tools/doclint/Checker.java
浏览文件 @
562e9975
...
@@ -730,6 +730,10 @@ public class Checker extends DocTreePathScanner<Void, Void> {
...
@@ -730,6 +730,10 @@ public class Checker extends DocTreePathScanner<Void, Void> {
@Override
@Override
public
Void
visitReference
(
ReferenceTree
tree
,
Void
ignore
)
{
public
Void
visitReference
(
ReferenceTree
tree
,
Void
ignore
)
{
String
sig
=
tree
.
getSignature
();
if
(
sig
.
contains
(
"<"
)
||
sig
.
contains
(
">"
))
env
.
messages
.
error
(
REFERENCE
,
tree
,
"dc.type.arg.not.allowed"
);
Element
e
=
env
.
trees
.
getElement
(
getCurrentPath
());
Element
e
=
env
.
trees
.
getElement
(
getCurrentPath
());
if
(
e
==
null
)
if
(
e
==
null
)
env
.
messages
.
error
(
REFERENCE
,
tree
,
"dc.ref.not.found"
);
env
.
messages
.
error
(
REFERENCE
,
tree
,
"dc.ref.not.found"
);
...
...
src/share/classes/com/sun/tools/doclint/resources/doclint.properties
浏览文件 @
562e9975
...
@@ -67,6 +67,7 @@ dc.tag.self.closing = self-closing element not allowed
...
@@ -67,6 +67,7 @@ dc.tag.self.closing = self-closing element not allowed
dc.tag.start.unmatched
=
end tag missing: </{0}>
dc.tag.start.unmatched
=
end tag missing: </{0}>
dc.tag.unknown
=
unknown tag: {0}
dc.tag.unknown
=
unknown tag: {0}
dc.text.not.allowed
=
text not allowed in <{0}> element
dc.text.not.allowed
=
text not allowed in <{0}> element
dc.type.arg.not.allowed
=
type arguments not allowed here
dc.unexpected.comment
=
documentation comment not expected here
dc.unexpected.comment
=
documentation comment not expected here
dc.value.not.allowed.here
=
'{@value}'
not allowed here
dc.value.not.allowed.here
=
'{@value}'
not allowed here
dc.value.not.a.constant
=
value does not refer to a constant
dc.value.not.a.constant
=
value does not refer to a constant
...
...
test/tools/doclint/ReferenceTest.java
浏览文件 @
562e9975
/*
/*
* @test /nodynamiccopyright/
* @test /nodynamiccopyright/
* @bug 8004832 8020556
* @bug 8004832 8020556
8002154
* @summary Add new doclint package
* @summary Add new doclint package
* @build DocLintTester
* @build DocLintTester
* @run main DocLintTester -Xmsgs:-reference ReferenceTest.java
* @run main DocLintTester -Xmsgs:-reference ReferenceTest.java
...
@@ -54,5 +54,13 @@ public class ReferenceTest {
...
@@ -54,5 +54,13 @@ public class ReferenceTest {
* @throws T description
* @throws T description
*/
*/
public
<
T
extends
Throwable
>
void
valid_throws_generic
()
throws
T
{
}
public
<
T
extends
Throwable
>
void
valid_throws_generic
()
throws
T
{
}
/**
* {@link java.util.List<String>}
* {@link java.util.List<String>#equals}
* @see java.util.List<String>
* @see java.util.List<String>#equals
*/
public
void
invalid_type_args
()
{
}
}
}
test/tools/doclint/ReferenceTest.out
浏览文件 @
562e9975
...
@@ -25,6 +25,18 @@ ReferenceTest.java:43: error: invalid use of @return
...
@@ -25,6 +25,18 @@ ReferenceTest.java:43: error: invalid use of @return
ReferenceTest.java:48: error: exception not thrown: java.lang.Exception
ReferenceTest.java:48: error: exception not thrown: java.lang.Exception
* @throws Exception description
* @throws Exception description
^
^
8 errors
ReferenceTest.java:59: error: type arguments not allowed here
* {@link java.util.List<String>}
^
ReferenceTest.java:60: error: type arguments not allowed here
* {@link java.util.List<String>#equals}
^
ReferenceTest.java:61: error: type arguments not allowed here
* @see java.util.List<String>
^
ReferenceTest.java:62: error: type arguments not allowed here
* @see java.util.List<String>#equals
^
12 errors
1 warning
1 warning
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录