This commit is contained in:
Phil Race 2016-09-01 08:39:27 -07:00
commit 2551c0ae07
154 changed files with 596 additions and 367 deletions

View File

@ -50,6 +50,8 @@ TARGETS += $(CLASSLIST_JAR)
CLASSLIST_FILE := $(SUPPORT_OUTPUTDIR)/classlist/classlist
JLI_TRACE_FILE := $(SUPPORT_OUTPUTDIR)/classlist/jli_trace.out
# If an external buildjdk has been supplied, we don't build a separate interim
# image, so just use the external build jdk instead.
ifeq ($(EXTERNAL_BUILDJDK), true)
@ -59,13 +61,11 @@ endif
$(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXE_SUFFIX) $(CLASSLIST_JAR)
$(call MakeDir, $(@D))
$(call LogInfo, Generating lib/classlist)
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@.tmp \
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
build.tools.classlist.HelloClasslist $(LOG_DEBUG) 2>&1
# Filter out generated classes, remove after JDK-8149977
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@ \
-Xshare:dump -XX:SharedClassListFile=$@.tmp $(LOG_DEBUG) 2>&1
$(RM) $@.tmp
-Djava.lang.invoke.MethodHandle.TRACE_RESOLVE=true \
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
build.tools.classlist.HelloClasslist \
$(LOG_DEBUG) 2>&1 > $(JLI_TRACE_FILE)
TARGETS += $(CLASSLIST_FILE)

View File

@ -25,8 +25,13 @@
package java.net;
import jdk.internal.misc.JavaNetSocketAccess;
import jdk.internal.misc.SharedSecrets;
import java.io.FileDescriptor;
import java.io.IOException;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.nio.channels.ServerSocketChannel;
import java.security.AccessController;
import java.security.PrivilegedExceptionAction;
@ -1011,4 +1016,27 @@ class ServerSocket implements java.io.Closeable {
return options;
}
}
static {
SharedSecrets.setJavaNetSocketAccess(
new JavaNetSocketAccess() {
@Override
public ServerSocket newServerSocket(SocketImpl impl) {
return new ServerSocket(impl);
}
@Override
public SocketImpl newSocketImpl(Class<? extends SocketImpl> implClass) {
try {
Constructor<? extends SocketImpl> ctor =
implClass.getDeclaredConstructor();
return ctor.newInstance();
} catch (NoSuchMethodException | InstantiationException |
IllegalAccessException | InvocationTargetException e) {
throw new AssertionError(e);
}
}
}
);
}
}

View File

@ -0,0 +1,41 @@
/*
* Copyright (c) 2016, 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.
*/
package jdk.internal.misc;
import java.net.ServerSocket;
import java.net.SocketImpl;
public interface JavaNetSocketAccess {
/**
* Creates a ServerSocket associated with the given SocketImpl.
*/
ServerSocket newServerSocket(SocketImpl impl);
/*
* Constructs a SocketImpl instance of the given class.
*/
SocketImpl newSocketImpl(Class<? extends SocketImpl> implClass);
}

View File

@ -55,6 +55,7 @@ public class SharedSecrets {
private static JavaNetAccess javaNetAccess;
private static JavaNetInetAddressAccess javaNetInetAddressAccess;
private static JavaNetHttpCookieAccess javaNetHttpCookieAccess;
private static JavaNetSocketAccess javaNetSocketAccess;
private static JavaNioAccess javaNioAccess;
private static JavaIOFileDescriptorAccess javaIOFileDescriptorAccess;
private static JavaSecurityProtectionDomainAccess javaSecurityProtectionDomainAccess;
@ -161,6 +162,16 @@ public class SharedSecrets {
return javaNetHttpCookieAccess;
}
public static void setJavaNetSocketAccess(JavaNetSocketAccess jnsa) {
javaNetSocketAccess = jnsa;
}
public static JavaNetSocketAccess getJavaNetSocketAccess() {
if (javaNetSocketAccess == null)
unsafe.ensureClassInitialized(java.net.ServerSocket.class);
return javaNetSocketAccess;
}
public static void setJavaNioAccess(JavaNioAccess jna) {
javaNioAccess = jna;
}

View File

@ -1496,7 +1496,7 @@ final class AbstractTrustManagerWrapper extends X509ExtendedTrustManager
}
} catch (CertPathValidatorException cpve) {
throw new CertificateException(
"Certificates does not conform to algorithm constraints");
"Certificates do not conform to algorithm constraints", cpve);
}
}
}

View File

