Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_langtools
提交
8af4e56a
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看板
提交
8af4e56a
编写于
1月 21, 2013
作者:
J
jjg
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8006251: doclint: incorrect position for diagnostic for illegal text in tags
Reviewed-by: mcimadamore
上级
d4f7e595
变更
16
显示空白变更内容
内联
并排
Showing
16 changed file
with
719 addition
and
102 deletion
+719
-102
src/share/classes/com/sun/tools/doclint/Checker.java
src/share/classes/com/sun/tools/doclint/Checker.java
+90
-48
src/share/classes/com/sun/tools/doclint/HtmlTag.java
src/share/classes/com/sun/tools/doclint/HtmlTag.java
+148
-51
src/share/classes/com/sun/tools/doclint/resources/doclint.properties
...lasses/com/sun/tools/doclint/resources/doclint.properties
+1
-0
test/tools/doclint/HtmlTagsTest.java
test/tools/doclint/HtmlTagsTest.java
+12
-0
test/tools/doclint/HtmlTagsTest.out
test/tools/doclint/HtmlTagsTest.out
+7
-1
test/tools/doclint/html/BlockTagsTest.java
test/tools/doclint/html/BlockTagsTest.java
+57
-0
test/tools/doclint/html/InlineTagsTest.java
test/tools/doclint/html/InlineTagsTest.java
+57
-0
test/tools/doclint/html/ListTagsTest.java
test/tools/doclint/html/ListTagsTest.java
+41
-0
test/tools/doclint/html/OtherTagsTest.java
test/tools/doclint/html/OtherTagsTest.java
+24
-0
test/tools/doclint/html/OtherTagsTest.out
test/tools/doclint/html/OtherTagsTest.out
+28
-0
test/tools/doclint/html/TableTagsTest.java
test/tools/doclint/html/TableTagsTest.java
+44
-0
test/tools/doclint/html/TagNotAllowed.java
test/tools/doclint/html/TagNotAllowed.java
+30
-0
test/tools/doclint/html/TagNotAllowed.out
test/tools/doclint/html/TagNotAllowed.out
+61
-0
test/tools/doclint/html/TextNotAllowed.java
test/tools/doclint/html/TextNotAllowed.java
+32
-0
test/tools/doclint/html/TextNotAllowed.out
test/tools/doclint/html/TextNotAllowed.out
+85
-0
test/tools/doclint/tidy/ParaInPre.out
test/tools/doclint/tidy/ParaInPre.out
+2
-2
未找到文件。
src/share/classes/com/sun/tools/doclint/Checker.java
浏览文件 @
8af4e56a
...
...
@@ -95,7 +95,8 @@ public class Checker extends DocTreeScanner<Void, Void> {
public
enum
Flag
{
TABLE_HAS_CAPTION
,
HAS_ELEMENT
,
HAS_TEXT
HAS_TEXT
,
REPORTED_BAD_INLINE
}
static
class
TagStackItem
{
...
...
@@ -195,7 +196,8 @@ public class Checker extends DocTreeScanner<Void, Void> {
@Override
public
Void
visitText
(
TextTree
tree
,
Void
ignore
)
{
if
(!
tree
.
getBody
().
trim
().
isEmpty
())
{
if
(
hasNonWhitespace
(
tree
))
{
checkAllowsText
(
tree
);
markEnclosingTag
(
Flag
.
HAS_TEXT
);
}
return
null
;
...
...
@@ -203,6 +205,7 @@ public class Checker extends DocTreeScanner<Void, Void> {
@Override
public
Void
visitEntity
(
EntityTree
tree
,
Void
ignore
)
{
checkAllowsText
(
tree
);
markEnclosingTag
(
Flag
.
HAS_TEXT
);
String
name
=
tree
.
getName
().
toString
();
if
(
name
.
startsWith
(
"#"
))
{
...
...
@@ -218,6 +221,18 @@ public class Checker extends DocTreeScanner<Void, Void> {
return
null
;
}
void
checkAllowsText
(
DocTree
tree
)
{
TagStackItem
top
=
tagStack
.
peek
();
if
(
top
!=
null
&&
top
.
tree
.
getKind
()
==
DocTree
.
Kind
.
START_ELEMENT
&&
!
top
.
tag
.
acceptsText
())
{
if
(
top
.
flags
.
add
(
Flag
.
REPORTED_BAD_INLINE
))
{
env
.
messages
.
error
(
HTML
,
tree
,
"dc.text.not.allowed"
,
((
StartElementTree
)
top
.
tree
).
getName
());
}
}
}
// </editor-fold>
// <editor-fold defaultstate="collapsed" desc="HTML elements">
...
...
@@ -230,53 +245,22 @@ public class Checker extends DocTreeScanner<Void, Void> {
if
(
t
==
null
)
{
env
.
messages
.
error
(
HTML
,
tree
,
"dc.tag.unknown"
,
treeName
);
}
else
{
for
(
TagStackItem
tsi:
tagStack
)
{
if
(
tsi
.
tag
.
accepts
(
t
))
{
while
(
tagStack
.
peek
()
!=
tsi
)
tagStack
.
pop
();
break
;
}
else
if
(
tsi
.
tag
.
endKind
!=
HtmlTag
.
EndKind
.
OPTIONAL
)
break
;
}
checkStructure
(
tree
,
t
);
// tag specific checks
switch
(
t
)
{
// check for out of sequence headers, such as <h1>...</h1> <h3>...</h3>
case
H1:
case
H2:
case
H3:
case
H4:
case
H5:
case
H6:
checkHeader
(
tree
,
t
);
break
;
// <p> inside <pre>
case
P:
TagStackItem
top
=
tagStack
.
peek
();
if
(
top
!=
null
&&
top
.
tag
==
HtmlTag
.
PRE
)
env
.
messages
.
warning
(
HTML
,
tree
,
"dc.tag.p.in.pre"
);
break
;
}
// check that only block tags and inline tags are used,
// and that blocks tags are not used within inline tags
switch
(
t
.
blockType
)
{
case
INLINE:
break
;
case
BLOCK:
TagStackItem
top
=
tagStack
.
peek
();
if
(
top
!=
null
&&
top
.
tag
!=
null
&&
top
.
tag
.
blockType
==
HtmlTag
.
BlockType
.
INLINE
)
{
switch
(
top
.
tree
.
getKind
())
{
case
START_ELEMENT:
{
Name
name
=
((
StartElementTree
)
top
.
tree
).
getName
();
env
.
messages
.
error
(
HTML
,
tree
,
"dc.tag.not.allowed.inline.element"
,
treeName
,
name
);
break
;
}
case
LINK:
case
LINK_PLAIN:
{
String
name
=
top
.
tree
.
getKind
().
tagName
;
env
.
messages
.
error
(
HTML
,
tree
,
"dc.tag.not.allowed.inline.tag"
,
treeName
,
name
);
break
;
}
default
:
env
.
messages
.
error
(
HTML
,
tree
,
"dc.tag.not.allowed.inline.other"
,
treeName
);
}
}
break
;
case
OTHER:
env
.
messages
.
error
(
HTML
,
tree
,
"dc.tag.not.allowed"
,
treeName
);
break
;
default
:
throw
new
AssertionError
();
}
if
(
t
.
flags
.
contains
(
HtmlTag
.
Flag
.
NO_NEST
))
{
...
...
@@ -324,6 +308,58 @@ public class Checker extends DocTreeScanner<Void, Void> {
}
}
private
void
checkStructure
(
StartElementTree
tree
,
HtmlTag
t
)
{
Name
treeName
=
tree
.
getName
();
TagStackItem
top
=
tagStack
.
peek
();
switch
(
t
.
blockType
)
{
case
BLOCK:
if
(
top
==
null
||
top
.
tag
.
accepts
(
t
))
return
;
switch
(
top
.
tree
.
getKind
())
{
case
START_ELEMENT:
{
if
(
top
.
tag
.
blockType
==
HtmlTag
.
BlockType
.
INLINE
)
{
Name
name
=
((
StartElementTree
)
top
.
tree
).
getName
();
env
.
messages
.
error
(
HTML
,
tree
,
"dc.tag.not.allowed.inline.element"
,
treeName
,
name
);
return
;
}
}
break
;
case
LINK:
case
LINK_PLAIN:
{
String
name
=
top
.
tree
.
getKind
().
tagName
;
env
.
messages
.
error
(
HTML
,
tree
,
"dc.tag.not.allowed.inline.tag"
,
treeName
,
name
);
return
;
}
}
break
;
case
INLINE:
if
(
top
==
null
||
top
.
tag
.
accepts
(
t
))
return
;
break
;
case
LIST_ITEM:
case
TABLE_ITEM:
if
(
top
!=
null
)
{
// reset this flag so subsequent bad inline content gets reported
top
.
flags
.
remove
(
Flag
.
REPORTED_BAD_INLINE
);
if
(
top
.
tag
.
accepts
(
t
))
return
;
}
break
;
case
OTHER:
env
.
messages
.
error
(
HTML
,
tree
,
"dc.tag.not.allowed"
,
treeName
);
return
;
}
env
.
messages
.
error
(
HTML
,
tree
,
"dc.tag.not.allowed.here"
,
treeName
);
}
private
void
checkHeader
(
StartElementTree
tree
,
HtmlTag
tag
)
{
// verify the new tag
if
(
getHeaderLevel
(
tag
)
>
getHeaderLevel
(
currHeaderTag
)
+
1
)
{
...
...
@@ -378,10 +414,6 @@ public class Checker extends DocTreeScanner<Void, Void> {
&&
!
top
.
flags
.
contains
(
Flag
.
HAS_ELEMENT
))
{
env
.
messages
.
warning
(
HTML
,
tree
,
"dc.tag.empty"
,
treeName
);
}
if
(
t
.
flags
.
contains
(
HtmlTag
.
Flag
.
NO_TEXT
)
&&
top
.
flags
.
contains
(
Flag
.
HAS_TEXT
))
{
env
.
messages
.
error
(
HTML
,
tree
,
"dc.text.not.allowed"
,
treeName
);
}
tagStack
.
pop
();
done
=
true
;
break
;
...
...
@@ -763,7 +795,7 @@ public class Checker extends DocTreeScanner<Void, Void> {
for
(
DocTree
d:
list
)
{
switch
(
d
.
getKind
())
{
case
TEXT:
if
(
!((
TextTree
)
d
).
getBody
().
trim
().
isEmpty
(
))
if
(
hasNonWhitespace
((
TextTree
)
d
))
return
;
break
;
default
:
...
...
@@ -772,6 +804,16 @@ public class Checker extends DocTreeScanner<Void, Void> {
}
env
.
messages
.
warning
(
SYNTAX
,
tree
,
"dc.empty"
,
tree
.
getKind
().
tagName
);
}
boolean
hasNonWhitespace
(
TextTree
tree
)
{
String
s
=
tree
.
getBody
();
for
(
int
i
=
0
;
i
<
s
.
length
();
i
++)
{
if
(!
Character
.
isWhitespace
(
s
.
charAt
(
i
)))
return
true
;
}
return
false
;
}
// </editor-fold>
}
src/share/classes/com/sun/tools/doclint/HtmlTag.java
浏览文件 @
8af4e56a
...
...
@@ -57,16 +57,22 @@ public enum HtmlTag {
B
(
BlockType
.
INLINE
,
EndKind
.
REQUIRED
,
EnumSet
.
of
(
Flag
.
EXPECT_CONTENT
,
Flag
.
NO_NEST
)),
BLOCKQUOTE
,
BIG
(
BlockType
.
INLINE
,
EndKind
.
REQUIRED
,
EnumSet
.
of
(
Flag
.
EXPECT_CONTENT
)),
BLOCKQUOTE
(
BlockType
.
BLOCK
,
EndKind
.
REQUIRED
,
EnumSet
.
of
(
Flag
.
ACCEPTS_BLOCK
,
Flag
.
ACCEPTS_INLINE
)),
BODY
(
BlockType
.
OTHER
,
EndKind
.
REQUIRED
),
BR
(
BlockType
.
INLINE
,
EndKind
.
NONE
,
attrs
(
AttrKind
.
USE_CSS
,
CLEAR
)),
CAPTION
(
EnumSet
.
of
(
Flag
.
EXPECT_CONTENT
)),
CAPTION
(
BlockType
.
TABLE_ITEM
,
EndKind
.
REQUIRED
,
EnumSet
.
of
(
Flag
.
ACCEPTS_INLINE
,
Flag
.
EXPECT_CONTENT
)),
CENTER
,
CENTER
(
BlockType
.
BLOCK
,
EndKind
.
REQUIRED
,
EnumSet
.
of
(
Flag
.
ACCEPTS_BLOCK
,
Flag
.
ACCEPTS_INLINE
)),
CITE
(
BlockType
.
INLINE
,
EndKind
.
REQUIRED
,
EnumSet
.
of
(
Flag
.
EXPECT_CONTENT
,
Flag
.
NO_NEST
)),
...
...
@@ -74,17 +80,23 @@ public enum HtmlTag {
CODE
(
BlockType
.
INLINE
,
EndKind
.
REQUIRED
,
EnumSet
.
of
(
Flag
.
EXPECT_CONTENT
,
Flag
.
NO_NEST
)),
DD
(
BlockType
.
BLOCK
,
EndKind
.
OPTIONAL
,
EnumSet
.
of
(
Flag
.
EXPECT_CONTENT
)),
DD
(
BlockType
.
LIST_ITEM
,
EndKind
.
OPTIONAL
,
EnumSet
.
of
(
Flag
.
ACCEPTS_BLOCK
,
Flag
.
ACCEPTS_INLINE
,
Flag
.
EXPECT_CONTENT
)),
DIV
,
DIV
(
BlockType
.
BLOCK
,
EndKind
.
REQUIRED
,
EnumSet
.
of
(
Flag
.
ACCEPTS_BLOCK
,
Flag
.
ACCEPTS_INLINE
)),
DL
(
BlockType
.
BLOCK
,
EndKind
.
REQUIRED
,
EnumSet
.
of
(
Flag
.
EXPECT_CONTENT
,
Flag
.
NO_TEXT
),
attrs
(
AttrKind
.
USE_CSS
,
COMPACT
)),
EnumSet
.
of
(
Flag
.
EXPECT_CONTENT
),
attrs
(
AttrKind
.
USE_CSS
,
COMPACT
))
{
@Override
public
boolean
accepts
(
HtmlTag
t
)
{
return
(
t
==
DT
)
||
(
t
==
DD
);
}
},
DT
(
BlockType
.
BLOCK
,
EndKind
.
OPTIONAL
,
EnumSet
.
of
(
Flag
.
EXPECT_CONTENT
)),
DT
(
BlockType
.
LIST_ITEM
,
EndKind
.
OPTIONAL
,
EnumSet
.
of
(
Flag
.
ACCEPTS_INLINE
,
Flag
.
EXPECT_CONTENT
)),
EM
(
BlockType
.
INLINE
,
EndKind
.
REQUIRED
,
EnumSet
.
of
(
Flag
.
NO_NEST
)),
...
...
@@ -97,12 +109,12 @@ public enum HtmlTag {
FRAMESET
(
BlockType
.
OTHER
,
EndKind
.
REQUIRED
),
H1
,
H2
,
H3
,
H4
,
H5
,
H6
,
H1
(
BlockType
.
BLOCK
,
EndKind
.
REQUIRED
)
,
H2
(
BlockType
.
BLOCK
,
EndKind
.
REQUIRED
)
,
H3
(
BlockType
.
BLOCK
,
EndKind
.
REQUIRED
)
,
H4
(
BlockType
.
BLOCK
,
EndKind
.
REQUIRED
)
,
H5
(
BlockType
.
BLOCK
,
EndKind
.
REQUIRED
)
,
H6
(
BlockType
.
BLOCK
,
EndKind
.
REQUIRED
)
,
HEAD
(
BlockType
.
OTHER
,
EndKind
.
REQUIRED
),
...
...
@@ -118,31 +130,54 @@ public enum HtmlTag {
attrs
(
AttrKind
.
OBSOLETE
,
NAME
),
attrs
(
AttrKind
.
USE_CSS
,
ALIGN
,
HSPACE
,
VSPACE
,
BORDER
)),
LI
(
BlockType
.
BLOCK
,
EndKind
.
OPTIONAL
),
LI
(
BlockType
.
LIST_ITEM
,
EndKind
.
OPTIONAL
,
EnumSet
.
of
(
Flag
.
ACCEPTS_BLOCK
,
Flag
.
ACCEPTS_INLINE
)),
LINK
(
BlockType
.
OTHER
,
EndKind
.
NONE
),
MENU
,
MENU
(
BlockType
.
BLOCK
,
EndKind
.
REQUIRED
)
{
@Override
public
boolean
accepts
(
HtmlTag
t
)
{
return
(
t
==
LI
);
}
},
META
(
BlockType
.
OTHER
,
EndKind
.
NONE
),
NOFRAMES
(
BlockType
.
OTHER
,
EndKind
.
REQUIRED
),
NOSCRIPT
(
BlockType
.
OTHER
,
EndKind
.
REQUIRED
),
NOSCRIPT
(
BlockType
.
BLOCK
,
EndKind
.
REQUIRED
),
OL
(
BlockType
.
BLOCK
,
EndKind
.
REQUIRED
,
EnumSet
.
of
(
Flag
.
EXPECT_CONTENT
,
Flag
.
NO_TEXT
),
attrs
(
AttrKind
.
USE_CSS
,
START
,
TYPE
)),
EnumSet
.
of
(
Flag
.
EXPECT_CONTENT
),
attrs
(
AttrKind
.
USE_CSS
,
START
,
TYPE
)){
@Override
public
boolean
accepts
(
HtmlTag
t
)
{
return
(
t
==
LI
);
}
},
P
(
BlockType
.
BLOCK
,
EndKind
.
OPTIONAL
,
EnumSet
.
of
(
Flag
.
EXPECT_CONTENT
),
attrs
(
AttrKind
.
USE_CSS
,
ALIGN
)),
PRE
(
EnumSet
.
of
(
Flag
.
EXPECT_CONTENT
)),
PRE
(
BlockType
.
BLOCK
,
EndKind
.
REQUIRED
,
EnumSet
.
of
(
Flag
.
EXPECT_CONTENT
))
{
@Override
public
boolean
accepts
(
HtmlTag
t
)
{
switch
(
t
)
{
case
IMG:
case
BIG:
case
SMALL:
case
SUB:
case
SUP:
return
false
;
default
:
return
(
t
.
blockType
==
BlockType
.
INLINE
);
}
}
},
SCRIPT
(
BlockType
.
OTHER
,
EndKind
.
REQUIRED
),
SMALL
(
BlockType
.
INLINE
,
EndKind
.
REQUIRED
),
SMALL
(
BlockType
.
INLINE
,
EndKind
.
REQUIRED
,
EnumSet
.
of
(
Flag
.
EXPECT_CONTENT
)),
SPAN
(
BlockType
.
INLINE
,
EndKind
.
REQUIRED
,
EnumSet
.
of
(
Flag
.
EXPECT_CONTENT
)),
...
...
@@ -157,37 +192,70 @@ public enum HtmlTag {
EnumSet
.
of
(
Flag
.
EXPECT_CONTENT
,
Flag
.
NO_NEST
)),
TABLE
(
BlockType
.
BLOCK
,
EndKind
.
REQUIRED
,
EnumSet
.
of
(
Flag
.
EXPECT_CONTENT
,
Flag
.
NO_TEXT
),
EnumSet
.
of
(
Flag
.
EXPECT_CONTENT
),
attrs
(
AttrKind
.
OK
,
SUMMARY
,
Attr
.
FRAME
,
RULES
,
BORDER
,
CELLPADDING
,
CELLSPACING
),
attrs
(
AttrKind
.
USE_CSS
,
ALIGN
,
WIDTH
,
BGCOLOR
)),
attrs
(
AttrKind
.
USE_CSS
,
ALIGN
,
WIDTH
,
BGCOLOR
))
{
@Override
public
boolean
accepts
(
HtmlTag
t
)
{
switch
(
t
)
{
case
CAPTION:
case
THEAD:
case
TBODY:
case
TFOOT:
case
TR:
// HTML 3.2
return
true
;
default
:
return
false
;
}
}
},
TBODY
(
BlockType
.
BLOCK
,
EndKind
.
REQUIRED
,
EnumSet
.
of
(
Flag
.
EXPECT_CONTENT
,
Flag
.
NO_TEXT
),
attrs
(
AttrKind
.
OK
,
ALIGN
,
CHAR
,
CHAROFF
,
VALIGN
)),
TBODY
(
BlockType
.
TABLE_ITEM
,
EndKind
.
REQUIRED
,
EnumSet
.
of
(
Flag
.
EXPECT_CONTENT
),
attrs
(
AttrKind
.
OK
,
ALIGN
,
CHAR
,
CHAROFF
,
VALIGN
))
{
@Override
public
boolean
accepts
(
HtmlTag
t
)
{
return
(
t
==
TR
);
}
},
TD
(
BlockType
.
BLOCK
,
EndKind
.
OPTIONAL
,
TD
(
BlockType
.
TABLE_ITEM
,
EndKind
.
OPTIONAL
,
EnumSet
.
of
(
Flag
.
ACCEPTS_BLOCK
,
Flag
.
ACCEPTS_INLINE
),
attrs
(
AttrKind
.
OK
,
COLSPAN
,
ROWSPAN
,
HEADERS
,
SCOPE
,
ABBR
,
AXIS
,
ALIGN
,
CHAR
,
CHAROFF
,
VALIGN
),
attrs
(
AttrKind
.
USE_CSS
,
WIDTH
,
BGCOLOR
,
HEIGHT
,
NOWRAP
)),
TFOOT
(
BlockType
.
BLOCK
,
EndKind
.
REQUIRED
,
attrs
(
AttrKind
.
OK
,
ALIGN
,
CHAR
,
CHAROFF
,
VALIGN
)),
TFOOT
(
BlockType
.
TABLE_ITEM
,
EndKind
.
REQUIRED
,
attrs
(
AttrKind
.
OK
,
ALIGN
,
CHAR
,
CHAROFF
,
VALIGN
))
{
@Override
public
boolean
accepts
(
HtmlTag
t
)
{
return
(
t
==
TR
);
}
},
TH
(
BlockType
.
BLOCK
,
EndKind
.
OPTIONAL
,
TH
(
BlockType
.
TABLE_ITEM
,
EndKind
.
OPTIONAL
,
EnumSet
.
of
(
Flag
.
ACCEPTS_BLOCK
,
Flag
.
ACCEPTS_INLINE
),
attrs
(
AttrKind
.
OK
,
COLSPAN
,
ROWSPAN
,
HEADERS
,
SCOPE
,
ABBR
,
AXIS
,
ALIGN
,
CHAR
,
CHAROFF
,
VALIGN
),
attrs
(
AttrKind
.
USE_CSS
,
WIDTH
,
BGCOLOR
,
HEIGHT
,
NOWRAP
)),
THEAD
(
BlockType
.
BLOCK
,
EndKind
.
REQUIRED
,
attrs
(
AttrKind
.
OK
,
ALIGN
,
CHAR
,
CHAROFF
,
VALIGN
)),
THEAD
(
BlockType
.
TABLE_ITEM
,
EndKind
.
REQUIRED
,
attrs
(
AttrKind
.
OK
,
ALIGN
,
CHAR
,
CHAROFF
,
VALIGN
))
{
@Override
public
boolean
accepts
(
HtmlTag
t
)
{
return
(
t
==
TR
);
}
},
TITLE
(
BlockType
.
OTHER
,
EndKind
.
REQUIRED
),
TR
(
BlockType
.
BLOCK
,
EndKind
.
OPTIONAL
,
EnumSet
.
of
(
Flag
.
NO_TEXT
),
TR
(
BlockType
.
TABLE_ITEM
,
EndKind
.
OPTIONAL
,
attrs
(
AttrKind
.
OK
,
ALIGN
,
CHAR
,
CHAROFF
,
VALIGN
),
attrs
(
AttrKind
.
USE_CSS
,
BGCOLOR
)),
attrs
(
AttrKind
.
USE_CSS
,
BGCOLOR
))
{
@Override
public
boolean
accepts
(
HtmlTag
t
)
{
return
(
t
==
TH
)
||
(
t
==
TD
);
}
},
TT
(
BlockType
.
INLINE
,
EndKind
.
REQUIRED
,
EnumSet
.
of
(
Flag
.
EXPECT_CONTENT
,
Flag
.
NO_NEST
)),
...
...
@@ -196,8 +264,13 @@ public enum HtmlTag {
EnumSet
.
of
(
Flag
.
EXPECT_CONTENT
,
Flag
.
NO_NEST
)),
UL
(
BlockType
.
BLOCK
,
EndKind
.
REQUIRED
,
EnumSet
.
of
(
Flag
.
EXPECT_CONTENT
,
Flag
.
NO_TEXT
),
attrs
(
AttrKind
.
USE_CSS
,
COMPACT
,
TYPE
)),
EnumSet
.
of
(
Flag
.
EXPECT_CONTENT
),
attrs
(
AttrKind
.
USE_CSS
,
COMPACT
,
TYPE
)){
@Override
public
boolean
accepts
(
HtmlTag
t
)
{
return
(
t
==
LI
);
}
},
VAR
(
BlockType
.
INLINE
,
EndKind
.
REQUIRED
);
...
...
@@ -207,6 +280,8 @@ public enum HtmlTag {
public
static
enum
BlockType
{
BLOCK
,
INLINE
,
LIST_ITEM
,
TABLE_ITEM
,
OTHER
;
}
...
...
@@ -220,9 +295,10 @@ public enum HtmlTag {
}
public
static
enum
Flag
{
ACCEPTS_BLOCK
,
ACCEPTS_INLINE
,
EXPECT_CONTENT
,
NO_NEST
,
NO_TEXT
NO_NEST
}
public
static
enum
Attr
{
...
...
@@ -300,22 +376,14 @@ public enum HtmlTag {
public
final
Set
<
Flag
>
flags
;
private
final
Map
<
Attr
,
AttrKind
>
attrs
;
HtmlTag
()
{
this
(
BlockType
.
BLOCK
,
EndKind
.
REQUIRED
);
}
HtmlTag
(
Set
<
Flag
>
flags
)
{
this
(
BlockType
.
BLOCK
,
EndKind
.
REQUIRED
,
flags
);
}
HtmlTag
(
BlockType
blockType
,
EndKind
endKind
,
AttrMap
...
attrMaps
)
{
this
(
blockType
,
endKind
,
Collections
.<
Flag
>
emptySet
(),
attrMaps
);
}
HtmlTag
(
BlockType
blockType
,
EndKind
endKind
,
Set
<
Flag
>
flags
,
AttrMap
...
attrMaps
)
{
this
.
blockType
=
blockType
;
this
.
endKind
=
endKind
;
this
.
flags
=
flags
;
this
.
endKind
=
endKind
;
this
.
flags
=
flags
;
this
.
attrs
=
new
EnumMap
<
Attr
,
AttrKind
>(
Attr
.
class
);
for
(
Map
<
Attr
,
AttrKind
>
m:
attrMaps
)
this
.
attrs
.
putAll
(
m
);
...
...
@@ -324,6 +392,35 @@ public enum HtmlTag {
attrs
.
put
(
Attr
.
STYLE
,
AttrKind
.
OK
);
}
public
boolean
accepts
(
HtmlTag
t
)
{
if
(
flags
.
contains
(
Flag
.
ACCEPTS_BLOCK
)
&&
flags
.
contains
(
Flag
.
ACCEPTS_INLINE
))
{
return
(
t
.
blockType
==
BlockType
.
BLOCK
)
||
(
t
.
blockType
==
BlockType
.
INLINE
);
}
else
if
(
flags
.
contains
(
Flag
.
ACCEPTS_BLOCK
))
{
return
(
t
.
blockType
==
BlockType
.
BLOCK
);
}
else
if
(
flags
.
contains
(
Flag
.
ACCEPTS_INLINE
))
{
return
(
t
.
blockType
==
BlockType
.
INLINE
);
}
else
switch
(
blockType
)
{
case
BLOCK:
case
INLINE:
return
(
t
.
blockType
==
BlockType
.
INLINE
);
case
OTHER:
// OTHER tags are invalid in doc comments, and will be
// reported separately, so silently accept/ignore any content
return
true
;
default
:
// any combination which could otherwise arrive here
// ought to have been handled in an overriding method
throw
new
AssertionError
(
this
+
":"
+
t
);
}
}
public
boolean
acceptsText
()
{
// generally, anywhere we can put text we can also put inline tag
// so check if a typical inline tag is allowed
return
accepts
(
B
);
}
public
String
getText
()
{
return
name
().
toLowerCase
();
}
...
...
src/share/classes/com/sun/tools/doclint/resources/doclint.properties
浏览文件 @
8af4e56a
...
...
@@ -55,6 +55,7 @@ dc.tag.end.unexpected = unexpected end tag: </{0}>
dc.tag.header.sequence.1
=
header used out of sequence: <{0}>
dc.tag.header.sequence.2
=
header used out of sequence: <{0}>
dc.tag.nested.not.allowed
=
nested tag not allowed: <{0}>
dc.tag.not.allowed.here
=
tag not allowed here: <{0}>
dc.tag.not.allowed
=
element not allowed in documentation comments: <{0}>
dc.tag.not.allowed.inline.element
=
block element not allowed within inline element <{1}>: {0}
dc.tag.not.allowed.inline.tag
=
block element not allowed within @{1}: {0}
...
...
test/tools/doclint/HtmlTagsTest.java
浏览文件 @
8af4e56a
...
...
@@ -54,5 +54,17 @@ public class HtmlTagsTest {
* <i> </b> </i>
*/
public
void
end_unexpected
()
{
}
/**
* <ul> text <li> ... </li> </ul>
*/
public
void
text_not_allowed
()
{
}
/**
* <ul> <b>text</b> <li> ... </li> </ul>
*/
public
void
inline_not_allowed
()
{
}
}
test/tools/doclint/HtmlTagsTest.out
浏览文件 @
8af4e56a
...
...
@@ -34,5 +34,11 @@ HtmlTagsTest.java:54: error: unexpected end tag: </b>
HtmlTagsTest.java:54: warning: empty
<i>
tag
*
<i>
</b>
</i>
^
11 errors
HtmlTagsTest.java:59: error: text not allowed in
<ul>
element
*
<ul>
text
<li>
...
</li>
</ul>
^
HtmlTagsTest.java:64: error: tag not allowed here:
<b>
*
<ul>
<b>
text
</b>
<li>
...
</li>
</ul>
^
13 errors
1 warning
test/tools/doclint/html/BlockTagsTest.java
0 → 100644
浏览文件 @
8af4e56a
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 8006251
* @summary test block tags
* @library ..
* @build DocLintTester
* @run main DocLintTester -Xmsgs BlockTagsTest.java
*/
/** */
public
class
BlockTagsTest
{
/**
* <blockquote> abc </blockquote>
* <center> abc </center>
* <div> abc </div>
* <dl> <dt> abc <dd> def </dl>
* <div> abc </div>
* <h1> abc </h1>
* <h2> abc </h2>
* <h3> abc </h3>
* <h4> abc </h4>
* <h5> abc </h5>
* <h6> abc </h6>
* <hr>
* <menu> <li> abc </menu>
* <noscript> </noscript>
* <ol> <li> abc </ol>
* <p> abc </p>
* <pre> abc </pre>
* <table summary="abc"> <tr> <td> </table>
* <ul> <li> abc </ul>
*/
public
void
supportedTags
()
{
}
}
test/tools/doclint/html/InlineTagsTest.java
0 → 100644
浏览文件 @
8af4e56a
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 8006251
* @summary test inline tags
* @library ..
* @build DocLintTester
* @run main DocLintTester -Xmsgs InlineTagsTest.java
*/
/** */
public
class
InlineTagsTest
{
/**
* <a href="#abc"> abc </a>
* <b> abc </b>
* <big> abc </big>
* <br>
* <cite> abc </cite>
* <code> abc </code>
* <em> abc </em>
* <font> abc </font>
* <i> abc </i>
* <img alt="image" src="image.png">
* <small> abc </small>
* <span> abc </span>
* <strong> abc </strong>
* <sub> abc </sub>
* <sup> abc </sup>
* <tt> abc </tt>
* <u> abc </u>
* <var> abc </var>
*/
public
void
supportedTags
()
{
}
}
test/tools/doclint/html/ListTagsTest.java
0 → 100644
浏览文件 @
8af4e56a
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 8006251
* @summary test list tags
* @library ..
* @build DocLintTester
* @run main DocLintTester -Xmsgs ListTagsTest.java
*/
/** */
public
class
ListTagsTest
{
/**
* <dl> <dt> abc <dd> def </dl>
* <ol> <li> abc </ol>
* <ul> <li> abc </ul>
*/
public
void
supportedTags
()
{
}
}
test/tools/doclint/html/OtherTagsTest.java
0 → 100644
浏览文件 @
8af4e56a
/*
* @test /nodynamiccopyright/
* @bug 8006251
* @summary test other tags
* @library ..
* @build DocLintTester
* @run main DocLintTester -Xmsgs -ref OtherTagsTest.out OtherTagsTest.java
*/
/** */
public
class
OtherTagsTest
{
/**
* <body> <p> abc </body>
* <frame>
* <frameset> </frameset>
* <head> </head>
* <link>
* <meta>
* <noframes> </noframes>
* <script> </script>
* <title> </title>
*/
public
void
knownInvalidTags
()
{
}
}
test/tools/doclint/html/OtherTagsTest.out
0 → 100644
浏览文件 @
8af4e56a
OtherTagsTest.java:13: error: element not allowed in documentation comments: <body>
* <body> <p> abc </body>
^
OtherTagsTest.java:14: error: element not allowed in documentation comments: <frame>
* <frame>
^
OtherTagsTest.java:15: error: element not allowed in documentation comments: <frameset>
* <frameset> </frameset>
^
OtherTagsTest.java:16: error: element not allowed in documentation comments: <head>
* <head> </head>
^
OtherTagsTest.java:17: error: element not allowed in documentation comments: <link>
* <link>
^
OtherTagsTest.java:18: error: element not allowed in documentation comments: <meta>
* <meta>
^
OtherTagsTest.java:19: error: element not allowed in documentation comments: <noframes>
* <noframes> </noframes>
^
OtherTagsTest.java:20: error: element not allowed in documentation comments: <script>
* <script> </script>
^
OtherTagsTest.java:21: error: element not allowed in documentation comments: <title>
* <title> </title>
^
9 errors
test/tools/doclint/html/TableTagsTest.java
0 → 100644
浏览文件 @
8af4e56a
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 8006251
* @summary test table tags
* @library ..
* @build DocLintTester
* @run main DocLintTester -Xmsgs TableTagsTest.java
*/
/** */
public
class
TableTagsTest
{
/**
* <table summary="abc"> <tr> <td> </table>
* <table summary="abc"> <tr> <th> </table>
* <table> <caption> abc </caption> <tr> <td> </table>
* <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>
*/
public
void
supportedTags
()
{
}
}
test/tools/doclint/html/TagNotAllowed.java
0 → 100644
浏览文件 @
8af4e56a
/*
* @test /nodynamiccopyright/
* @bug 8004832
* @summary Add new doclint package
* @library ..
* @build DocLintTester
* @run main DocLintTester -ref TagNotAllowed.out TagNotAllowed.java
*/
/**
* <dl> <b>abc</b> <dt> term </dt> <b>def</b> <dd> description </dd> <b>ghi</b> </dl>
* <ol> <b>abc</b> <li> item </li> <b>def</b> <li> item </li> <b>ghi</b> </ol>
* <ul> <b>abc</b> <li> item </li> <b>def</b> <li> item </li> <b>ghi</b> </ul>
*
* <table summary=description> <b>abc</b> </table>
* <table summary=description> <thead> <b>abc</b> </thead> </table>
* <table summary=description> <tbody> <b>abc</b> </tbody> </table>
* <table summary=description> <tfoot> <b>abc</b> </tfoot> </table>
* <table summary=description> <tr> <b>abc</b> </tr> </table>
*
* <pre>
* <img alt="image" src="image.png">
* <p> para </p>
* <big> text </big>
* <small> text </small>
* <sub> text </sub>
* <sup> text </sup>
* </pre>
*/
public
class
TagNotAllowed
{
}
test/tools/doclint/html/TagNotAllowed.out
0 → 100644
浏览文件 @
8af4e56a
TagNotAllowed.java:11: error: tag not allowed here: <b>
* <dl> <b>abc</b> <dt> term </dt> <b>def</b> <dd> description </dd> <b>ghi</b> </dl>
^
TagNotAllowed.java:11: error: tag not allowed here: <b>
* <dl> <b>abc</b> <dt> term </dt> <b>def</b> <dd> description </dd> <b>ghi</b> </dl>
^
TagNotAllowed.java:11: error: tag not allowed here: <b>
* <dl> <b>abc</b> <dt> term </dt> <b>def</b> <dd> description </dd> <b>ghi</b> </dl>
^
TagNotAllowed.java:12: error: tag not allowed here: <b>
* <ol> <b>abc</b> <li> item </li> <b>def</b> <li> item </li> <b>ghi</b> </ol>
^
TagNotAllowed.java:12: error: tag not allowed here: <b>
* <ol> <b>abc</b> <li> item </li> <b>def</b> <li> item </li> <b>ghi</b> </ol>
^
TagNotAllowed.java:12: error: tag not allowed here: <b>
* <ol> <b>abc</b> <li> item </li> <b>def</b> <li> item </li> <b>ghi</b> </ol>
^
TagNotAllowed.java:13: error: tag not allowed here: <b>
* <ul> <b>abc</b> <li> item </li> <b>def</b> <li> item </li> <b>ghi</b> </ul>
^
TagNotAllowed.java:13: error: tag not allowed here: <b>
* <ul> <b>abc</b> <li> item </li> <b>def</b> <li> item </li> <b>ghi</b> </ul>
^
TagNotAllowed.java:13: error: tag not allowed here: <b>
* <ul> <b>abc</b> <li> item </li> <b>def</b> <li> item </li> <b>ghi</b> </ul>
^
TagNotAllowed.java:15: error: tag not allowed here: <b>
* <table summary=description> <b>abc</b> </table>
^
TagNotAllowed.java:16: error: tag not allowed here: <b>
* <table summary=description> <thead> <b>abc</b> </thead> </table>
^
TagNotAllowed.java:17: error: tag not allowed here: <b>
* <table summary=description> <tbody> <b>abc</b> </tbody> </table>
^
TagNotAllowed.java:18: error: tag not allowed here: <b>
* <table summary=description> <tfoot> <b>abc</b> </tfoot> </table>
^
TagNotAllowed.java:19: error: tag not allowed here: <b>
* <table summary=description> <tr> <b>abc</b> </tr> </table>
^
TagNotAllowed.java:22: error: tag not allowed here: <img>
* <img alt="image" src="image.png">
^
TagNotAllowed.java:23: error: tag not allowed here: <p>
* <p> para </p>
^
TagNotAllowed.java:24: error: tag not allowed here: <big>
* <big> text </big>
^
TagNotAllowed.java:25: error: tag not allowed here: <small>
* <small> text </small>
^
TagNotAllowed.java:26: error: tag not allowed here: <sub>
* <sub> text </sub>
^
TagNotAllowed.java:27: error: tag not allowed here: <sup>
* <sup> text </sup>
^
20 errors
test/tools/doclint/html/TextNotAllowed.java
0 → 100644
浏览文件 @
8af4e56a
/*
* @test /nodynamiccopyright/
* @bug 8004832
* @summary Add new doclint package
* @library ..
* @build DocLintTester
* @run main DocLintTester -ref TextNotAllowed.out TextNotAllowed.java
*/
/**
* <dl> abc <dt> term </dt> def <dd> description </dd> ghi </dl>
* <ol> abc <li> item </li> def <li> item </li> ghi </ol>
* <ul> abc <li> item </li> def <li> item </li> ghi </ul>
*
* <table summary=description> abc </table>
* <table summary=description> <thead> abc </thead> </table>
* <table summary=description> <tbody> abc </tbody> </table>
* <table summary=description> <tfoot> abc </tfoot> </table>
* <table summary=description> <tr> abc </tr> </table>
*
* <dl> & <dt> term </dt> < <dd> description </dd> > </dl>
* <ol> & <li> item </li> < <li> item </li> > </ol>
* <ul> & <li> item </li> < <li> item </li> > </ul>
*
* <table summary=description> & </table>
* <table summary=description> <thead> & </thead> </table>
* <table summary=description> <tbody> & </tbody> </table>
* <table summary=description> <tfoot> & </tfoot> </table>
* <table summary=description> <tr> & </tr> </table>
*
*/
public
class
TextNotAllowed
{
}
test/tools/doclint/html/TextNotAllowed.out
0 → 100644
浏览文件 @
8af4e56a
TextNotAllowed.java:11: error: text not allowed in <dl> element
* <dl> abc <dt> term </dt> def <dd> description </dd> ghi </dl>
^
TextNotAllowed.java:11: error: text not allowed in <dl> element
* <dl> abc <dt> term </dt> def <dd> description </dd> ghi </dl>
^
TextNotAllowed.java:11: error: text not allowed in <dl> element
* <dl> abc <dt> term </dt> def <dd> description </dd> ghi </dl>
^
TextNotAllowed.java:12: error: text not allowed in <ol> element
* <ol> abc <li> item </li> def <li> item </li> ghi </ol>
^
TextNotAllowed.java:12: error: text not allowed in <ol> element
* <ol> abc <li> item </li> def <li> item </li> ghi </ol>
^
TextNotAllowed.java:12: error: text not allowed in <ol> element
* <ol> abc <li> item </li> def <li> item </li> ghi </ol>
^
TextNotAllowed.java:13: error: text not allowed in <ul> element
* <ul> abc <li> item </li> def <li> item </li> ghi </ul>
^
TextNotAllowed.java:13: error: text not allowed in <ul> element
* <ul> abc <li> item </li> def <li> item </li> ghi </ul>
^
TextNotAllowed.java:13: error: text not allowed in <ul> element
* <ul> abc <li> item </li> def <li> item </li> ghi </ul>
^
TextNotAllowed.java:15: error: text not allowed in <table> element
* <table summary=description> abc </table>
^
TextNotAllowed.java:16: error: text not allowed in <thead> element
* <table summary=description> <thead> abc </thead> </table>
^
TextNotAllowed.java:17: error: text not allowed in <tbody> element
* <table summary=description> <tbody> abc </tbody> </table>
^
TextNotAllowed.java:18: error: text not allowed in <tfoot> element
* <table summary=description> <tfoot> abc </tfoot> </table>
^
TextNotAllowed.java:19: error: text not allowed in <tr> element
* <table summary=description> <tr> abc </tr> </table>
^
TextNotAllowed.java:21: error: text not allowed in <dl> element
* <dl> & <dt> term </dt> < <dd> description </dd> > </dl>
^
TextNotAllowed.java:21: error: text not allowed in <dl> element
* <dl> & <dt> term </dt> < <dd> description </dd> > </dl>
^
TextNotAllowed.java:21: error: text not allowed in <dl> element
* <dl> & <dt> term </dt> < <dd> description </dd> > </dl>
^
TextNotAllowed.java:22: error: text not allowed in <ol> element
* <ol> & <li> item </li> < <li> item </li> > </ol>
^
TextNotAllowed.java:22: error: text not allowed in <ol> element
* <ol> & <li> item </li> < <li> item </li> > </ol>
^
TextNotAllowed.java:22: error: text not allowed in <ol> element
* <ol> & <li> item </li> < <li> item </li> > </ol>
^
TextNotAllowed.java:23: error: text not allowed in <ul> element
* <ul> & <li> item </li> < <li> item </li> > </ul>
^
TextNotAllowed.java:23: error: text not allowed in <ul> element
* <ul> & <li> item </li> < <li> item </li> > </ul>
^
TextNotAllowed.java:23: error: text not allowed in <ul> element
* <ul> & <li> item </li> < <li> item </li> > </ul>
^
TextNotAllowed.java:25: error: text not allowed in <table> element
* <table summary=description> & </table>
^
TextNotAllowed.java:26: error: text not allowed in <thead> element
* <table summary=description> <thead> & </thead> </table>
^
TextNotAllowed.java:27: error: text not allowed in <tbody> element
* <table summary=description> <tbody> & </tbody> </table>
^
TextNotAllowed.java:28: error: text not allowed in <tfoot> element
* <table summary=description> <tfoot> & </tfoot> </table>
^
TextNotAllowed.java:29: error: text not allowed in <tr> element
* <table summary=description> <tr> & </tr> </table>
^
28 errors
test/tools/doclint/tidy/ParaInPre.out
浏览文件 @
8af4e56a
ParaInPre.java:16:
warning: unexpected use of <p> inside <pre> element
ParaInPre.java:16:
error: tag not allowed here: <p>
* <p>
^
1
warning
1
error
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录