6873951: test/java/lang/reflect/Generics/Probe.java fails
Reviewed-by: alanb
This commit is contained in:
parent
58285b80f7
commit
f8db2dee43
@ -23,11 +23,9 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 5003916 6704655
|
||||
* @bug 5003916 6704655 6873951
|
||||
* @summary Testing parsing of signatures attributes of nested classes
|
||||
* @author Joseph D. Darcy
|
||||
* @compile -source 1.5 Probe.java
|
||||
* @run main Probe
|
||||
*/
|
||||
|
||||
import java.lang.reflect.*;
|
||||
@ -35,8 +33,7 @@ import java.lang.annotation.*;
|
||||
import java.util.*;
|
||||
import static java.util.Arrays.*;
|
||||
|
||||
@Classes(value={
|
||||
"java.util.concurrent.FutureTask",
|
||||
@Classes({"java.util.concurrent.FutureTask",
|
||||
"java.util.concurrent.ConcurrentHashMap$EntryIterator",
|
||||
"java.util.concurrent.ConcurrentHashMap$KeyIterator",
|
||||
"java.util.concurrent.ConcurrentHashMap$ValueIterator",
|
||||
@ -58,28 +55,13 @@ import static java.util.Arrays.*;
|
||||
"java.util.HashMap$ValueIterator",
|
||||
"java.util.LinkedHashMap$EntryIterator",
|
||||
"java.util.LinkedHashMap$KeyIterator",
|
||||
"java.util.LinkedHashMap$ValueIterator"
|
||||
},
|
||||
sunClasses={
|
||||
"javax.crypto.SunJCE_c",
|
||||
"javax.crypto.SunJCE_e",
|
||||
"javax.crypto.SunJCE_f",
|
||||
"javax.crypto.SunJCE_j",
|
||||
"javax.crypto.SunJCE_k",
|
||||
"javax.crypto.SunJCE_l"
|
||||
})
|
||||
"java.util.LinkedHashMap$ValueIterator"})
|
||||
public class Probe {
|
||||
public static void main (String[] args) throws Throwable {
|
||||
public static void main (String... args) throws Throwable {
|
||||
Classes classesAnnotation = (Probe.class).getAnnotation(Classes.class);
|
||||
List<String> names =
|
||||
new ArrayList<String>(asList(classesAnnotation.value()));
|
||||
|
||||
if (System.getProperty("java.runtime.name").startsWith("Java(TM)")) {
|
||||
// Sun production JDK; test crypto classes too
|
||||
for(String name: classesAnnotation.sunClasses())
|
||||
names.add(name);
|
||||
}
|
||||
|
||||
int errs = 0;
|
||||
for(String name: names) {
|
||||
System.out.println("\nCLASS " + name);
|
||||
@ -152,5 +134,4 @@ public class Probe {
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@interface Classes {
|
||||
String [] value(); // list of classes to probe
|
||||
String [] sunClasses(); // list of Sun-production JDK specific classes to probe
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user