@ -556,20 +556,6 @@ IsLauncherOption(const char* name) {
JLI_StrCmp(name, "--list-modules") == 0;
}
#ifndef OLD_MODULE_OPTIONS
/*
* Old module options for transition
*/
static jboolean
IsOldModuleOption(const char* name) {
return JLI_StrCmp(name, "-modulepath") == 0 ||
JLI_StrCmp(name, "-mp") == 0 ||
JLI_StrCmp(name, "-upgrademodulepath") == 0 ||
JLI_StrCmp(name, "-addmods") == 0 ||
JLI_StrCmp(name, "-limitmods") == 0;
}
#endif
/*
* Test if the given name is a module-system white-space option that
* will be passed to the VM with its corresponding long-form option
@ -584,8 +570,7 @@ IsModuleOption(const char* name) {
JLI_StrCmp(name, "--limit-modules") == 0 ||
JLI_StrCmp(name, "--add-exports") == 0 ||
JLI_StrCmp(name, "--add-reads") == 0 ||
JLI_StrCmp(name, "--patch-module") == 0 ||
IsOldModuleOption(name);
JLI_StrCmp(name, "--patch-module") == 0;
}
/*
@ -1224,32 +1209,6 @@ GetOpt(int *pargc, char ***pargv, char **poption, char **pvalue) {
}
}
#ifndef OLD_MODULE_OPTIONS
// for transition to support both old and new syntax
if (JLI_StrCmp(arg, "-modulepath") == 0 ||
JLI_StrCmp(arg, "-mp") == 0) {
option = "--module-path";
} else if (JLI_StrCmp(arg, "-upgrademodulepath") == 0) {
option = "--upgrade-module-path";
} else if (JLI_StrCmp(arg, "-addmods") == 0) {
option = "--add-modules";
} else if (JLI_StrCmp(arg, "-limitmods") == 0) {
option = "--limit-modules";
} else if (JLI_StrCCmp(arg, "-XaddExports:") == 0) {
option = "--add-exports";
value = arg + 13;
kind = VM_LONG_OPTION_WITH_ARGUMENT;
} else if (JLI_StrCCmp(arg, "-XaddReads:") == 0) {
option = "--add-reads";
value = arg + 11;
kind = VM_LONG_OPTION_WITH_ARGUMENT;
} else if (JLI_StrCCmp(arg, "-Xpatch:") == 0) {
option = "--patch-module";
value = arg + 8;
kind = VM_LONG_OPTION_WITH_ARGUMENT;
}
#endif
*pargc = argc;
*pargv = argv;
*poption = option;
@ -1340,16 +1299,6 @@ ParseArguments(int *pargc, char ***pargv,
JLI_StrCmp(arg, "--patch-module") == 0) {
REPORT_ERROR (has_arg, ARG_ERROR6, arg);
}
#ifndef OLD_MODULE_OPTIONS
else if (JLI_StrCmp(arg, "-modulepath") == 0 ||
JLI_StrCmp(arg, "-mp") == 0 ||
JLI_StrCmp(arg, "-upgrademodulepath") == 0) {
REPORT_ERROR (has_arg, ARG_ERROR4, arg);
} else if (JLI_StrCmp(arg, "-addmods") == 0 ||
JLI_StrCmp(arg, "-limitmods") == 0) {
REPORT_ERROR (has_arg, ARG_ERROR6, arg);
}
#endif
/*
* The following cases will cause the argument parsing to stop
*/
@ -1548,6 +1497,7 @@ NewPlatformStringArray(JNIEnv *env, char **strv, int strc)
NULL_CHECK0(cls = FindBootStrapClass(env, "java/lang/String"));
NULL_CHECK0(ary = (*env)->NewObjectArray(env, strc, cls, 0));
CHECK_EXCEPTION_RETURN_VALUE(0);
for (i = 0; i < strc; i++) {
jstring str = NewPlatformString(env, *strv++);
NULL_CHECK0(str);

View File

@ -253,6 +253,13 @@ typedef struct {
#define NULL_CHECK(NC_check_pointer) \
NULL_CHECK_RETURN_VALUE(NC_check_pointer, )
#define CHECK_EXCEPTION_RETURN_VALUE(CER_value) \
do { \
if ((*env)->ExceptionOccurred(env)) { \
return CER_value; \
} \
} while (JNI_FALSE)
#define CHECK_EXCEPTION_RETURN() \
do { \
if ((*env)->ExceptionOccurred(env)) { \

View File

@ -76,20 +76,29 @@ public class VirtualMachineImpl extends HotSpotVirtualMachine {
sendQuitTo(pid);
// give the target VM time to start the attach mechanism
int i = 0;
long delay = 200;
int retries = (int)(attachTimeout() / delay);
final int delay_step = 100;
final long timeout = attachTimeout();
long time_spend = 0;
long delay = 0;
do {
// Increase timeout on each attempt to reduce polling
delay += delay_step;
try {
Thread.sleep(delay);
} catch (InterruptedException x) { }
path = findSocketFile(pid);
i++;
} while (i <= retries && path == null);
time_spend += delay;
if (time_spend > timeout/2 && path == null) {
// Send QUIT again to give target VM the last chance to react
sendQuitTo(pid);
}
} while (time_spend <= timeout && path == null);
if (path == null) {
throw new AttachNotSupportedException(
"Unable to open socket file: target process not responding " +
"or HotSpot VM not loaded");
String.format("Unable to open socket file %s: " +
"target process %d doesn't respond within %dms " +
"or HotSpot VM not loaded", f.getPath(), pid, time_spend));
}
} finally {
f.delete();

View File

@ -44,9 +44,6 @@ public class VirtualMachineImpl extends HotSpotVirtualMachine {
// Any changes to this needs to be synchronized with HotSpot.
private static final String tmpdir = "/tmp";
// Indicates if this machine uses the old LinuxThreads
static boolean isLinuxThreads;
// The patch to the socket file created by the target VM
String path;
@ -73,44 +70,37 @@ public class VirtualMachineImpl extends HotSpotVirtualMachine {
if (path == null) {
File f = createAttachFile(pid);
try {
// On LinuxThreads each thread is a process and we don't have the
// pid of the VMThread which has SIGQUIT unblocked. To workaround
// this we get the pid of the "manager thread" that is created
// by the first call to pthread_create. This is parent of all
// threads (except the initial thread).
if (isLinuxThreads) {
int mpid;
try {
mpid = getLinuxThreadsManager(pid);
} catch (IOException x) {
throw new AttachNotSupportedException(x.getMessage());
}
assert(mpid >= 1);
sendQuitToChildrenOf(mpid);
} else {
sendQuitTo(pid);
}
sendQuitTo(pid);
// give the target VM time to start the attach mechanism
int i = 0;
long delay = 200;
int retries = (int)(attachTimeout() / delay);
final int delay_step = 100;
final long timeout = attachTimeout();
long time_spend = 0;
long delay = 0;
do {
// Increase timeout on each attempt to reduce polling
delay += delay_step;
try {
Thread.sleep(delay);
} catch (InterruptedException x) { }
path = findSocketFile(pid);
i++;
} while (i <= retries && path == null);
time_spend += delay;
if (time_spend > timeout/2 && path == null) {
// Send QUIT again to give target VM the last chance to react
sendQuitTo(pid);
}
} while (time_spend <= timeout && path == null);
if (path == null) {
throw new AttachNotSupportedException(
"Unable to open socket file: target process not responding " +
"or HotSpot VM not loaded");
String.format("Unable to open socket file %s: " +
"target process %d doesn't respond within %dms " +
"or HotSpot VM not loaded", f.getPath(), pid, time_spend));
}
} finally {
f.delete();
}
}
}
// Check that the file owner/permission to avoid attaching to
// bogus process
@ -340,6 +330,5 @@ public class VirtualMachineImpl extends HotSpotVirtualMachine {
static {
System.loadLibrary("attach");
isLinuxThreads = isLinuxThreads();
}
}

View File

@ -70,26 +70,34 @@ public class VirtualMachineImpl extends HotSpotVirtualMachine {
// Then we attempt to find the socket file again.
path = findSocketFile(pid);
if (path == null) {
File f = new File(tmpdir, ".attach_pid" + pid);
createAttachFile(f.getPath());
File f = createAttachFile(pid);
try {
sendQuitTo(pid);
// give the target VM time to start the attach mechanism
int i = 0;
long delay = 200;
int retries = (int)(attachTimeout() / delay);
final int delay_step = 100;
final long timeout = attachTimeout();
long time_spend = 0;
long delay = 0;
do {
// Increase timeout on each attempt to reduce polling
delay += delay_step;
try {
Thread.sleep(delay);
} catch (InterruptedException x) { }
path = findSocketFile(pid);
i++;
} while (i <= retries && path == null);
time_spend += delay;
if (time_spend > timeout/2 && path == null) {
// Send QUIT again to give target VM the last chance to react
sendQuitTo(pid);
}
} while (time_spend <= timeout && path == null);
if (path == null) {
throw new AttachNotSupportedException(
"Unable to open socket file: target process not responding " +
"or HotSpot VM not loaded");
String.format("Unable to open socket file %s: " +
"target process %d doesn't respond within %dms " +
"or HotSpot VM not loaded", f.getPath(), pid, time_spend));
}
} finally {
f.delete();
@ -282,6 +290,12 @@ public class VirtualMachineImpl extends HotSpotVirtualMachine {
write(fd, b, 0, 1);
}
private File createAttachFile(int pid) throws IOException {
String fn = ".attach_pid" + pid;
File f = new File(tmpdir, fn);
createAttachFile0(f.getPath());
return f;
}
//-- native methods
@ -299,7 +313,7 @@ public class VirtualMachineImpl extends HotSpotVirtualMachine {
static native void write(int fd, byte buf[], int off, int bufLen) throws IOException;
static native void createAttachFile(String path);
static native void createAttachFile0(String path);
static native String getTempDir();

View File

@ -270,7 +270,7 @@ JNIEXPORT void JNICALL Java_sun_tools_attach_VirtualMachineImpl_write
* Method: createAttachFile
* Signature: (Ljava.lang.String;)V
*/
JNIEXPORT void JNICALL Java_sun_tools_attach_VirtualMachineImpl_createAttachFile(JNIEnv *env, jclass cls, jstring path)
JNIEXPORT void JNICALL Java_sun_tools_attach_VirtualMachineImpl_createAttachFile0(JNIEnv *env, jclass cls, jstring path)
{
const char* _path;
jboolean isCopy;

View File

@ -319,7 +319,7 @@ public abstract class HotSpotVirtualMachine extends VirtualMachine {
// -- attach timeout support
private static long defaultAttachTimeout = 5000;
private static long defaultAttachTimeout = 10000;
private volatile long attachTimeout;
/*

View File

@ -71,27 +71,36 @@ public class VirtualMachineImpl extends HotSpotVirtualMachine {
} catch (FileNotFoundException fnf1) {
File f = createAttachFile(pid);
try {
// kill -QUIT will tickle target VM to check for the
// attach file.
sigquit(pid);
// give the target VM time to start the attach mechanism
int i = 0;
long delay = 200;
int retries = (int)(attachTimeout() / delay);
final int delay_step = 100;
final long timeout = attachTimeout();
long time_spend = 0;
long delay = 0;
do {
// Increase timeout on each attempt to reduce polling
delay += delay_step;
try {
Thread.sleep(delay);
} catch (InterruptedException x) { }
try {
fd = openDoor(pid);
} catch (FileNotFoundException fnf2) { }
i++;
} while (i <= retries && fd == -1);
if (fd == -1) {
} catch (FileNotFoundException fnf2) {
// pass
}
time_spend += delay;
if (time_spend > timeout/2 && fd == -1) {
// Send QUIT again to give target VM the last chance to react
sigquit(pid);
}
} while (time_spend <= timeout && fd == -1);
if (fd == -1) {
throw new AttachNotSupportedException(
"Unable to open door: target process not responding or " +
"HotSpot VM not loaded");
String.format("Unable to open door %s: " +
"target process %d doesn't respond within %dms " +
"or HotSpot VM not loaded", f.getPath(), pid, time_spend));
}
} finally {
f.delete();

View File

@ -39,6 +39,7 @@ import java.util.ListIterator;
//import java.util.Map;
import java.util.ResourceBundle;
import java.util.Stack;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import jdk.internal.jline.Terminal;
@ -2336,6 +2337,33 @@ public class ConsoleReader
out.flush();
}
Stack<Character> pushBackChar = new Stack<Character>();
if (terminal.isAnsiSupported()) {
//detect the prompt length by reading the cursor position from the terminal
//the real prompt length could differ from the simple prompt length due to
//use of escape sequences:
out.write("\033[6n");
out.flush();
StringBuilder input = new StringBuilder();
while (true) {
int read;
while ((read = in.read()) != 'R') {
input.appendCodePoint(read);
}
input.appendCodePoint(read);
Matcher m = CURSOR_COLUMN_PATTERN.matcher(input);
if (m.matches()) {
promptLen = Integer.parseInt(m.group("column")) - 1;
String prefix = m.group("prefix");
for (int i = prefix.length() - 1; i >= 0; i--) {
pushBackChar.push(prefix.charAt(i));
}
break;
}
}
}
// if the terminal is unsupported, just use plain-java reading
if (!terminal.isSupported()) {
return readLineSimple();
@ -2352,7 +2380,6 @@ public class ConsoleReader
boolean success = true;
StringBuilder sb = new StringBuilder();
Stack<Character> pushBackChar = new Stack<Character>();
while (true) {
int c = pushBackChar.isEmpty() ? readCharacter() : pushBackChar.pop ();
if (c == -1) {
@ -3193,6 +3220,9 @@ public class ConsoleReader
}
}
}
//where:
private Pattern CURSOR_COLUMN_PATTERN =
Pattern.compile("(?<prefix>.*)\033\\[[0-9]+;(?<column>[0-9]+)R");
/**
* Read a line for unsupported terminals.

View File

@ -29,12 +29,12 @@ import java.io.IOException;
import java.lang.invoke.MethodType;
import java.nio.file.Files;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import java.util.TreeSet;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import jdk.internal.misc.SharedSecrets;
@ -69,11 +69,11 @@ public final class GenerateJLIClassesPlugin implements Plugin {
private static final JavaLangInvokeAccess JLIA
= SharedSecrets.getJavaLangInvokeAccess();
List<String> speciesTypes;
Set<String> speciesTypes;
List<String> invokerTypes;
Set<String> invokerTypes;
Map<String, List<String>> dmhMethods;
Map<String, Set<String>> dmhMethods;
public GenerateJLIClassesPlugin() {
}
@ -110,8 +110,8 @@ public final class GenerateJLIClassesPlugin implements Plugin {
* A better long-term solution is to define and run a set of quick
* generators and extracting this list as a step in the build process.
*/
public static List<String> defaultSpecies() {
return List.of("LL", "L3", "L4", "L5", "L6", "L7", "L7I",
public static Set<String> defaultSpecies() {
return Set.of("LL", "L3", "L4", "L5", "L6", "L7", "L7I",
"L7II", "L7IIL", "L8", "L9", "L10", "L10I", "L10II", "L10IIL",
"L11", "L12", "L13", "LI", "D", "L3I", "LIL", "LLI", "LLIL",
"LILL", "I", "LLILL");
@ -120,23 +120,23 @@ public final class GenerateJLIClassesPlugin implements Plugin {
/**
* @return the default invoker forms to generate.
*/
private static List<String> defaultInvokers() {
return List.of("LL_L", "LL_I", "LILL_I", "L6_L");
private static Set<String> defaultInvokers() {
return Set.of("LL_L", "LL_I", "LILL_I", "L6_L");
}
/**
* @return the list of default DirectMethodHandle methods to generate.
*/
private static Map<String, List<String>> defaultDMHMethods() {
private static Map<String, Set<String>> defaultDMHMethods() {
return Map.of(
DMH_INVOKE_VIRTUAL, List.of("L_L", "LL_L", "LLI_I", "L3_V"),
DMH_INVOKE_SPECIAL, List.of("LL_I", "LL_L", "LLF_L", "LLD_L", "L3_L",
DMH_INVOKE_VIRTUAL, Set.of("L_L", "LL_L", "LLI_I", "L3_V"),
DMH_INVOKE_SPECIAL, Set.of("LL_I", "LL_L", "LLF_L", "LLD_L", "L3_L",
"L4_L", "L5_L", "L6_L", "L7_L", "L8_L", "LLI_I", "LLI_L",
"LLIL_I", "LLII_I", "LLII_L", "L3I_L", "L3I_I", "LLILI_I",
"LLIIL_L", "LLIILL_L", "LLIILL_I", "LLIIL_I", "LLILIL_I",
"LLILILL_I", "LLILII_I", "LLI3_I", "LLI3L_I", "LLI3LL_I",
"LLI3_L", "LLI4_I"),
DMH_INVOKE_STATIC, List.of("LII_I", "LIL_I", "LILIL_I", "LILII_I",
DMH_INVOKE_STATIC, Set.of("LII_I", "LIL_I", "LILIL_I", "LILII_I",
"L_I", "L_L", "L_V", "LD_L", "LF_L", "LI_I", "LII_L", "LLI_L",
"LL_V", "LL_L", "L3_L", "L4_L", "L5_L", "L6_L", "L7_L",
"L8_L", "L9_L", "L10_L", "L10I_L", "L10II_L", "L10IIL_L",
@ -159,15 +159,48 @@ public final class GenerateJLIClassesPlugin implements Plugin {
public void configure(Map<String, String> config) {
String mainArgument = config.get(NAME);
if (mainArgument != null && mainArgument.startsWith("@")) {
if ("none".equals(mainArgument)) {
speciesTypes = Set.of();
invokerTypes = Set.of();
dmhMethods = Map.of();
return;
}
// Start with the default configuration
Set<String> defaultBMHSpecies = defaultSpecies();
// Expand BMH species signatures
defaultBMHSpecies = defaultBMHSpecies.stream()
.map(type -> expandSignature(type))
.collect(Collectors.toSet());
Set<String> defaultInvokerTypes = defaultInvokers();
validateMethodTypes(defaultInvokerTypes);
Map<String, Set<String>> defaultDmhMethods = defaultDMHMethods();
for (Set<String> dmhMethodTypes : defaultDmhMethods.values()) {
validateMethodTypes(dmhMethodTypes);
}
// Extend the default configuration with the contents in the supplied
// input file
if (mainArgument == null || !mainArgument.startsWith("@")) {
speciesTypes = defaultBMHSpecies;
invokerTypes = defaultInvokerTypes;
dmhMethods = defaultDmhMethods;
} else {
File file = new File(mainArgument.substring(1));
if (file.exists()) {
speciesTypes = new ArrayList<>();
invokerTypes = new ArrayList<>();
dmhMethods = new HashMap<>();
Stream<String> lines = fileLines(file);
lines.map(line -> line.split(" "))
// Use TreeSet/TreeMap to keep things sorted in a deterministic
// order to avoid scrambling the layout on small changes and to
// ease finding methods in the generated code
speciesTypes = new TreeSet<>(defaultBMHSpecies);
invokerTypes = new TreeSet<>(defaultInvokerTypes);
dmhMethods = new TreeMap<>();
for (Map.Entry<String, Set<String>> entry : defaultDmhMethods.entrySet()) {
dmhMethods.put(entry.getKey(), new TreeSet<>(entry.getValue()));
}
fileLines(file)
.map(line -> line.split(" "))
.forEach(parts -> {
switch (parts[0]) {
case "[BMH_RESOLVE]":
@ -191,28 +224,14 @@ public final class GenerateJLIClassesPlugin implements Plugin {
}
});
}
} else {
List<String> bmhSpecies = defaultSpecies();
// Expand BMH species signatures
speciesTypes = bmhSpecies.stream()
.map(type -> expandSignature(type))
.collect(Collectors.toList());
invokerTypes = defaultInvokers();
validateMethodTypes(invokerTypes);
dmhMethods = defaultDMHMethods();
for (List<String> dmhMethodTypes : dmhMethods.values()) {
validateMethodTypes(dmhMethodTypes);
}
}
}
private void addDMHMethodType(String dmh, String methodType) {
validateMethodType(methodType);
List<String> methodTypes = dmhMethods.get(dmh);
Set<String> methodTypes = dmhMethods.get(dmh);
if (methodTypes == null) {
methodTypes = new ArrayList<>();
methodTypes = new TreeSet<>();
dmhMethods.put(dmh, methodTypes);
}
methodTypes.add(methodType);
@ -226,7 +245,7 @@ public final class GenerateJLIClassesPlugin implements Plugin {
}
}
private void validateMethodTypes(List<String> dmhMethodTypes) {
private void validateMethodTypes(Set<String> dmhMethodTypes) {
for (String type : dmhMethodTypes) {
validateMethodType(type);
}
@ -291,13 +310,13 @@ public final class GenerateJLIClassesPlugin implements Plugin {
private void generateHolderClasses(ResourcePoolBuilder out) {
int count = 0;
for (List<String> entry : dmhMethods.values()) {
for (Set<String> entry : dmhMethods.values()) {
count += entry.size();
}
MethodType[] directMethodTypes = new MethodType[count];
int[] dmhTypes = new int[count];
int index = 0;
for (Map.Entry<String, List<String>> entry : dmhMethods.entrySet()) {
for (Map.Entry<String, Set<String>> entry : dmhMethods.entrySet()) {
String dmhType = entry.getKey();
for (String type : entry.getValue()) {
// The DMH type to actually ask for is retrieved by removing
@ -314,10 +333,11 @@ public final class GenerateJLIClassesPlugin implements Plugin {
}
}
MethodType[] invokerMethodTypes = new MethodType[this.invokerTypes.size()];
for (int i = 0; i < invokerTypes.size(); i++) {
int i = 0;
for (String invokerType : invokerTypes) {
// The invoker type to ask for is retrieved by removing the first
// and the last argument, which needs to be of Object.class
MethodType mt = asMethodType(invokerTypes.get(i));
MethodType mt = asMethodType(invokerType);
final int lastParam = mt.parameterCount() - 1;
if (mt.parameterCount() < 2 ||
mt.parameterType(0) != Object.class ||
@ -327,6 +347,7 @@ public final class GenerateJLIClassesPlugin implements Plugin {
}
mt = mt.dropParameterTypes(lastParam, lastParam + 1);
invokerMethodTypes[i] = mt.dropParameterTypes(0, 1);
i++;
}
try {
byte[] bytes = JLIA.generateDirectMethodHandleHolderClassBytes(

View File

@ -68,12 +68,12 @@ exclude-resources.argument=<pattern-list> resources to exclude
exclude-resources.description=\
Specify resources to exclude. e.g.: **.jcov,glob:**/META-INF/**
generate-jli-classes.argument=<@filename>
generate-jli-classes.argument=<none|@filename>
generate-jli-classes.description=\
Takes a file hinting to jlink what java.lang.invoke classes to pre-generate. If\n\
this flag is not specified a default set of classes will be generated, so to \n\
disable pre-generation supply the name of an empty or non-existing file
this flag is not specified a default set of classes will be generated. To \n\
disable pre-generation specify none as the argument
installed-modules.description=Fast loading of module descriptors (always enabled)

View File

@ -87,9 +87,32 @@ JNIEXPORT void JNICALL Java_com_sun_management_internal_GcInfoBuilder_fillGcAttr
for (i = 0; i < num_attributes; i++) {
nativeTypes[i] = ext_att_info[i].type;
attName = (*env)->NewStringUTF(env, ext_att_info[i].name);
desc = (*env)->NewStringUTF(env, ext_att_info[i].description);
if ((*env)->ExceptionCheck(env)) {
free(ext_att_info);
free(nativeTypes);
return;
}
(*env)->SetObjectArrayElement(env, attributeNames, i, attName);
if ((*env)->ExceptionCheck(env)) {
free(ext_att_info);
free(nativeTypes);
return;
}
desc = (*env)->NewStringUTF(env, ext_att_info[i].description);
if ((*env)->ExceptionCheck(env)) {
free(ext_att_info);
free(nativeTypes);
return;
}
(*env)->SetObjectArrayElement(env, descriptions, i, desc);
if ((*env)->ExceptionCheck(env)) {
free(ext_att_info);
free(nativeTypes);
return;
}
}
(*env)->SetCharArrayRegion(env, types, 0, num_attributes, nativeTypes);

View File

@ -213,8 +213,6 @@ java/rmi/transport/dgcDeadLock/DGCDeadLock.java 8029360 macosx-a
sun/security/pkcs11/ec/TestKeyFactory.java 8026976 generic-all
sun/security/krb5/auto/Unreachable.java 7164518 macosx-all
sun/security/tools/keytool/ListKeychainStore.sh 8156889 macosx-all
sun/security/tools/jarsigner/warnings/BadKeyUsageTest.java 8026393 generic-all

View File

@ -189,7 +189,6 @@ jdk_security3 = \
-sun/security/krb5 \
-sun/security/jgss \
javax/net \
sun/net/www/protocol/https \
com/sun/net/ssl \
lib/security

View File

@ -32,7 +32,7 @@ import jdk.test.lib.Asserts;
* @summary Verifies that PathSearchingVirtualMachine.bootClassPath()
* returns an empty list in case no bootclass path specified
* regardless of sun.boot.class.path option, which is now obsolete
* @library /test/lib/share/classes
* @library /test/lib
* @compile TestClass.java
* @compile SunBootClassPathEmptyTest.java
* @run main/othervm SunBootClassPathEmptyTest

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 2016, 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 com.sun.management.HotSpotDiagnosticMXBean;
* @bug 6455258
* @summary Sanity test for com.sun.management.HotSpotDiagnosticMXBean.dumpHeap method
* @library /lib/testlibrary
* @library /test/lib/share/classes
* @library /test/lib
* @build jdk.testlibrary.*
* @build jdk.test.lib.hprof.*
* @build jdk.test.lib.hprof.model.*

View File

@ -1,4 +1,4 @@
/**
/*
* Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*

View File

@ -1,4 +1,4 @@
/**
/*
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*

View File

@ -1,5 +1,5 @@
/*
* 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

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2016 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2016, 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

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2014 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 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

View File

@ -19,7 +19,6 @@
* 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.
*
*/
import java.io.File;

View File

@ -36,7 +36,7 @@ import org.testng.annotations.Test;
/*
* @test
* @library /test/lib/share/classes
* @library /test/lib
* @modules java.base/jdk.internal.misc
* jdk.management
* @run testng Basic

View File

@ -48,7 +48,7 @@ import org.testng.annotations.Test;
/*
* @test
* @bug 8077350 8081566 8081567 8098852 8136597
* @library /test/lib/share/classes
* @library /test/lib
* @modules java.base/jdk.internal.misc
* jdk.management
* @build jdk.test.lib.Platform jdk.test.lib.Utils

View File

@ -38,7 +38,7 @@ import org.testng.TestNG;
/*
* @test
* @library /test/lib/share/classes
* @library /test/lib
* @modules java.base/jdk.internal.misc
* jdk.management
* @build jdk.test.lib.Platform jdk.test.lib.Utils

View File

@ -44,7 +44,7 @@ import org.testng.annotations.Test;
/*
* @test
* @library /test/lib/share/classes
* @library /test/lib
* @modules java.base/jdk.internal.misc
* jdk.management
* @build jdk.test.lib.Utils

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 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

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2016, 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

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 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

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 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

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 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

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 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

View File

@ -1,5 +1,5 @@
/*
* 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

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2014 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 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

View File

@ -1,5 +1,5 @@
/*
* 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

View File

@ -24,6 +24,7 @@
/**
* @test
* @bug 6263319
* @requires ((vm.opt.StartFlightRecording == null) | (vm.opt.StartFlightRecording == false)) & ((vm.opt.FlightRecorder == null) | (vm.opt.FlightRecorder == false))
* @summary test setNativeMethodPrefix
* @author Robert Field, Sun Microsystems
*

View File

@ -70,7 +70,7 @@ else
fi
"${JAVA}" ${TESTVMOPTS} \
-XX:TraceRedefineClasses=3 ${NMT} \
-Xlog:redefine+class+load=debug,redefine+class+load+exceptions=info ${NMT} \
-javaagent:RedefineBigClassAgent.jar=BigClass.class \
-classpath "${TESTCLASSES}" RedefineBigClassApp \
> output.log 2>&1

View File

@ -87,23 +87,8 @@ mv RedefineSubclassWithTwoInterfacesImpl.class \
echo "INFO: launching RedefineSubclassWithTwoInterfacesApp"
# TraceRedefineClasses options:
#
# 0x00000001 | 1 - name each target class before loading, after
# loading and after redefinition is completed
# 0x00000002 | 2 - print info if parsing, linking or
# verification throws an exception
# 0x00000004 | 4 - print timer info for the VM operation
# 0x00001000 | 4096 - detect calls to obsolete methods
# 0x00002000 | 8192 - fail a guarantee() in addition to detection
# 0x00004000 | 16384 - detect old/obsolete methods in metadata
# 0x00100000 | 1048576 - impl details: vtable updates
# 0x00200000 | 2097152 - impl details: itable updates
#
# 1+2+4+4096+8192+16384+1048576+2097152 == 3174407
"${JAVA}" ${TESTVMOPTS} \
-XX:TraceRedefineClasses=3174407 \
-Xlog:redefine+class+load=trace,redefine+class+load+exceptions=trace,redefine+class+timer=trace,redefine+class+obsolete=trace,redefine+class+obsolete+metadata=trace,redefine+class+constantpool=trace \
-javaagent:RedefineSubclassWithTwoInterfacesAgent.jar \
-classpath "${TESTCLASSES}" \
RedefineSubclassWithTwoInterfacesApp > output.log 2>&1

View File

@ -70,7 +70,7 @@ else
fi
"${JAVA}" ${TESTVMOPTS} \
-XX:TraceRedefineClasses=3 ${NMT} \
-Xlog:redefine+class+load=debug,redefine+class+load+exceptions=info ${NMT} \
-javaagent:RetransformBigClassAgent.jar=BigClass.class \
-classpath "${TESTCLASSES}" RetransformBigClassApp \
> output.log 2>&1

View File

@ -19,7 +19,6 @@
* 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.
*
*/
/**

View File

@ -19,7 +19,6 @@
* 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.
*
*/
/**

View File

@ -19,7 +19,6 @@
* 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.
*
*/
/**

View File

@ -19,7 +19,6 @@
* 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

View File

@ -19,7 +19,6 @@
* 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.
*
*/
/*

View File

@ -19,7 +19,6 @@
* 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.
*
*/
/**

View File

@ -19,7 +19,6 @@
* 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.
*
*/
/**

View File

@ -19,7 +19,6 @@
* 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.
*
*/
/**

View File

@ -19,7 +19,6 @@
* 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.
*
*/
import java.io.BufferedInputStream;

View File

@ -19,7 +19,6 @@
* 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.
*
*/
import java.lang.reflect.InvocationTargetException;

View File

@ -19,7 +19,6 @@
* 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.
*
*/
public class Invoker {

View File

@ -19,7 +19,6 @@
* 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.
*
*/
/**

View File

@ -19,7 +19,6 @@
* 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.
*
*/
/*

View File

@ -19,7 +19,6 @@
* 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.
*
*/
/**

View File

@ -19,7 +19,6 @@
* 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.
*
*/
/**

View File

@ -19,7 +19,6 @@
* 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.
*
*/
/**

View File

@ -19,8 +19,8 @@
* 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 p1;
import p2.T3;

View File

@ -19,8 +19,8 @@
* 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 p2;
import p1.T2;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2016, 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

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2016, 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

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2016, 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

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2016, 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

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2016, 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

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2016, 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

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2016, 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

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2016, 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

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2016, 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

View File

@ -19,7 +19,6 @@
* 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.
*
*/
import java.io.BufferedInputStream;

View File

@ -19,7 +19,6 @@
* 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.
*
*/
import anotherpkg.MethodSupplierOuter;

View File

@ -19,7 +19,6 @@
* 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.
*
*/
/**

View File

@ -19,7 +19,6 @@
* 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 anotherpkg;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2006, 2016 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 2016, 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

View File

@ -49,7 +49,7 @@ import org.testng.annotations.Test;
/*
* @test
* @library /test/lib/share/classes /lib/testlibrary /test/lib
* @library /lib/testlibrary /test/lib
* @build sun.hotspot.WhiteBox
* @build jdk.test.lib.Utils
* @modules java.base/jdk.internal

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2016 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2016, 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

View File

@ -20,6 +20,7 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 8035158 8145732

View File

@ -1,4 +1,4 @@
/**
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2016 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2016, 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

View File

@ -20,6 +20,7 @@
*
* 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.
*/
/**

View File

@ -20,6 +20,7 @@
*
* 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.
*/
/**

View File

@ -20,6 +20,7 @@
*
* 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.
*/
/**

View File

@ -20,6 +20,7 @@
*
* 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.
*/
/**

View File

@ -20,6 +20,7 @@
*
* 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.
*/
/**

View File

@ -24,7 +24,7 @@
/* @test
* @bug 8051408 8158534
* @summary Make sure DrbgParameters coded as specified
* @library /test/lib/share/classes
* @library /test/lib
*/
import jdk.test.lib.Asserts;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 2016, 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
@ -25,6 +25,7 @@
* @test
* @bug 6850113 8032446
* @summary confirm the behavior of new Bidi implementation. (Backward compatibility)
* @modules java.desktop
*/
import java.awt.font.NumericShaper;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2016, 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
@ -28,6 +28,7 @@
* indicate overrides, rather than using bit 7. Also tests Bidi without loading awt classes to
* confirm that Bidi can be used without awt. Verify that embedding level 0 is properly mapped
* to the base embedding level.
* @modules java.desktop
*/
import java.awt.Color;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2016, 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
@ -25,6 +25,7 @@
* @test
* @bug 7042148
* @summary verify that Bidi.baseIsLeftToRight() returns the correct value even if an incorrect position is set in the given AttributedCharacterIterator.
* @modules java.desktop
*/
import java.awt.font.*;
import java.text.*;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2016, 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
@ -26,6 +26,7 @@
* @bug 7051769 8038092
* @summary verify that Bidi.toString() returns the corect result.
* The second run is intended to test lazy SharedSectets init for 8038092
* @modules java.desktop
* @run main Bug7051769
* @run main/othervm -DpreloadBidi=true Bug7051769
*/

View File

@ -22,9 +22,10 @@
*/
/*
@test
@summary test Comparison of New Collators against Old Collators in the en_US locale
*/
* @test
* @summary test Comparison of New Collators against Old Collators in the en_US locale
* @modules jdk.localedata
*/
import java.io.*;
import java.util.Enumeration;

View File

@ -25,6 +25,7 @@
* @test
* @library /java/text/testlib
* @summary test Collation API
* @modules jdk.localedata
*/
/*
(C) Copyright Taligent, Inc. 1996 - All Rights Reserved

View File

@ -29,6 +29,7 @@
* RuleBasedCollationKey. This test basically tests on the two features:
* 1. Existing code using CollationKey works (backward compatiblility)
* 2. CollationKey can be extended by its subclass.
* @modules jdk.localedata
*/

View File

@ -26,6 +26,7 @@
* @bug 4930708 4174436 5008498
* @library /java/text/testlib
* @summary test Danish Collation
* @modules jdk.localedata
*/
/*
(C) Copyright Taligent, Inc. 1996 - All Rights Reserved

View File

@ -25,6 +25,7 @@
* @test
* @library /java/text/testlib
* @summary test Finnish Collation
* @modules jdk.localedata
*/
/*
(C) Copyright Taligent, Inc. 1996 - All Rights Reserved

View File

@ -25,6 +25,7 @@
* @test
* @library /java/text/testlib
* @summary test French Collation
* @modules jdk.localedata
*/
/*
(C) Copyright Taligent, Inc. 1996 - All Rights Reserved

View File

@ -25,6 +25,7 @@
* @test
* @library /java/text/testlib
* @summary test G7 Collation
* @modules jdk.localedata
*/
/*
*

View File

@ -25,6 +25,7 @@
* @test 1.1 02/09/11
* @bug 4176141 4655819
* @summary Regression tests for Japanese Collation
* @modules jdk.localedata
*/
import java.text.*;

View File

@ -25,6 +25,7 @@
* @test 1.1 02/09/12
* @bug 4176141 4655819
* @summary Regression tests for Korean Collation
* @modules jdk.localedata
*/
import java.text.*;

Some files were not shown because too many files have changed in this diff Show More