Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_langtools
提交
d094ce29
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看板
提交
d094ce29
编写于
1月 13, 2011
作者:
B
bpatel
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7010528: javadoc performance regression
Reviewed-by: jjg
上级
80ba8459
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
33 addition
and
9 deletion
+33
-9
src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java
...s/com/sun/tools/doclets/formats/html/markup/HtmlTree.java
+14
-6
src/share/classes/com/sun/tools/doclets/internal/toolkit/Content.java
...asses/com/sun/tools/doclets/internal/toolkit/Content.java
+19
-3
未找到文件。
src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java
浏览文件 @
d094ce29
...
...
@@ -755,22 +755,30 @@ public class HtmlTree extends Content {
if
(!
isInline
()
&&
!
endsWithNewLine
(
contentBuilder
))
contentBuilder
.
append
(
DocletConstants
.
NL
);
String
tagString
=
htmlTag
.
toString
();
contentBuilder
.
append
(
"<"
+
tagString
);
contentBuilder
.
append
(
"<"
);
contentBuilder
.
append
(
tagString
);
Iterator
<
HtmlAttr
>
iterator
=
attrs
.
keySet
().
iterator
();
HtmlAttr
key
;
String
value
=
""
;
while
(
iterator
.
hasNext
())
{
key
=
iterator
.
next
();
value
=
attrs
.
get
(
key
);
contentBuilder
.
append
(
" "
+
key
.
toString
());
if
(!
value
.
isEmpty
())
contentBuilder
.
append
(
"=\""
+
value
+
"\""
);
contentBuilder
.
append
(
" "
);
contentBuilder
.
append
(
key
.
toString
());
if
(!
value
.
isEmpty
())
{
contentBuilder
.
append
(
"=\""
);
contentBuilder
.
append
(
value
);
contentBuilder
.
append
(
"\""
);
}
}
contentBuilder
.
append
(
">"
);
for
(
Content
c
:
content
)
c
.
write
(
contentBuilder
);
if
(
htmlTag
.
endTagRequired
())
contentBuilder
.
append
(
"</"
+
tagString
+
">"
);
if
(
htmlTag
.
endTagRequired
())
{
contentBuilder
.
append
(
"</"
);
contentBuilder
.
append
(
tagString
);
contentBuilder
.
append
(
">"
);
}
if
(!
isInline
())
contentBuilder
.
append
(
DocletConstants
.
NL
);
}
...
...
src/share/classes/com/sun/tools/doclets/internal/toolkit/Content.java
浏览文件 @
d094ce29
...
...
@@ -99,8 +99,24 @@ public abstract class Content {
* @param contentBuilder content to test for newline character at the end
* @return true if the content ends with newline.
*/
public
boolean
endsWithNewLine
(
StringBuilder
contentBuilder
)
{
return
((
contentBuilder
.
length
()
==
0
)
||
(
contentBuilder
.
toString
().
endsWith
(
DocletConstants
.
NL
)));
protected
boolean
endsWithNewLine
(
StringBuilder
contentBuilder
)
{
int
contentLength
=
contentBuilder
.
length
();
if
(
contentLength
==
0
)
{
return
true
;
}
int
nlLength
=
DocletConstants
.
NL
.
length
();
if
(
contentLength
<
nlLength
)
{
return
false
;
}
int
contentIndex
=
contentLength
-
1
;
int
nlIndex
=
nlLength
-
1
;
while
(
nlIndex
>=
0
)
{
if
(
contentBuilder
.
charAt
(
contentIndex
)
!=
DocletConstants
.
NL
.
charAt
(
nlIndex
))
{
return
false
;
}
contentIndex
--;
nlIndex
--;
}
return
true
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录