Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_langtools
提交
be2674dc
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看板
提交
be2674dc
编写于
7月 17, 2013
作者:
J
jjg
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8014636: TestLiteralCodeInPre fails on windows
Reviewed-by: ksrini
上级
7dd21645
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
60 addition
and
35 deletion
+60
-35
src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
.../com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
+1
-0
src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java
.../com/sun/tools/doclets/formats/html/TagletWriterImpl.java
+2
-2
src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java
...ses/com/sun/tools/doclets/internal/toolkit/util/Util.java
+26
-0
test/com/sun/javadoc/testCRLineSeparator/TestCRLineSeparator.java
.../sun/javadoc/testCRLineSeparator/TestCRLineSeparator.java
+3
-3
test/com/sun/javadoc/testLeadingSpaces/LeadingSpaces.java
test/com/sun/javadoc/testLeadingSpaces/LeadingSpaces.java
+10
-10
test/com/sun/javadoc/testLinkTaglet/TestLinkTaglet.java
test/com/sun/javadoc/testLinkTaglet/TestLinkTaglet.java
+10
-10
test/com/sun/javadoc/testLiteralCodeInPre/TestLiteralCodeInPre.java
...un/javadoc/testLiteralCodeInPre/TestLiteralCodeInPre.java
+2
-2
test/com/sun/javadoc/testRelativeLinks/TestRelativeLinks.java
.../com/sun/javadoc/testRelativeLinks/TestRelativeLinks.java
+6
-8
未找到文件。
src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
浏览文件 @
be2674dc
...
...
@@ -1621,6 +1621,7 @@ public class HtmlDocletWriter extends HtmlDocWriter {
text
=
removeNonInlineHtmlTags
(
text
);
}
text
=
Util
.
replaceTabs
(
configuration
,
text
);
text
=
Util
.
normalizeNewlines
(
text
);
result
.
addContent
(
new
RawHtml
(
text
));
}
}
...
...
src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java
浏览文件 @
be2674dc
...
...
@@ -71,7 +71,7 @@ public class TagletWriterImpl extends TagletWriter {
* {@inheritDoc}
*/
protected
Content
codeTagOutput
(
Tag
tag
)
{
Content
result
=
HtmlTree
.
CODE
(
new
StringContent
(
tag
.
text
(
)));
Content
result
=
HtmlTree
.
CODE
(
new
StringContent
(
Util
.
normalizeNewlines
(
tag
.
text
()
)));
return
result
;
}
...
...
@@ -135,7 +135,7 @@ public class TagletWriterImpl extends TagletWriter {
* {@inheritDoc}
*/
protected
Content
literalTagOutput
(
Tag
tag
)
{
Content
result
=
new
StringContent
(
tag
.
text
(
));
Content
result
=
new
StringContent
(
Util
.
normalizeNewlines
(
tag
.
text
()
));
return
result
;
}
...
...
src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java
浏览文件 @
be2674dc
...
...
@@ -631,6 +631,32 @@ public class Util {
return
result
.
toString
();
}
public
static
String
normalizeNewlines
(
String
text
)
{
StringBuilder
sb
=
new
StringBuilder
();
final
int
textLength
=
text
.
length
();
final
String
NL
=
DocletConstants
.
NL
;
int
pos
=
0
;
for
(
int
i
=
0
;
i
<
textLength
;
i
++)
{
char
ch
=
text
.
charAt
(
i
);
switch
(
ch
)
{
case
'\n'
:
sb
.
append
(
text
,
pos
,
i
);
sb
.
append
(
NL
);
pos
=
i
+
1
;
break
;
case
'\r'
:
sb
.
append
(
text
,
pos
,
i
);
sb
.
append
(
NL
);
if
(
i
+
1
<
textLength
&&
text
.
charAt
(
i
+
1
)
==
'\n'
)
i
++;
pos
=
i
+
1
;
break
;
}
}
sb
.
append
(
text
,
pos
,
textLength
);
return
sb
.
toString
();
}
/**
* The documentation for values() and valueOf() in Enums are set by the
* doclet.
...
...
test/com/sun/javadoc/testCRLineSeparator/TestCRLineSeparator.java
浏览文件 @
be2674dc
/*
* Copyright (c) 2004, 20
09
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 20
13
, 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
...
...
@@ -38,7 +38,7 @@ import java.util.*;
public
class
TestCRLineSeparator
extends
JavadocTester
{
//Test information.
private
static
final
String
BUG_ID
=
"4979486"
;
private
static
final
String
BUG_ID
=
"4979486
-8014636
"
;
//Javadoc arguments.
private
static
final
String
[]
ARGS
=
new
String
[]
{
...
...
@@ -47,7 +47,7 @@ public class TestCRLineSeparator extends JavadocTester {
//Input for string search tests.
private
static
final
String
[][]
TEST
=
{
{
BUG_ID
+
FS
+
"pkg"
+
FS
+
"MyClass.html"
,
"Line 1
\n
Line 2"
}
{
BUG_ID
+
FS
+
"pkg"
+
FS
+
"MyClass.html"
,
"Line 1
"
+
NL
+
"
Line 2"
}
};
private
static
final
String
[][]
NEGATED_TEST
=
NO_TEST
;
...
...
test/com/sun/javadoc/testLeadingSpaces/LeadingSpaces.java
浏览文件 @
be2674dc
/*
* Copyright (c) 2001, 20
02
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 20
13
, 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
...
...
@@ -23,11 +23,11 @@
/*
* @test
* @bug 4232882
* @bug 4232882
8014636
* @summary Javadoc strips all of the leading spaces when the comment
* does not begin with a star. This RFE allows users to
* begin their comment without a leading star without leading
* spaces striped
* spaces strip
p
ed
* @author jamieh
* @library ../lib/
* @build JavadocTester
...
...
@@ -37,15 +37,15 @@
public
class
LeadingSpaces
extends
JavadocTester
{
private
static
final
String
BUG_ID
=
"4232882"
;
private
static
final
String
BUG_ID
=
"4232882
-8014636
"
;
private
static
final
String
[][]
TEST
=
{
{
BUG_ID
+
FS
+
"LeadingSpaces.html"
,
" 1
\n"
+
" 2
\n"
+
" 3
\n"
+
" 4
\n"
+
" 5
\n"
+
" 6
\n"
+
" 1
"
+
NL
+
" 2
"
+
NL
+
" 3
"
+
NL
+
" 4
"
+
NL
+
" 5
"
+
NL
+
" 6
"
+
NL
+
" 7"
}
};
private
static
final
String
[][]
NEGATED_TEST
=
NO_TEST
;
...
...
test/com/sun/javadoc/testLinkTaglet/TestLinkTaglet.java
浏览文件 @
be2674dc
/*
* Copyright (c) 2004, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2004, 201
3
, 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
...
...
@@ -23,7 +23,7 @@
/*
* @test
* @bug 4732864 6280605 7064544
* @bug 4732864 6280605 7064544
8014636
* @summary Make sure that you can link from one member to another using
* non-qualified name, furthermore, ensure the right one is linked.
* @author jamieh
...
...
@@ -36,7 +36,7 @@
public
class
TestLinkTaglet
extends
JavadocTester
{
//Test information.
private
static
final
String
BUG_ID
=
"4732864-6280605-7064544"
;
private
static
final
String
BUG_ID
=
"4732864-6280605-7064544
-8014636
"
;
//Javadoc arguments.
private
static
final
String
[]
ARGS
=
new
String
[]
{
...
...
@@ -46,16 +46,16 @@ public class TestLinkTaglet extends JavadocTester {
//Input for string search tests.
private
static
final
String
[][]
TEST
=
{
{
BUG_ID
+
FS
+
"pkg"
+
FS
+
"C.html"
,
"Qualified Link: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>
\n"
+
" Unqualified Link1: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>
\n"
+
" Unqualified Link2: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>
\n"
+
" Qualified Link: <a href=\"../pkg/C.html#method(pkg.C.InnerC, pkg.C.InnerC2)\"><code>method(pkg.C.InnerC, pkg.C.InnerC2)</code></a>.<br/>
\n"
+
" Unqualified Link: <a href=\"../pkg/C.html#method(pkg.C.InnerC, pkg.C.InnerC2)\"><code>method(C.InnerC, C.InnerC2)</code></a>.<br/>
\n"
+
"Qualified Link: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>
"
+
NL
+
" Unqualified Link1: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>
"
+
NL
+
" Unqualified Link2: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>
"
+
NL
+
" Qualified Link: <a href=\"../pkg/C.html#method(pkg.C.InnerC, pkg.C.InnerC2)\"><code>method(pkg.C.InnerC, pkg.C.InnerC2)</code></a>.<br/>
"
+
NL
+
" Unqualified Link: <a href=\"../pkg/C.html#method(pkg.C.InnerC, pkg.C.InnerC2)\"><code>method(C.InnerC, C.InnerC2)</code></a>.<br/>
"
+
NL
+
" Unqualified Link: <a href=\"../pkg/C.html#method(pkg.C.InnerC, pkg.C.InnerC2)\"><code>method(InnerC, InnerC2)</code></a>.<br/>"
},
{
BUG_ID
+
FS
+
"pkg"
+
FS
+
"C.InnerC.html"
,
"Link to member in outer class: <a href=\"../pkg/C.html#MEMBER\"><code>C.MEMBER</code></a> <br/>
\n"
+
" Link to member in inner class: <a href=\"../pkg/C.InnerC2.html#MEMBER2\"><code>C.InnerC2.MEMBER2</code></a> <br/>
\n"
+
"Link to member in outer class: <a href=\"../pkg/C.html#MEMBER\"><code>C.MEMBER</code></a> <br/>
"
+
NL
+
" Link to member in inner class: <a href=\"../pkg/C.InnerC2.html#MEMBER2\"><code>C.InnerC2.MEMBER2</code></a> <br/>
"
+
NL
+
" Link to another inner class: <a href=\"../pkg/C.InnerC2.html\" title=\"class in pkg\"><code>C.InnerC2</code></a>"
},
{
BUG_ID
+
FS
+
"pkg"
+
FS
+
"C.InnerC2.html"
,
...
...
test/com/sun/javadoc/testLiteralCodeInPre/TestLiteralCodeInPre.java
浏览文件 @
be2674dc
...
...
@@ -23,7 +23,7 @@
/*
* @test
* @bug 8002387
* @bug 8002387
8014636
* @summary Improve rendered HTML formatting for {@code}
* @library ../lib/
* @build JavadocTester TestLiteralCodeInPre
...
...
@@ -33,7 +33,7 @@
public
class
TestLiteralCodeInPre
extends
JavadocTester
{
//Test information.
private
static
final
String
BUG_ID
=
"8002387"
;
private
static
final
String
BUG_ID
=
"8002387
-8014636
"
;
private
static
final
String
OUTPUT_DIR
=
BUG_ID
;
//Javadoc arguments.
...
...
test/com/sun/javadoc/testRelativeLinks/TestRelativeLinks.java
浏览文件 @
be2674dc
/*
* Copyright (c) 2003, 20
04
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 20
13
, 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
...
...
@@ -23,11 +23,9 @@
/*
* @test
* @bug 4460354
* @bug 4460354
8014636
* @summary Test to make sure that relative paths are redirected in the
* output so that they are not broken.
* NOTE: these tests have \\n instead of NL because they are user
* generated new lines, not Java generated.
* @author jamieh
* @library ../lib/
* @build JavadocTester
...
...
@@ -38,7 +36,7 @@
public
class
TestRelativeLinks
extends
JavadocTester
{
//Test information.
private
static
final
String
BUG_ID
=
"4460354"
;
private
static
final
String
BUG_ID
=
"4460354
-8014636
"
;
//Javadoc arguments.
private
static
final
String
[]
ARGS
=
new
String
[]
{
...
...
@@ -58,7 +56,7 @@ public class TestRelativeLinks extends JavadocTester {
{
BUG_ID
+
FS
+
"pkg"
+
FS
+
"package-summary.html"
,
"<a href=\"relative-package-link.html\">relative package link</a>"
},
{
BUG_ID
+
FS
+
"pkg"
+
FS
+
"C.html"
,
" <a
\n"
+
" <a
"
+
NL
+
" href=\"relative-multi-line-link.html\">relative-multi-line-link</a>."
},
//These relative paths should be redirected because they are in different
...
...
@@ -74,7 +72,7 @@ public class TestRelativeLinks extends JavadocTester {
{
BUG_ID
+
FS
+
"index-all.html"
,
"<a href=\"./pkg/relative-package-link.html\">relative package link</a>"
},
{
BUG_ID
+
FS
+
"index-all.html"
,
" <a
\n"
+
" <a
"
+
NL
+
" href=\"./pkg/relative-multi-line-link.html\">relative-multi-line-link</a>."
},
...
...
@@ -92,7 +90,7 @@ public class TestRelativeLinks extends JavadocTester {
{
BUG_ID
+
FS
+
"pkg"
+
FS
+
"class-use"
+
FS
+
"C.html"
,
"<a href=\"../../pkg/relative-package-link.html\">relative package link</a>"
},
{
BUG_ID
+
FS
+
"pkg"
+
FS
+
"class-use"
+
FS
+
"C.html"
,
" <a
\n"
+
" <a
"
+
NL
+
" href=\"../../pkg/relative-multi-line-link.html\">relative-multi-line-link</a>."
},
//PACKAGE OVERVIEW
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录