Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_langtools
提交
1007e4fa
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看板
提交
1007e4fa
编写于
6月 03, 2015
作者:
A
asaha
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
720219b6
28c4e672
变更
23
隐藏空白更改
内联
并排
Showing
23 changed file
with
246 addition
and
59 deletion
+246
-59
.hgtags
.hgtags
+1
-0
src/share/classes/com/sun/tools/doclets/formats/html/SubWriterHolderWriter.java
...sun/tools/doclets/formats/html/SubWriterHolderWriter.java
+2
-2
src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java
...com/sun/tools/doclets/formats/html/markup/HtmlWriter.java
+16
-8
src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets.properties
...ols/doclets/internal/toolkit/resources/doclets.properties
+7
-0
src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MethodTypes.java
.../sun/tools/doclets/internal/toolkit/util/MethodTypes.java
+13
-13
src/share/classes/com/sun/tools/javac/comp/Infer.java
src/share/classes/com/sun/tools/javac/comp/Infer.java
+3
-5
src/share/classes/com/sun/tools/jdeps/Analyzer.java
src/share/classes/com/sun/tools/jdeps/Analyzer.java
+1
-1
src/share/classes/com/sun/tools/jdeps/JdepsTask.java
src/share/classes/com/sun/tools/jdeps/JdepsTask.java
+36
-12
src/share/classes/com/sun/tools/jdeps/PlatformClassPath.java
src/share/classes/com/sun/tools/jdeps/PlatformClassPath.java
+14
-2
test/Makefile
test/Makefile
+2
-6
test/tools/javac/MethodParameters/LambdaTest.java
test/tools/javac/MethodParameters/LambdaTest.java
+1
-1
test/tools/javac/annotations/typeAnnotations/classfile/TestAnonInnerClasses.java
...tions/typeAnnotations/classfile/TestAnonInnerClasses.java
+1
-1
test/tools/javac/diags/examples/MrefInferAndExplicitParams.java
...ools/javac/diags/examples/MrefInferAndExplicitParams.java
+1
-1
test/tools/javac/generics/inference/8055963/T8055963.java
test/tools/javac/generics/inference/8055963/T8055963.java
+41
-0
test/tools/javac/lambda/8023389/T8023389.java
test/tools/javac/lambda/8023389/T8023389.java
+1
-1
test/tools/javac/lambda/LambdaExprLeadsToMissingClassFilesTest.java
.../javac/lambda/LambdaExprLeadsToMissingClassFilesTest.java
+1
-1
test/tools/javac/resolve/tests/PrimitiveVsReferenceSamePhase.java
...ls/javac/resolve/tests/PrimitiveVsReferenceSamePhase.java
+1
-1
test/tools/jdeps/APIDeps.java
test/tools/jdeps/APIDeps.java
+3
-2
test/tools/jdeps/Basic.java
test/tools/jdeps/Basic.java
+15
-2
test/tools/jdeps/m/Gee.java
test/tools/jdeps/m/Gee.java
+1
-0
test/tools/jdeps/p/C.java
test/tools/jdeps/p/C.java
+30
-0
test/tools/jdeps/p/SubClass.java
test/tools/jdeps/p/SubClass.java
+28
-0
test/tools/jdeps/q/Gee.java
test/tools/jdeps/q/Gee.java
+27
-0
未找到文件。
.hgtags
浏览文件 @
1007e4fa
...
...
@@ -434,3 +434,4 @@ a136ed2f3041e48f340d891208cc8ac0171a7816 jdk8u60-b14
248db113703a917fd38b637d384848a5e458ebcc jdk8u60-b15
ecb7e46b820f293bb644f92bc1af3ede53bceced jdk8u60-b16
87dcdc1fd75bf827c8a4596b183de7ea73cb75e1 jdk8u60-b17
e7e42c79861ea1ab7495de5f238c01f98035a8a8 jdk8u60-b18
src/share/classes/com/sun/tools/doclets/formats/html/SubWriterHolderWriter.java
浏览文件 @
1007e4fa
...
...
@@ -113,7 +113,7 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
Content
captionSpan
;
Content
span
;
if
(
type
.
isDefaultTab
())
{
captionSpan
=
HtmlTree
.
SPAN
(
new
StringContent
(
type
.
text
()));
captionSpan
=
HtmlTree
.
SPAN
(
configuration
.
getResource
(
type
.
resourceKey
()));
span
=
HtmlTree
.
SPAN
(
type
.
tabId
(),
HtmlStyle
.
activeTableTab
,
captionSpan
);
}
else
{
...
...
@@ -136,7 +136,7 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
*/
public
Content
getMethodTypeLinks
(
MethodTypes
methodType
)
{
String
jsShow
=
"javascript:show("
+
methodType
.
value
()
+
");"
;
HtmlTree
link
=
HtmlTree
.
A
(
jsShow
,
new
StringContent
(
methodType
.
text
()));
HtmlTree
link
=
HtmlTree
.
A
(
jsShow
,
configuration
.
getResource
(
methodType
.
resourceKey
()));
return
link
;
}
...
...
src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java
浏览文件 @
1007e4fa
...
...
@@ -471,10 +471,10 @@ public class HtmlWriter {
for
(
Map
.
Entry
<
String
,
Integer
>
entry
:
typeMap
.
entrySet
())
{
vars
.
append
(
sep
);
sep
=
","
;
vars
.
append
(
"\""
)
;
vars
.
append
(
entry
.
getKey
());
vars
.
append
(
"\":"
);
vars
.
append
(
entry
.
getValue
());
vars
.
append
(
"\""
)
.
append
(
entry
.
getKey
())
.
append
(
"\":"
)
.
append
(
entry
.
getValue
());
}
vars
.
append
(
"};"
).
append
(
DocletConstants
.
NL
);
sep
=
""
;
...
...
@@ -482,11 +482,19 @@ public class HtmlWriter {
for
(
MethodTypes
entry
:
methodTypes
)
{
vars
.
append
(
sep
);
sep
=
","
;
vars
.
append
(
entry
.
value
()).
append
(
":"
);
vars
.
append
(
"["
).
append
(
"\""
).
append
(
entry
.
tabId
());
vars
.
append
(
"\""
).
append
(
sep
).
append
(
"\""
).
append
(
entry
.
text
()).
append
(
"\"]"
);
vars
.
append
(
entry
.
value
())
.
append
(
":"
)
.
append
(
"["
)
.
append
(
"\""
)
.
append
(
entry
.
tabId
())
.
append
(
"\""
)
.
append
(
sep
)
.
append
(
"\""
)
.
append
(
configuration
.
getText
(
entry
.
resourceKey
()))
.
append
(
"\"]"
);
}
vars
.
append
(
"};"
).
append
(
DocletConstants
.
NL
);
vars
.
append
(
"};"
)
.
append
(
DocletConstants
.
NL
);
addStyles
(
HtmlStyle
.
altColor
,
vars
);
addStyles
(
HtmlStyle
.
rowColor
,
vars
);
addStyles
(
HtmlStyle
.
tableTab
,
vars
);
...
...
src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets.properties
浏览文件 @
1007e4fa
...
...
@@ -150,6 +150,13 @@ doclet.constructors=constructors
doclet.Constructors
=
Constructors
doclet.methods
=
methods
doclet.Methods
=
Methods
doclet.All_Methods
=
All Methods
doclet.Static_Methods
=
Static Methods
doclet.Instance_Methods
=
Instance Methods
doclet.Abstract_Methods
=
Abstract Methods
doclet.Concrete_Methods
=
Concrete Methods
doclet.Default_Methods
=
Default Methods
doclet.Deprecated_Methods
=
Deprecated Methods
doclet.annotation_type_optional_members
=
optional elements
doclet.Annotation_Type_Optional_Members
=
Optional Elements
doclet.annotation_type_required_members
=
required elements
...
...
src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MethodTypes.java
浏览文件 @
1007e4fa
/*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012,
2015,
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
...
...
@@ -31,22 +31,22 @@ package com.sun.tools.doclets.internal.toolkit.util;
* @author Bhavesh Patel
*/
public
enum
MethodTypes
{
ALL
(
0xffff
,
"
All
Methods"
,
"t0"
,
true
),
STATIC
(
0x1
,
"
Static
Methods"
,
"t1"
,
false
),
INSTANCE
(
0x2
,
"
Instance
Methods"
,
"t2"
,
false
),
ABSTRACT
(
0x4
,
"
Abstract
Methods"
,
"t3"
,
false
),
CONCRETE
(
0x8
,
"
Concrete
Methods"
,
"t4"
,
false
),
DEFAULT
(
0x10
,
"
Default
Methods"
,
"t5"
,
false
),
DEPRECATED
(
0x20
,
"
Deprecated
Methods"
,
"t6"
,
false
);
ALL
(
0xffff
,
"
doclet.All_
Methods"
,
"t0"
,
true
),
STATIC
(
0x1
,
"
doclet.Static_
Methods"
,
"t1"
,
false
),
INSTANCE
(
0x2
,
"
doclet.Instance_
Methods"
,
"t2"
,
false
),
ABSTRACT
(
0x4
,
"
doclet.Abstract_
Methods"
,
"t3"
,
false
),
CONCRETE
(
0x8
,
"
doclet.Concrete_
Methods"
,
"t4"
,
false
),
DEFAULT
(
0x10
,
"
doclet.Default_
Methods"
,
"t5"
,
false
),
DEPRECATED
(
0x20
,
"
doclet.Deprecated_
Methods"
,
"t6"
,
false
);
private
final
int
value
;
private
final
String
text
;
private
final
String
resourceKey
;
private
final
String
tabId
;
private
final
boolean
isDefaultTab
;
MethodTypes
(
int
v
,
String
t
,
String
id
,
boolean
dt
)
{
MethodTypes
(
int
v
,
String
k
,
String
id
,
boolean
dt
)
{
this
.
value
=
v
;
this
.
text
=
t
;
this
.
resourceKey
=
k
;
this
.
tabId
=
id
;
this
.
isDefaultTab
=
dt
;
}
...
...
@@ -55,8 +55,8 @@ public enum MethodTypes {
return
value
;
}
public
String
text
()
{
return
text
;
public
String
resourceKey
()
{
return
resourceKey
;
}
public
String
tabId
()
{
...
...
src/share/classes/com/sun/tools/javac/comp/Infer.java
浏览文件 @
1007e4fa
...
...
@@ -315,11 +315,9 @@ public class Infer {
for
(
Type
aLowerBound
:
from
.
getBounds
(
InferenceBound
.
LOWER
))
{
for
(
Type
anotherLowerBound
:
from
.
getBounds
(
InferenceBound
.
LOWER
))
{
if
(
aLowerBound
!=
anotherLowerBound
&&
commonSuperWithDiffParameterization
(
aLowerBound
,
anotherLowerBound
))
{
/* self comment check if any lower bound may be and undetVar,
* in that case the result of this call may be a false positive.
* Should this be restricted to non free types?
*/
!
inferenceContext
.
free
(
aLowerBound
)
&&
!
inferenceContext
.
free
(
anotherLowerBound
)
&&
commonSuperWithDiffParameterization
(
aLowerBound
,
anotherLowerBound
))
{
return
generateReferenceToTargetConstraint
(
tree
,
from
,
to
,
resultInfo
,
inferenceContext
);
}
...
...
src/share/classes/com/sun/tools/jdeps/Analyzer.java
浏览文件 @
1007e4fa
...
...
@@ -223,7 +223,7 @@ public class Analyzer {
Archive
targetArchive
=
findArchive
(
t
);
if
(
filter
.
accepts
(
o
,
archive
,
t
,
targetArchive
))
{
addDep
(
o
,
t
);
if
(!
requires
.
contains
(
targetArchive
))
{
if
(
archive
!=
targetArchive
&&
!
requires
.
contains
(
targetArchive
))
{
requires
.
add
(
targetArchive
);
}
}
...
...
src/share/classes/com/sun/tools/jdeps/JdepsTask.java
浏览文件 @
1007e4fa
...
...
@@ -489,9 +489,11 @@ class JdepsTask {
List
<
Archive
>
archives
=
new
ArrayList
<>();
Deque
<
String
>
roots
=
new
LinkedList
<>();
List
<
Path
>
paths
=
new
ArrayList
<>();
for
(
String
s
:
classes
)
{
Path
p
=
Paths
.
get
(
s
);
if
(
Files
.
exists
(
p
))
{
paths
.
add
(
p
);
archives
.
add
(
Archive
.
getInstance
(
p
));
}
else
{
if
(
isValidClassName
(
s
))
{
...
...
@@ -504,7 +506,7 @@ class JdepsTask {
sourceLocations
.
addAll
(
archives
);
List
<
Archive
>
classpaths
=
new
ArrayList
<>();
// for class file lookup
classpaths
.
addAll
(
getClassPathArchives
(
options
.
classpath
));
classpaths
.
addAll
(
getClassPathArchives
(
options
.
classpath
,
paths
));
if
(
options
.
includePattern
!=
null
)
{
archives
.
addAll
(
classpaths
);
}
...
...
@@ -545,6 +547,9 @@ class JdepsTask {
deque
.
add
(
cn
);
}
a
.
addClass
(
d
.
getOrigin
(),
d
.
getTarget
());
}
else
{
// ensure that the parsed class is added the archive
a
.
addClass
(
d
.
getOrigin
());
}
}
for
(
String
name
:
a
.
reader
().
skippedEntries
())
{
...
...
@@ -592,6 +597,9 @@ class JdepsTask {
if
(!
doneClasses
.
contains
(
cn
)
&&
!
deque
.
contains
(
cn
))
{
deque
.
add
(
cn
);
}
}
else
{
// ensure that the parsed class is added the archive
a
.
addClass
(
d
.
getOrigin
());
}
}
}
...
...
@@ -743,36 +751,52 @@ class JdepsTask {
}
}
private
List
<
Archive
>
getClassPathArchives
(
String
paths
)
throws
IOException
{
/*
* Returns the list of Archive specified in cpaths and not included
* initialArchives
*/
private
List
<
Archive
>
getClassPathArchives
(
String
cpaths
,
List
<
Path
>
initialArchives
)
throws
IOException
{
List
<
Archive
>
result
=
new
ArrayList
<>();
if
(
paths
.
isEmpty
())
{
if
(
c
paths
.
isEmpty
())
{
return
result
;
}
for
(
String
p
:
paths
.
split
(
File
.
pathSeparator
))
{
List
<
Path
>
paths
=
new
ArrayList
<>();
for
(
String
p
:
cpaths
.
split
(
File
.
pathSeparator
))
{
if
(
p
.
length
()
>
0
)
{
List
<
Path
>
files
=
new
ArrayList
<>();
// wildcard to parse all JAR files e.g. -classpath dir/*
int
i
=
p
.
lastIndexOf
(
".*"
);
if
(
i
>
0
)
{
Path
dir
=
Paths
.
get
(
p
.
substring
(
0
,
i
));
try
(
DirectoryStream
<
Path
>
stream
=
Files
.
newDirectoryStream
(
dir
,
"*.jar"
))
{
for
(
Path
entry
:
stream
)
{
file
s
.
add
(
entry
);
path
s
.
add
(
entry
);
}
}
}
else
{
files
.
add
(
Paths
.
get
(
p
));
}
for
(
Path
f
:
files
)
{
if
(
Files
.
exists
(
f
))
{
result
.
add
(
Archive
.
getInstance
(
f
));
}
paths
.
add
(
Paths
.
get
(
p
));
}
}
}
for
(
Path
p
:
paths
)
{
if
(
Files
.
exists
(
p
)
&&
!
hasSameFile
(
initialArchives
,
p
))
{
result
.
add
(
Archive
.
getInstance
(
p
));
}
}
return
result
;
}
private
boolean
hasSameFile
(
List
<
Path
>
paths
,
Path
p2
)
throws
IOException
{
for
(
Path
p1
:
paths
)
{
if
(
Files
.
isSameFile
(
p1
,
p2
))
{
return
true
;
}
}
return
false
;
}
class
RawOutputFormatter
implements
Analyzer
.
Visitor
{
private
final
PrintWriter
writer
;
private
String
pkg
=
""
;
...
...
src/share/classes/com/sun/tools/jdeps/PlatformClassPath.java
浏览文件 @
1007e4fa
...
...
@@ -46,7 +46,7 @@ import static com.sun.tools.classfile.Attribute.*;
*/
class
PlatformClassPath
{
private
static
final
List
<
String
>
NON_PLATFORM_JARFILES
=
Arrays
.
asList
(
"alt-rt.jar"
,
"
jfxrt.jar"
,
"
ant-javafx.jar"
,
"javafx-mx.jar"
);
Arrays
.
asList
(
"alt-rt.jar"
,
"ant-javafx.jar"
,
"javafx-mx.jar"
);
private
static
final
List
<
Archive
>
javaHomeArchives
=
init
();
static
List
<
Archive
>
getArchives
()
{
...
...
@@ -124,6 +124,14 @@ class PlatformClassPath {
*/
static
class
JDKArchive
extends
Archive
{
private
static
List
<
String
>
PROFILE_JARS
=
Arrays
.
asList
(
"rt.jar"
,
"jce.jar"
);
// Workaround: The following packages are not annotated as jdk.Exported
private
static
List
<
String
>
EXPORTED_PACKAGES
=
Arrays
.
asList
(
"javax.jnlp"
,
"org.w3c.dom.css"
,
"org.w3c.dom.html"
,
"org.w3c.dom.stylesheets"
,
"org.w3c.dom.xpath"
);
public
static
boolean
isProfileArchive
(
Archive
archive
)
{
if
(
archive
instanceof
JDKArchive
)
{
return
PROFILE_JARS
.
contains
(
archive
.
getName
());
...
...
@@ -155,7 +163,11 @@ class PlatformClassPath {
* Tests if a given package name is exported.
*/
public
boolean
isExportedPackage
(
String
pn
)
{
if
(
Profile
.
getProfile
(
pn
)
!=
null
||
"javax.jnlp"
.
equals
(
pn
))
{
if
(
Profile
.
getProfile
(
pn
)
!=
null
)
{
return
true
;
}
// special case for JavaFX and APIs that are not annotated with @jdk.Exported)
if
(
EXPORTED_PACKAGES
.
contains
(
pn
)
||
pn
.
startsWith
(
"javafx."
))
{
return
true
;
}
return
exportedPackages
.
containsKey
(
pn
)
?
exportedPackages
.
get
(
pn
)
:
false
;
...
...
test/Makefile
浏览文件 @
1007e4fa
...
...
@@ -21,7 +21,6 @@ OSNAME = $(shell uname -s)
ifeq
($(OSNAME), SunOS)
SLASH_JAVA
=
/java
PLATFORM
=
solaris
JT_PLATFORM
=
solaris
ARCH
=
$(
shell
uname
-p
)
ifeq
($(ARCH), i386)
ARCH
=
i586
...
...
@@ -30,7 +29,6 @@ endif
ifeq
($(OSNAME), Linux)
SLASH_JAVA
=
/java
PLATFORM
=
linux
JT_PLATFORM
=
linux
ARCH
=
$(
shell
uname
-m
)
ifeq
($(ARCH), i386)
ARCH
=
i586
...
...
@@ -38,7 +36,6 @@ ifeq ($(OSNAME), Linux)
endif
ifeq
($(OSNAME), Darwin)
PLATFORM
=
bsd
JT_PLATFORM
=
linux
ARCH
=
$(
shell
uname
-m
)
ifeq
($(ARCH), i386)
ARCH
=
i586
...
...
@@ -55,7 +52,6 @@ endif
ifeq
($(PLATFORM), windows)
SLASH_JAVA
=
J:
JT_PLATFORM
=
win32
ifeq
($(word 1, $(PROCESSOR_IDENTIFIER)),ia64)
ARCH
=
ia64
else
...
...
@@ -93,8 +89,8 @@ ifdef JPRT_JTREG_HOME
else
JTREG_HOME
=
$(SLASH_JAVA)
/re/jtreg/4.1/promoted/latest/binaries/jtreg
endif
JTREG
=
$(JTREG_HOME)
/
$(JT_PLATFORM)
/
bin/jtreg
JTDIFF
=
$(JTREG_HOME)
/
$(JT_PLATFORM)
/
bin/jtdiff
JTREG
=
$(JTREG_HOME)
/bin/jtreg
JTDIFF
=
$(JTREG_HOME)
/bin/jtdiff
# Default JCK to run
ifdef
JPRT_JCK_HOME
...
...
test/tools/javac/MethodParameters/LambdaTest.java
浏览文件 @
1007e4fa
/*
* Copyright (c) 2013, 2015 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2015
,
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
...
...
test/tools/javac/annotations/typeAnnotations/classfile/TestAnonInnerClasses.java
浏览文件 @
1007e4fa
/*
* Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved.
* 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
...
...
test/tools/javac/diags/examples/MrefInferAndExplicitParams.java
浏览文件 @
1007e4fa
...
...
@@ -8,7 +8,7 @@
*
* 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
* 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).
*
...
...
test/tools/javac/generics/inference/8055963/T8055963.java
0 → 100644
浏览文件 @
1007e4fa
/*
* Copyright (c) 2014, 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* 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 8055963
* @summary Inference failure with nested invocation
* @compile T8055963.java
*/
class
T8055963
{
static
class
C
<
T
>
{}
<
T
>
T
choose
(
T
first
,
T
second
)
{
return
null
;
}
void
test
()
{
C
<
String
>
cs
=
choose
(
new
C
<
String
>(),
new
C
<>());
}
}
test/tools/javac/lambda/8023389/T8023389.java
浏览文件 @
1007e4fa
...
...
@@ -8,7 +8,7 @@
*
* 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
* 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).
*
...
...
test/tools/javac/lambda/LambdaExprLeadsToMissingClassFilesTest.java
浏览文件 @
1007e4fa
/*
* Copyright (c) 2012, 2014 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2014
,
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
...
...
test/tools/javac/resolve/tests/PrimitiveVsReferenceSamePhase.java
浏览文件 @
1007e4fa
/*
* Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014
,
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
...
...
test/tools/jdeps/APIDeps.java
浏览文件 @
1007e4fa
...
...
@@ -90,8 +90,9 @@ public class APIDeps {
new
String
[]
{
"-classpath"
,
testDir
.
getPath
(),
"-verbose:class"
,
"-filter:none"
,
"-P"
});
test
(
new
File
(
mDir
,
"Gee.class"
),
new
String
[]
{
"g.G"
,
"sun.misc.Lock"
,
"com.sun.tools.classfile.ClassFile"
,
"com.sun.management.ThreadMXBean"
,
"com.sun.source.tree.BinaryTree"
},
new
String
[]
{
testDirBasename
,
"JDK internal API"
,
"compact3"
,
""
},
"com.sun.management.ThreadMXBean"
,
"com.sun.source.tree.BinaryTree"
,
"org.w3c.dom.css.CSSValue"
},
new
String
[]
{
testDirBasename
,
"JDK internal API"
,
"compact2"
,
"compact3"
,
""
},
new
String
[]
{
"-classpath"
,
testDir
.
getPath
(),
"-verbose"
,
"-P"
});
// -jdkinternals
...
...
test/tools/jdeps/Basic.java
浏览文件 @
1007e4fa
...
...
@@ -23,9 +23,9 @@
/*
* @test
* @bug 8003562 8005428 8015912 8027481 8048063
* @bug 8003562 8005428 8015912 8027481 8048063
8068937
* @summary Basic tests for jdeps tool
* @build Test p.Foo p.Bar javax.activity.NotCompactProfile
* @build Test p.Foo p.Bar
p.C p.SubClass q.Gee
javax.activity.NotCompactProfile
* @run main Basic
*/
...
...
@@ -111,6 +111,19 @@ public class Basic {
new
String
[]
{
"compact1"
},
new
String
[]
{
"-verbose:package"
,
"-e"
,
"java\\.lang\\..*"
});
// parse p.C, p.SubClass and q.*
// p.SubClass have no dependency other than p.C
// q.Gee depends on p.SubClass that should be found
test
(
testDir
,
new
String
[]
{
"java.lang"
,
"p"
},
new
String
[]
{
"compact1"
,
testDir
.
getName
()},
new
String
[]
{
"-include"
,
"p.C|p.SubClass|q\\..*"
});
test
(
testDir
,
new
String
[]
{
"java.lang"
,
"p"
},
new
String
[]
{
"compact1"
,
testDir
.
getName
()},
new
String
[]
{
"-classpath"
,
testDir
.
getPath
(),
"-include"
,
"p.C|p.SubClass|q\\..*"
});
// test -classpath and -include options
test
(
null
,
new
String
[]
{
"java.lang"
,
"java.util"
,
"java.lang.management"
,
...
...
test/tools/jdeps/m/Gee.java
浏览文件 @
1007e4fa
...
...
@@ -29,4 +29,5 @@ class Gee extends g.G {
public
com
.
sun
.
tools
.
classfile
.
ClassFile
cf
;
// @jdk.Exported(false)
public
com
.
sun
.
source
.
tree
.
BinaryTree
tree
;
// @jdk.Exported
public
com
.
sun
.
management
.
ThreadMXBean
mxbean
;
// @jdk.Exported on package-info
public
org
.
w3c
.
dom
.
css
.
CSSValue
value
;
// special case
}
test/tools/jdeps/p/C.java
0 → 100644
浏览文件 @
1007e4fa
/*
* Copyright (c) 2015, 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.
*/
package
p
;
public
class
C
{
public
String
name
()
{
return
"C"
;
}
}
test/tools/jdeps/p/SubClass.java
0 → 100644
浏览文件 @
1007e4fa
/*
* Copyright (c) 2015, 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.
*/
package
p
;
// SubClass only references types in package p
public
class
SubClass
extends
C
{
}
test/tools/jdeps/q/Gee.java
0 → 100644
浏览文件 @
1007e4fa
/*
* Copyright (c) 2015, 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.
*/
package
q
;
public
class
Gee
extends
p
.
SubClass
{
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录