8139371: Three langtools test failures after the removal of sun.misc.Lock
Reviewed-by: jjg, mchung
This commit is contained in:
parent
cb20fc2079
commit
8a27a7469b
langtools/test/tools
javac
jdeps
@ -3,11 +3,11 @@
|
||||
* @bug 6380059
|
||||
* @summary Emit warnings for proprietary packages in the boot class path
|
||||
* @author Peter von der Ah\u00e9
|
||||
* @modules java.base/sun.misc
|
||||
* @modules java.base/sun.security.x509
|
||||
* @compile WarnClass.java
|
||||
* @compile/fail/ref=WarnClass.out -XDrawDiagnostics -Werror WarnClass.java
|
||||
* @compile/fail/ref=WarnClass.out -XDrawDiagnostics -Werror -nowarn WarnClass.java
|
||||
* @compile/fail/ref=WarnClass.out -XDrawDiagnostics -Werror -Xlint:none WarnClass.java
|
||||
*/
|
||||
|
||||
public class WarnClass extends sun.misc.Lock {}
|
||||
public class WarnClass extends sun.security.x509.X509CertInfo {}
|
||||
|
@ -1,4 +1,4 @@
|
||||
WarnClass.java:13:40: compiler.warn.sun.proprietary: sun.misc.Lock
|
||||
WarnClass.java:13:49: compiler.warn.sun.proprietary: sun.security.x509.X509CertInfo
|
||||
- compiler.err.warnings.and.werror
|
||||
1 error
|
||||
1 warning
|
||||
|
@ -2,29 +2,31 @@
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 6594914
|
||||
* @summary \\@SuppressWarnings("deprecation") does not not work for the type of a variable
|
||||
* @modules java.base/sun.misc
|
||||
* @modules java.base/sun.security.x509
|
||||
* @compile/ref=T6594914b.out -XDenableSunApiLintControl -XDrawDiagnostics -Xlint:sunapi T6594914b.java
|
||||
*/
|
||||
|
||||
|
||||
class T6747671b {
|
||||
|
||||
sun.misc.Lock a1; //warn
|
||||
sun.security.x509.X509CertInfo a1; //warn
|
||||
|
||||
@SuppressWarnings("sunapi")
|
||||
sun.misc.Lock a2;
|
||||
sun.security.x509.X509CertInfo a2;
|
||||
|
||||
<X extends sun.misc.Lock> sun.misc.Lock m1(sun.misc.Lock a)
|
||||
throws sun.misc.CEFormatException { return null; } //warn
|
||||
<X extends sun.security.x509.X509CertInfo>
|
||||
sun.security.x509.X509CertInfo m1(sun.security.x509.X509CertInfo a)
|
||||
throws sun.security.x509.CertException { return null; } //warn
|
||||
|
||||
@SuppressWarnings("sunapi")
|
||||
<X extends sun.misc.Lock> sun.misc.Lock m2(sun.misc.Lock a)
|
||||
throws sun.misc.CEFormatException { return null; }
|
||||
<X extends sun.security.x509.X509CertInfo>
|
||||
sun.security.x509.X509CertInfo m2(sun.security.x509.X509CertInfo a)
|
||||
throws sun.security.x509.CertException { return null; }
|
||||
|
||||
void test() {
|
||||
sun.misc.Lock a1; //warn
|
||||
sun.security.x509.X509CertInfo a1; //warn
|
||||
|
||||
@SuppressWarnings("sunapi")
|
||||
sun.misc.Lock a2;
|
||||
sun.security.x509.X509CertInfo a2;
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
T6594914b.java:12:13: compiler.warn.sun.proprietary: sun.misc.Lock
|
||||
T6594914b.java:17:24: compiler.warn.sun.proprietary: sun.misc.Lock
|
||||
T6594914b.java:17:39: compiler.warn.sun.proprietary: sun.misc.Lock
|
||||
T6594914b.java:18:28: compiler.warn.sun.proprietary: sun.misc.CEFormatException
|
||||
T6594914b.java:17:56: compiler.warn.sun.proprietary: sun.misc.Lock
|
||||
T6594914b.java:25:17: compiler.warn.sun.proprietary: sun.misc.Lock
|
||||
T6594914b.java:12:22: compiler.warn.sun.proprietary: sun.security.x509.X509CertInfo
|
||||
T6594914b.java:17:33: compiler.warn.sun.proprietary: sun.security.x509.X509CertInfo
|
||||
T6594914b.java:18:22: compiler.warn.sun.proprietary: sun.security.x509.X509CertInfo
|
||||
T6594914b.java:19:37: compiler.warn.sun.proprietary: sun.security.x509.CertException
|
||||
T6594914b.java:18:56: compiler.warn.sun.proprietary: sun.security.x509.X509CertInfo
|
||||
T6594914b.java:27:26: compiler.warn.sun.proprietary: sun.security.x509.X509CertInfo
|
||||
- compiler.note.deprecated.filename: T6594914b.java
|
||||
- compiler.note.deprecated.recompile
|
||||
6 warnings
|
||||
|
@ -25,7 +25,7 @@
|
||||
* @test
|
||||
* @bug 8015912 8029216 8048063 8050804
|
||||
* @summary Test -apionly and -jdkinternals options
|
||||
* @modules java.base/sun.misc
|
||||
* @modules java.base/sun.security.x509
|
||||
* java.management
|
||||
* jdk.jdeps/com.sun.tools.classfile
|
||||
* jdk.jdeps/com.sun.tools.jdeps
|
||||
@ -72,20 +72,20 @@ public class APIDeps {
|
||||
new String[] {testDirBasename},
|
||||
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",
|
||||
new String[] {"g.G", "sun.security.x509.X509CertInfo", "com.sun.tools.classfile.ClassFile",
|
||||
"com.sun.management.ThreadMXBean", "com.sun.source.tree.BinaryTree"},
|
||||
new String[] {testDirBasename, "JDK internal API", "compact3", ""},
|
||||
new String[] {"-classpath", testDir.getPath(), "-verbose", "-P"});
|
||||
|
||||
// -jdkinternals
|
||||
test(new File(mDir, "Gee.class"),
|
||||
new String[] {"sun.misc.Lock", "com.sun.tools.classfile.ClassFile"},
|
||||
new String[] {"sun.security.x509.X509CertInfo", "com.sun.tools.classfile.ClassFile"},
|
||||
new String[] {"JDK internal API"},
|
||||
new String[] {"-jdkinternals"});
|
||||
// -jdkinternals parses all classes on -classpath and the input arguments
|
||||
test(new File(mDir, "Gee.class"),
|
||||
new String[] {"com.sun.tools.jdeps.Main", "com.sun.tools.classfile.ClassFile",
|
||||
"sun.misc.Lock", "sun.misc.Unsafe"},
|
||||
"sun.security.x509.X509CertInfo", "sun.misc.Unsafe"},
|
||||
new String[] {"JDK internal API"},
|
||||
new String[] {"-classpath", testDir.getPath(), "-jdkinternals"});
|
||||
|
||||
|
@ -25,7 +25,7 @@ package m;
|
||||
|
||||
|
||||
class Gee extends g.G {
|
||||
public sun.misc.Lock lock;
|
||||
public sun.security.x509.X509CertInfo cert;
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user