Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_langtools
提交
91a355d4
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看板
提交
91a355d4
编写于
8月 22, 2013
作者:
J
jjg
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8022173: Relax some warnings in doclint
Reviewed-by: darcy
上级
9ffecb3b
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
19 addition
and
13 deletion
+19
-13
src/share/classes/com/sun/tools/doclint/HtmlTag.java
src/share/classes/com/sun/tools/doclint/HtmlTag.java
+8
-5
test/tools/doclint/html/ListTagsTest.java
test/tools/doclint/html/ListTagsTest.java
+2
-1
test/tools/doclint/html/OtherTagsTest.java
test/tools/doclint/html/OtherTagsTest.java
+2
-1
test/tools/doclint/html/OtherTagsTest.out
test/tools/doclint/html/OtherTagsTest.out
+5
-5
test/tools/doclint/html/TableTagsTest.java
test/tools/doclint/html/TableTagsTest.java
+2
-1
未找到文件。
src/share/classes/com/sun/tools/doclint/HtmlTag.java
浏览文件 @
91a355d4
...
...
@@ -42,12 +42,14 @@ import static com.sun.tools.doclint.HtmlTag.Attr.*;
*
* The intent of this class is to embody the semantics of W3C HTML 4.01
* to the extent supported/used by javadoc.
* In time, we may wish to transition javadoc and doclint to using HTML 5.
*
* This is derivative of com.sun.tools.doclets.formats.html.markup.HtmlTag.
* Eventually, these two should be merged back together, and possibly made
* public.
*
* @see <a href="http://www.w3.org/TR/REC-html40/">HTML 4.01 Specification</a>
* @see <a href="http://www.w3.org/TR/html5/">HTML 5 Specification</a>
* @author Bhavesh Patel
* @author Jonathan Gibbons (revised)
*/
...
...
@@ -119,7 +121,8 @@ public enum HtmlTag {
HEAD
(
BlockType
.
OTHER
,
EndKind
.
REQUIRED
),
HR
(
BlockType
.
BLOCK
,
EndKind
.
NONE
),
HR
(
BlockType
.
BLOCK
,
EndKind
.
NONE
,
attrs
(
AttrKind
.
OK
,
WIDTH
)),
// OK in 4.01; not allowed in 5
HTML
(
BlockType
.
OTHER
,
EndKind
.
REQUIRED
),
...
...
@@ -152,7 +155,7 @@ public enum HtmlTag {
OL
(
BlockType
.
BLOCK
,
EndKind
.
REQUIRED
,
EnumSet
.
of
(
Flag
.
EXPECT_CONTENT
),
attrs
(
AttrKind
.
USE_CSS
,
START
,
TYPE
))
{
attrs
(
AttrKind
.
OK
,
START
,
TYPE
))
{
@Override
public
boolean
accepts
(
HtmlTag
t
)
{
return
(
t
==
LI
);
...
...
@@ -196,8 +199,8 @@ public enum HtmlTag {
TABLE
(
BlockType
.
BLOCK
,
EndKind
.
REQUIRED
,
EnumSet
.
of
(
Flag
.
EXPECT_CONTENT
),
attrs
(
AttrKind
.
OK
,
SUMMARY
,
Attr
.
FRAME
,
RULES
,
BORDER
,
CELLPADDING
,
CELLSPACING
),
attrs
(
AttrKind
.
USE_CSS
,
ALIGN
,
WIDTH
,
BGCOLOR
))
{
CELLPADDING
,
CELLSPACING
,
WIDTH
),
// width OK in 4.01; not allowed in 5
attrs
(
AttrKind
.
USE_CSS
,
ALIGN
,
BGCOLOR
))
{
@Override
public
boolean
accepts
(
HtmlTag
t
)
{
switch
(
t
)
{
...
...
@@ -267,7 +270,7 @@ public enum HtmlTag {
UL
(
BlockType
.
BLOCK
,
EndKind
.
REQUIRED
,
EnumSet
.
of
(
Flag
.
EXPECT_CONTENT
),
attrs
(
AttrKind
.
USE_CSS
,
COMPACT
,
TYPE
)){
attrs
(
AttrKind
.
OK
,
COMPACT
,
TYPE
))
{
// OK in 4.01; not allowed in 5
@Override
public
boolean
accepts
(
HtmlTag
t
)
{
return
(
t
==
LI
);
...
...
test/tools/doclint/html/ListTagsTest.java
浏览文件 @
91a355d4
/*
* @test /nodynamiccopyright/
* @bug 8006251 8013405
* @bug 8006251 8013405
8022173
* @summary test list tags
* @library ..
* @build DocLintTester
...
...
@@ -15,6 +15,7 @@ public class ListTagsTest {
* <ol> <li value="1"> abc </ol>
* <ol> <li value> bad </ol>
* <ol> <li value="a"> bad </ol>
* <ol type="a"> <li> bad </ol>
* <ul> <li> abc </ul>
*/
public
void
supportedTags
()
{
}
...
...
test/tools/doclint/html/OtherTagsTest.java
浏览文件 @
91a355d4
/*
* @test /nodynamiccopyright/
* @bug 8006251
* @bug 8006251
8022173
* @summary test other tags
* @library ..
* @build DocLintTester
...
...
@@ -14,6 +14,7 @@ public class OtherTagsTest {
* <frame>
* <frameset> </frameset>
* <head> </head>
* <hr width="50%">
* <link>
* <meta>
* <noframes> </noframes>
...
...
test/tools/doclint/html/OtherTagsTest.out
浏览文件 @
91a355d4
...
...
@@ -10,19 +10,19 @@ OtherTagsTest.java:15: error: element not allowed in documentation comments: <fr
OtherTagsTest.java:16: error: element not allowed in documentation comments: <head>
* <head> </head>
^
OtherTagsTest.java:1
7
: error: element not allowed in documentation comments: <link>
OtherTagsTest.java:1
8
: error: element not allowed in documentation comments: <link>
* <link>
^
OtherTagsTest.java:1
8
: error: element not allowed in documentation comments: <meta>
OtherTagsTest.java:1
9
: error: element not allowed in documentation comments: <meta>
* <meta>
^
OtherTagsTest.java:
19
: error: element not allowed in documentation comments: <noframes>
OtherTagsTest.java:
20
: error: element not allowed in documentation comments: <noframes>
* <noframes> </noframes>
^
OtherTagsTest.java:2
0
: error: element not allowed in documentation comments: <script>
OtherTagsTest.java:2
1
: error: element not allowed in documentation comments: <script>
* <script> </script>
^
OtherTagsTest.java:2
1
: error: element not allowed in documentation comments: <title>
OtherTagsTest.java:2
2
: error: element not allowed in documentation comments: <title>
* <title> </title>
^
9 errors
test/tools/doclint/html/TableTagsTest.java
浏览文件 @
91a355d4
...
...
@@ -23,7 +23,7 @@
/*
* @test
* @bug 8006251
* @bug 8006251
8022173
* @summary test table tags
* @library ..
* @build DocLintTester
...
...
@@ -39,6 +39,7 @@ public class TableTagsTest {
* <table summary="abc"> <thead> <tr> </thead> <tr> <td> </table>
* <table summary="abc"> <tbody> <tr> <td> </tbody> </table>
* <table summary="abc"> <tr> <td> <tfoot> <tr> </tfoot></table>
* <table summary="abc" width="50%"> <tr> <td> <tfoot> <tr> </tfoot></table>
*/
public
void
supportedTags
()
{
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录