OpenJDK / bsd-port / jdk9 / jdk
changeset 13501:b14117a57650
Merge
author | amurillo |
---|---|
date | Tue, 12 Jan 2016 11:31:48 -0800 |
parents | 21e5acefd22a 67ecd47614dc |
children | 806ce052a588 0fbab9d2fa08 |
files | src/java.base/share/classes/jdk/Exported.java src/java.base/share/classes/jdk/internal/misc/CleanerImpl.java src/java.base/share/classes/sun/misc/MessageUtils.java src/java.base/share/classes/sun/misc/Unsafe.java src/java.base/share/classes/sun/misc/VM.java src/java.base/share/classes/sun/misc/VMNotification.java src/java.base/share/native/libjava/MessageUtils.c src/java.base/unix/classes/sun/misc/OSEnvironment.java src/java.base/windows/classes/sun/misc/OSEnvironment.java src/java.scripting/share/classes/javax/script/package.html test/java/lang/ProcessHandle/TEST.properties test/sun/misc/VM/GetNanoTimeAdjustment.java |
diffstat | 361 files changed, 2776 insertions(+), 2632 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgtags Thu Jan 07 20:06:51 2016 +0000 +++ b/.hgtags Tue Jan 12 11:31:48 2016 -0800 @@ -342,3 +342,4 @@ fdd84b2265ddce7f50e084b7c8635189bba6f012 jdk-9+97 f86ee68d1107dad41a27efc34306e0e56244a12e jdk-9+98 e1a789be1535741274c9779f4d4ca3495196b5c3 jdk-9+99 +3d452840f48299a36842760d17c0c8402f0e1266 jdk-9+100
--- a/make/gendata/GendataBreakIterator.gmk Thu Jan 07 20:06:51 2016 +0000 +++ b/make/gendata/GendataBreakIterator.gmk Tue Jan 12 11:31:48 2016 -0800 @@ -48,7 +48,6 @@ $(eval $(call SetupJavaCompilation,BUILD_BREAKITERATOR, \ SETUP := GENERATE_OLDBYTECODE, \ SRC := $(TEXT_SRCDIR), \ - INCLUDES := $(TEXT_PKG), \ INCLUDE_FILES := $(TEXT_SOURCES), \ BIN := $(BREAK_ITERATOR_CLASSES)))
--- a/make/mapfiles/libjava/mapfile-vers Thu Jan 07 20:06:51 2016 +0000 +++ b/make/mapfiles/libjava/mapfile-vers Tue Jan 12 11:31:48 2016 -0800 @@ -216,6 +216,7 @@ Java_java_lang_SecurityManager_getClassContext; Java_java_lang_Shutdown_halt0; Java_java_lang_String_intern; + Java_java_lang_StringCoding_err; Java_java_lang_StringUTF16_isBigEndian; Java_java_lang_System_identityHashCode; Java_java_lang_System_initProperties; @@ -243,8 +244,6 @@ Java_java_util_TimeZone_getSystemTimeZoneID; Java_java_util_TimeZone_getSystemGMTOffsetID; Java_java_util_concurrent_atomic_AtomicLong_VMSupportsCS8; - Java_sun_misc_MessageUtils_toStderr; - Java_sun_misc_MessageUtils_toStdout; Java_sun_misc_NativeSignalHandler_handle0; Java_sun_misc_Signal_findSignal; Java_sun_misc_Signal_handle0; @@ -274,12 +273,12 @@ Java_sun_reflect_Reflection_getClassAccessFlags; Java_sun_misc_Version_getJdkVersionInfo; Java_sun_misc_Version_getJvmVersionInfo; - Java_sun_misc_VM_latestUserDefinedLoader; - Java_sun_misc_VM_getuid; - Java_sun_misc_VM_geteuid; - Java_sun_misc_VM_getgid; - Java_sun_misc_VM_getegid; - Java_sun_misc_VM_initialize; + Java_jdk_internal_misc_VM_latestUserDefinedLoader; + Java_jdk_internal_misc_VM_getuid; + Java_jdk_internal_misc_VM_geteuid; + Java_jdk_internal_misc_VM_getgid; + Java_jdk_internal_misc_VM_getegid; + Java_jdk_internal_misc_VM_initialize; Java_sun_misc_VMSupport_initAgentProperties; Java_sun_misc_VMSupport_getVMTemporaryDirectory;
--- a/make/src/classes/build/tools/dtdbuilder/DTDParser.java Thu Jan 07 20:06:51 2016 +0000 +++ b/make/src/classes/build/tools/dtdbuilder/DTDParser.java Tue Jan 12 11:31:48 2016 -0800 @@ -35,8 +35,6 @@ import java.util.BitSet; import java.text.MessageFormat; -import sun.misc.MessageUtils; - /** * A parser for DTDs. This parser roughly corresponds to the * rules specified in "The SGML Handbook" by Charles F. Goldfarb.
--- a/src/java.base/share/classes/java/io/ObjectInputStream.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/java/io/ObjectInputStream.java Tue Jan 12 11:31:48 2016 -0800 @@ -2135,7 +2135,7 @@ * corresponding modifications to the above class. */ private static ClassLoader latestUserDefinedLoader() { - return sun.misc.VM.latestUserDefinedLoader(); + return jdk.internal.misc.VM.latestUserDefinedLoader(); } /**
--- a/src/java.base/share/classes/java/lang/Class.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/java/lang/Class.java Tue Jan 12 11:31:48 2016 -0800 @@ -56,6 +56,7 @@ import java.util.Objects; import java.util.StringJoiner; import jdk.internal.misc.Unsafe; +import jdk.internal.misc.VM; import jdk.internal.HotSpotIntrinsicCandidate; import sun.reflect.CallerSensitive; import sun.reflect.ConstantPool; @@ -360,9 +361,9 @@ // Reflective call to get caller class is only needed if a security manager // is present. Avoid the overhead of making this call otherwise. caller = Reflection.getCallerClass(); - if (sun.misc.VM.isSystemDomainLoader(loader)) { + if (VM.isSystemDomainLoader(loader)) { ClassLoader ccl = ClassLoader.getClassLoader(caller); - if (!sun.misc.VM.isSystemDomainLoader(ccl)) { + if (!VM.isSystemDomainLoader(ccl)) { sm.checkPermission( SecurityConstants.GET_CLASSLOADER_PERMISSION); }
--- a/src/java.base/share/classes/java/lang/Integer.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/java/lang/Integer.java Tue Jan 12 11:31:48 2016 -0800 @@ -28,6 +28,7 @@ import java.lang.annotation.Native; import java.util.Objects; import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.misc.VM; import static java.lang.String.COMPACT_STRINGS; import static java.lang.String.LATIN1; @@ -1018,7 +1019,7 @@ * may be controlled by the {@code -XX:AutoBoxCacheMax=<size>} option. * During VM initialization, java.lang.Integer.IntegerCache.high property * may be set and saved in the private system properties in the - * sun.misc.VM class. + * jdk.internal.misc.VM class. */ private static class IntegerCache { @@ -1030,7 +1031,7 @@ // high value may be configured by property int h = 127; String integerCacheHighPropValue = - sun.misc.VM.getSavedProperty("java.lang.Integer.IntegerCache.high"); + VM.getSavedProperty("java.lang.Integer.IntegerCache.high"); if (integerCacheHighPropValue != null) { try { int i = parseInt(integerCacheHighPropValue);
--- a/src/java.base/share/classes/java/lang/LiveStackFrame.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/java/lang/LiveStackFrame.java Tue Jan 12 11:31:48 2016 -0800 @@ -61,6 +61,9 @@ * local variable array is an {@link PrimitiveValue} object; * otherwise, the element is an {@code Object}. * + * <p>The returned array may contain null entries if a local variable is not + * live. + * * @return the local variable array of this stack frame. */ public Object[] getLocals();
--- a/src/java.base/share/classes/java/lang/StackStreamFactory.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/java/lang/StackStreamFactory.java Tue Jan 12 11:31:48 2016 -0800 @@ -24,7 +24,7 @@ */ package java.lang; -import sun.misc.VM; +import jdk.internal.misc.VM; import java.io.PrintStream; import java.lang.StackWalker.Option;
--- a/src/java.base/share/classes/java/lang/StringCoding.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/java/lang/StringCoding.java Tue Jan 12 11:31:48 2016 -0800 @@ -39,7 +39,6 @@ import java.nio.charset.UnsupportedCharsetException; import java.util.Arrays; import jdk.internal.HotSpotIntrinsicCandidate; -import sun.misc.MessageUtils; import sun.nio.cs.HistoricallyNamedCharset; import sun.nio.cs.ArrayDecoder; import sun.nio.cs.ArrayEncoder; @@ -106,11 +105,11 @@ private static void warnUnsupportedCharset(String csn) { if (warnUnsupportedCharset) { - // Use sun.misc.MessageUtils rather than the Logging API or - // System.err since this method may be called during VM - // initialization before either is available. - MessageUtils.err("WARNING: Default charset " + csn + - " not supported, using ISO-8859-1 instead"); + // Use err(String) rather than the Logging API or System.err + // since this method may be called during VM initialization + // before either is available. + err("WARNING: Default charset " + csn + + " not supported, using ISO-8859-1 instead\n"); warnUnsupportedCharset = false; } } @@ -341,10 +340,9 @@ try { return decode("ISO-8859-1", ba, off, len); } catch (UnsupportedEncodingException x) { - // If this code is hit during VM initialization, MessageUtils is + // If this code is hit during VM initialization, err(String) is // the only way we will be able to get any kind of error message. - MessageUtils.err("ISO-8859-1 charset not available: " - + x.toString()); + err("ISO-8859-1 charset not available: " + x.toString() + "\n"); // If we can not find ISO-8859-1 (a required encoding) then things // are seriously wrong with the installation. System.exit(1); @@ -653,14 +651,20 @@ try { return encode("ISO-8859-1", coder, val); } catch (UnsupportedEncodingException x) { - // If this code is hit during VM initialization, MessageUtils is + // If this code is hit during VM initialization, err(String) is // the only way we will be able to get any kind of error message. - MessageUtils.err("ISO-8859-1 charset not available: " - + x.toString()); + err("ISO-8859-1 charset not available: " + x.toString() + "\n"); // If we can not find ISO-8859-1 (a required encoding) then things // are seriously wrong with the installation. System.exit(1); return null; } } + + /** + * Print a message directly to stderr, bypassing all character conversion + * methods. + * @param msg message to print + */ + private static native void err(String msg); }
--- a/src/java.base/share/classes/java/lang/System.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/java/lang/System.java Tue Jan 12 11:31:48 2016 -0800 @@ -46,6 +46,7 @@ import jdk.internal.HotSpotIntrinsicCandidate; import jdk.internal.misc.JavaLangAccess;; import jdk.internal.misc.SharedSecrets;; +import jdk.internal.misc.VM; import jdk.internal.logger.LoggerFinderLoader; import jdk.internal.logger.LazyLoggers; import jdk.internal.logger.LocalizedLoggerWrapper; @@ -1534,6 +1535,8 @@ * @return an instance of {@link Logger} that can be used by the calling * class. * @throws NullPointerException if {@code name} is {@code null}. + * + * @since 9 */ @CallerSensitive public static Logger getLogger(String name) { @@ -1571,6 +1574,8 @@ * resource bundle for message localization. * @throws NullPointerException if {@code name} is {@code null} or * {@code bundle} is {@code null}. + * + * @since 9 */ @CallerSensitive public static Logger getLogger(String name, ResourceBundle bundle) { @@ -1817,12 +1822,12 @@ // removed from the system properties. // // See java.lang.Integer.IntegerCache and the - // sun.misc.VM.saveAndRemoveProperties method for example. + // VM.saveAndRemoveProperties method for example. // // Save a private copy of the system properties object that // can only be accessed by the internal implementation. Remove // certain system properties that are not intended for public access. - sun.misc.VM.saveAndRemoveProperties(props); + VM.saveAndRemoveProperties(props); lineSeparator = props.getProperty("line.separator"); @@ -1846,7 +1851,7 @@ // set for the class libraries. Currently this is no-op everywhere except // for Windows where the process-wide error mode is set before the java.io // classes are used. - sun.misc.VM.initializeOSEnvironment(); + VM.initializeOSEnvironment(); // The main thread is not added to its thread group in the same // way as other threads; we must do it ourselves here. @@ -1857,10 +1862,10 @@ setJavaLangAccess(); // Subsystems that are invoked during initialization can invoke - // sun.misc.VM.isBooted() in order to avoid doing things that should + // VM.isBooted() in order to avoid doing things that should // wait until the application class loader has been set up. // IMPORTANT: Ensure that this remains the last initialization action! - sun.misc.VM.booted(); + VM.booted(); } private static void setJavaLangAccess() {
--- a/src/java.base/share/classes/java/lang/Thread.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/java/lang/Thread.java Tue Jan 12 11:31:48 2016 -0800 @@ -1869,7 +1869,7 @@ */ public State getState() { // get current thread state - return sun.misc.VM.toThreadState(threadStatus); + return jdk.internal.misc.VM.toThreadState(threadStatus); } // Added in JSR-166
--- a/src/java.base/share/classes/java/lang/ThreadGroup.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/java/lang/ThreadGroup.java Tue Jan 12 11:31:48 2016 -0800 @@ -27,7 +27,7 @@ import java.io.PrintStream; import java.util.Arrays; -import sun.misc.VM; +import jdk.internal.misc.VM; /** * A thread group represents a set of threads. In addition, a thread
--- a/src/java.base/share/classes/java/lang/Throwable.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/java/lang/Throwable.java Tue Jan 12 11:31:48 2016 -0800 @@ -24,7 +24,7 @@ */ package java.lang; -import sun.misc.VM; +import jdk.internal.misc.VM; import java.io.*; import java.util.*;
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandles.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/java/lang/invoke/MethodHandles.java Tue Jan 12 11:31:48 2016 -0800 @@ -1836,7 +1836,7 @@ return false; } ClassLoader loader = defc.getClassLoader(); - if (!sun.misc.VM.isSystemDomainLoader(loader)) { + if (!jdk.internal.misc.VM.isSystemDomainLoader(loader)) { ClassLoader sysl = ClassLoader.getSystemClassLoader(); boolean found = false; while (sysl != null) {
--- a/src/java.base/share/classes/java/lang/ref/Cleaner.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/java/lang/ref/Cleaner.java Tue Jan 12 11:31:48 2016 -0800 @@ -28,7 +28,7 @@ import java.util.Objects; import java.util.concurrent.ThreadFactory; -import jdk.internal.misc.CleanerImpl; +import jdk.internal.ref.CleanerImpl; /** * {@code Cleaner} manages a set of object references and corresponding cleaning actions.
--- a/src/java.base/share/classes/java/lang/ref/Finalizer.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/java/lang/ref/Finalizer.java Tue Jan 12 11:31:48 2016 -0800 @@ -29,7 +29,7 @@ import java.security.AccessController; import jdk.internal.misc.JavaLangAccess; import jdk.internal.misc.SharedSecrets; -import sun.misc.VM; +import jdk.internal.misc.VM; final class Finalizer extends FinalReference<Object> { /* Package-private; must be in same package as the Reference
--- a/src/java.base/share/classes/java/lang/ref/ReferenceQueue.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/java/lang/ref/ReferenceQueue.java Tue Jan 12 11:31:48 2016 -0800 @@ -26,6 +26,7 @@ package java.lang.ref; import java.util.function.Consumer; +import jdk.internal.misc.VM; /** * Reference queues, to which registered reference objects are appended by the @@ -73,7 +74,7 @@ // Volatiles ensure ordering. r.queue = ENQUEUED; if (r instanceof FinalReference) { - sun.misc.VM.addFinalRefCount(1); + VM.addFinalRefCount(1); } lock.notifyAll(); return true; @@ -93,7 +94,7 @@ r.next = r; queueLength--; if (r instanceof FinalReference) { - sun.misc.VM.addFinalRefCount(-1); + VM.addFinalRefCount(-1); } return r; }
--- a/src/java.base/share/classes/java/lang/reflect/Proxy.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/java/lang/reflect/Proxy.java Tue Jan 12 11:31:48 2016 -0800 @@ -34,7 +34,7 @@ import java.util.Objects; import java.util.concurrent.atomic.AtomicLong; import java.util.function.BiFunction; -import sun.misc.VM; +import jdk.internal.misc.VM; import sun.reflect.CallerSensitive; import sun.reflect.Reflection; import sun.reflect.misc.ReflectUtil;
--- a/src/java.base/share/classes/java/net/URI.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/java/net/URI.java Tue Jan 12 11:31:48 2016 -0800 @@ -1146,13 +1146,30 @@ if (part != null) { return part; } - StringBuilder sb = new StringBuilder(); - appendSchemeSpecificPart(sb, null, getAuthority(), getUserInfo(), + + String s = string; + if (s != null) { + // if string is defined, components will have been parsed + int start = 0; + int end = s.length(); + if (scheme != null) { + start = scheme.length() + 1; + } + if (fragment != null) { + end -= fragment.length() + 1; + } + if (path != null && path.length() == end - start) { + part = path; + } else { + part = s.substring(start, end); + } + } else { + StringBuilder sb = new StringBuilder(); + appendSchemeSpecificPart(sb, null, getAuthority(), getUserInfo(), host, port, getPath(), getQuery()); - if (sb.length() == 0) { - return null; + part = sb.toString(); } - return schemeSpecificPart = sb.toString(); + return schemeSpecificPart = part; } /** @@ -2059,7 +2076,7 @@ // 5.2 (2): Reference to current document (lone fragment) if ((child.scheme == null) && (child.authority == null) - && child.path.equals("") && (child.fragment != null) + && child.path.isEmpty() && (child.fragment != null) && (child.query == null)) { if ((base.fragment != null) && child.fragment.equals(base.fragment)) { @@ -2647,13 +2664,6 @@ private static final long L_SCHEME = L_ALPHA | L_DIGIT | lowMask("+-."); private static final long H_SCHEME = H_ALPHA | H_DIGIT | highMask("+-."); - // uric_no_slash = unreserved | escaped | ";" | "?" | ":" | "@" | - // "&" | "=" | "+" | "$" | "," - private static final long L_URIC_NO_SLASH - = L_UNRESERVED | L_ESCAPED | lowMask(";?:@&=+$,"); - private static final long H_URIC_NO_SLASH - = H_UNRESERVED | H_ESCAPED | highMask(";?:@&=+$,"); - // scope_id = alpha | digit | "_" | "." private static final long L_SCOPE_ID = L_ALPHANUM | lowMask("_."); @@ -2884,23 +2894,10 @@ // -- Simple access to the input string -- - // Return a substring of the input string - // - private String substring(int start, int end) { - return input.substring(start, end); - } - - // Return the char at position p, - // assuming that p < input.length() - // - private char charAt(int p) { - return input.charAt(p); - } - // Tells whether start < end and, if so, whether charAt(start) == c // private boolean at(int start, int end, char c) { - return (start < end) && (charAt(start) == c); + return (start < end) && (input.charAt(start) == c); } // Tells whether start + s.length() < end and, if so, @@ -2913,7 +2910,7 @@ return false; int i = 0; while (i < sn) { - if (charAt(p++) != s.charAt(i)) { + if (input.charAt(p++) != s.charAt(i)) { break; } i++; @@ -2953,7 +2950,7 @@ // start position. // private int scan(int start, int end, char c) { - if ((start < end) && (charAt(start) == c)) + if ((start < end) && (input.charAt(start) == c)) return start + 1; return start; } @@ -2968,7 +2965,7 @@ private int scan(int start, int end, String err, String stop) { int p = start; while (p < end) { - char c = charAt(p); + char c = input.charAt(p); if (err.indexOf(c) >= 0) return -1; if (stop.indexOf(c) >= 0) @@ -2978,6 +2975,23 @@ return p; } + // Scan forward from the given start position. Stop at the first char + // in the stop string (in which case the index of the preceding char is + // returned), or the end of the input string (in which case the length + // of the input string is returned). May return the start position if + // nothing matches. + // + private int scan(int start, int end, String stop) { + int p = start; + while (p < end) { + char c = input.charAt(p); + if (stop.indexOf(c) >= 0) + break; + p++; + } + return p; + } + // Scan a potential escape sequence, starting at the given position, // with the given first char (i.e., charAt(start) == c). // @@ -2992,8 +3006,8 @@ if (c == '%') { // Process escape pair if ((p + 3 <= n) - && match(charAt(p + 1), L_HEX, H_HEX) - && match(charAt(p + 2), L_HEX, H_HEX)) { + && match(input.charAt(p + 1), L_HEX, H_HEX) + && match(input.charAt(p + 2), L_HEX, H_HEX)) { return p + 3; } fail("Malformed escape pair", p); @@ -3013,7 +3027,7 @@ { int p = start; while (p < n) { - char c = charAt(p); + char c = input.charAt(p); if (match(c, lowMask, highMask)) { p++; continue; @@ -3059,7 +3073,6 @@ // void parse(boolean rsa) throws URISyntaxException { requireServerAuthority = rsa; - int ssp; // Start of scheme-specific part int n = input.length(); int p = scan(0, n, "/?#", ":"); if ((p >= 0) && at(p, n, ':')) { @@ -3067,26 +3080,25 @@ failExpecting("scheme name", 0); checkChar(0, L_ALPHA, H_ALPHA, "scheme name"); checkChars(1, p, L_SCHEME, H_SCHEME, "scheme name"); - scheme = substring(0, p); + scheme = input.substring(0, p); p++; // Skip ':' - ssp = p; if (at(p, n, '/')) { p = parseHierarchical(p, n); } else { - int q = scan(p, n, "", "#"); + // opaque; need to create the schemeSpecificPart + int q = scan(p, n, "#"); if (q <= p) failExpecting("scheme-specific part", p); checkChars(p, q, L_URIC, H_URIC, "opaque part"); + schemeSpecificPart = input.substring(p, q); p = q; } } else { - ssp = 0; p = parseHierarchical(0, n); } - schemeSpecificPart = substring(ssp, p); if (at(p, n, '#')) { checkChars(p + 1, n, L_URIC, H_URIC, "fragment"); - fragment = substring(p + 1, n); + fragment = input.substring(p + 1, n); p = n; } if (p < n) @@ -3113,7 +3125,7 @@ int p = start; if (at(p, n, '/') && at(p + 1, n, '/')) { p += 2; - int q = scan(p, n, "", "/?#"); + int q = scan(p, n, "/?#"); if (q > p) { p = parseAuthority(p, q); } else if (q < n) { @@ -3122,15 +3134,15 @@ } else failExpecting("authority", p); } - int q = scan(p, n, "", "?#"); // DEVIATION: May be empty + int q = scan(p, n, "?#"); // DEVIATION: May be empty checkChars(p, q, L_PATH, H_PATH, "path"); - path = substring(p, q); + path = input.substring(p, q); p = q; if (at(p, n, '?')) { p++; - q = scan(p, n, "", "#"); + q = scan(p, n, "#"); checkChars(p, q, L_URIC, H_URIC, "query"); - query = substring(p, q); + query = input.substring(p, q); p = q; } return p; @@ -3154,7 +3166,7 @@ boolean serverChars; boolean regChars; - if (scan(p, n, "", "]") > p) { + if (scan(p, n, "]") > p) { // contains a literal IPv6 address, therefore % is allowed serverChars = (scan(p, n, L_SERVER_PERCENT, H_SERVER_PERCENT) == n); } else { @@ -3164,7 +3176,7 @@ if (regChars && !serverChars) { // Must be a registry-based authority - authority = substring(p, n); + authority = input.substring(p, n); return n; } @@ -3176,7 +3188,7 @@ q = parseServer(p, n); if (q < n) failExpecting("end of authority", q); - authority = substring(p, n); + authority = input.substring(p, n); } catch (URISyntaxException x) { // Undo results of failed parse userInfo = null; @@ -3198,7 +3210,7 @@ if (q < n) { if (regChars) { // Registry-based authority - authority = substring(p, n); + authority = input.substring(p, n); } else if (ex != null) { // Re-throw exception; it was probably due to // a malformed IPv6 address @@ -3224,7 +3236,7 @@ q = scan(p, n, "/?#", "@"); if ((q >= p) && at(q, n, '@')) { checkChars(p, q, L_USERINFO, H_USERINFO, "user info"); - userInfo = substring(p, q); + userInfo = input.substring(p, q); p = q + 1; // Skip '@' } @@ -3235,7 +3247,7 @@ q = scan(p, n, "/?#", "]"); if ((q > p) && at(q, n, ']')) { // look for a "%" scope id - int r = scan (p, q, "", "%"); + int r = scan (p, q, "%"); if (r > p) { parseIPv6Reference(p, r); if (r+1 == q) { @@ -3246,7 +3258,7 @@ } else { parseIPv6Reference(p, q); } - host = substring(p-1, q+1); + host = input.substring(p-1, q+1); p = q + 1; } else { failExpecting("closing bracket for IPv6 address", q); @@ -3261,7 +3273,7 @@ // port if (at(p, n, ':')) { p++; - q = scan(p, n, "", "/"); + q = scan(p, n, "/"); if (q > p) { checkChars(p, q, L_DIGIT, H_DIGIT, "port number"); try { @@ -3361,13 +3373,13 @@ // IPv4 address is followed by something - check that // it's a ":" as this is the only valid character to // follow an address. - if (charAt(p) != ':') { + if (input.charAt(p) != ':') { p = -1; } } if (p > start) - host = substring(start, p); + host = input.substring(start, p); return p; } @@ -3393,7 +3405,7 @@ p = q; q = scan(p, n, L_ALPHANUM | L_DASH, H_ALPHANUM | H_DASH); if (q > p) { - if (charAt(q - 1) == '-') + if (input.charAt(q - 1) == '-') fail("Illegal character in hostname", q - 1); p = q; } @@ -3412,11 +3424,11 @@ // for a fully qualified hostname check that the rightmost // label starts with an alpha character. - if (l > start && !match(charAt(l), L_ALPHA, H_ALPHA)) { + if (l > start && !match(input.charAt(l), L_ALPHA, H_ALPHA)) { fail("Illegal character in hostname", l); } - host = substring(start, p); + host = input.substring(start, p); return p; }
--- a/src/java.base/share/classes/java/net/URL.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/java/net/URL.java Tue Jan 12 11:31:48 2016 -0800 @@ -1242,7 +1242,7 @@ private static ThreadLocal<Object> gate = new ThreadLocal<>(); private static URLStreamHandler lookupViaProviders(final String protocol) { - if (!sun.misc.VM.isBooted()) + if (!jdk.internal.misc.VM.isBooted()) return null; if (gate.get() != null)
--- a/src/java.base/share/classes/java/net/URLConnection.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/java/net/URLConnection.java Tue Jan 12 11:31:48 2016 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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 @@ -1567,6 +1567,11 @@ } } + if ((c1 == 0x49 && c2 == 0x49 && c3 == 0x2a && c4 == 0x00) + || (c1 == 0x4d && c2 == 0x4d && c3 == 0x00 && c4 == 0x2a)) { + return "image/tiff"; + } + if (c1 == 0xD0 && c2 == 0xCF && c3 == 0x11 && c4 == 0xE0 && c5 == 0xA1 && c6 == 0xB1 && c7 == 0x1A && c8 == 0xE1) {
--- a/src/java.base/share/classes/java/nio/Bits.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/java/nio/Bits.java Tue Jan 12 11:31:48 2016 -0800 @@ -31,7 +31,7 @@ import jdk.internal.misc.JavaLangRefAccess; import jdk.internal.misc.SharedSecrets; import jdk.internal.misc.Unsafe; -import sun.misc.VM; +import jdk.internal.misc.VM; /** * Access to bits, native and otherwise.
--- a/src/java.base/share/classes/java/nio/Direct-X-Buffer.java.template Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/java/nio/Direct-X-Buffer.java.template Tue Jan 12 11:31:48 2016 -0800 @@ -30,7 +30,7 @@ import java.io.FileDescriptor; import sun.misc.Cleaner; import jdk.internal.misc.Unsafe; -import sun.misc.VM; +import jdk.internal.misc.VM; import sun.nio.ch.DirectBuffer;
--- a/src/java.base/share/classes/java/nio/charset/Charset.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/java/nio/charset/Charset.java Tue Jan 12 11:31:48 2016 -0800 @@ -43,6 +43,7 @@ import java.util.ServiceConfigurationError; import java.util.SortedMap; import java.util.TreeMap; +import jdk.internal.misc.VM; import sun.misc.ASCIICaseInsensitiveComparator; import sun.nio.cs.StandardCharsets; import sun.nio.cs.ThreadLocalCoders; @@ -281,7 +282,7 @@ static boolean atBugLevel(String bl) { // package-private String level = bugLevel; if (level == null) { - if (!sun.misc.VM.isBooted()) + if (!VM.isBooted()) return false; bugLevel = level = AccessController.doPrivileged( new GetPropertyAction("sun.nio.cs.bugLevel", "")); @@ -394,7 +395,7 @@ // that loader to be prematurely initialized with incomplete // information. // - if (!sun.misc.VM.isBooted()) + if (!VM.isBooted()) return null; if (gate.get() != null) @@ -445,7 +446,7 @@ } private static Charset lookupExtendedCharset(String charsetName) { - if (!sun.misc.VM.isBooted()) // see lookupViaProviders() + if (!VM.isBooted()) // see lookupViaProviders() return null; CharsetProvider[] ecps = ExtendedProviderHolder.extendedProviders; for (CharsetProvider cp : ecps) {
--- a/src/java.base/share/classes/java/time/Clock.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/java/time/Clock.java Tue Jan 12 11:31:48 2016 -0800 @@ -69,7 +69,7 @@ import java.io.Serializable; import java.util.Objects; import java.util.TimeZone; -import sun.misc.VM; +import jdk.internal.misc.VM; /** * A clock providing access to the current instant, date and time using a time-zone.
--- a/src/java.base/share/classes/java/time/LocalDate.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/java/time/LocalDate.java Tue Jan 12 11:31:48 2016 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 @@ -1369,6 +1369,23 @@ if (daysToAdd == 0) { return this; } + long dom = day + daysToAdd; + if (dom > 0) { + if (dom <= 28) { + return new LocalDate(year, month, (int) dom); + } else if (dom <= 59) { // 59th Jan is 28th Feb, 59th Feb is 31st Mar + long monthLen = lengthOfMonth(); + if (dom <= monthLen) { + return new LocalDate(year, month, (int) dom); + } else if (month < 12) { + return new LocalDate(year, month + 1, (int) (dom - monthLen)); + } else { + YEAR.checkValidValue(year + 1); + return new LocalDate(year + 1, 1, (int) (dom - monthLen)); + } + } + } + long mjDay = Math.addExact(toEpochDay(), daysToAdd); return LocalDate.ofEpochDay(mjDay); }
--- a/src/java.base/share/classes/jdk/Exported.java Thu Jan 07 20:06:51 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,80 +0,0 @@ -/* - * 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 - * 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; - -import java.lang.annotation.*; - -/** - * Indicates whether or not a JDK specific type or package is an - * exported part of the JDK suitable for use outside of the JDK - * implementation itself. - * - * This annotation should only be applied to types and packages - * <em>outside</em> of the Java SE namespaces of {@code java.*} and - * {@code javax.*} packages. For example, certain portions of {@code - * com.sun.*} are official parts of the JDK meant to be generally - * usable while other portions of {@code com.sun.*} are not. This - * annotation type allows those portions to be easily and - * programmatically distinguished. - * - * <p>If in one release a type or package is - * <code>@Exported(true)</code>, in a subsequent major release such a - * type or package can transition to <code>@Exported(false)</code>. - * - * <p>If a type or package is <code>@Exported(false)</code> in a - * release, it may be removed in a subsequent major release. - * - * <p>If a top-level type has an <code>@Exported</code> annotation, - * any nested member types with the top-level type should have an - * <code>@Exported</code> annotation with the same value. - * - * (In exceptional cases, if a nested type is going to be removed - * before its enclosing type, the nested type's could be - * <code>@Exported(false)</code> while its enclosing type was - * <code>@Exported(true)</code>.) - * - * Likewise, if a package has an <code>@Exported</code> annotation, - * top-level types within that package should also have an - * <code>@Exported</code> annotation. - * - * Sometimes a top-level type may have a different - * <code>@Exported</code> value than its package. - * - * @since 1.8 - */ -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.TYPE, ElementType.PACKAGE}) -@Exported -public @interface Exported { - /** - * Whether or not the annotated type or package is an exported - * part of the JDK. - * @return whether or not the annotated type or package is an exported - * part of the JDK - */ - boolean value() default true; -}
--- a/src/java.base/share/classes/jdk/internal/logger/BootstrapLogger.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/jdk/internal/logger/BootstrapLogger.java Tue Jan 12 11:31:48 2016 -0800 @@ -48,7 +48,7 @@ import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; import sun.misc.InnocuousThread; -import sun.misc.VM; +import jdk.internal.misc.VM; import sun.util.logging.PlatformLogger; import jdk.internal.logger.LazyLoggers.LazyLoggerAccessor;
--- a/src/java.base/share/classes/jdk/internal/logger/LazyLoggers.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/jdk/internal/logger/LazyLoggers.java Tue Jan 12 11:31:48 2016 -0800 @@ -32,7 +32,7 @@ import java.lang.System.Logger; import java.lang.ref.WeakReference; import java.util.Objects; -import sun.misc.VM; +import jdk.internal.misc.VM; import sun.util.logging.PlatformLogger; /**
--- a/src/java.base/share/classes/jdk/internal/misc/CleanerImpl.java Thu Jan 07 20:06:51 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,788 +0,0 @@ -/* - * 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. 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.lang.ref.Cleaner; -import java.lang.ref.Cleaner.Cleanable; -import java.lang.ref.PhantomReference; -import java.lang.ref.Reference; -import java.lang.ref.ReferenceQueue; -import java.lang.ref.SoftReference; -import java.lang.ref.WeakReference; -import java.security.AccessController; -import java.security.PrivilegedAction; -import java.util.Objects; -import java.util.concurrent.ThreadFactory; -import java.util.function.Function; - -import sun.misc.InnocuousThread; - -/** - * CleanerImpl manages a set of object references and corresponding cleaning actions. - * CleanerImpl provides the functionality of {@link java.lang.ref.Cleaner}. - */ -public final class CleanerImpl implements Runnable { - - /** - * An object to access the CleanerImpl from a Cleaner; set by Cleaner init. - */ - private static Function<Cleaner, CleanerImpl> cleanerImplAccess = null; - - /** - * Heads of a CleanableList for each reference type. - */ - final PhantomCleanable<?> phantomCleanableList; - - final WeakCleanable<?> weakCleanableList; - - final SoftCleanable<?> softCleanableList; - - // The ReferenceQueue of pending cleaning actions - final ReferenceQueue<Object> queue; - - /** - * Called by Cleaner static initialization to provide the function - * to map from Cleaner to CleanerImpl. - * @param access a function to map from Cleaner to CleanerImpl - */ - public static void setCleanerImplAccess(Function<Cleaner, CleanerImpl> access) { - if (cleanerImplAccess == null) { - cleanerImplAccess = access; - } - } - - /** - * Called to get the CleanerImpl for a Cleaner. - * @param cleaner the cleaner - * @return the corresponding CleanerImpl - */ - private static CleanerImpl getCleanerImpl(Cleaner cleaner) { - return cleanerImplAccess.apply(cleaner); - } - - /** - * Constructor for CleanerImpl. - */ - public CleanerImpl() { - queue = new ReferenceQueue<>(); - phantomCleanableList = new PhantomCleanableRef(this); - weakCleanableList = new WeakCleanableRef(this); - softCleanableList = new SoftCleanableRef(this); - } - - /** - * Starts the Cleaner implementation. - * When started waits for Cleanables to be queued. - * @param service the cleaner - * @param threadFactory the thread factory - */ - public void start(Cleaner service, ThreadFactory threadFactory) { - // schedule a nop cleaning action for the service, so the associated thread - // will continue to run at least until the service is reclaimable. - new PhantomCleanableRef(service, service, () -> {}); - - if (threadFactory == null) { - threadFactory = CleanerImpl.InnocuousThreadFactory.factory(); - } - - // now that there's at least one cleaning action, for the service, - // we can start the associated thread, which runs until - // all cleaning actions have been run. - Thread thread = threadFactory.newThread(this); - thread.setDaemon(true); - thread.start(); - } - - /** - * Process queued Cleanables as long as the cleanable lists are not empty. - * A Cleanable is in one of the lists for each Object and for the Cleaner - * itself. - * Terminates when the Cleaner is no longer reachable and - * has been cleaned and there are no more Cleanable instances - * for which the object is reachable. - * <p> - * If the thread is a ManagedLocalsThread, the threadlocals - * are erased before each cleanup - */ - public void run() { - Thread t = Thread.currentThread(); - InnocuousThread mlThread = (t instanceof InnocuousThread) - ? (InnocuousThread) t - : null; - while (!phantomCleanableList.isListEmpty() || - !weakCleanableList.isListEmpty() || - !softCleanableList.isListEmpty()) { - if (mlThread != null) { - // Clear the thread locals - mlThread.eraseThreadLocals(); - } - try { - // Wait for a Ref, with a timeout to avoid getting hung - // due to a race with clear/clean - Cleanable ref = (Cleanable) queue.remove(60 * 1000L); - if (ref != null) { - ref.clean(); - } - } catch (InterruptedException i) { - continue; // ignore the interruption - } catch (Throwable e) { - // ignore exceptions from the cleanup action - } - } - } - - /** - * PhantomCleanable subclasses efficiently encapsulate cleanup state and - * the cleaning action. - * Subclasses implement the abstract {@link #performCleanup()} method - * to provide the cleaning action. - * When constructed, the object reference and the {@link Cleanable Cleanable} - * are registered with the {@link Cleaner}. - * The Cleaner invokes {@link Cleaner.Cleanable#clean() clean} after the - * referent becomes phantom reachable. - */ - public static abstract class PhantomCleanable<T> extends PhantomReference<T> - implements Cleaner.Cleanable { - - /** - * Links to previous and next in a doubly-linked list. - */ - PhantomCleanable<?> prev = this, next = this; - - /** - * The CleanerImpl for this Cleanable. - */ - private final CleanerImpl cleanerImpl; - - /** - * Constructs new {@code PhantomCleanable} with - * {@code non-null referent} and {@code non-null cleaner}. - * The {@code cleaner} is not retained; it is only used to - * register the newly constructed {@link Cleaner.Cleanable Cleanable}. - * - * @param referent the referent to track - * @param cleaner the {@code Cleaner} to register with - */ - public PhantomCleanable(T referent, Cleaner cleaner) { - super(Objects.requireNonNull(referent), getCleanerImpl(cleaner).queue); - this.cleanerImpl = getCleanerImpl(cleaner); - insert(); - - // TODO: Replace getClass() with ReachabilityFence when it is available - cleaner.getClass(); - referent.getClass(); - } - - /** - * Construct a new root of the list; not inserted. - */ - PhantomCleanable(CleanerImpl cleanerImpl) { - super(null, null); - this.cleanerImpl = cleanerImpl; - } - - /** - * Insert this PhantomCleanable after the list head. - */ - private void insert() { - final PhantomCleanable<?> list = cleanerImpl.phantomCleanableList; - synchronized (list) { - prev = list; - next = list.next; - next.prev = this; - list.next = this; - } - } - - /** - * Remove this PhantomCleanable from the list. - * - * @return true if Cleanable was removed or false if not because - * it had already been removed before - */ - private boolean remove() { - PhantomCleanable<?> list = cleanerImpl.phantomCleanableList; - synchronized (list) { - if (next != this) { - next.prev = prev; - prev.next = next; - prev = this; - next = this; - return true; - } - return false; - } - } - - /** - * Returns true if the list's next reference refers to itself. - * - * @return true if the list is empty - */ - boolean isListEmpty() { - PhantomCleanable<?> list = cleanerImpl.phantomCleanableList; - synchronized (list) { - return list == list.next; - } - } - - /** - * Unregister this PhantomCleanable and invoke {@link #performCleanup()}, - * ensuring at-most-once semantics. - */ - @Override - public final void clean() { - if (remove()) { - super.clear(); - performCleanup(); - } - } - - /** - * Unregister this PhantomCleanable and clear the reference. - * Due to inherent concurrency, {@link #performCleanup()} may still be invoked. - */ - @Override - public void clear() { - if (remove()) { - super.clear(); - } - } - - /** - * The {@code performCleanup} abstract method is overridden - * to implement the cleaning logic. - * The {@code performCleanup} method should not be called except - * by the {@link #clean} method which ensures at most once semantics. - */ - protected abstract void performCleanup(); - - /** - * This method always throws {@link UnsupportedOperationException}. - * Enqueuing details of {@link Cleaner.Cleanable} - * are a private implementation detail. - * - * @throws UnsupportedOperationException always - */ - @Override - public final boolean isEnqueued() { - throw new UnsupportedOperationException("isEnqueued"); - } - - /** - * This method always throws {@link UnsupportedOperationException}. - * Enqueuing details of {@link Cleaner.Cleanable} - * are a private implementation detail. - * - * @throws UnsupportedOperationException always - */ - @Override - public final boolean enqueue() { - throw new UnsupportedOperationException("enqueue"); - } - } - - /** - * WeakCleanable subclasses efficiently encapsulate cleanup state and - * the cleaning action. - * Subclasses implement the abstract {@link #performCleanup()} method - * to provide the cleaning action. - * When constructed, the object reference and the {@link Cleanable Cleanable} - * are registered with the {@link Cleaner}. - * The Cleaner invokes {@link Cleaner.Cleanable#clean() clean} after the - * referent becomes weakly reachable. - */ - public static abstract class WeakCleanable<T> extends WeakReference<T> - implements Cleaner.Cleanable { - - /** - * Links to previous and next in a doubly-linked list. - */ - WeakCleanable<?> prev = this, next = this; - - /** - * The CleanerImpl for this Cleanable. - */ - private final CleanerImpl cleanerImpl; - - /** - * Constructs new {@code WeakCleanableReference} with - * {@code non-null referent} and {@code non-null cleaner}. - * The {@code cleaner} is not retained by this reference; it is only used - * to register the newly constructed {@link Cleaner.Cleanable Cleanable}. - * - * @param referent the referent to track - * @param cleaner the {@code Cleaner} to register new reference with - */ - public WeakCleanable(T referent, Cleaner cleaner) { - super(Objects.requireNonNull(referent), getCleanerImpl(cleaner).queue); - cleanerImpl = getCleanerImpl(cleaner); - insert(); - - // TODO: Replace getClass() with ReachabilityFence when it is available - cleaner.getClass(); - referent.getClass(); - } - - /** - * Construct a new root of the list; not inserted. - */ - WeakCleanable(CleanerImpl cleanerImpl) { - super(null, null); - this.cleanerImpl = cleanerImpl; - } - - /** - * Insert this WeakCleanableReference after the list head. - */ - private void insert() { - final WeakCleanable<?> list = cleanerImpl.weakCleanableList; - synchronized (list) { - prev = list; - next = list.next; - next.prev = this; - list.next = this; - } - } - - /** - * Remove this WeakCleanableReference from the list. - * - * @return true if Cleanable was removed or false if not because - * it had already been removed before - */ - private boolean remove() { - WeakCleanable<?> list = cleanerImpl.weakCleanableList; - synchronized (list) { - if (next != this) { - next.prev = prev; - prev.next = next; - prev = this; - next = this; - return true; - } - return false; - } - } - - /** - * Returns true if the list's next reference refers to itself. - * - * @return true if the list is empty - */ - boolean isListEmpty() { - WeakCleanable<?> list = cleanerImpl.weakCleanableList; - synchronized (list) { - return list == list.next; - } - } - - /** - * Unregister this WeakCleanable reference and invoke {@link #performCleanup()}, - * ensuring at-most-once semantics. - */ - @Override - public final void clean() { - if (remove()) { - super.clear(); - performCleanup(); - } - } - - /** - * Unregister this WeakCleanable and clear the reference. - * Due to inherent concurrency, {@link #performCleanup()} may still be invoked. - */ - @Override - public void clear() { - if (remove()) { - super.clear(); - } - } - - /** - * The {@code performCleanup} abstract method is overridden - * to implement the cleaning logic. - * The {@code performCleanup} method should not be called except - * by the {@link #clean} method which ensures at most once semantics. - */ - protected abstract void performCleanup(); - - /** - * This method always throws {@link UnsupportedOperationException}. - * Enqueuing details of {@link java.lang.ref.Cleaner.Cleanable} - * are a private implementation detail. - * - * @throws UnsupportedOperationException always - */ - @Override - public final boolean isEnqueued() { - throw new UnsupportedOperationException("isEnqueued"); - } - - /** - * This method always throws {@link UnsupportedOperationException}. - * Enqueuing details of {@link java.lang.ref.Cleaner.Cleanable} - * are a private implementation detail. - * - * @throws UnsupportedOperationException always - */ - @Override - public final boolean enqueue() { - throw new UnsupportedOperationException("enqueue"); - } - } - - /** - * SoftCleanable subclasses efficiently encapsulate cleanup state and - * the cleaning action. - * Subclasses implement the abstract {@link #performCleanup()} method - * to provide the cleaning action. - * When constructed, the object reference and the {@link Cleanable Cleanable} - * are registered with the {@link Cleaner}. - * The Cleaner invokes {@link Cleaner.Cleanable#clean() clean} after the - * referent becomes softly reachable. - */ - public static abstract class SoftCleanable<T> extends SoftReference<T> - implements Cleaner.Cleanable { - - /** - * Links to previous and next in a doubly-linked list. - */ - SoftCleanable<?> prev = this, next = this; - - /** - * The CleanerImpl for this Cleanable. - */ - private final CleanerImpl cleanerImpl; - - /** - * Constructs new {@code SoftCleanableReference} with - * {@code non-null referent} and {@code non-null cleaner}. - * The {@code cleaner} is not retained by this reference; it is only used - * to register the newly constructed {@link Cleaner.Cleanable Cleanable}. - * - * @param referent the referent to track - * @param cleaner the {@code Cleaner} to register with - */ - public SoftCleanable(T referent, Cleaner cleaner) { - super(Objects.requireNonNull(referent), getCleanerImpl(cleaner).queue); - cleanerImpl = getCleanerImpl(cleaner); - insert(); - - // TODO: Replace getClass() with ReachabilityFence when it is available - cleaner.getClass(); - referent.getClass(); - } - - /** - * Construct a new root of the list; not inserted. - */ - SoftCleanable(CleanerImpl cleanerImpl) { - super(null, null); - this.cleanerImpl = cleanerImpl; - } - - /** - * Insert this SoftCleanableReference after the list head. - */ - private void insert() { - final SoftCleanable<?> list = cleanerImpl.softCleanableList; - synchronized (list) { - prev = list; - next = list.next; - next.prev = this; - list.next = this; - } - } - - /** - * Remove this SoftCleanableReference from the list. - * - * @return true if Cleanable was removed or false if not because - * it had already been removed before - */ - private boolean remove() { - SoftCleanable<?> list = cleanerImpl.softCleanableList; - synchronized (list) { - if (next != this) { - next.prev = prev; - prev.next = next; - prev = this; - next = this; - return true; - } - return false; - } - } - - /** - * Returns true if the list's next reference refers to itself. - * - * @return true if the list is empty - */ - boolean isListEmpty() { - SoftCleanable<?> list = cleanerImpl.softCleanableList; - synchronized (list) { - return list == list.next; - } - } - - /** - * Unregister this SoftCleanable reference and invoke {@link #performCleanup()}, - * ensuring at-most-once semantics. - */ - @Override - public final void clean() { - if (remove()) { - super.clear(); - performCleanup(); - } - } - - /** - * Unregister this SoftCleanable and clear the reference. - * Due to inherent concurrency, {@link #performCleanup()} may still be invoked. - */ - @Override - public void clear() { - if (remove()) { - super.clear(); - } - } - - /** - * The {@code performCleanup} abstract method is overridden - * to implement the cleaning logic. - * The {@code performCleanup} method should not be called except - * by the {@link #clean} method which ensures at most once semantics. - */ - protected abstract void performCleanup(); - - /** - * This method always throws {@link UnsupportedOperationException}. - * Enqueuing details of {@link Cleaner.Cleanable} - * are a private implementation detail. - * - * @throws UnsupportedOperationException always - */ - @Override - public final boolean isEnqueued() { - throw new UnsupportedOperationException("isEnqueued"); - } - - /** - * This method always throws {@link UnsupportedOperationException}. - * Enqueuing details of {@link Cleaner.Cleanable} - * are a private implementation detail. - * - * @throws UnsupportedOperationException always - */ - @Override - public final boolean enqueue() { - throw new UnsupportedOperationException("enqueue"); - } - } - - /** - * Perform cleaning on an unreachable PhantomReference. - */ - public static final class PhantomCleanableRef extends PhantomCleanable<Object> { - private final Runnable action; - - /** - * Constructor for a phantom cleanable reference. - * @param obj the object to monitor - * @param cleaner the cleaner - * @param action the action Runnable - */ - public PhantomCleanableRef(Object obj, Cleaner cleaner, Runnable action) { - super(obj, cleaner); - this.action = action; - } - - /** - * Constructor used only for root of phantom cleanable list. - * @param cleanerImpl the cleanerImpl - */ - PhantomCleanableRef(CleanerImpl cleanerImpl) { - super(cleanerImpl); - this.action = null; - } - - @Override - protected void performCleanup() { - action.run(); - } - - /** - * Prevent access to referent even when it is still alive. - * - * @throws UnsupportedOperationException always - */ - @Override - public Object get() { - throw new UnsupportedOperationException("get"); - } - - /** - * Direct clearing of the referent is not supported. - * - * @throws UnsupportedOperationException always - */ - @Override - public void clear() { - throw new UnsupportedOperationException("clear"); - } - } - - /** - * Perform cleaning on an unreachable WeakReference. - */ - public static final class WeakCleanableRef extends WeakCleanable<Object> { - private final Runnable action; - - /** - * Constructor for a weak cleanable reference. - * @param obj the object to monitor - * @param cleaner the cleaner - * @param action the action Runnable - */ - WeakCleanableRef(Object obj, Cleaner cleaner, Runnable action) { - super(obj, cleaner); - this.action = action; - } - - /** - * Constructor used only for root of weak cleanable list. - * @param cleanerImpl the cleanerImpl - */ - WeakCleanableRef(CleanerImpl cleanerImpl) { - super(cleanerImpl); - this.action = null; - } - - @Override - protected void performCleanup() { - action.run(); - } - - /** - * Prevent access to referent even when it is still alive. - * - * @throws UnsupportedOperationException always - */ - @Override - public Object get() { - throw new UnsupportedOperationException("get"); - } - - /** - * Direct clearing of the referent is not supported. - * - * @throws UnsupportedOperationException always - */ - @Override - public void clear() { - throw new UnsupportedOperationException("clear"); - } - } - - /** - * Perform cleaning on an unreachable SoftReference. - */ - public static final class SoftCleanableRef extends SoftCleanable<Object> { - private final Runnable action; - - /** - * Constructor for a soft cleanable reference. - * @param obj the object to monitor - * @param cleaner the cleaner - * @param action the action Runnable - */ - SoftCleanableRef(Object obj, Cleaner cleaner, Runnable action) { - super(obj, cleaner); - this.action = action; - } - - /** - * Constructor used only for root of soft cleanable list. - * @param cleanerImpl the cleanerImpl - */ - SoftCleanableRef(CleanerImpl cleanerImpl) { - super(cleanerImpl); - this.action = null; - } - - @Override - protected void performCleanup() { - action.run(); - } - - /** - * Prevent access to referent even when it is still alive. - * - * @throws UnsupportedOperationException always - */ - @Override - public Object get() { - throw new UnsupportedOperationException("get"); - } - - /** - * Direct clearing of the referent is not supported. - * - * @throws UnsupportedOperationException always - */ - @Override - public void clear() { - throw new UnsupportedOperationException("clear"); - } - - } - - /** - * A ThreadFactory for InnocuousThreads. - * The factory is a singleton. - */ - static final class InnocuousThreadFactory implements ThreadFactory { - final static ThreadFactory factory = new InnocuousThreadFactory(); - - static ThreadFactory factory() { - return factory; - } - - public Thread newThread(Runnable r) { - return AccessController.doPrivileged((PrivilegedAction<Thread>) () -> { - Thread t = new InnocuousThread(r); - t.setPriority(Thread.MAX_PRIORITY - 2); - t.setName("Cleaner-" + t.getId()); - return t; - }); - } - } - -}
--- a/src/java.base/share/classes/jdk/internal/misc/Unsafe.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/jdk/internal/misc/Unsafe.java Tue Jan 12 11:31:48 2016 -0800 @@ -30,7 +30,7 @@ import sun.reflect.CallerSensitive; import sun.reflect.Reflection; -import sun.misc.VM; +import jdk.internal.misc.VM; import jdk.internal.HotSpotIntrinsicCandidate;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/java.base/share/classes/jdk/internal/misc/VM.java Tue Jan 12 11:31:48 2016 -0800 @@ -0,0 +1,433 @@ +/* + * Copyright (c) 1996, 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. 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 static java.lang.Thread.State.*; +import java.util.Properties; + +public class VM { + + /* The following methods used to be native methods that instruct + * the VM to selectively suspend certain threads in low-memory + * situations. They are inherently dangerous and not implementable + * on native threads. We removed them in JDK 1.2. The skeletons + * remain so that existing applications that use these methods + * will still work. + */ + private static boolean suspended = false; + + /** @deprecated */ + @Deprecated + public static boolean threadsSuspended() { + return suspended; + } + + @SuppressWarnings("deprecation") + public static boolean allowThreadSuspension(ThreadGroup g, boolean b) { + return g.allowThreadSuspension(b); + } + + /** @deprecated */ + @Deprecated + public static boolean suspendThreads() { + suspended = true; + return true; + } + + // Causes any suspended threadgroups to be resumed. + /** @deprecated */ + @Deprecated + public static void unsuspendThreads() { + suspended = false; + } + + // Causes threadgroups no longer marked suspendable to be resumed. + /** @deprecated */ + @Deprecated + public static void unsuspendSomeThreads() { + } + + /* Deprecated fields and methods -- Memory advice not supported in 1.2 */ + + /** @deprecated */ + @Deprecated + public static final int STATE_GREEN = 1; + + /** @deprecated */ + @Deprecated + public static final int STATE_YELLOW = 2; + + /** @deprecated */ + @Deprecated + public static final int STATE_RED = 3; + + /** @deprecated */ + @Deprecated + public static final int getState() { + return STATE_GREEN; + } + + /** @deprecated */ + @Deprecated + public static void registerVMNotification(VMNotification n) { } + + /** @deprecated */ + @Deprecated + public static void asChange(int as_old, int as_new) { } + + /** @deprecated */ + @Deprecated + public static void asChange_otherthread(int as_old, int as_new) { } + + /* + * Not supported in 1.2 because these will have to be exported as + * JVM functions, and we are not sure we want do that. Leaving + * here so it can be easily resurrected -- just remove the // + * comments. + */ + + /** + * Resume Java profiling. All profiling data is added to any + * earlier profiling, unless <code>resetJavaProfiler</code> is + * called in between. If profiling was not started from the + * command line, <code>resumeJavaProfiler</code> will start it. + * <p> + * + * NOTE: Profiling must be enabled from the command line for a + * java.prof report to be automatically generated on exit; if not, + * writeJavaProfilerReport must be invoked to write a report. + * + * @see resetJavaProfiler + * @see writeJavaProfilerReport + */ + + // public native static void resumeJavaProfiler(); + + /** + * Suspend Java profiling. + */ + // public native static void suspendJavaProfiler(); + + /** + * Initialize Java profiling. Any accumulated profiling + * information is discarded. + */ + // public native static void resetJavaProfiler(); + + /** + * Write the current profiling contents to the file "java.prof". + * If the file already exists, it will be overwritten. + */ + // public native static void writeJavaProfilerReport(); + + + private static volatile boolean booted = false; + private static final Object lock = new Object(); + + // Invoked by System.initializeSystemClass just before returning. + // Subsystems that are invoked during initialization can check this + // property in order to avoid doing things that should wait until the + // application class loader has been set up. + // + public static void booted() { + synchronized (lock) { + booted = true; + lock.notifyAll(); + } + } + + public static boolean isBooted() { + return booted; + } + + // Waits until VM completes initialization + // + // This method is invoked by the Finalizer thread + public static void awaitBooted() throws InterruptedException { + synchronized (lock) { + while (!booted) { + lock.wait(); + } + } + } + + // A user-settable upper limit on the maximum amount of allocatable direct + // buffer memory. This value may be changed during VM initialization if + // "java" is launched with "-XX:MaxDirectMemorySize=<size>". + // + // The initial value of this field is arbitrary; during JRE initialization + // it will be reset to the value specified on the command line, if any, + // otherwise to Runtime.getRuntime().maxMemory(). + // + private static long directMemory = 64 * 1024 * 1024; + + // Returns the maximum amount of allocatable direct buffer memory. + // The directMemory variable is initialized during system initialization + // in the saveAndRemoveProperties method. + // + public static long maxDirectMemory() { + return directMemory; + } + + // User-controllable flag that determines if direct buffers should be page + // aligned. The "-XX:+PageAlignDirectMemory" option can be used to force + // buffers, allocated by ByteBuffer.allocateDirect, to be page aligned. + private static boolean pageAlignDirectMemory; + + // Returns {@code true} if the direct buffers should be page aligned. This + // variable is initialized by saveAndRemoveProperties. + public static boolean isDirectMemoryPageAligned() { + return pageAlignDirectMemory; + } + + /** + * Returns true if the given class loader is in the system domain + * in which all permissions are granted. + */ + public static boolean isSystemDomainLoader(ClassLoader loader) { + return loader == null; + } + + /** + * Returns the system property of the specified key saved at + * system initialization time. This method should only be used + * for the system properties that are not changed during runtime. + * It accesses a private copy of the system properties so + * that user's locking of the system properties object will not + * cause the library to deadlock. + * + * Note that the saved system properties do not include + * the ones set by sun.misc.Version.init(). + * + */ + public static String getSavedProperty(String key) { + if (savedProps.isEmpty()) + throw new IllegalStateException("Should be non-empty if initialized"); + + return savedProps.getProperty(key); + } + + // TODO: the Property Management needs to be refactored and + // the appropriate prop keys need to be accessible to the + // calling classes to avoid duplication of keys. + private static final Properties savedProps = new Properties(); + + // Save a private copy of the system properties and remove + // the system properties that are not intended for public access. + // + // This method can only be invoked during system initialization. + public static void saveAndRemoveProperties(Properties props) { + if (booted) + throw new IllegalStateException("System initialization has completed"); + + savedProps.putAll(props); + + // Set the maximum amount of direct memory. This value is controlled + // by the vm option -XX:MaxDirectMemorySize=<size>. + // The maximum amount of allocatable direct buffer memory (in bytes) + // from the system property sun.nio.MaxDirectMemorySize set by the VM. + // The system property will be removed. + String s = (String)props.remove("sun.nio.MaxDirectMemorySize"); + if (s != null) { + if (s.equals("-1")) { + // -XX:MaxDirectMemorySize not given, take default + directMemory = Runtime.getRuntime().maxMemory(); + } else { + long l = Long.parseLong(s); + if (l > -1) + directMemory = l; + } + } + + // Check if direct buffers should be page aligned + s = (String)props.remove("sun.nio.PageAlignDirectMemory"); + if ("true".equals(s)) + pageAlignDirectMemory = true; + + // Remove other private system properties + // used by java.lang.Integer.IntegerCache + props.remove("java.lang.Integer.IntegerCache.high"); + + // used by sun.launcher.LauncherHelper + props.remove("sun.java.launcher.diag"); + } + + // Initialize any miscellenous operating system settings that need to be + // set for the class libraries. + // + public static void initializeOSEnvironment() { + if (!booted) { + OSEnvironment.initialize(); + } + } + + /* Current count of objects pending for finalization */ + private static volatile int finalRefCount; + + /* Peak count of objects pending for finalization */ + private static volatile int peakFinalRefCount; + + /* + * Gets the number of objects pending for finalization. + * + * @return the number of objects pending for finalization. + */ + public static int getFinalRefCount() { + return finalRefCount; + } + + /* + * Gets the peak number of objects pending for finalization. + * + * @return the peak number of objects pending for finalization. + */ + public static int getPeakFinalRefCount() { + return peakFinalRefCount; + } + + /* + * Add {@code n} to the objects pending for finalization count. + * + * @param n an integer value to be added to the objects pending + * for finalization count + */ + public static void addFinalRefCount(int n) { + // The caller must hold lock to synchronize the update. + + finalRefCount += n; + if (finalRefCount > peakFinalRefCount) { + peakFinalRefCount = finalRefCount; + } + } + + /** + * Returns Thread.State for the given threadStatus + */ + public static Thread.State toThreadState(int threadStatus) { + if ((threadStatus & JVMTI_THREAD_STATE_RUNNABLE) != 0) { + return RUNNABLE; + } else if ((threadStatus & JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER) != 0) { + return BLOCKED; + } else if ((threadStatus & JVMTI_THREAD_STATE_WAITING_INDEFINITELY) != 0) { + return WAITING; + } else if ((threadStatus & JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT) != 0) { + return TIMED_WAITING; + } else if ((threadStatus & JVMTI_THREAD_STATE_TERMINATED) != 0) { + return TERMINATED; + } else if ((threadStatus & JVMTI_THREAD_STATE_ALIVE) == 0) { + return NEW; + } else { + return RUNNABLE; + } + } + + /* The threadStatus field is set by the VM at state transition + * in the hotspot implementation. Its value is set according to + * the JVM TI specification GetThreadState function. + */ + private static final int JVMTI_THREAD_STATE_ALIVE = 0x0001; + private static final int JVMTI_THREAD_STATE_TERMINATED = 0x0002; + private static final int JVMTI_THREAD_STATE_RUNNABLE = 0x0004; + private static final int JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER = 0x0400; + private static final int JVMTI_THREAD_STATE_WAITING_INDEFINITELY = 0x0010; + private static final int JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT = 0x0020; + + /* + * Returns the first non-null class loader up the execution stack, + * or null if only code from the null class loader is on the stack. + */ + public static native ClassLoader latestUserDefinedLoader(); + + /** + * Returns {@code true} if we are in a set UID program. + */ + public static boolean isSetUID() { + long uid = getuid(); + long euid = geteuid(); + long gid = getgid(); + long egid = getegid(); + return uid != euid || gid != egid; + } + + /** + * Returns the real user ID of the calling process, + * or -1 if the value is not available. + */ + public static native long getuid(); + + /** + * Returns the effective user ID of the calling process, + * or -1 if the value is not available. + */ + public static native long geteuid(); + + /** + * Returns the real group ID of the calling process, + * or -1 if the value is not available. + */ + public static native long getgid(); + + /** + * Returns the effective group ID of the calling process, + * or -1 if the value is not available. + */ + public static native long getegid(); + + /** + * Get a nanosecond time stamp adjustment in the form of a single long. + * + * This value can be used to create an instant using + * {@link java.time.Instant#ofEpochSecond(long, long) + * java.time.Instant.ofEpochSecond(offsetInSeconds, + * getNanoTimeAdjustment(offsetInSeconds))}. + * <p> + * The value returned has the best resolution available to the JVM on + * the current system. + * This is usually down to microseconds - or tenth of microseconds - + * depending on the OS/Hardware and the JVM implementation. + * + * @param offsetInSeconds The offset in seconds from which the nanosecond + * time stamp should be computed. + * + * @apiNote The offset should be recent enough - so that + * {@code offsetInSeconds} is within {@code +/- 2^32} seconds of the + * current UTC time. If the offset is too far off, {@code -1} will be + * returned. As such, {@code -1} must not be considered as a valid + * nano time adjustment, but as an exception value indicating + * that an offset closer to the current time should be used. + * + * @return A nanosecond time stamp adjustment in the form of a single long. + * If the offset is too far off the current time, this method returns -1. + * In that case, the caller should call this method again, passing a + * more accurate offset. + */ + public static native long getNanoTimeAdjustment(long offsetInSeconds); + + static { + initialize(); + } + private static native void initialize(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/java.base/share/classes/jdk/internal/misc/VMNotification.java Tue Jan 12 11:31:48 2016 -0800 @@ -0,0 +1,39 @@ +/* + * Copyright (c) 1996, 2004, 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; + +/** @deprecated */ +@Deprecated +public interface VMNotification { + + // when the vm switches allocation states, we get notified + // (possible semantics: if the state changes while in this + // notification, don't recursively notify). + // oldState and newState may be the same if we are just releasing + // suspended threads. + void newAllocState(int oldState, int newState, + boolean threadsSuspended); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/java.base/share/classes/jdk/internal/ref/CleanerFactory.java Tue Jan 12 11:31:48 2016 -0800 @@ -0,0 +1,48 @@ +/* + * 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.ref; + +import java.lang.ref.Cleaner; + +/** + * CleanerFactory provides a Cleaner for use within OpenJDK modules. + * The cleaner is created on the first reference to the CleanerFactory. + */ +public final class CleanerFactory { + + /* The common Cleaner. */ + private final static Cleaner commonCleaner = Cleaner.create(); + + /** + * Cleaner for use within OpenJDK modules. + * + * @return a Cleaner for use within OpenJDK modules + */ + public static Cleaner cleaner() { + return commonCleaner; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/java.base/share/classes/jdk/internal/ref/CleanerImpl.java Tue Jan 12 11:31:48 2016 -0800 @@ -0,0 +1,333 @@ +/* + * 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 + * 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.ref; + +import java.lang.ref.Cleaner; +import java.lang.ref.Cleaner.Cleanable; +import java.lang.ref.ReferenceQueue; +import java.security.AccessController; +import java.security.PrivilegedAction; +import java.util.concurrent.ThreadFactory; +import java.util.function.Function; + +import sun.misc.InnocuousThread; + +/** + * CleanerImpl manages a set of object references and corresponding cleaning actions. + * CleanerImpl provides the functionality of {@link java.lang.ref.Cleaner}. + */ +public final class CleanerImpl { + + /** + * An object to access the CleanerImpl from a Cleaner; set by Cleaner init. + */ + private static Function<Cleaner, CleanerImpl> cleanerImplAccess = null; + + /** + * Heads of a CleanableList for each reference type. + */ + final PhantomCleanable<?> phantomCleanableList; + + final WeakCleanable<?> weakCleanableList; + + final SoftCleanable<?> softCleanableList; + + // The ReferenceQueue of pending cleaning actions + final ReferenceQueue<Object> queue; + + /** + * Called by Cleaner static initialization to provide the function + * to map from Cleaner to CleanerImpl. + * @param access a function to map from Cleaner to CleanerImpl + */ + public static void setCleanerImplAccess(Function<Cleaner, CleanerImpl> access) { + if (cleanerImplAccess == null) { + cleanerImplAccess = access; + } else { + throw new InternalError("cleanerImplAccess"); + } + } + + /** + * Called to get the CleanerImpl for a Cleaner. + * @param cleaner the cleaner + * @return the corresponding CleanerImpl + */ + static CleanerImpl getCleanerImpl(Cleaner cleaner) { + return cleanerImplAccess.apply(cleaner); + } + + /** + * Constructor for CleanerImpl. + */ + public CleanerImpl() { + queue = new ReferenceQueue<>(); + phantomCleanableList = new PhantomCleanableRef(); + weakCleanableList = new WeakCleanableRef(); + softCleanableList = new SoftCleanableRef(); + } + + /** + * Starts the Cleaner implementation. + * Ensure this is the CleanerImpl for the Cleaner. + * When started waits for Cleanables to be queued. + * @param cleaner the cleaner + * @param threadFactory the thread factory + */ + public void start(Cleaner cleaner, ThreadFactory threadFactory) { + if (getCleanerImpl(cleaner) != this) { + throw new AssertionError("wrong cleaner"); + } + // schedule a nop cleaning action for the cleaner, so the associated thread + // will continue to run at least until the cleaner is reclaimable. + new PhantomCleanableRef(cleaner, cleaner, () -> {}); + + if (threadFactory == null) { + threadFactory = CleanerImpl.InnocuousThreadFactory.factory(); + } + + // now that there's at least one cleaning action, for the cleaner, + // we can start the associated thread, which runs until + // all cleaning actions have been run. + Thread thread = threadFactory.newThread(this::run); + thread.setDaemon(true); + thread.start(); + } + + /** + * Process queued Cleanables as long as the cleanable lists are not empty. + * A Cleanable is in one of the lists for each Object and for the Cleaner + * itself. + * Terminates when the Cleaner is no longer reachable and + * has been cleaned and there are no more Cleanable instances + * for which the object is reachable. + * <p> + * If the thread is a ManagedLocalsThread, the threadlocals + * are erased before each cleanup + */ + private void run() { + Thread t = Thread.currentThread(); + InnocuousThread mlThread = (t instanceof InnocuousThread) + ? (InnocuousThread) t + : null; + while (!phantomCleanableList.isListEmpty() || + !weakCleanableList.isListEmpty() || + !softCleanableList.isListEmpty()) { + if (mlThread != null) { + // Clear the thread locals + mlThread.eraseThreadLocals(); + } + try { + // Wait for a Ref, with a timeout to avoid getting hung + // due to a race with clear/clean + Cleanable ref = (Cleanable) queue.remove(60 * 1000L); + if (ref != null) { + ref.clean(); + } + } catch (InterruptedException i) { + continue; // ignore the interruption + } catch (Throwable e) { + // ignore exceptions from the cleanup action + } + } + } + + /** + * Perform cleaning on an unreachable PhantomReference. + */ + public static final class PhantomCleanableRef extends PhantomCleanable<Object> { + private final Runnable action; + + /** + * Constructor for a phantom cleanable reference. + * @param obj the object to monitor + * @param cleaner the cleaner + * @param action the action Runnable + */ + public PhantomCleanableRef(Object obj, Cleaner cleaner, Runnable action) { + super(obj, cleaner); + this.action = action; + } + + /** + * Constructor used only for root of phantom cleanable list. + */ + PhantomCleanableRef() { + super(); + this.action = null; + } + + @Override + protected void performCleanup() { + action.run(); + } + + /** + * Prevent access to referent even when it is still alive. + * + * @throws UnsupportedOperationException always + */ + @Override + public Object get() { + throw new UnsupportedOperationException("get"); + } + + /** + * Direct clearing of the referent is not supported. + * + * @throws UnsupportedOperationException always + */ + @Override + public void clear() { + throw new UnsupportedOperationException("clear"); + } + } + + /** + * Perform cleaning on an unreachable WeakReference. + */ + public static final class WeakCleanableRef extends WeakCleanable<Object> { + private final Runnable action; + + /** + * Constructor for a weak cleanable reference. + * @param obj the object to monitor + * @param cleaner the cleaner + * @param action the action Runnable + */ + WeakCleanableRef(Object obj, Cleaner cleaner, Runnable action) { + super(obj, cleaner); + this.action = action; + } + + /** + * Constructor used only for root of weak cleanable list. + */ + WeakCleanableRef() { + super(); + this.action = null; + } + + @Override + protected void performCleanup() { + action.run(); + } + + /** + * Prevent access to referent even when it is still alive. + * + * @throws UnsupportedOperationException always + */ + @Override + public Object get() { + throw new UnsupportedOperationException("get"); + } + + /** + * Direct clearing of the referent is not supported. + * + * @throws UnsupportedOperationException always + */ + @Override + public void clear() { + throw new UnsupportedOperationException("clear"); + } + } + + /** + * Perform cleaning on an unreachable SoftReference. + */ + public static final class SoftCleanableRef extends SoftCleanable<Object> { + private final Runnable action; + + /** + * Constructor for a soft cleanable reference. + * @param obj the object to monitor + * @param cleaner the cleaner + * @param action the action Runnable + */ + SoftCleanableRef(Object obj, Cleaner cleaner, Runnable action) { + super(obj, cleaner); + this.action = action; + } + + /** + * Constructor used only for root of soft cleanable list. + */ + SoftCleanableRef() { + super(); + this.action = null; + } + + @Override + protected void performCleanup() { + action.run(); + } + + /** + * Prevent access to referent even when it is still alive. + * + * @throws UnsupportedOperationException always + */ + @Override + public Object get() { + throw new UnsupportedOperationException("get"); + } + + /** + * Direct clearing of the referent is not supported. + * + * @throws UnsupportedOperationException always + */ + @Override + public void clear() { + throw new UnsupportedOperationException("clear"); + } + + } + + /** + * A ThreadFactory for InnocuousThreads. + * The factory is a singleton. + */ + static final class InnocuousThreadFactory implements ThreadFactory { + final static ThreadFactory factory = new InnocuousThreadFactory(); + + static ThreadFactory factory() { + return factory; + } + + public Thread newThread(Runnable r) { + return AccessController.doPrivileged((PrivilegedAction<Thread>) () -> { + Thread t = new InnocuousThread(r); + t.setPriority(Thread.MAX_PRIORITY - 2); + t.setName("Cleaner-" + t.getId()); + return t; + }); + } + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/java.base/share/classes/jdk/internal/ref/PhantomCleanable.java Tue Jan 12 11:31:48 2016 -0800 @@ -0,0 +1,178 @@ +/* + * 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 + * 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.ref; + +import java.lang.ref.Cleaner; +import java.lang.ref.PhantomReference; +import java.util.Objects; + +/** + * PhantomCleanable subclasses efficiently encapsulate cleanup state and + * the cleaning action. + * Subclasses implement the abstract {@link #performCleanup()} method + * to provide the cleaning action. + * When constructed, the object reference and the {@link Cleaner.Cleanable Cleanable} + * are registered with the {@link Cleaner}. + * The Cleaner invokes {@link Cleaner.Cleanable#clean() clean} after the + * referent becomes phantom reachable. + */ +public abstract class PhantomCleanable<T> extends PhantomReference<T> + implements Cleaner.Cleanable { + + /** + * Links to previous and next in a doubly-linked list. + */ + PhantomCleanable<?> prev = this, next = this; + + /** + * The list of PhantomCleanable; synchronizes insert and remove. + */ + private final PhantomCleanable<?> list; + + /** + * Constructs new {@code PhantomCleanable} with + * {@code non-null referent} and {@code non-null cleaner}. + * The {@code cleaner} is not retained; it is only used to + * register the newly constructed {@link Cleaner.Cleanable Cleanable}. + * + * @param referent the referent to track + * @param cleaner the {@code Cleaner} to register with + */ + public PhantomCleanable(T referent, Cleaner cleaner) { + super(Objects.requireNonNull(referent), CleanerImpl.getCleanerImpl(cleaner).queue); + this.list = CleanerImpl.getCleanerImpl(cleaner).phantomCleanableList; + insert(); + + // TODO: Replace getClass() with ReachabilityFence when it is available + cleaner.getClass(); + referent.getClass(); + } + + /** + * Construct a new root of the list; not inserted. + */ + PhantomCleanable() { + super(null, null); + this.list = this; + } + + /** + * Insert this PhantomCleanable after the list head. + */ + private void insert() { + synchronized (list) { + prev = list; + next = list.next; + next.prev = this; + list.next = this; + } + } + + /** + * Remove this PhantomCleanable from the list. + * + * @return true if Cleanable was removed or false if not because + * it had already been removed before + */ + private boolean remove() { + synchronized (list) { + if (next != this) { + next.prev = prev; + prev.next = next; + prev = this; + next = this; + return true; + } + return false; + } + } + + /** + * Returns true if the list's next reference refers to itself. + * + * @return true if the list is empty + */ + boolean isListEmpty() { + synchronized (list) { + return list == list.next; + } + } + + /** + * Unregister this PhantomCleanable and invoke {@link #performCleanup()}, + * ensuring at-most-once semantics. + */ + @Override + public final void clean() { + if (remove()) { + super.clear(); + performCleanup(); + } + } + + /** + * Unregister this PhantomCleanable and clear the reference. + * Due to inherent concurrency, {@link #performCleanup()} may still be invoked. + */ + @Override + public void clear() { + if (remove()) { + super.clear(); + } + } + + /** + * The {@code performCleanup} abstract method is overridden + * to implement the cleaning logic. + * The {@code performCleanup} method should not be called except + * by the {@link #clean} method which ensures at most once semantics. + */ + protected abstract void performCleanup(); + + /** + * This method always throws {@link UnsupportedOperationException}. + * Enqueuing details of {@link Cleaner.Cleanable} + * are a private implementation detail. + * + * @throws UnsupportedOperationException always + */ + @Override + public final boolean isEnqueued() { + throw new UnsupportedOperationException("isEnqueued"); + } + + /** + * This method always throws {@link UnsupportedOperationException}. + * Enqueuing details of {@link Cleaner.Cleanable} + * are a private implementation detail. + * + * @throws UnsupportedOperationException always + */ + @Override + public final boolean enqueue() { + throw new UnsupportedOperationException("enqueue"); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/java.base/share/classes/jdk/internal/ref/SoftCleanable.java Tue Jan 12 11:31:48 2016 -0800 @@ -0,0 +1,178 @@ +/* + * 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 + * 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.ref; + +import java.lang.ref.Cleaner; +import java.lang.ref.SoftReference; +import java.util.Objects; + +/** + * SoftCleanable subclasses efficiently encapsulate cleanup state and + * the cleaning action. + * Subclasses implement the abstract {@link #performCleanup()} method + * to provide the cleaning action. + * When constructed, the object reference and the {@link Cleaner.Cleanable Cleanable} + * are registered with the {@link Cleaner}. + * The Cleaner invokes {@link Cleaner.Cleanable#clean() clean} after the + * referent becomes softly reachable. + */ +public abstract class SoftCleanable<T> extends SoftReference<T> + implements Cleaner.Cleanable { + + /** + * Links to previous and next in a doubly-linked list. + */ + SoftCleanable<?> prev = this, next = this; + + /** + * The list of SoftCleanable; synchronizes insert and remove. + */ + private final SoftCleanable<?> list; + + /** + * Constructs new {@code SoftCleanableReference} with + * {@code non-null referent} and {@code non-null cleaner}. + * The {@code cleaner} is not retained by this reference; it is only used + * to register the newly constructed {@link Cleaner.Cleanable Cleanable}. + * + * @param referent the referent to track + * @param cleaner the {@code Cleaner} to register with + */ + public SoftCleanable(T referent, Cleaner cleaner) { + super(Objects.requireNonNull(referent), CleanerImpl.getCleanerImpl(cleaner).queue); + list = CleanerImpl.getCleanerImpl(cleaner).softCleanableList; + insert(); + + // TODO: Replace getClass() with ReachabilityFence when it is available + cleaner.getClass(); + referent.getClass(); + } + + /** + * Construct a new root of the list; not inserted. + */ + SoftCleanable() { + super(null, null); + this.list = this; + } + + /** + * Insert this SoftCleanableReference after the list head. + */ + private void insert() { + synchronized (list) { + prev = list; + next = list.next; + next.prev = this; + list.next = this; + } + } + + /** + * Remove this SoftCleanableReference from the list. + * + * @return true if Cleanable was removed or false if not because + * it had already been removed before + */ + private boolean remove() { + synchronized (list) { + if (next != this) { + next.prev = prev; + prev.next = next; + prev = this; + next = this; + return true; + } + return false; + } + } + + /** + * Returns true if the list's next reference refers to itself. + * + * @return true if the list is empty + */ + boolean isListEmpty() { + synchronized (list) { + return list == list.next; + } + } + + /** + * Unregister this SoftCleanable reference and invoke {@link #performCleanup()}, + * ensuring at-most-once semantics. + */ + @Override + public final void clean() { + if (remove()) { + super.clear(); + performCleanup(); + } + } + + /** + * Unregister this SoftCleanable and clear the reference. + * Due to inherent concurrency, {@link #performCleanup()} may still be invoked. + */ + @Override + public void clear() { + if (remove()) { + super.clear(); + } + } + + /** + * The {@code performCleanup} abstract method is overridden + * to implement the cleaning logic. + * The {@code performCleanup} method should not be called except + * by the {@link #clean} method which ensures at most once semantics. + */ + protected abstract void performCleanup(); + + /** + * This method always throws {@link UnsupportedOperationException}. + * Enqueuing details of {@link Cleaner.Cleanable} + * are a private implementation detail. + * + * @throws UnsupportedOperationException always + */ + @Override + public final boolean isEnqueued() { + throw new UnsupportedOperationException("isEnqueued"); + } + + /** + * This method always throws {@link UnsupportedOperationException}. + * Enqueuing details of {@link Cleaner.Cleanable} + * are a private implementation detail. + * + * @throws UnsupportedOperationException always + */ + @Override + public final boolean enqueue() { + throw new UnsupportedOperationException("enqueue"); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/java.base/share/classes/jdk/internal/ref/WeakCleanable.java Tue Jan 12 11:31:48 2016 -0800 @@ -0,0 +1,178 @@ +package jdk.internal.ref; + +/* + * 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 + * 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. + */ + +import java.lang.ref.Cleaner; +import java.lang.ref.WeakReference; +import java.util.Objects; + +/** + * WeakCleanable subclasses efficiently encapsulate cleanup state and + * the cleaning action. + * Subclasses implement the abstract {@link #performCleanup()} method + * to provide the cleaning action. + * When constructed, the object reference and the {@link Cleaner.Cleanable Cleanable} + * are registered with the {@link Cleaner}. + * The Cleaner invokes {@link Cleaner.Cleanable#clean() clean} after the + * referent becomes weakly reachable. + */ +public abstract class WeakCleanable<T> extends WeakReference<T> + implements Cleaner.Cleanable { + + /** + * Links to previous and next in a doubly-linked list. + */ + WeakCleanable<?> prev = this, next = this; + + /** + * The list of WeakCleanable; synchronizes insert and remove. + */ + private final WeakCleanable<?> list; + + /** + * Constructs new {@code WeakCleanableReference} with + * {@code non-null referent} and {@code non-null cleaner}. + * The {@code cleaner} is not retained by this reference; it is only used + * to register the newly constructed {@link Cleaner.Cleanable Cleanable}. + * + * @param referent the referent to track + * @param cleaner the {@code Cleaner} to register new reference with + */ + public WeakCleanable(T referent, Cleaner cleaner) { + super(Objects.requireNonNull(referent), CleanerImpl.getCleanerImpl(cleaner).queue); + list = CleanerImpl.getCleanerImpl(cleaner).weakCleanableList; + insert(); + + // TODO: Replace getClass() with ReachabilityFence when it is available + cleaner.getClass(); + referent.getClass(); + } + + /** + * Construct a new root of the list; not inserted. + */ + WeakCleanable() { + super(null, null); + this.list = this; + } + + /** + * Insert this WeakCleanableReference after the list head. + */ + private void insert() { + synchronized (list) { + prev = list; + next = list.next; + next.prev = this; + list.next = this; + } + } + + /** + * Remove this WeakCleanableReference from the list. + * + * @return true if Cleanable was removed or false if not because + * it had already been removed before + */ + private boolean remove() { + synchronized (list) { + if (next != this) { + next.prev = prev; + prev.next = next; + prev = this; + next = this; + return true; + } + return false; + } + } + + /** + * Returns true if the list's next reference refers to itself. + * + * @return true if the list is empty + */ + boolean isListEmpty() { + synchronized (list) { + return list == list.next; + } + } + + /** + * Unregister this WeakCleanable reference and invoke {@link #performCleanup()}, + * ensuring at-most-once semantics. + */ + @Override + public final void clean() { + if (remove()) { + super.clear(); + performCleanup(); + } + } + + /** + * Unregister this WeakCleanable and clear the reference. + * Due to inherent concurrency, {@link #performCleanup()} may still be invoked. + */ + @Override + public void clear() { + if (remove()) { + super.clear(); + } + } + + /** + * The {@code performCleanup} abstract method is overridden + * to implement the cleaning logic. + * The {@code performCleanup} method should not be called except + * by the {@link #clean} method which ensures at most once semantics. + */ + protected abstract void performCleanup(); + + /** + * This method always throws {@link UnsupportedOperationException}. + * Enqueuing details of {@link Cleaner.Cleanable} + * are a private implementation detail. + * + * @throws UnsupportedOperationException always + */ + @Override + public final boolean isEnqueued() { + throw new UnsupportedOperationException("isEnqueued"); + } + + /** + * This method always throws {@link UnsupportedOperationException}. + * Enqueuing details of {@link Cleaner.Cleanable} + * are a private implementation detail. + * + * @throws UnsupportedOperationException always + */ + @Override + public final boolean enqueue() { + throw new UnsupportedOperationException("enqueue"); + } +}
--- a/src/java.base/share/classes/jdk/net/ExtendedSocketOptions.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/jdk/net/ExtendedSocketOptions.java Tue Jan 12 11:31:48 2016 -0800 @@ -34,7 +34,6 @@ * * @since 1.8 */ -@jdk.Exported public final class ExtendedSocketOptions { private static class ExtSocketOption<T> implements SocketOption<T> {
--- a/src/java.base/share/classes/jdk/net/NetworkPermission.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/jdk/net/NetworkPermission.java Tue Jan 12 11:31:48 2016 -0800 @@ -61,7 +61,6 @@ * @since 1.8 */ -@jdk.Exported public final class NetworkPermission extends BasicPermission { private static final long serialVersionUID = -2012939586906722291L;
--- a/src/java.base/share/classes/jdk/net/SocketFlow.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/jdk/net/SocketFlow.java Tue Jan 12 11:31:48 2016 -0800 @@ -45,7 +45,6 @@ * * @since 1.8 */ -@jdk.Exported public class SocketFlow { private static final int UNSET = -1; @@ -68,7 +67,6 @@ * * @since 1.8 */ - @jdk.Exported public enum Status { /** * Set or get socket option has not been called yet. Status
--- a/src/java.base/share/classes/jdk/net/Sockets.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/jdk/net/Sockets.java Tue Jan 12 11:31:48 2016 -0800 @@ -55,7 +55,6 @@ * * @see java.nio.channels.NetworkChannel */ -@jdk.Exported public class Sockets { private static final HashMap<Class<?>,Set<SocketOption<?>>>
--- a/src/java.base/share/classes/jdk/net/package-info.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/jdk/net/package-info.java Tue Jan 12 11:31:48 2016 -0800 @@ -30,5 +30,4 @@ * @since 1.8 */ -@jdk.Exported package jdk.net;
--- a/src/java.base/share/classes/sun/launcher/LauncherHelper.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/sun/launcher/LauncherHelper.java Tue Jan 12 11:31:48 2016 -0800 @@ -66,6 +66,7 @@ import java.util.jar.Attributes; import java.util.jar.JarFile; import java.util.jar.Manifest; +import jdk.internal.misc.VM; public enum LauncherHelper { INSTANCE; @@ -86,9 +87,9 @@ private static final String PROP_SETTINGS = "Property settings:"; private static final String LOCALE_SETTINGS = "Locale settings:"; - // sync with java.c and sun.misc.VM + // sync with java.c and jdk.internal.misc.VM private static final String diagprop = "sun.java.launcher.diag"; - static final boolean trace = sun.misc.VM.getSavedProperty(diagprop) != null; + static final boolean trace = VM.getSavedProperty(diagprop) != null; private static final String defaultBundleName = "sun.launcher.resources.launcher";
--- a/src/java.base/share/classes/sun/misc/MessageUtils.java Thu Jan 07 20:06:51 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,127 +0,0 @@ -/* - * Copyright (c) 1995, 2000, 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 sun.misc; - -/** - * MessageUtils: miscellaneous utilities for handling error and status - * properties and messages. - * - * @author Herb Jellinek - */ - -public class MessageUtils { - // can instantiate it for to allow less verbose use - via instance - // instead of classname - - public MessageUtils() { } - - public static String subst(String patt, String arg) { - String args[] = { arg }; - return subst(patt, args); - } - - public static String subst(String patt, String arg1, String arg2) { - String args[] = { arg1, arg2 }; - return subst(patt, args); - } - - public static String subst(String patt, String arg1, String arg2, - String arg3) { - String args[] = { arg1, arg2, arg3 }; - return subst(patt, args); - } - - public static String subst(String patt, String args[]) { - StringBuilder result = new StringBuilder(); - int len = patt.length(); - for (int i = 0; i >= 0 && i < len; i++) { - char ch = patt.charAt(i); - if (ch == '%') { - if (i != len) { - int index = Character.digit(patt.charAt(i + 1), 10); - if (index == -1) { - result.append(patt.charAt(i + 1)); - i++; - } else if (index < args.length) { - result.append(args[index]); - i++; - } - } - } else { - result.append(ch); - } - } - return result.toString(); - } - - public static String substProp(String propName, String arg) { - return subst(System.getProperty(propName), arg); - } - - public static String substProp(String propName, String arg1, String arg2) { - return subst(System.getProperty(propName), arg1, arg2); - } - - public static String substProp(String propName, String arg1, String arg2, - String arg3) { - return subst(System.getProperty(propName), arg1, arg2, arg3); - } - - /** - * Print a message directly to stderr, bypassing all the - * character conversion methods. - * @param msg message to print - */ - public static native void toStderr(String msg); - - /** - * Print a message directly to stdout, bypassing all the - * character conversion methods. - * @param msg message to print - */ - public static native void toStdout(String msg); - - - // Short forms of the above - - public static void err(String s) { - toStderr(s + "\n"); - } - - public static void out(String s) { - toStdout(s + "\n"); - } - - // Print a stack trace to stderr - // - public static void where() { - Throwable t = new Throwable(); - StackTraceElement[] es = t.getStackTrace(); - for (int i = 1; i < es.length; i++) - toStderr("\t" + es[i].toString() + "\n"); - } - -}
--- a/src/java.base/share/classes/sun/misc/Unsafe.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/sun/misc/Unsafe.java Tue Jan 12 11:31:48 2016 -0800 @@ -26,6 +26,7 @@ package sun.misc; import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.misc.VM; import sun.reflect.CallerSensitive; import sun.reflect.Reflection;
--- a/src/java.base/share/classes/sun/misc/VM.java Thu Jan 07 20:06:51 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,433 +0,0 @@ -/* - * Copyright (c) 1996, 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. 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 sun.misc; - -import static java.lang.Thread.State.*; -import java.util.Properties; - -public class VM { - - /* The following methods used to be native methods that instruct - * the VM to selectively suspend certain threads in low-memory - * situations. They are inherently dangerous and not implementable - * on native threads. We removed them in JDK 1.2. The skeletons - * remain so that existing applications that use these methods - * will still work. - */ - private static boolean suspended = false; - - /** @deprecated */ - @Deprecated - public static boolean threadsSuspended() { - return suspended; - } - - @SuppressWarnings("deprecation") - public static boolean allowThreadSuspension(ThreadGroup g, boolean b) { - return g.allowThreadSuspension(b); - } - - /** @deprecated */ - @Deprecated - public static boolean suspendThreads() { - suspended = true; - return true; - } - - // Causes any suspended threadgroups to be resumed. - /** @deprecated */ - @Deprecated - public static void unsuspendThreads() { - suspended = false; - } - - // Causes threadgroups no longer marked suspendable to be resumed. - /** @deprecated */ - @Deprecated - public static void unsuspendSomeThreads() { - } - - /* Deprecated fields and methods -- Memory advice not supported in 1.2 */ - - /** @deprecated */ - @Deprecated - public static final int STATE_GREEN = 1; - - /** @deprecated */ - @Deprecated - public static final int STATE_YELLOW = 2; - - /** @deprecated */ - @Deprecated - public static final int STATE_RED = 3; - - /** @deprecated */ - @Deprecated - public static final int getState() { - return STATE_GREEN; - } - - /** @deprecated */ - @Deprecated - public static void registerVMNotification(VMNotification n) { } - - /** @deprecated */ - @Deprecated - public static void asChange(int as_old, int as_new) { } - - /** @deprecated */ - @Deprecated - public static void asChange_otherthread(int as_old, int as_new) { } - - /* - * Not supported in 1.2 because these will have to be exported as - * JVM functions, and we are not sure we want do that. Leaving - * here so it can be easily resurrected -- just remove the // - * comments. - */ - - /** - * Resume Java profiling. All profiling data is added to any - * earlier profiling, unless <code>resetJavaProfiler</code> is - * called in between. If profiling was not started from the - * command line, <code>resumeJavaProfiler</code> will start it. - * <p> - * - * NOTE: Profiling must be enabled from the command line for a - * java.prof report to be automatically generated on exit; if not, - * writeJavaProfilerReport must be invoked to write a report. - * - * @see resetJavaProfiler - * @see writeJavaProfilerReport - */ - - // public native static void resumeJavaProfiler(); - - /** - * Suspend Java profiling. - */ - // public native static void suspendJavaProfiler(); - - /** - * Initialize Java profiling. Any accumulated profiling - * information is discarded. - */ - // public native static void resetJavaProfiler(); - - /** - * Write the current profiling contents to the file "java.prof". - * If the file already exists, it will be overwritten. - */ - // public native static void writeJavaProfilerReport(); - - - private static volatile boolean booted = false; - private static final Object lock = new Object(); - - // Invoked by System.initializeSystemClass just before returning. - // Subsystems that are invoked during initialization can check this - // property in order to avoid doing things that should wait until the - // application class loader has been set up. - // - public static void booted() { - synchronized (lock) { - booted = true; - lock.notifyAll(); - } - } - - public static boolean isBooted() { - return booted; - } - - // Waits until VM completes initialization - // - // This method is invoked by the Finalizer thread - public static void awaitBooted() throws InterruptedException { - synchronized (lock) { - while (!booted) { - lock.wait(); - } - } - } - - // A user-settable upper limit on the maximum amount of allocatable direct - // buffer memory. This value may be changed during VM initialization if - // "java" is launched with "-XX:MaxDirectMemorySize=<size>". - // - // The initial value of this field is arbitrary; during JRE initialization - // it will be reset to the value specified on the command line, if any, - // otherwise to Runtime.getRuntime().maxMemory(). - // - private static long directMemory = 64 * 1024 * 1024; - - // Returns the maximum amount of allocatable direct buffer memory. - // The directMemory variable is initialized during system initialization - // in the saveAndRemoveProperties method. - // - public static long maxDirectMemory() { - return directMemory; - } - - // User-controllable flag that determines if direct buffers should be page - // aligned. The "-XX:+PageAlignDirectMemory" option can be used to force - // buffers, allocated by ByteBuffer.allocateDirect, to be page aligned. - private static boolean pageAlignDirectMemory; - - // Returns {@code true} if the direct buffers should be page aligned. This - // variable is initialized by saveAndRemoveProperties. - public static boolean isDirectMemoryPageAligned() { - return pageAlignDirectMemory; - } - - /** - * Returns true if the given class loader is in the system domain - * in which all permissions are granted. - */ - public static boolean isSystemDomainLoader(ClassLoader loader) { - return loader == null; - } - - /** - * Returns the system property of the specified key saved at - * system initialization time. This method should only be used - * for the system properties that are not changed during runtime. - * It accesses a private copy of the system properties so - * that user's locking of the system properties object will not - * cause the library to deadlock. - * - * Note that the saved system properties do not include - * the ones set by sun.misc.Version.init(). - * - */ - public static String getSavedProperty(String key) { - if (savedProps.isEmpty()) - throw new IllegalStateException("Should be non-empty if initialized"); - - return savedProps.getProperty(key); - } - - // TODO: the Property Management needs to be refactored and - // the appropriate prop keys need to be accessible to the - // calling classes to avoid duplication of keys. - private static final Properties savedProps = new Properties(); - - // Save a private copy of the system properties and remove - // the system properties that are not intended for public access. - // - // This method can only be invoked during system initialization. - public static void saveAndRemoveProperties(Properties props) { - if (booted) - throw new IllegalStateException("System initialization has completed"); - - savedProps.putAll(props); - - // Set the maximum amount of direct memory. This value is controlled - // by the vm option -XX:MaxDirectMemorySize=<size>. - // The maximum amount of allocatable direct buffer memory (in bytes) - // from the system property sun.nio.MaxDirectMemorySize set by the VM. - // The system property will be removed. - String s = (String)props.remove("sun.nio.MaxDirectMemorySize"); - if (s != null) { - if (s.equals("-1")) { - // -XX:MaxDirectMemorySize not given, take default - directMemory = Runtime.getRuntime().maxMemory(); - } else { - long l = Long.parseLong(s); - if (l > -1) - directMemory = l; - } - } - - // Check if direct buffers should be page aligned - s = (String)props.remove("sun.nio.PageAlignDirectMemory"); - if ("true".equals(s)) - pageAlignDirectMemory = true; - - // Remove other private system properties - // used by java.lang.Integer.IntegerCache - props.remove("java.lang.Integer.IntegerCache.high"); - - // used by sun.launcher.LauncherHelper - props.remove("sun.java.launcher.diag"); - } - - // Initialize any miscellenous operating system settings that need to be - // set for the class libraries. - // - public static void initializeOSEnvironment() { - if (!booted) { - OSEnvironment.initialize(); - } - } - - /* Current count of objects pending for finalization */ - private static volatile int finalRefCount; - - /* Peak count of objects pending for finalization */ - private static volatile int peakFinalRefCount; - - /* - * Gets the number of objects pending for finalization. - * - * @return the number of objects pending for finalization. - */ - public static int getFinalRefCount() { - return finalRefCount; - } - - /* - * Gets the peak number of objects pending for finalization. - * - * @return the peak number of objects pending for finalization. - */ - public static int getPeakFinalRefCount() { - return peakFinalRefCount; - } - - /* - * Add {@code n} to the objects pending for finalization count. - * - * @param n an integer value to be added to the objects pending - * for finalization count - */ - public static void addFinalRefCount(int n) { - // The caller must hold lock to synchronize the update. - - finalRefCount += n; - if (finalRefCount > peakFinalRefCount) { - peakFinalRefCount = finalRefCount; - } - } - - /** - * Returns Thread.State for the given threadStatus - */ - public static Thread.State toThreadState(int threadStatus) { - if ((threadStatus & JVMTI_THREAD_STATE_RUNNABLE) != 0) { - return RUNNABLE; - } else if ((threadStatus & JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER) != 0) { - return BLOCKED; - } else if ((threadStatus & JVMTI_THREAD_STATE_WAITING_INDEFINITELY) != 0) { - return WAITING; - } else if ((threadStatus & JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT) != 0) { - return TIMED_WAITING; - } else if ((threadStatus & JVMTI_THREAD_STATE_TERMINATED) != 0) { - return TERMINATED; - } else if ((threadStatus & JVMTI_THREAD_STATE_ALIVE) == 0) { - return NEW; - } else { - return RUNNABLE; - } - } - - /* The threadStatus field is set by the VM at state transition - * in the hotspot implementation. Its value is set according to - * the JVM TI specification GetThreadState function. - */ - private static final int JVMTI_THREAD_STATE_ALIVE = 0x0001; - private static final int JVMTI_THREAD_STATE_TERMINATED = 0x0002; - private static final int JVMTI_THREAD_STATE_RUNNABLE = 0x0004; - private static final int JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER = 0x0400; - private static final int JVMTI_THREAD_STATE_WAITING_INDEFINITELY = 0x0010; - private static final int JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT = 0x0020; - - /* - * Returns the first non-null class loader up the execution stack, - * or null if only code from the null class loader is on the stack. - */ - public static native ClassLoader latestUserDefinedLoader(); - - /** - * Returns {@code true} if we are in a set UID program. - */ - public static boolean isSetUID() { - long uid = getuid(); - long euid = geteuid(); - long gid = getgid(); - long egid = getegid(); - return uid != euid || gid != egid; - } - - /** - * Returns the real user ID of the calling process, - * or -1 if the value is not available. - */ - public static native long getuid(); - - /** - * Returns the effective user ID of the calling process, - * or -1 if the value is not available. - */ - public static native long geteuid(); - - /** - * Returns the real group ID of the calling process, - * or -1 if the value is not available. - */ - public static native long getgid(); - - /** - * Returns the effective group ID of the calling process, - * or -1 if the value is not available. - */ - public static native long getegid(); - - /** - * Get a nanosecond time stamp adjustment in the form of a single long. - * - * This value can be used to create an instant using - * {@link java.time.Instant#ofEpochSecond(long, long) - * java.time.Instant.ofEpochSecond(offsetInSeconds, - * getNanoTimeAdjustment(offsetInSeconds))}. - * <p> - * The value returned has the best resolution available to the JVM on - * the current system. - * This is usually down to microseconds - or tenth of microseconds - - * depending on the OS/Hardware and the JVM implementation. - * - * @param offsetInSeconds The offset in seconds from which the nanosecond - * time stamp should be computed. - * - * @apiNote The offset should be recent enough - so that - * {@code offsetInSeconds} is within {@code +/- 2^32} seconds of the - * current UTC time. If the offset is too far off, {@code -1} will be - * returned. As such, {@code -1} must not be considered as a valid - * nano time adjustment, but as an exception value indicating - * that an offset closer to the current time should be used. - * - * @return A nanosecond time stamp adjustment in the form of a single long. - * If the offset is too far off the current time, this method returns -1. - * In that case, the caller should call this method again, passing a - * more accurate offset. - */ - public static native long getNanoTimeAdjustment(long offsetInSeconds); - - static { - initialize(); - } - private static native void initialize(); -}
--- a/src/java.base/share/classes/sun/misc/VMNotification.java Thu Jan 07 20:06:51 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* - * Copyright (c) 1996, 2004, 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 sun.misc; - -/** @deprecated */ -@Deprecated -public interface VMNotification { - - // when the vm switches allocation states, we get notified - // (possible semantics: if the state changes while in this - // notification, don't recursively notify). - // oldState and newState may be the same if we are just releasing - // suspended threads. - void newAllocState(int oldState, int newState, - boolean threadsSuspended); -}
--- a/src/java.base/share/classes/sun/net/www/http/HttpClient.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/sun/net/www/http/HttpClient.java Tue Jan 12 11:31:48 2016 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 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 @@ -967,12 +967,6 @@ return ""; } - @Override - protected void finalize() throws Throwable { - // This should do nothing. The stream finalizer will - // close the fd. - } - public void setDoNotRetry(boolean value) { // failedOnce is used to determine if a request should be retried. failedOnce = value;
--- a/src/java.base/share/classes/sun/net/www/protocol/jar/URLJarFile.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/sun/net/www/protocol/jar/URLJarFile.java Tue Jan 12 11:31:48 2016 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -108,13 +108,6 @@ return false; } - /* - * close the jar file. - */ - protected void finalize() throws IOException { - close(); - } - /** * Returns the <code>ZipEntry</code> for the given entry name or * <code>null</code> if not found.
--- a/src/java.base/share/classes/sun/nio/ch/Util.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/sun/nio/ch/Util.java Tue Jan 12 11:31:48 2016 -0800 @@ -389,7 +389,7 @@ static boolean atBugLevel(String bl) { // package-private if (bugLevel == null) { - if (!sun.misc.VM.isBooted()) + if (!jdk.internal.misc.VM.isBooted()) return false; String value = AccessController.doPrivileged( new GetPropertyAction("sun.nio.ch.bugLevel"));
--- a/src/java.base/share/classes/sun/nio/cs/StandardCharsets.java.template Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/sun/nio/cs/StandardCharsets.java.template Tue Jan 12 11:31:48 2016 -0800 @@ -156,12 +156,12 @@ private boolean initialized = false; - /* provider the sun.nio.cs.map property fir sjis/ms932 mapping hack + /* provider the sun.nio.cs.map property fir sjis/ms932 mapping hack */ private void init() { if (initialized) return; - if (!sun.misc.VM.isBooted()) + if (!jdk.internal.misc.VM.isBooted()) return; initialized = true;
--- a/src/java.base/share/classes/sun/reflect/Reflection.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/sun/reflect/Reflection.java Tue Jan 12 11:31:48 2016 -0800 @@ -29,6 +29,7 @@ import java.util.HashMap; import java.util.Map; import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.misc.VM; /** Common utility routines used by both java.lang and java.lang.reflect */ @@ -335,7 +336,7 @@ */ public static boolean isCallerSensitive(Method m) { final ClassLoader loader = m.getDeclaringClass().getClassLoader(); - if (sun.misc.VM.isSystemDomainLoader(loader) || isExtClassLoader(loader)) { + if (VM.isSystemDomainLoader(loader) || isExtClassLoader(loader)) { return m.isAnnotationPresent(CallerSensitive.class); } return false;
--- a/src/java.base/share/classes/sun/security/ssl/SignatureAndHashAlgorithm.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/classes/sun/security/ssl/SignatureAndHashAlgorithm.java Tue Jan 12 11:31:48 2016 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2015, 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 @@ -153,13 +153,11 @@ getSupportedAlgorithms(AlgorithmConstraints constraints) { Collection<SignatureAndHashAlgorithm> supported = new ArrayList<>(); - synchronized (priorityMap) { - for (SignatureAndHashAlgorithm sigAlg : priorityMap.values()) { - if (sigAlg.priority <= SUPPORTED_ALG_PRIORITY_MAX_NUM && - constraints.permits(SIGNATURE_PRIMITIVE_SET, - sigAlg.algorithm, null)) { - supported.add(sigAlg); - } + for (SignatureAndHashAlgorithm sigAlg : priorityMap.values()) { + if (sigAlg.priority <= SUPPORTED_ALG_PRIORITY_MAX_NUM && + constraints.permits(SIGNATURE_PRIMITIVE_SET, + sigAlg.algorithm, null)) { + supported.add(sigAlg); } } @@ -417,14 +415,12 @@ supports(HashAlgorithm.SHA1, SignatureAlgorithm.ECDSA, "SHA1withECDSA", --p); - if (Security.getProvider("SunMSCAPI") == null) { supports(HashAlgorithm.SHA224, SignatureAlgorithm.DSA, "SHA224withDSA", --p); supports(HashAlgorithm.SHA224, SignatureAlgorithm.RSA, "SHA224withRSA", --p); supports(HashAlgorithm.SHA224, SignatureAlgorithm.ECDSA, "SHA224withECDSA", --p); - } supports(HashAlgorithm.SHA256, SignatureAlgorithm.DSA, "SHA256withDSA", --p);
--- a/src/java.base/share/native/libjava/MessageUtils.c Thu Jan 07 20:06:51 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* - * Copyright (c) 1998, 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. - */ - -#include <stdlib.h> -#include <jni.h> -#include <jni_util.h> -#include <jlong.h> -#include <stdio.h> -#include <jvm.h> - -#include "sun_misc_MessageUtils.h" - -static void -printToFile(JNIEnv *env, jstring s, FILE *file) -{ - char *sConverted; - int length = 0; - int i; - const jchar *sAsArray; - - if (s == NULL) { - s = (*env)->NewStringUTF(env, "null"); - if (s == NULL) return; - } - - sAsArray = (*env)->GetStringChars(env, s, NULL); - if (!sAsArray) - return; - length = (*env)->GetStringLength(env, s); - if (length == 0) { - (*env)->ReleaseStringChars(env, s, sAsArray); - return; - } - sConverted = (char *) malloc(length + 1); - if (!sConverted) { - (*env)->ReleaseStringChars(env, s, sAsArray); - JNU_ThrowOutOfMemoryError(env, NULL); - return; - } - - for(i = 0; i < length; i++) { - sConverted[i] = (0x7f & sAsArray[i]); - } - sConverted[length] = '\0'; - jio_fprintf(file, "%s", sConverted); - (*env)->ReleaseStringChars(env, s, sAsArray); - free(sConverted); -} - -JNIEXPORT void JNICALL -Java_sun_misc_MessageUtils_toStderr(JNIEnv *env, jclass cls, jstring s) -{ - printToFile(env, s, stderr); -} - -JNIEXPORT void JNICALL -Java_sun_misc_MessageUtils_toStdout(JNIEnv *env, jclass cls, jstring s) -{ - printToFile(env, s, stdout); -}
--- a/src/java.base/share/native/libjava/RandomAccessFile.c Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/native/libjava/RandomAccessFile.c Tue Jan 12 11:31:48 2016 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -103,23 +103,19 @@ JNIEXPORT jlong JNICALL Java_java_io_RandomAccessFile_length(JNIEnv *env, jobject this) { + FD fd; - jlong cur = jlong_zero; - jlong end = jlong_zero; + jlong length = jlong_zero; fd = GET_FD(this, raf_fd); if (fd == -1) { JNU_ThrowIOException(env, "Stream Closed"); return -1; } - if ((cur = IO_Lseek(fd, 0L, SEEK_CUR)) == -1) { - JNU_ThrowIOExceptionWithLastError(env, "Seek failed"); - } else if ((end = IO_Lseek(fd, 0L, SEEK_END)) == -1) { - JNU_ThrowIOExceptionWithLastError(env, "Seek failed"); - } else if (IO_Lseek(fd, cur, SEEK_SET) == -1) { - JNU_ThrowIOExceptionWithLastError(env, "Seek failed"); + if ((length = IO_GetLength(fd)) == -1) { + JNU_ThrowIOExceptionWithLastError(env, "GetLength failed"); } - return end; + return length; } JNIEXPORT void JNICALL
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/java.base/share/native/libjava/StringCoding.c Tue Jan 12 11:31:48 2016 -0800 @@ -0,0 +1,75 @@ +/* + * Copyright (c) 1998, 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. + */ + +#include <stdlib.h> +#include <jni.h> +#include <jni_util.h> +#include <stdio.h> +#include <jvm.h> + +#include "java_lang_StringCoding.h" + +static void +printToFile(JNIEnv *env, jstring s, FILE *file) +{ + char *sConverted; + int length = 0; + int i; + const jchar *sAsArray; + + if (s == NULL) { + JNU_ThrowNullPointerException(env, NULL); + return; + } + + sAsArray = (*env)->GetStringChars(env, s, NULL); + if (!sAsArray) + return; + length = (*env)->GetStringLength(env, s); + if (length == 0) { + (*env)->ReleaseStringChars(env, s, sAsArray); + return; + } + sConverted = (char *) malloc(length + 1); + if (!sConverted) { + (*env)->ReleaseStringChars(env, s, sAsArray); + JNU_ThrowOutOfMemoryError(env, NULL); + return; + } + + for(i = 0; i < length; i++) { + sConverted[i] = (0x7f & sAsArray[i]); + } + sConverted[length] = '\0'; + jio_fprintf(file, "%s", sConverted); + (*env)->ReleaseStringChars(env, s, sAsArray); + free(sConverted); +} + +JNIEXPORT void JNICALL +Java_java_lang_StringCoding_err(JNIEnv *env, jclass cls, jstring s) +{ + printToFile(env, s, stderr); +}
--- a/src/java.base/share/native/libjava/VM.c Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/share/native/libjava/VM.c Tue Jan 12 11:31:48 2016 -0800 @@ -28,7 +28,7 @@ #include "jvm.h" #include "jdk_util.h" -#include "sun_misc_VM.h" +#include "jdk_internal_misc_VM.h" /* Only register the performance-critical methods */ static JNINativeMethod methods[] = { @@ -36,12 +36,12 @@ }; JNIEXPORT jobject JNICALL -Java_sun_misc_VM_latestUserDefinedLoader(JNIEnv *env, jclass cls) { +Java_jdk_internal_misc_VM_latestUserDefinedLoader(JNIEnv *env, jclass cls) { return JVM_LatestUserDefinedLoader(env); } JNIEXPORT void JNICALL -Java_sun_misc_VM_initialize(JNIEnv *env, jclass cls) { +Java_jdk_internal_misc_VM_initialize(JNIEnv *env, jclass cls) { if (!JDK_InitJvmHandle()) { JNU_ThrowInternalError(env, "Handle for JVM not found for symbol lookup"); return; @@ -50,8 +50,8 @@ // Registers implementations of native methods described in methods[] // above. // In particular, registers JVM_GetNanoTimeAdjustment as the implementation - // of the native sun.misc.VM.getNanoTimeAdjustment - avoiding the cost of - // introducing a Java_sun_misc_VM_getNanoTimeAdjustment wrapper + // of the native VM.getNanoTimeAdjustment - avoiding the cost of + // introducing a Java_jdk_internal_misc_VM_getNanoTimeAdjustment wrapper (*env)->RegisterNatives(env, cls, methods, sizeof(methods)/sizeof(methods[0])); }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/java.base/unix/classes/jdk/internal/misc/OSEnvironment.java Tue Jan 12 11:31:48 2016 -0800 @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2005, 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; + +public class OSEnvironment { + + /* + * Initialize any miscellaneous operating system settings that need to be set + * for the class libraries. + */ + public static void initialize() { + // no-op on Solaris and Linux + } + +}
--- a/src/java.base/unix/classes/sun/misc/OSEnvironment.java Thu Jan 07 20:06:51 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2005, 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 sun.misc; - -public class OSEnvironment { - - /* - * Initialize any miscellenous operating system settings that need to be set - * for the class libraries. - */ - public static void initialize() { - // no-op on Solaris and Linux - } - -}
--- a/src/java.base/unix/native/libjava/VM_md.c Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/unix/native/libjava/VM_md.c Tue Jan 12 11:31:48 2016 -0800 @@ -28,25 +28,25 @@ JNIEXPORT jlong JNICALL -Java_sun_misc_VM_getuid(JNIEnv *env, jclass thisclass) { +Java_jdk_internal_misc_VM_getuid(JNIEnv *env, jclass thisclass) { return getuid(); } JNIEXPORT jlong JNICALL -Java_sun_misc_VM_geteuid(JNIEnv *env, jclass thisclass) { +Java_jdk_internal_misc_VM_geteuid(JNIEnv *env, jclass thisclass) { return geteuid(); } JNIEXPORT jlong JNICALL -Java_sun_misc_VM_getgid(JNIEnv *env, jclass thisclass) { +Java_jdk_internal_misc_VM_getgid(JNIEnv *env, jclass thisclass) { return getgid(); } JNIEXPORT jlong JNICALL -Java_sun_misc_VM_getegid(JNIEnv *env, jclass thisclass) { +Java_jdk_internal_misc_VM_getegid(JNIEnv *env, jclass thisclass) { return getegid(); }
--- a/src/java.base/unix/native/libjava/io_util_md.c Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/unix/native/libjava/io_util_md.c Tue Jan 12 11:31:48 2016 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -22,7 +22,6 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ - #include "jni.h" #include "jni_util.h" #include "jvm.h" @@ -219,3 +218,14 @@ RESTARTABLE(ftruncate64(fd, length), result); return result; } + +jlong +handleGetLength(FD fd) +{ + struct stat64 sb; + if (fstat64(fd, &sb) == 0) { + return sb.st_size; + } else { + return -1; + } +}
--- a/src/java.base/unix/native/libjava/io_util_md.h Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/unix/native/libjava/io_util_md.h Tue Jan 12 11:31:48 2016 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -39,7 +39,7 @@ ssize_t handleRead(FD fd, void *buf, jint len); jint handleAvailable(FD fd, jlong *pbytes); jint handleSetLength(FD fd, jlong length); - +jlong handleGetLength(FD fd); FD handleOpen(const char *path, int oflag, int mode); /* @@ -72,6 +72,7 @@ #define IO_Append handleWrite #define IO_Available handleAvailable #define IO_SetLength handleSetLength +#define IO_GetLength handleGetLength #ifdef _ALLBSD_SOURCE #define open64 open
--- a/src/java.base/unix/native/libnio/ch/NativeThread.c Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/unix/native/libnio/ch/NativeThread.c Tue Jan 12 11:31:48 2016 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2006, 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 @@ -93,6 +93,10 @@ #else ret = pthread_kill((pthread_t)thread, INTERRUPT_SIGNAL); #endif +#ifdef MACOSX + if (ret != 0 && ret != ESRCH) +#else if (ret != 0) +#endif JNU_ThrowIOExceptionWithLastError(env, "Thread signal failed"); }
--- a/src/java.base/windows/classes/java/lang/ProcessImpl.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/windows/classes/java/lang/ProcessImpl.java Tue Jan 12 11:31:48 2016 -0800 @@ -42,8 +42,10 @@ import java.util.concurrent.TimeUnit; import java.util.regex.Matcher; import java.util.regex.Pattern; + import jdk.internal.misc.JavaIOFileDescriptorAccess; import jdk.internal.misc.SharedSecrets; +import jdk.internal.ref.CleanerFactory; /* This class is for the exclusive use of ProcessBuilder.start() to * create new processes. @@ -417,6 +419,10 @@ handle = create(cmdstr, envblock, path, stdHandles, redirectErrorStream); + // Register a cleaning function to close the handle + final long local_handle = handle; // local to prevent capture of this + CleanerFactory.cleaner().register(this, () -> closeHandle(local_handle)); + processHandle = ProcessHandleImpl.getInternal(getProcessId0(handle)); java.security.AccessController.doPrivileged( @@ -463,10 +469,6 @@ return stderr_stream; } - protected void finalize() { - closeHandle(handle); - } - private static final int STILL_ACTIVE = getStillActive(); private static native int getStillActive();
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/java.base/windows/classes/jdk/internal/misc/OSEnvironment.java Tue Jan 12 11:31:48 2016 -0800 @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2005, 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 sun.io.Win32ErrorMode; + +public class OSEnvironment { + + /* + * Initialize any miscellaneous operating system settings that need to be set + * for the class libraries. + * <p> + * At this time only the process-wide error mode needs to be set. + */ + public static void initialize() { + Win32ErrorMode.initialize(); + } + +}
--- a/src/java.base/windows/classes/sun/io/Win32ErrorMode.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/windows/classes/sun/io/Win32ErrorMode.java Tue Jan 12 11:31:48 2016 -0800 @@ -66,7 +66,7 @@ * has completed. */ public static void initialize() { - if (!sun.misc.VM.isBooted()) { + if (!jdk.internal.misc.VM.isBooted()) { String s = System.getProperty("sun.io.allowCriticalErrorMessageBox"); if (s == null || s.equals(Boolean.FALSE.toString())) { long mode = setErrorMode(0);
--- a/src/java.base/windows/classes/sun/misc/OSEnvironment.java Thu Jan 07 20:06:51 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2005, 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 sun.misc; - -import sun.io.Win32ErrorMode; - -public class OSEnvironment { - - /* - * Initialize any miscellenous operating system settings that need to be set - * for the class libraries. - * <p> - * At this time only the process-wide error mode needs to be set. - */ - public static void initialize() { - Win32ErrorMode.initialize(); - } - -}
--- a/src/java.base/windows/native/libjava/VM_md.c Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/windows/native/libjava/VM_md.c Tue Jan 12 11:31:48 2016 -0800 @@ -27,28 +27,28 @@ JNIEXPORT jlong JNICALL -Java_sun_misc_VM_getuid(JNIEnv *env, jclass thisclass) { +Java_jdk_internal_misc_VM_getuid(JNIEnv *env, jclass thisclass) { /* -1 means function not available. */ return -1; } JNIEXPORT jlong JNICALL -Java_sun_misc_VM_geteuid(JNIEnv *env, jclass thisclass) { +Java_jdk_internal_misc_VM_geteuid(JNIEnv *env, jclass thisclass) { /* -1 means function not available. */ return -1; } JNIEXPORT jlong JNICALL -Java_sun_misc_VM_getgid(JNIEnv *env, jclass thisclass) { +Java_jdk_internal_misc_VM_getgid(JNIEnv *env, jclass thisclass) { /* -1 means function not available. */ return -1; } JNIEXPORT jlong JNICALL -Java_sun_misc_VM_getegid(JNIEnv *env, jclass thisclass) { +Java_jdk_internal_misc_VM_getegid(JNIEnv *env, jclass thisclass) { /* -1 means function not available. */ return -1;
--- a/src/java.base/windows/native/libjava/io_util_md.c Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/windows/native/libjava/io_util_md.c Tue Jan 12 11:31:48 2016 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -584,3 +584,14 @@ } return long_to_jlong(pos.QuadPart); } + +jlong +handleGetLength(FD fd) { + HANDLE h = (HANDLE) fd; + LARGE_INTEGER length; + if (GetFileSizeEx(h, &length) != 0) { + return long_to_jlong(length.QuadPart); + } else { + return -1; + } +}
--- a/src/java.base/windows/native/libjava/io_util_md.h Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.base/windows/native/libjava/io_util_md.h Tue Jan 12 11:31:48 2016 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -44,6 +44,7 @@ int handleAvailable(FD fd, jlong *pbytes); int handleSync(FD fd); int handleSetLength(FD fd, jlong length); +jlong handleGetLength(FD fd); JNIEXPORT jint handleRead(FD fd, void *buf, jint len); jint handleWrite(FD fd, const void *buf, jint len); jint handleAppend(FD fd, const void *buf, jint len); @@ -84,6 +85,7 @@ #define IO_Lseek handleLseek #define IO_Available handleAvailable #define IO_SetLength handleSetLength +#define IO_GetLength handleGetLength /* * Setting the handle field in Java_java_io_FileDescriptor_set for
--- a/src/java.desktop/share/classes/javax/swing/text/html/parser/Parser.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.desktop/share/classes/javax/swing/text/html/parser/Parser.java Tue Jan 12 11:31:48 2016 -0800 @@ -35,8 +35,6 @@ import java.util.Enumeration; import java.net.URL; -import sun.misc.MessageUtils; - /** * A simple DTD-driven HTML parser. The parser reads an * HTML file from an InputStream and calls various methods
--- a/src/java.desktop/share/classes/sun/applet/AppletPanel.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.desktop/share/classes/sun/applet/AppletPanel.java Tue Jan 12 11:31:48 2016 -0800 @@ -44,7 +44,6 @@ import sun.awt.EmbeddedFrame; import sun.awt.SunToolkit; import sun.misc.ManagedLocalsThread; -import sun.misc.MessageUtils; import sun.misc.PerformanceLogger; import sun.security.util.SecurityConstants; @@ -118,8 +117,6 @@ */ Dimension currentAppletSize = new Dimension(10, 10); - MessageUtils mu = new MessageUtils(); - /** * The thread to use during applet loading */
--- a/src/java.logging/share/classes/java/util/logging/FileHandler.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.logging/share/classes/java/util/logging/FileHandler.java Tue Jan 12 11:31:48 2016 -0800 @@ -639,7 +639,7 @@ continue; } else if (ch2 == 'h') { file = new File(System.getProperty("user.home")); - if (sun.misc.VM.isSetUID()) { + if (jdk.internal.misc.VM.isSetUID()) { // Ok, we are in a set UID program. For safety's sake // we disallow attempts to open files relative to %h. throw new IOException("can't use %h in set UID program");
--- a/src/java.management/share/classes/java/lang/management/ManagementFactory.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.management/share/classes/java/lang/management/ManagementFactory.java Tue Jan 12 11:31:48 2016 -0800 @@ -583,7 +583,7 @@ ClassLoader loader = AccessController.doPrivileged( (PrivilegedAction<ClassLoader>) () -> cls.getClassLoader()); - if (!sun.misc.VM.isSystemDomainLoader(loader)) { + if (!jdk.internal.misc.VM.isSystemDomainLoader(loader)) { throw new IllegalArgumentException(mxbeanName + " is not a platform MXBean"); }
--- a/src/java.management/share/classes/sun/management/ManagementFactoryHelper.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.management/share/classes/sun/management/ManagementFactoryHelper.java Tue Jan 12 11:31:48 2016 -0800 @@ -473,7 +473,7 @@ public static Thread.State toThreadState(int state) { // suspended and native bits may be set in state int threadStatus = state & ~JMM_THREAD_STATE_FLAG_MASK; - return sun.misc.VM.toThreadState(threadStatus); + return jdk.internal.misc.VM.toThreadState(threadStatus); } // These values are defined in jmm.h
--- a/src/java.management/share/classes/sun/management/MemoryImpl.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.management/share/classes/sun/management/MemoryImpl.java Tue Jan 12 11:31:48 2016 -0800 @@ -59,7 +59,7 @@ } public int getObjectPendingFinalizationCount() { - return sun.misc.VM.getFinalRefCount(); + return jdk.internal.misc.VM.getFinalRefCount(); } public void gc() {
--- a/src/java.rmi/share/classes/sun/rmi/server/MarshalInputStream.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.rmi/share/classes/sun/rmi/server/MarshalInputStream.java Tue Jan 12 11:31:48 2016 -0800 @@ -262,7 +262,7 @@ * if only code from the null class loader is on the stack. */ private static ClassLoader latestUserDefinedLoader() { - return sun.misc.VM.latestUserDefinedLoader(); + return jdk.internal.misc.VM.latestUserDefinedLoader(); } /**
--- a/src/java.scripting/share/classes/javax/script/ScriptEngineFactory.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.scripting/share/classes/javax/script/ScriptEngineFactory.java Tue Jan 12 11:31:48 2016 -0800 @@ -31,12 +31,14 @@ * <code>ScriptEngineFactory</code> is used to describe and instantiate * <code>ScriptEngines</code>. * <br><br> - * Each class implementing <code>ScriptEngine</code> has a corresponding factory - * that exposes metadata describing the engine class. + * Each class implementing <code>ScriptEngine</code> has a corresponding + * factory that exposes metadata describing the engine class. * <br><br>The <code>ScriptEngineManager</code> - * uses the service provider mechanism described in the <i>Jar File Specification</i> to obtain - * instances of all <code>ScriptEngineFactories</code> available in - * the current ClassLoader. + * uses the service-provider loader mechanism described in the + * {@link java.util.ServiceLoader} class to obtain + * instances of {@code ScriptEngineFactory} instances. + * See {@link ScriptEngineManager#ScriptEngineManager()} and + * {@link ScriptEngineManager#ScriptEngineManager(java.lang.ClassLoader)}. * * @since 1.6 */
--- a/src/java.scripting/share/classes/javax/script/ScriptEngineManager.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.scripting/share/classes/javax/script/ScriptEngineManager.java Tue Jan 12 11:31:48 2016 -0800 @@ -33,7 +33,8 @@ * The <code>ScriptEngineManager</code> implements a discovery and instantiation * mechanism for <code>ScriptEngine</code> classes and also maintains a * collection of key/value pairs storing state shared by all engines created - * by the Manager. This class uses the <a href="../../../technotes/guides/jar/jar.html#Service%20Provider">service provider</a> mechanism to enumerate all the + * by the Manager. This class uses the service provider mechanism described in the + * {@link java.util.ServiceLoader} class to enumerate all the * implementations of <code>ScriptEngineFactory</code>. <br><br> * The <code>ScriptEngineManager</code> provides a method to return a list of all these factories * as well as utility methods which look up factories on the basis of language name, file extension @@ -64,7 +65,7 @@ /** * This constructor loads the implementations of * <code>ScriptEngineFactory</code> visible to the given - * <code>ClassLoader</code> using the <a href="../../../technotes/guides/jar/jar.html#Service%20Provider">service provider</a> mechanism.<br><br> + * <code>ClassLoader</code> using the service provider mechanism.<br><br> * If loader is <code>null</code>, the script engine factories that are * bundled with the platform are loaded. <br> *
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/java.scripting/share/classes/javax/script/package-info.java Tue Jan 12 11:31:48 2016 -0800 @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2005, 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. + */ + +/** + +<p>The scripting API consists of interfaces and classes that define +Java™ Scripting Engines and provides +a framework for their use in Java applications. This API is intended +for use by application programmers who wish to execute programs +written in scripting languages in their Java applications. The +scripting language programs are usually provided by the end-users of +the applications. +</p> +<p>The main areas of functionality of <code>javax.script</code> +package include +</p> +<ol> +<li><p><b>Script execution</b>: Scripts +are streams of characters used as sources for programs executed by +script engines. Script execution uses +{@link javax.script.ScriptEngine#eval eval} methods of +{@link javax.script.ScriptEngine ScriptEngine} and methods of the +{@link javax.script.Invocable Invocable} interface. +</p> +<li><p><b>Binding</b>: This facility +allows Java objects to be exposed to script programs as named +variables. {@link javax.script.Bindings Bindings} and +{@link javax.script.ScriptContext ScriptContext} +classes are used for this purpose. +</p> +<li><p><b>Compilation</b>: This +functionality allows the intermediate code generated by the +front-end of a script engine to be stored and executed repeatedly. +This benefits applications that execute the same script multiple +times. These applications can gain efficiency since the engines' +front-ends only need to execute once per script rather than once per +script execution. Note that this functionality is optional and +script engines may choose not to implement it. Callers need to check +for availability of the {@link javax.script.Compilable Compilable} +interface using an <I>instanceof</I> check. +</p> +<li><p><b>Invocation</b>: This +functionality allows the reuse of intermediate code generated by a +script engine's front-end. Whereas Compilation allows entire scripts +represented by intermediate code to be re-executed, Invocation +functionality allows individual procedures/methods in the scripts to +be re-executed. As in the case with compilation, not all script +engines are required to provide this facility. Caller has to check +for {@link javax.script.Invocable Invocable} availability. +</p> +<li><p><b>Script engine discovery</b>: Applications +written to the Scripting API might have specific requirements on +script engines. Some may require a specific scripting language +and/or version while others may require a specific implementation +engine and/or version. Script engines are packaged in a specified +way so that engines can be discovered at runtime and queried for +attributes. The Engine discovery mechanism is based on the service-provider +loading facility described in the {@link java.util.ServiceLoader} class. +{@link javax.script.ScriptEngineManager ScriptEngineManager} +includes +{@link javax.script.ScriptEngineManager#getEngineFactories getEngineFactories} method to get all +{@link javax.script.ScriptEngineFactory ScriptEngineFactory} instances +discovered using this mechanism. <code>ScriptEngineFactory</code> has +methods to query attributes about script engine. +</p> +</ol> + +@since 1.6 +*/ + +package javax.script; +
--- a/src/java.scripting/share/classes/javax/script/package.html Thu Jan 07 20:06:51 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,102 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<html> -<head> -<!-- -Copyright (c) 2005, 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. ---> - -</head> -<body bgcolor="white"> -<p>The scripting API consists of interfaces and classes that define -Java™ Scripting Engines and provides -a framework for their use in Java applications. This API is intended -for use by application programmers who wish to execute programs -written in scripting languages in their Java applications. The -scripting language programs are usually provided by the end-users of -the applications. -</p> -<p>The main areas of functionality of <code>javax.script</code> -package include -</p> -<ol> - <li><p><b>Script execution</b>: Scripts - are streams of characters used as sources for programs executed by - script engines. Script execution uses - {@link javax.script.ScriptEngine#eval eval} methods of - {@link javax.script.ScriptEngine ScriptEngine} and methods of the - {@link javax.script.Invocable Invocable} interface. - </p> - <li><p><b>Binding</b>: This facility - allows Java objects to be exposed to script programs as named - variables. {@link javax.script.Bindings Bindings} and - {@link javax.script.ScriptContext ScriptContext} - classes are used for this purpose. - </p> - <li><p><b>Compilation</b>: This - functionality allows the intermediate code generated by the - front-end of a script engine to be stored and executed repeatedly. - This benefits applications that execute the same script multiple - times. These applications can gain efficiency since the engines' - front-ends only need to execute once per script rather than once per - script execution. Note that this functionality is optional and - script engines may choose not to implement it. Callers need to check - for availability of the {@link javax.script.Compilable Compilable} - interface using an <I>instanceof</I> check. - </p> - <li><p><b>Invocation</b>: This - functionality allows the reuse of intermediate code generated by a - script engine's front-end. Whereas Compilation allows entire scripts - represented by intermediate code to be re-executed, Invocation - functionality allows individual procedures/methods in the scripts to - be re-executed. As in the case with compilation, not all script - engines are required to provide this facility. Caller has to check - for {@link javax.script.Invocable Invocable} availability. - </p> - <li><p><b>Script engine discovery and Metadata</b>: Applications - written to the Scripting API might have specific requirements on - script engines. Some may require a specific scripting language - and/or version while others may require a specific implementation - engine and/or version. Script engines are packaged in a specified - way so that engines can be discovered at runtime and queried for - attributes. The Engine discovery mechanism is based on the Service - discovery mechanism described in the <b>Jar File Specification</b>. - Script engine implementing classes are packaged in jar files that - include a text resource named - <b>META-INF/services/javax.script.ScriptEngineFactory</b>. This - resource must include a line for each - {@link javax.script.ScriptEngineFactory ScriptEngineFactory} - that is packaged in the jar file. - {@link javax.script.ScriptEngineManager ScriptEngineManager} - includes - {@link javax.script.ScriptEngineManager#getEngineFactories getEngineFactories} method to get all - {@link javax.script.ScriptEngineFactory ScriptEngineFactory} instances - discovered using this mechanism. <code>ScriptEngineFactory</code> has - methods to query attributes about script engine. - </p> -</ol> - -@since 1.6 - -</body> -</html>
--- a/src/java.security.jgss/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.security.jgss/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java Tue Jan 12 11:31:48 2016 -0800 @@ -397,7 +397,7 @@ */ if (osname != null && !osname.startsWith("Windows")) { - long uid = sun.misc.VM.getuid(); + long uid = jdk.internal.misc.VM.getuid(); if (uid != -1) { name = File.separator + "tmp" + File.separator + stdCacheNameComponent + "_" + uid;
--- a/src/java.security.jgss/share/classes/sun/security/krb5/internal/rcache/DflCache.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/java.security.jgss/share/classes/sun/security/krb5/internal/rcache/DflCache.java Tue Jan 12 11:31:48 2016 -0800 @@ -60,7 +60,7 @@ * * service_euid * - * in which euid is available as sun.misc.VM.geteuid(). + * in which euid is available as jdk.internal.misc.VM.geteuid(). * * The file has a header: * @@ -107,7 +107,7 @@ private static long uid; static { // Available on Solaris, Linux and Mac. Otherwise, -1 and no _euid suffix - uid = sun.misc.VM.geteuid(); + uid = jdk.internal.misc.VM.geteuid(); } public DflCache (String source) {
--- a/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/AWTEventMonitor.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/AWTEventMonitor.java Tue Jan 12 11:31:48 2016 -0800 @@ -45,7 +45,6 @@ * level support for capturing the top-level containers as they are created. */ -@jdk.Exported public class AWTEventMonitor { /**
--- a/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/AccessibilityEventMonitor.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/AccessibilityEventMonitor.java Tue Jan 12 11:31:48 2016 -0800 @@ -43,7 +43,6 @@ * */ -@jdk.Exported public class AccessibilityEventMonitor { // listeners
--- a/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/AccessibilityListenerList.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/AccessibilityListenerList.java Tue Jan 12 11:31:48 2016 -0800 @@ -37,7 +37,6 @@ * */ -@jdk.Exported public class AccessibilityListenerList { /* A null array to be shared by all empty listener lists */ private final static Object[] NULL_ARRAY = new Object[0];
--- a/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/EventID.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/EventID.java Tue Jan 12 11:31:48 2016 -0800 @@ -35,7 +35,6 @@ * @see SwingEventMonitor * */ -@jdk.Exported public class EventID { /**
--- a/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/EventQueueMonitor.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/EventQueueMonitor.java Tue Jan 12 11:31:48 2016 -0800 @@ -40,7 +40,6 @@ * @see AWTEventMonitor * @see SwingEventMonitor */ -@jdk.Exported public class EventQueueMonitor implements AWTEventListener {
--- a/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/GUIInitializedListener.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/GUIInitializedListener.java Tue Jan 12 11:31:48 2016 -0800 @@ -49,7 +49,6 @@ * @see EventQueueMonitor#removeGUIInitializedListener * */ -@jdk.Exported public interface GUIInitializedListener extends EventListener { /**
--- a/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/SwingEventMonitor.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/SwingEventMonitor.java Tue Jan 12 11:31:48 2016 -0800 @@ -56,7 +56,6 @@ * @see AWTEventMonitor * */ -@jdk.Exported public class SwingEventMonitor extends AWTEventMonitor { /**
--- a/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/TopLevelWindowListener.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/TopLevelWindowListener.java Tue Jan 12 11:31:48 2016 -0800 @@ -43,7 +43,6 @@ * @see EventQueueMonitor#removeTopLevelWindowListener * */ -@jdk.Exported public interface TopLevelWindowListener extends EventListener { /**
--- a/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/Translator.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/Translator.java Tue Jan 12 11:31:48 2016 -0800 @@ -58,7 +58,6 @@ * to implement accessibility features for a toolkit. Instead of relying upon this * code, a toolkit's components should implement interface {@code Accessible} directly. */ -@jdk.Exported public class Translator extends AccessibleContext implements Accessible, AccessibleComponent {
--- a/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java Tue Jan 12 11:31:48 2016 -0800 @@ -53,7 +53,6 @@ * Note: This class has to be public. It's loaded from the VM like this: * Class.forName(atName).newInstance(); */ -@jdk.Exported(false) final public class AccessBridge { private static AccessBridge theAccessBridge;
--- a/src/jdk.attach/share/classes/com/sun/tools/attach/AgentInitializationException.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.attach/share/classes/com/sun/tools/attach/AgentInitializationException.java Tue Jan 12 11:31:48 2016 -0800 @@ -40,7 +40,6 @@ * the error returned by the agent's {@code Agent_OnAttach} function. * This error code can be obtained by invoking the {@link #returnValue() returnValue} method. */ -@jdk.Exported public class AgentInitializationException extends Exception { /** use serialVersionUID for interoperability */
--- a/src/jdk.attach/share/classes/com/sun/tools/attach/AgentLoadException.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.attach/share/classes/com/sun/tools/attach/AgentLoadException.java Tue Jan 12 11:31:48 2016 -0800 @@ -36,7 +36,6 @@ * com.sun.tools.attach.VirtualMachine#loadAgentPath loadAgentPath} methods * if the agent, or agent library, cannot be loaded. */ -@jdk.Exported public class AgentLoadException extends Exception { /** use serialVersionUID for interoperability */
--- a/src/jdk.attach/share/classes/com/sun/tools/attach/AttachNotSupportedException.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.attach/share/classes/com/sun/tools/attach/AttachNotSupportedException.java Tue Jan 12 11:31:48 2016 -0800 @@ -36,7 +36,6 @@ * AttachProvider.attachVirtualMachine} if the provider attempts to * attach to a Java virtual machine with which it not comptatible. */ -@jdk.Exported public class AttachNotSupportedException extends Exception { /** use serialVersionUID for interoperability */
--- a/src/jdk.attach/share/classes/com/sun/tools/attach/AttachOperationFailedException.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.attach/share/classes/com/sun/tools/attach/AttachOperationFailedException.java Tue Jan 12 11:31:48 2016 -0800 @@ -37,7 +37,6 @@ * * @since 1.9 */ -@jdk.Exported public class AttachOperationFailedException extends IOException { private static final long serialVersionUID = 2140308168167478043L;
--- a/src/jdk.attach/share/classes/com/sun/tools/attach/AttachPermission.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.attach/share/classes/com/sun/tools/attach/AttachPermission.java Tue Jan 12 11:31:48 2016 -0800 @@ -79,7 +79,6 @@ * @see com.sun.tools.attach.spi.AttachProvider */ -@jdk.Exported public final class AttachPermission extends java.security.BasicPermission { /** use serialVersionUID for interoperability */
--- a/src/jdk.attach/share/classes/com/sun/tools/attach/VirtualMachine.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.attach/share/classes/com/sun/tools/attach/VirtualMachine.java Tue Jan 12 11:31:48 2016 -0800 @@ -96,7 +96,6 @@ * @since 1.6 */ -@jdk.Exported public abstract class VirtualMachine { private AttachProvider provider; private String id;
--- a/src/jdk.attach/share/classes/com/sun/tools/attach/VirtualMachineDescriptor.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.attach/share/classes/com/sun/tools/attach/VirtualMachineDescriptor.java Tue Jan 12 11:31:48 2016 -0800 @@ -55,7 +55,6 @@ * * @since 1.6 */ -@jdk.Exported public class VirtualMachineDescriptor { private AttachProvider provider;
--- a/src/jdk.attach/share/classes/com/sun/tools/attach/package-info.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.attach/share/classes/com/sun/tools/attach/package-info.java Tue Jan 12 11:31:48 2016 -0800 @@ -38,5 +38,4 @@ * @since 1.6 */ -@jdk.Exported package com.sun.tools.attach;
--- a/src/jdk.attach/share/classes/com/sun/tools/attach/spi/AttachProvider.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.attach/share/classes/com/sun/tools/attach/spi/AttachProvider.java Tue Jan 12 11:31:48 2016 -0800 @@ -74,7 +74,6 @@ * @since 1.6 */ -@jdk.Exported public abstract class AttachProvider { private static final Object lock = new Object();
--- a/src/jdk.attach/share/classes/com/sun/tools/attach/spi/package-info.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.attach/share/classes/com/sun/tools/attach/spi/package-info.java Tue Jan 12 11:31:48 2016 -0800 @@ -31,5 +31,4 @@ * @since 1.6 */ -@jdk.Exported package com.sun.tools.attach.spi;
--- a/src/jdk.charsets/share/classes/sun/nio/cs/ext/ExtendedCharsets.java.template Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.charsets/share/classes/sun/nio/cs/ext/ExtendedCharsets.java.template Tue Jan 12 11:31:48 2016 -0800 @@ -97,7 +97,7 @@ protected void init() { if (initialized) return; - if (!sun.misc.VM.isBooted()) + if (!jdk.internal.misc.VM.isBooted()) return; String map = getProperty("sun.nio.cs.map");
--- a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Authenticator.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Authenticator.java Tue Jan 12 11:31:48 2016 -0800 @@ -36,7 +36,6 @@ * Note. This implies that any caching of credentials or other authentication * information must be done outside of this class. */ -@jdk.Exported public abstract class Authenticator { /** @@ -48,7 +47,6 @@ * Indicates an authentication failure. The authentication * attempt has completed. */ - @jdk.Exported public static class Failure extends Result { private int responseCode; @@ -70,7 +68,6 @@ * authenticated user principal can be acquired by calling * getPrincipal(). */ - @jdk.Exported public static class Success extends Result { private HttpPrincipal principal; @@ -92,7 +89,6 @@ * set any necessary response headers in the given HttpExchange * before returning this Retry object. */ - @jdk.Exported public static class Retry extends Result { private int responseCode;
--- a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/BasicAuthenticator.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/BasicAuthenticator.java Tue Jan 12 11:31:48 2016 -0800 @@ -33,7 +33,6 @@ * to provide an implementation of {@link #checkCredentials(String,String)} * which is called to verify each incoming request. */ -@jdk.Exported public abstract class BasicAuthenticator extends Authenticator { protected String realm;
--- a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Filter.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Filter.java Tue Jan 12 11:31:48 2016 -0800 @@ -39,7 +39,6 @@ * exchange handler. * @since 1.6 */ -@jdk.Exported public abstract class Filter { protected Filter () {} @@ -49,7 +48,6 @@ * Each filter in the chain is given one of these * so it can invoke the next filter in the chain */ - @jdk.Exported public static class Chain { /* the last element in the chain must invoke the users * handler
--- a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Headers.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Headers.java Tue Jan 12 11:31:48 2016 -0800 @@ -61,7 +61,6 @@ * as a header line containing the key but no associated value. * @since 1.6 */ -@jdk.Exported public class Headers implements Map<String,List<String>> { HashMap<String,List<String>> map;
--- a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpContext.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpContext.java Tue Jan 12 11:31:48 2016 -0800 @@ -40,7 +40,6 @@ * context can be pre- and post-processed by each Filter in the chain. * @since 1.6 */ -@jdk.Exported public abstract class HttpContext { protected HttpContext () {
--- a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpExchange.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpExchange.java Tue Jan 12 11:31:48 2016 -0800 @@ -64,7 +64,6 @@ * @since 1.6 */ -@jdk.Exported public abstract class HttpExchange { protected HttpExchange () {
--- a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpHandler.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpHandler.java Tue Jan 12 11:31:48 2016 -0800 @@ -32,7 +32,6 @@ * HTTP exchange is handled by one of these handlers. * @since 1.6 */ -@jdk.Exported public interface HttpHandler { /** * Handle the given request and generate an appropriate response.
--- a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpPrincipal.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpPrincipal.java Tue Jan 12 11:31:48 2016 -0800 @@ -33,7 +33,6 @@ * Represents a user authenticated by HTTP Basic or Digest * authentication. */ -@jdk.Exported public class HttpPrincipal implements Principal { private String username, realm;
--- a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpServer.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpServer.java Tue Jan 12 11:31:48 2016 -0800 @@ -87,7 +87,6 @@ * @since 1.6 */ -@jdk.Exported public abstract class HttpServer { /**
--- a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpsConfigurator.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpsConfigurator.java Tue Jan 12 11:31:48 2016 -0800 @@ -67,7 +67,6 @@ * </pre></blockquote> * @since 1.6 */ -@jdk.Exported public class HttpsConfigurator { private SSLContext context;
--- a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpsExchange.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpsExchange.java Tue Jan 12 11:31:48 2016 -0800 @@ -39,7 +39,6 @@ * @since 1.6 */ -@jdk.Exported public abstract class HttpsExchange extends HttpExchange { protected HttpsExchange () {
--- a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpsParameters.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpsParameters.java Tue Jan 12 11:31:48 2016 -0800 @@ -49,7 +49,6 @@ * are used, and any settings made in this object are ignored. * @since 1.6 */ -@jdk.Exported public abstract class HttpsParameters { private String[] cipherSuites;
--- a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpsServer.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpsServer.java Tue Jan 12 11:31:48 2016 -0800 @@ -45,7 +45,6 @@ * @since 1.6 */ -@jdk.Exported public abstract class HttpsServer extends HttpServer { /**
--- a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/package-info.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/package-info.java Tue Jan 12 11:31:48 2016 -0800 @@ -123,5 +123,4 @@ @since 1.6 */ -@jdk.Exported package com.sun.net.httpserver;
--- a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/spi/HttpServerProvider.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/spi/HttpServerProvider.java Tue Jan 12 11:31:48 2016 -0800 @@ -40,7 +40,6 @@ * {@link HttpServer} and associated classes. Applications do not normally use * this class. See {@link #provider()} for how providers are found and loaded. */ -@jdk.Exported public abstract class HttpServerProvider { /**
--- a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/spi/package-info.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/spi/package-info.java Tue Jan 12 11:31:48 2016 -0800 @@ -27,5 +27,4 @@ * Provides a pluggable service provider interface, which allows the HTTP server * implementation to be replaced with other implementations. */ -@jdk.Exported package com.sun.net.httpserver.spi;
--- a/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSigner.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSigner.java Tue Jan 12 11:31:48 2016 -0800 @@ -38,7 +38,6 @@ * @deprecated This class has been deprecated. */ -@jdk.Exported @Deprecated public abstract class ContentSigner {
--- a/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSignerParameters.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jartool/share/classes/com/sun/jarsigner/ContentSignerParameters.java Tue Jan 12 11:31:48 2016 -0800 @@ -36,7 +36,6 @@ * @author Vincent Ryan * @deprecated This class has been deprecated. */ -@jdk.Exported @Deprecated public interface ContentSignerParameters {
--- a/src/jdk.jartool/share/classes/com/sun/jarsigner/package-info.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jartool/share/classes/com/sun/jarsigner/package-info.java Tue Jan 12 11:31:48 2016 -0800 @@ -35,5 +35,4 @@ * to sign JAR files. */ -@jdk.Exported package com.sun.jarsigner;
--- a/src/jdk.jartool/share/classes/jdk/security/jarsigner/JarSigner.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jartool/share/classes/jdk/security/jarsigner/JarSigner.java Tue Jan 12 11:31:48 2016 -0800 @@ -79,7 +79,6 @@ * * @since 1.9 */ -@jdk.Exported public final class JarSigner { /** @@ -88,7 +87,6 @@ * * @since 1.9 */ - @jdk.Exported public static class Builder { // Signer materials:
--- a/src/jdk.jartool/share/classes/jdk/security/jarsigner/JarSignerException.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jartool/share/classes/jdk/security/jarsigner/JarSignerException.java Tue Jan 12 11:31:48 2016 -0800 @@ -30,7 +30,6 @@ * * @since 1.9 */ -@jdk.Exported public class JarSignerException extends RuntimeException { private static final long serialVersionUID = -4732217075689309530L;
--- a/src/jdk.jconsole/share/classes/com/sun/tools/jconsole/JConsoleContext.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jconsole/share/classes/com/sun/tools/jconsole/JConsoleContext.java Tue Jan 12 11:31:48 2016 -0800 @@ -42,7 +42,6 @@ * * @since 1.6 */ -@jdk.Exported public interface JConsoleContext { /** * The {@link ConnectionState ConnectionState} bound property name. @@ -53,7 +52,6 @@ * Values for the {@linkplain #CONNECTION_STATE_PROPERTY * <i>ConnectionState</i>} bound property. */ - @jdk.Exported public enum ConnectionState { /** * The connection has been successfully established.
--- a/src/jdk.jconsole/share/classes/com/sun/tools/jconsole/JConsolePlugin.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jconsole/share/classes/com/sun/tools/jconsole/JConsolePlugin.java Tue Jan 12 11:31:48 2016 -0800 @@ -72,7 +72,6 @@ * * @since 1.6 */ -@jdk.Exported public abstract class JConsolePlugin { private volatile JConsoleContext context = null; private List<PropertyChangeListener> listeners = null;
--- a/src/jdk.jconsole/share/classes/com/sun/tools/jconsole/package-info.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jconsole/share/classes/com/sun/tools/jconsole/package-info.java Tue Jan 12 11:31:48 2016 -0800 @@ -29,5 +29,4 @@ * @since 1.6 */ -@jdk.Exported package com.sun.tools.jconsole;
--- a/src/jdk.jdi/share/classes/com/sun/jdi/AbsentInformationException.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/AbsentInformationException.java Tue Jan 12 11:31:48 2016 -0800 @@ -31,7 +31,6 @@ * @author Gordon Hirsch * @since 1.3 */ -@jdk.Exported public class AbsentInformationException extends Exception { private static final long serialVersionUID = 4988939309582416373L;
--- a/src/jdk.jdi/share/classes/com/sun/jdi/Accessible.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/Accessible.java Tue Jan 12 11:31:48 2016 -0800 @@ -36,7 +36,6 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface Accessible { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/ArrayReference.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/ArrayReference.java Tue Jan 12 11:31:48 2016 -0800 @@ -39,7 +39,6 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface ArrayReference extends ObjectReference { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/ArrayType.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/ArrayType.java Tue Jan 12 11:31:48 2016 -0800 @@ -38,7 +38,6 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface ArrayType extends ReferenceType { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/BooleanType.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/BooleanType.java Tue Jan 12 11:31:48 2016 -0800 @@ -35,6 +35,5 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface BooleanType extends PrimitiveType { }
--- a/src/jdk.jdi/share/classes/com/sun/jdi/BooleanValue.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/BooleanValue.java Tue Jan 12 11:31:48 2016 -0800 @@ -34,7 +34,6 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface BooleanValue extends PrimitiveValue { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/Bootstrap.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/Bootstrap.java Tue Jan 12 11:31:48 2016 -0800 @@ -34,7 +34,6 @@ * @since 1.3 */ -@jdk.Exported public class Bootstrap extends Object { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/ByteType.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/ByteType.java Tue Jan 12 11:31:48 2016 -0800 @@ -35,6 +35,5 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface ByteType extends PrimitiveType { }
--- a/src/jdk.jdi/share/classes/com/sun/jdi/ByteValue.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/ByteValue.java Tue Jan 12 11:31:48 2016 -0800 @@ -33,7 +33,6 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface ByteValue extends PrimitiveValue, Comparable<ByteValue> { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/CharType.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/CharType.java Tue Jan 12 11:31:48 2016 -0800 @@ -35,6 +35,5 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface CharType extends PrimitiveType { }
--- a/src/jdk.jdi/share/classes/com/sun/jdi/CharValue.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/CharValue.java Tue Jan 12 11:31:48 2016 -0800 @@ -34,7 +34,6 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface CharValue extends PrimitiveValue, Comparable<CharValue> { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/ClassLoaderReference.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/ClassLoaderReference.java Tue Jan 12 11:31:48 2016 -0800 @@ -39,7 +39,6 @@ * @author Gordon Hirsch * @since 1.3 */ -@jdk.Exported public interface ClassLoaderReference extends ObjectReference { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/ClassNotLoadedException.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/ClassNotLoadedException.java Tue Jan 12 11:31:48 2016 -0800 @@ -67,7 +67,6 @@ * @author Gordon Hirsch * @since 1.3 */ -@jdk.Exported public class ClassNotLoadedException extends Exception { private static final long serialVersionUID = -6242978768444298722L;
--- a/src/jdk.jdi/share/classes/com/sun/jdi/ClassNotPreparedException.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/ClassNotPreparedException.java Tue Jan 12 11:31:48 2016 -0800 @@ -32,7 +32,6 @@ * @author Gordon Hirsch * @since 1.3 */ -@jdk.Exported public class ClassNotPreparedException extends RuntimeException { private static final long serialVersionUID = -6120698967144079642L; public ClassNotPreparedException()
--- a/src/jdk.jdi/share/classes/com/sun/jdi/ClassObjectReference.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/ClassObjectReference.java Tue Jan 12 11:31:48 2016 -0800 @@ -35,7 +35,6 @@ * @author Gordon Hirsch * @since 1.3 */ -@jdk.Exported public interface ClassObjectReference extends ObjectReference { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/ClassType.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/ClassType.java Tue Jan 12 11:31:48 2016 -0800 @@ -41,7 +41,6 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface ClassType extends ReferenceType { /** * Gets the superclass of this class.
--- a/src/jdk.jdi/share/classes/com/sun/jdi/DoubleType.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/DoubleType.java Tue Jan 12 11:31:48 2016 -0800 @@ -35,6 +35,5 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface DoubleType extends PrimitiveType { }
--- a/src/jdk.jdi/share/classes/com/sun/jdi/DoubleValue.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/DoubleValue.java Tue Jan 12 11:31:48 2016 -0800 @@ -34,7 +34,6 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface DoubleValue extends PrimitiveValue, Comparable<DoubleValue> { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/Field.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/Field.java Tue Jan 12 11:31:48 2016 -0800 @@ -38,7 +38,6 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface Field extends TypeComponent, Comparable<Field> { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/FloatType.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/FloatType.java Tue Jan 12 11:31:48 2016 -0800 @@ -35,6 +35,5 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface FloatType extends PrimitiveType { }
--- a/src/jdk.jdi/share/classes/com/sun/jdi/FloatValue.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/FloatValue.java Tue Jan 12 11:31:48 2016 -0800 @@ -34,7 +34,6 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface FloatValue extends PrimitiveValue, Comparable<FloatValue> { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/IncompatibleThreadStateException.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/IncompatibleThreadStateException.java Tue Jan 12 11:31:48 2016 -0800 @@ -32,7 +32,6 @@ * @author Gordon Hirsch * @since 1.3 */ -@jdk.Exported public class IncompatibleThreadStateException extends Exception { private static final long serialVersionUID = 6199174323414551389L;
--- a/src/jdk.jdi/share/classes/com/sun/jdi/InconsistentDebugInfoException.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/InconsistentDebugInfoException.java Tue Jan 12 11:31:48 2016 -0800 @@ -34,7 +34,6 @@ * @author Gordon Hirsch * @since 1.3 */ -@jdk.Exported public class InconsistentDebugInfoException extends RuntimeException { private static final long serialVersionUID = 7964236415376861808L; public InconsistentDebugInfoException() {
--- a/src/jdk.jdi/share/classes/com/sun/jdi/IntegerType.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/IntegerType.java Tue Jan 12 11:31:48 2016 -0800 @@ -35,6 +35,5 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface IntegerType extends PrimitiveType { }
--- a/src/jdk.jdi/share/classes/com/sun/jdi/IntegerValue.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/IntegerValue.java Tue Jan 12 11:31:48 2016 -0800 @@ -34,7 +34,6 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface IntegerValue extends PrimitiveValue, Comparable<IntegerValue> { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/InterfaceType.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/InterfaceType.java Tue Jan 12 11:31:48 2016 -0800 @@ -43,7 +43,6 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface InterfaceType extends ReferenceType { /** * Gets the interfaces directly extended by this interface.
--- a/src/jdk.jdi/share/classes/com/sun/jdi/InternalException.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/InternalException.java Tue Jan 12 11:31:48 2016 -0800 @@ -32,7 +32,6 @@ * @author Gordon Hirsch * @since 1.3 */ -@jdk.Exported public class InternalException extends RuntimeException { private static final long serialVersionUID = -9171606393104480607L; private int errorCode;
--- a/src/jdk.jdi/share/classes/com/sun/jdi/InvalidCodeIndexException.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/InvalidCodeIndexException.java Tue Jan 12 11:31:48 2016 -0800 @@ -34,7 +34,6 @@ * @author Gordon Hirsch * @since 1.3 */ -@jdk.Exported @Deprecated public class InvalidCodeIndexException extends RuntimeException { private static final long serialVersionUID = 7416010225133747805L;
--- a/src/jdk.jdi/share/classes/com/sun/jdi/InvalidLineNumberException.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/InvalidLineNumberException.java Tue Jan 12 11:31:48 2016 -0800 @@ -34,7 +34,6 @@ * @author Gordon Hirsch * @since 1.3 */ -@jdk.Exported @Deprecated public class InvalidLineNumberException extends RuntimeException { private static final long serialVersionUID = 4048709912372692875L;
--- a/src/jdk.jdi/share/classes/com/sun/jdi/InvalidStackFrameException.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/InvalidStackFrameException.java Tue Jan 12 11:31:48 2016 -0800 @@ -32,7 +32,6 @@ * @author Gordon Hirsch * @since 1.3 */ -@jdk.Exported public class InvalidStackFrameException extends RuntimeException { private static final long serialVersionUID = -1919378296505827922L; public InvalidStackFrameException() {
--- a/src/jdk.jdi/share/classes/com/sun/jdi/InvalidTypeException.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/InvalidTypeException.java Tue Jan 12 11:31:48 2016 -0800 @@ -32,7 +32,6 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public class InvalidTypeException extends Exception { private static final long serialVersionUID = 2256667231949650806L;
--- a/src/jdk.jdi/share/classes/com/sun/jdi/InvocationException.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/InvocationException.java Tue Jan 12 11:31:48 2016 -0800 @@ -32,7 +32,6 @@ * @author Gordon Hirsch * @since 1.3 */ -@jdk.Exported public class InvocationException extends Exception { private static final long serialVersionUID = 6066780907971918568L; ObjectReference exception;
--- a/src/jdk.jdi/share/classes/com/sun/jdi/JDIPermission.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/JDIPermission.java Tue Jan 12 11:31:48 2016 -0800 @@ -78,7 +78,6 @@ * */ -@jdk.Exported public final class JDIPermission extends java.security.BasicPermission { private static final long serialVersionUID = -6988461416938786271L; /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/LocalVariable.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/LocalVariable.java Tue Jan 12 11:31:48 2016 -0800 @@ -42,7 +42,6 @@ * @since 1.3 */ -@jdk.Exported public interface LocalVariable extends Mirror, Comparable<LocalVariable> { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/Locatable.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/Locatable.java Tue Jan 12 11:31:48 2016 -0800 @@ -33,7 +33,6 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface Locatable { /** * Returns the {@link Location} of this mirror, if there is
--- a/src/jdk.jdi/share/classes/com/sun/jdi/Location.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/Location.java Tue Jan 12 11:31:48 2016 -0800 @@ -86,7 +86,6 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface Location extends Mirror, Comparable<Location> { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/LongType.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/LongType.java Tue Jan 12 11:31:48 2016 -0800 @@ -35,6 +35,5 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface LongType extends PrimitiveType { }
--- a/src/jdk.jdi/share/classes/com/sun/jdi/LongValue.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/LongValue.java Tue Jan 12 11:31:48 2016 -0800 @@ -34,7 +34,6 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface LongValue extends PrimitiveValue, Comparable<LongValue> { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/Method.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/Method.java Tue Jan 12 11:31:48 2016 -0800 @@ -39,7 +39,6 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface Method extends TypeComponent, Locatable, Comparable<Method> { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/Mirror.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/Mirror.java Tue Jan 12 11:31:48 2016 -0800 @@ -56,7 +56,6 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface Mirror { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/MonitorInfo.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/MonitorInfo.java Tue Jan 12 11:31:48 2016 -0800 @@ -32,7 +32,6 @@ * @since 1.6 */ -@jdk.Exported public interface MonitorInfo extends Mirror { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/NativeMethodException.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/NativeMethodException.java Tue Jan 12 11:31:48 2016 -0800 @@ -32,7 +32,6 @@ * @author Gordon Hirsch * @since 1.3 */ -@jdk.Exported public class NativeMethodException extends RuntimeException { private static final long serialVersionUID = 3924951669039469992L;
--- a/src/jdk.jdi/share/classes/com/sun/jdi/ObjectCollectedException.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/ObjectCollectedException.java Tue Jan 12 11:31:48 2016 -0800 @@ -32,7 +32,6 @@ * @author Gordon Hirsch * @since 1.3 */ -@jdk.Exported public class ObjectCollectedException extends RuntimeException { private static final long serialVersionUID = -1928428056197269588L; public ObjectCollectedException() {
--- a/src/jdk.jdi/share/classes/com/sun/jdi/ObjectReference.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/ObjectReference.java Tue Jan 12 11:31:48 2016 -0800 @@ -55,7 +55,6 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface ObjectReference extends Value { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/PathSearchingVirtualMachine.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/PathSearchingVirtualMachine.java Tue Jan 12 11:31:48 2016 -0800 @@ -33,7 +33,6 @@ * @author Gordon Hirsch * @since 1.3 */ -@jdk.Exported public interface PathSearchingVirtualMachine extends VirtualMachine { /** * Get the class path for this virtual machine.
--- a/src/jdk.jdi/share/classes/com/sun/jdi/PrimitiveType.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/PrimitiveType.java Tue Jan 12 11:31:48 2016 -0800 @@ -37,6 +37,5 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface PrimitiveType extends Type { }
--- a/src/jdk.jdi/share/classes/com/sun/jdi/PrimitiveValue.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/PrimitiveValue.java Tue Jan 12 11:31:48 2016 -0800 @@ -35,7 +35,6 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface PrimitiveValue extends Value { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/ReferenceType.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/ReferenceType.java Tue Jan 12 11:31:48 2016 -0800 @@ -77,7 +77,6 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface ReferenceType extends Type, Comparable<ReferenceType>, Accessible {
--- a/src/jdk.jdi/share/classes/com/sun/jdi/ShortType.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/ShortType.java Tue Jan 12 11:31:48 2016 -0800 @@ -35,6 +35,5 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface ShortType extends PrimitiveType { }
--- a/src/jdk.jdi/share/classes/com/sun/jdi/ShortValue.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/ShortValue.java Tue Jan 12 11:31:48 2016 -0800 @@ -34,7 +34,6 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface ShortValue extends PrimitiveValue, Comparable<ShortValue> { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/StackFrame.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/StackFrame.java Tue Jan 12 11:31:48 2016 -0800 @@ -58,7 +58,6 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface StackFrame extends Mirror, Locatable { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/StringReference.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/StringReference.java Tue Jan 12 11:31:48 2016 -0800 @@ -35,7 +35,6 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface StringReference extends ObjectReference { /** * Returns the StringReference as a String. The returned string
--- a/src/jdk.jdi/share/classes/com/sun/jdi/ThreadGroupReference.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/ThreadGroupReference.java Tue Jan 12 11:31:48 2016 -0800 @@ -37,7 +37,6 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface ThreadGroupReference extends ObjectReference { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/ThreadReference.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/ThreadReference.java Tue Jan 12 11:31:48 2016 -0800 @@ -36,7 +36,6 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface ThreadReference extends ObjectReference { /** Thread status is unknown */ public final int THREAD_STATUS_UNKNOWN =-1;
--- a/src/jdk.jdi/share/classes/com/sun/jdi/Type.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/Type.java Tue Jan 12 11:31:48 2016 -0800 @@ -127,7 +127,6 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface Type extends Mirror { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/TypeComponent.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/TypeComponent.java Tue Jan 12 11:31:48 2016 -0800 @@ -44,7 +44,6 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface TypeComponent extends Mirror, Accessible { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/VMCannotBeModifiedException.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/VMCannotBeModifiedException.java Tue Jan 12 11:31:48 2016 -0800 @@ -32,7 +32,6 @@ * @author Jim Holmlund * @since 1.5 */ -@jdk.Exported public class VMCannotBeModifiedException extends UnsupportedOperationException { private static final long serialVersionUID = -4063879815130164009L; public VMCannotBeModifiedException() {
--- a/src/jdk.jdi/share/classes/com/sun/jdi/VMDisconnectedException.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/VMDisconnectedException.java Tue Jan 12 11:31:48 2016 -0800 @@ -33,7 +33,6 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public class VMDisconnectedException extends RuntimeException { private static final long serialVersionUID = 2892975269768351637L;
--- a/src/jdk.jdi/share/classes/com/sun/jdi/VMMismatchException.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/VMMismatchException.java Tue Jan 12 11:31:48 2016 -0800 @@ -33,7 +33,6 @@ * @author Gordon Hirsch * @since 1.3 */ -@jdk.Exported public class VMMismatchException extends RuntimeException { private static final long serialVersionUID = 289169358790459564L; public VMMismatchException() {
--- a/src/jdk.jdi/share/classes/com/sun/jdi/VMOutOfMemoryException.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/VMOutOfMemoryException.java Tue Jan 12 11:31:48 2016 -0800 @@ -32,7 +32,6 @@ * @author Gordon Hirsch * @since 1.3 */ -@jdk.Exported public class VMOutOfMemoryException extends RuntimeException { private static final long serialVersionUID = 71504228548910686L; public VMOutOfMemoryException() {
--- a/src/jdk.jdi/share/classes/com/sun/jdi/Value.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/Value.java Tue Jan 12 11:31:48 2016 -0800 @@ -168,7 +168,6 @@ * @since 1.3 */ -@jdk.Exported public interface Value extends Mirror { /** * Returns the run-time type of this value.
--- a/src/jdk.jdi/share/classes/com/sun/jdi/VirtualMachine.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/VirtualMachine.java Tue Jan 12 11:31:48 2016 -0800 @@ -70,7 +70,6 @@ * @author James McIlree * @since 1.3 */ -@jdk.Exported public interface VirtualMachine extends Mirror { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/VirtualMachineManager.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/VirtualMachineManager.java Tue Jan 12 11:31:48 2016 -0800 @@ -275,7 +275,6 @@ * @author Gordon Hirsch * @since 1.3 */ -@jdk.Exported public interface VirtualMachineManager { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/VoidType.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/VoidType.java Tue Jan 12 11:31:48 2016 -0800 @@ -35,6 +35,5 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public interface VoidType extends Type { }
--- a/src/jdk.jdi/share/classes/com/sun/jdi/VoidValue.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/VoidValue.java Tue Jan 12 11:31:48 2016 -0800 @@ -32,7 +32,6 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public interface VoidValue extends Value { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/connect/AttachingConnector.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/connect/AttachingConnector.java Tue Jan 12 11:31:48 2016 -0800 @@ -35,7 +35,6 @@ * @author Gordon Hirsch * @since 1.3 */ -@jdk.Exported public interface AttachingConnector extends Connector { /** * Attaches to a running application and returns a
--- a/src/jdk.jdi/share/classes/com/sun/jdi/connect/Connector.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/connect/Connector.java Tue Jan 12 11:31:48 2016 -0800 @@ -45,7 +45,6 @@ * @author Gordon Hirsch * @since 1.3 */ -@jdk.Exported public interface Connector { /** * Returns a short identifier for the connector. Connector implementors @@ -92,7 +91,6 @@ * {@link Connector.IntegerArgument}, * or {@link Connector.SelectedArgument}. */ - @jdk.Exported public interface Argument extends Serializable { /** * Returns a short, unique identifier for the argument. @@ -158,7 +156,6 @@ * whose value is Boolean. Boolean values are represented * by the localized versions of the strings "true" and "false". */ - @jdk.Exported public interface BooleanArgument extends Argument { /** * Sets the value of the argument. @@ -199,7 +196,6 @@ * whose value is an integer. Integer values are represented * by their corresponding strings. */ - @jdk.Exported public interface IntegerArgument extends Argument { /** * Sets the value of the argument. @@ -261,7 +257,6 @@ * Specification for and value of a Connector argument, * whose value is a String. */ - @jdk.Exported public interface StringArgument extends Argument { /** * Performs basic sanity check of argument. @@ -274,7 +269,6 @@ * Specification for and value of a Connector argument, * whose value is a String selected from a list of choices. */ - @jdk.Exported public interface SelectedArgument extends Argument { /** * Return the possible values for the argument
--- a/src/jdk.jdi/share/classes/com/sun/jdi/connect/IllegalConnectorArgumentsException.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/connect/IllegalConnectorArgumentsException.java Tue Jan 12 11:31:48 2016 -0800 @@ -36,7 +36,6 @@ * @author Gordon Hirsch * @since 1.3 */ -@jdk.Exported public class IllegalConnectorArgumentsException extends Exception { private static final long serialVersionUID = -3042212603611350941L;
--- a/src/jdk.jdi/share/classes/com/sun/jdi/connect/LaunchingConnector.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/connect/LaunchingConnector.java Tue Jan 12 11:31:48 2016 -0800 @@ -35,7 +35,6 @@ * @author Gordon Hirsch * @since 1.3 */ -@jdk.Exported public interface LaunchingConnector extends Connector { /** * Launches an application and connects to its VM. Properties
--- a/src/jdk.jdi/share/classes/com/sun/jdi/connect/ListeningConnector.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/connect/ListeningConnector.java Tue Jan 12 11:31:48 2016 -0800 @@ -35,7 +35,6 @@ * @author Gordon Hirsch * @since 1.3 */ -@jdk.Exported public interface ListeningConnector extends Connector { /** * Indicates whether this listening connector supports multiple
--- a/src/jdk.jdi/share/classes/com/sun/jdi/connect/Transport.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/connect/Transport.java Tue Jan 12 11:31:48 2016 -0800 @@ -42,7 +42,6 @@ * @author Gordon Hirsch * @since 1.3 */ -@jdk.Exported public interface Transport { /** * Returns a short identifier for the transport.
--- a/src/jdk.jdi/share/classes/com/sun/jdi/connect/TransportTimeoutException.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/connect/TransportTimeoutException.java Tue Jan 12 11:31:48 2016 -0800 @@ -54,7 +54,6 @@ * * @since 1.5 */ -@jdk.Exported public class TransportTimeoutException extends java.io.IOException { private static final long serialVersionUID = 4107035242623365074L; /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/connect/VMStartException.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/connect/VMStartException.java Tue Jan 12 11:31:48 2016 -0800 @@ -34,7 +34,6 @@ * @author Gordon Hirsch * @since 1.3 */ -@jdk.Exported public class VMStartException extends Exception { private static final long serialVersionUID = 6408644824640801020L;
--- a/src/jdk.jdi/share/classes/com/sun/jdi/connect/package-info.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/connect/package-info.java Tue Jan 12 11:31:48 2016 -0800 @@ -35,5 +35,4 @@ * extension. */ -@jdk.Exported package com.sun.jdi.connect;
--- a/src/jdk.jdi/share/classes/com/sun/jdi/connect/spi/ClosedConnectionException.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/connect/spi/ClosedConnectionException.java Tue Jan 12 11:31:48 2016 -0800 @@ -45,7 +45,6 @@ * * @since 1.5 */ -@jdk.Exported public class ClosedConnectionException extends java.io.IOException { private static final long serialVersionUID = 3877032124297204774L; /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/connect/spi/Connection.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/connect/spi/Connection.java Tue Jan 12 11:31:48 2016 -0800 @@ -56,7 +56,6 @@ * @since 1.5 */ -@jdk.Exported public abstract class Connection { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/connect/spi/TransportService.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/connect/spi/TransportService.java Tue Jan 12 11:31:48 2016 -0800 @@ -77,7 +77,6 @@ * @since 1.5 */ -@jdk.Exported public abstract class TransportService { /** @@ -97,7 +96,6 @@ /** * The transport service capabilities. */ - @jdk.Exported public static abstract class Capabilities { /** @@ -231,7 +229,6 @@ * #stopListening stopListening} to stop the transport * service from listening on an address. */ - @jdk.Exported public static abstract class ListenKey { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/connect/spi/package-info.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/connect/spi/package-info.java Tue Jan 12 11:31:48 2016 -0800 @@ -29,5 +29,4 @@ * implementations. */ -@jdk.Exported package com.sun.jdi.connect.spi;
--- a/src/jdk.jdi/share/classes/com/sun/jdi/event/AccessWatchpointEvent.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/event/AccessWatchpointEvent.java Tue Jan 12 11:31:48 2016 -0800 @@ -37,6 +37,5 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public interface AccessWatchpointEvent extends WatchpointEvent { }
--- a/src/jdk.jdi/share/classes/com/sun/jdi/event/BreakpointEvent.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/event/BreakpointEvent.java Tue Jan 12 11:31:48 2016 -0800 @@ -47,6 +47,5 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public interface BreakpointEvent extends LocatableEvent { }
--- a/src/jdk.jdi/share/classes/com/sun/jdi/event/ClassPrepareEvent.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/event/ClassPrepareEvent.java Tue Jan 12 11:31:48 2016 -0800 @@ -39,7 +39,6 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public interface ClassPrepareEvent extends Event { /** * Returns the thread in which this event has occurred.
--- a/src/jdk.jdi/share/classes/com/sun/jdi/event/ClassUnloadEvent.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/event/ClassUnloadEvent.java Tue Jan 12 11:31:48 2016 -0800 @@ -39,7 +39,6 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public interface ClassUnloadEvent extends Event { /** * Returns the name of the class that has been unloaded.
--- a/src/jdk.jdi/share/classes/com/sun/jdi/event/Event.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/event/Event.java Tue Jan 12 11:31:48 2016 -0800 @@ -43,7 +43,6 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public interface Event extends Mirror { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/event/EventIterator.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/event/EventIterator.java Tue Jan 12 11:31:48 2016 -0800 @@ -40,7 +40,6 @@ * @since 1.3 */ -@jdk.Exported public interface EventIterator extends Iterator<Event> { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/event/EventQueue.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/event/EventQueue.java Tue Jan 12 11:31:48 2016 -0800 @@ -57,7 +57,6 @@ * @since 1.3 */ -@jdk.Exported public interface EventQueue extends Mirror { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/event/EventSet.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/event/EventSet.java Tue Jan 12 11:31:48 2016 -0800 @@ -126,7 +126,6 @@ * @since 1.3 */ -@jdk.Exported public interface EventSet extends Mirror, Set<Event> { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/event/ExceptionEvent.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/event/ExceptionEvent.java Tue Jan 12 11:31:48 2016 -0800 @@ -44,7 +44,6 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public interface ExceptionEvent extends LocatableEvent { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/event/LocatableEvent.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/event/LocatableEvent.java Tue Jan 12 11:31:48 2016 -0800 @@ -36,7 +36,6 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public interface LocatableEvent extends Event, Locatable { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/event/MethodEntryEvent.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/event/MethodEntryEvent.java Tue Jan 12 11:31:48 2016 -0800 @@ -43,7 +43,6 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public interface MethodEntryEvent extends LocatableEvent { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/event/MethodExitEvent.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/event/MethodExitEvent.java Tue Jan 12 11:31:48 2016 -0800 @@ -40,7 +40,6 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public interface MethodExitEvent extends LocatableEvent { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/event/ModificationWatchpointEvent.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/event/ModificationWatchpointEvent.java Tue Jan 12 11:31:48 2016 -0800 @@ -38,7 +38,6 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public interface ModificationWatchpointEvent extends WatchpointEvent { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorContendedEnterEvent.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorContendedEnterEvent.java Tue Jan 12 11:31:48 2016 -0800 @@ -39,7 +39,6 @@ * @author Swamy Venkataramanappa * @since 1.6 */ -@jdk.Exported public interface MonitorContendedEnterEvent extends LocatableEvent { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorContendedEnteredEvent.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorContendedEnteredEvent.java Tue Jan 12 11:31:48 2016 -0800 @@ -38,7 +38,6 @@ * @author Swamy Venkataramanappa * @since 1.6 */ -@jdk.Exported public interface MonitorContendedEnteredEvent extends LocatableEvent { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorWaitEvent.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorWaitEvent.java Tue Jan 12 11:31:48 2016 -0800 @@ -37,7 +37,6 @@ * @author Swamy Venkataramanappa * @since 1.6 */ -@jdk.Exported public interface MonitorWaitEvent extends LocatableEvent { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorWaitedEvent.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorWaitedEvent.java Tue Jan 12 11:31:48 2016 -0800 @@ -37,7 +37,6 @@ * @author Swamy Venkataramanappa * @since 1.6 */ -@jdk.Exported public interface MonitorWaitedEvent extends LocatableEvent { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/event/StepEvent.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/event/StepEvent.java Tue Jan 12 11:31:48 2016 -0800 @@ -46,6 +46,5 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public interface StepEvent extends LocatableEvent { }
--- a/src/jdk.jdi/share/classes/com/sun/jdi/event/ThreadDeathEvent.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/event/ThreadDeathEvent.java Tue Jan 12 11:31:48 2016 -0800 @@ -45,7 +45,6 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public interface ThreadDeathEvent extends Event { /** * Returns the thread which is terminating.
--- a/src/jdk.jdi/share/classes/com/sun/jdi/event/ThreadStartEvent.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/event/ThreadStartEvent.java Tue Jan 12 11:31:48 2016 -0800 @@ -52,7 +52,6 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public interface ThreadStartEvent extends Event { /** * Returns the thread which has started.
--- a/src/jdk.jdi/share/classes/com/sun/jdi/event/VMDeathEvent.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/event/VMDeathEvent.java Tue Jan 12 11:31:48 2016 -0800 @@ -68,6 +68,5 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public interface VMDeathEvent extends Event { }
--- a/src/jdk.jdi/share/classes/com/sun/jdi/event/VMDisconnectEvent.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/event/VMDisconnectEvent.java Tue Jan 12 11:31:48 2016 -0800 @@ -52,6 +52,5 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public interface VMDisconnectEvent extends Event { }
--- a/src/jdk.jdi/share/classes/com/sun/jdi/event/VMStartEvent.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/event/VMStartEvent.java Tue Jan 12 11:31:48 2016 -0800 @@ -43,7 +43,6 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public interface VMStartEvent extends Event { /** * Returns the initial thread of the VM which has started.
--- a/src/jdk.jdi/share/classes/com/sun/jdi/event/WatchpointEvent.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/event/WatchpointEvent.java Tue Jan 12 11:31:48 2016 -0800 @@ -37,7 +37,6 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public interface WatchpointEvent extends LocatableEvent { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/event/package-info.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/event/package-info.java Tue Jan 12 11:31:48 2016 -0800 @@ -43,5 +43,4 @@ * extension. */ -@jdk.Exported package com.sun.jdi.event;
--- a/src/jdk.jdi/share/classes/com/sun/jdi/package-info.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/package-info.java Tue Jan 12 11:31:48 2016 -0800 @@ -44,5 +44,4 @@ * extension. */ -@jdk.Exported package com.sun.jdi;
--- a/src/jdk.jdi/share/classes/com/sun/jdi/request/AccessWatchpointRequest.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/request/AccessWatchpointRequest.java Tue Jan 12 11:31:48 2016 -0800 @@ -55,6 +55,5 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public interface AccessWatchpointRequest extends WatchpointRequest { }
--- a/src/jdk.jdi/share/classes/com/sun/jdi/request/BreakpointRequest.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/request/BreakpointRequest.java Tue Jan 12 11:31:48 2016 -0800 @@ -46,7 +46,6 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public interface BreakpointRequest extends EventRequest, Locatable { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/request/ClassPrepareRequest.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/request/ClassPrepareRequest.java Tue Jan 12 11:31:48 2016 -0800 @@ -47,7 +47,6 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public interface ClassPrepareRequest extends EventRequest { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/request/ClassUnloadRequest.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/request/ClassUnloadRequest.java Tue Jan 12 11:31:48 2016 -0800 @@ -46,7 +46,6 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public interface ClassUnloadRequest extends EventRequest { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/request/DuplicateRequestException.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/request/DuplicateRequestException.java Tue Jan 12 11:31:48 2016 -0800 @@ -31,7 +31,6 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public class DuplicateRequestException extends RuntimeException { private static final long serialVersionUID = -3719784920313411060L;
--- a/src/jdk.jdi/share/classes/com/sun/jdi/request/EventRequest.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/request/EventRequest.java Tue Jan 12 11:31:48 2016 -0800 @@ -78,7 +78,6 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public interface EventRequest extends Mirror { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/request/EventRequestManager.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/request/EventRequestManager.java Tue Jan 12 11:31:48 2016 -0800 @@ -44,7 +44,6 @@ * @since 1.3 */ -@jdk.Exported public interface EventRequestManager extends Mirror { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/request/ExceptionRequest.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/request/ExceptionRequest.java Tue Jan 12 11:31:48 2016 -0800 @@ -43,7 +43,6 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public interface ExceptionRequest extends EventRequest { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/request/InvalidRequestStateException.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/request/InvalidRequestStateException.java Tue Jan 12 11:31:48 2016 -0800 @@ -35,7 +35,6 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public class InvalidRequestStateException extends RuntimeException { private static final long serialVersionUID = -3774632428543322148L; public InvalidRequestStateException()
--- a/src/jdk.jdi/share/classes/com/sun/jdi/request/MethodEntryRequest.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/request/MethodEntryRequest.java Tue Jan 12 11:31:48 2016 -0800 @@ -44,7 +44,6 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public interface MethodEntryRequest extends EventRequest { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/request/MethodExitRequest.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/request/MethodExitRequest.java Tue Jan 12 11:31:48 2016 -0800 @@ -44,7 +44,6 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public interface MethodExitRequest extends EventRequest { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/request/ModificationWatchpointRequest.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/request/ModificationWatchpointRequest.java Tue Jan 12 11:31:48 2016 -0800 @@ -55,6 +55,5 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public interface ModificationWatchpointRequest extends WatchpointRequest { }
--- a/src/jdk.jdi/share/classes/com/sun/jdi/request/MonitorContendedEnterRequest.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/request/MonitorContendedEnterRequest.java Tue Jan 12 11:31:48 2016 -0800 @@ -45,7 +45,6 @@ * @author Swamy Venkataramanappa * @since 1.6 */ -@jdk.Exported public interface MonitorContendedEnterRequest extends EventRequest { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/request/MonitorContendedEnteredRequest.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/request/MonitorContendedEnteredRequest.java Tue Jan 12 11:31:48 2016 -0800 @@ -45,7 +45,6 @@ * @author Swamy Venkataramanappa * @since 1.6 */ -@jdk.Exported public interface MonitorContendedEnteredRequest extends EventRequest { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/request/MonitorWaitRequest.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/request/MonitorWaitRequest.java Tue Jan 12 11:31:48 2016 -0800 @@ -45,7 +45,6 @@ * @author Swamy Venkataramanappa * @since 1.6 */ -@jdk.Exported public interface MonitorWaitRequest extends EventRequest { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/request/MonitorWaitedRequest.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/request/MonitorWaitedRequest.java Tue Jan 12 11:31:48 2016 -0800 @@ -45,7 +45,6 @@ * @author Swamy Venkataramanappa * @since 1.6 */ -@jdk.Exported public interface MonitorWaitedRequest extends EventRequest { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/request/StepRequest.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/request/StepRequest.java Tue Jan 12 11:31:48 2016 -0800 @@ -43,7 +43,6 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public interface StepRequest extends EventRequest { /** Step into any newly pushed frames */
--- a/src/jdk.jdi/share/classes/com/sun/jdi/request/ThreadDeathRequest.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/request/ThreadDeathRequest.java Tue Jan 12 11:31:48 2016 -0800 @@ -44,7 +44,6 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public interface ThreadDeathRequest extends EventRequest { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/request/ThreadStartRequest.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/request/ThreadStartRequest.java Tue Jan 12 11:31:48 2016 -0800 @@ -44,7 +44,6 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public interface ThreadStartRequest extends EventRequest { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/request/VMDeathRequest.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/request/VMDeathRequest.java Tue Jan 12 11:31:48 2016 -0800 @@ -56,7 +56,6 @@ * @author Robert Field * @since 1.4 */ -@jdk.Exported public interface VMDeathRequest extends EventRequest { }
--- a/src/jdk.jdi/share/classes/com/sun/jdi/request/WatchpointRequest.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/request/WatchpointRequest.java Tue Jan 12 11:31:48 2016 -0800 @@ -38,7 +38,6 @@ * @author Robert Field * @since 1.3 */ -@jdk.Exported public interface WatchpointRequest extends EventRequest { /**
--- a/src/jdk.jdi/share/classes/com/sun/jdi/request/package-info.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.jdi/share/classes/com/sun/jdi/request/package-info.java Tue Jan 12 11:31:48 2016 -0800 @@ -42,5 +42,4 @@ * extension. */ -@jdk.Exported package com.sun.jdi.request;
--- a/src/jdk.management/share/classes/com/sun/management/GarbageCollectionNotificationInfo.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.management/share/classes/com/sun/management/GarbageCollectionNotificationInfo.java Tue Jan 12 11:31:48 2016 -0800 @@ -82,7 +82,6 @@ * </ul> **/ -@jdk.Exported public class GarbageCollectionNotificationInfo implements CompositeDataView { private final String gcName;
--- a/src/jdk.management/share/classes/com/sun/management/GarbageCollectorMXBean.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.management/share/classes/com/sun/management/GarbageCollectorMXBean.java Tue Jan 12 11:31:48 2016 -0800 @@ -37,7 +37,6 @@ * @author Mandy Chung * @since 1.5 */ -@jdk.Exported public interface GarbageCollectorMXBean extends java.lang.management.GarbageCollectorMXBean {
--- a/src/jdk.management/share/classes/com/sun/management/GcInfo.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.management/share/classes/com/sun/management/GcInfo.java Tue Jan 12 11:31:48 2016 -0800 @@ -63,7 +63,6 @@ * @author Mandy Chung * @since 1.5 */ -@jdk.Exported public class GcInfo implements CompositeData, CompositeDataView { private final long index; private final long startTime;
--- a/src/jdk.management/share/classes/com/sun/management/HotSpotDiagnosticMXBean.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.management/share/classes/com/sun/management/HotSpotDiagnosticMXBean.java Tue Jan 12 11:31:48 2016 -0800 @@ -47,7 +47,6 @@ * * @see java.lang.management.ManagementFactory#getPlatformMXBeans(Class) */ -@jdk.Exported public interface HotSpotDiagnosticMXBean extends PlatformManagedObject { /** * Dumps the heap to the {@code outputFile} file in the same
--- a/src/jdk.management/share/classes/com/sun/management/OperatingSystemMXBean.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.management/share/classes/com/sun/management/OperatingSystemMXBean.java Tue Jan 12 11:31:48 2016 -0800 @@ -39,7 +39,6 @@ * @author Mandy Chung * @since 1.5 */ -@jdk.Exported public interface OperatingSystemMXBean extends java.lang.management.OperatingSystemMXBean {
--- a/src/jdk.management/share/classes/com/sun/management/ThreadMXBean.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.management/share/classes/com/sun/management/ThreadMXBean.java Tue Jan 12 11:31:48 2016 -0800 @@ -38,7 +38,6 @@ * @since 6u25 */ -@jdk.Exported public interface ThreadMXBean extends java.lang.management.ThreadMXBean { /** * Returns the total CPU time for each thread whose ID is
--- a/src/jdk.management/share/classes/com/sun/management/UnixOperatingSystemMXBean.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.management/share/classes/com/sun/management/UnixOperatingSystemMXBean.java Tue Jan 12 11:31:48 2016 -0800 @@ -32,7 +32,6 @@ * @author Mandy Chung * @since 1.5 */ -@jdk.Exported public interface UnixOperatingSystemMXBean extends com.sun.management.OperatingSystemMXBean {
--- a/src/jdk.management/share/classes/com/sun/management/VMOption.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.management/share/classes/com/sun/management/VMOption.java Tue Jan 12 11:31:48 2016 -0800 @@ -52,7 +52,6 @@ * @author Mandy Chung * @since 1.6 */ -@jdk.Exported public class VMOption { private String name; private String value; @@ -65,7 +64,6 @@ * * @since 1.6 */ - @jdk.Exported public enum Origin { /** * The VM option has not been set and its value
--- a/src/jdk.management/share/classes/com/sun/management/package-info.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.management/share/classes/com/sun/management/package-info.java Tue Jan 12 11:31:48 2016 -0800 @@ -40,5 +40,4 @@ * @since 1.5 */ -@jdk.Exported package com.sun.management;
--- a/src/jdk.sctp/share/classes/com/sun/nio/sctp/AbstractNotificationHandler.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.sctp/share/classes/com/sun/nio/sctp/AbstractNotificationHandler.java Tue Jan 12 11:31:48 2016 -0800 @@ -39,7 +39,6 @@ * * @since 1.7 */ -@jdk.Exported public class AbstractNotificationHandler<T> implements NotificationHandler<T> {
--- a/src/jdk.sctp/share/classes/com/sun/nio/sctp/Association.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.sctp/share/classes/com/sun/nio/sctp/Association.java Tue Jan 12 11:31:48 2016 -0800 @@ -51,7 +51,6 @@ * * @since 1.7 */ -@jdk.Exported public class Association { private final int associationID; private final int maxInStreams;
--- a/src/jdk.sctp/share/classes/com/sun/nio/sctp/AssociationChangeNotification.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.sctp/share/classes/com/sun/nio/sctp/AssociationChangeNotification.java Tue Jan 12 11:31:48 2016 -0800 @@ -29,7 +29,6 @@ * * @since 1.7 */ -@jdk.Exported public abstract class AssociationChangeNotification implements Notification { @@ -38,7 +37,6 @@ * * @since 1.7 */ - @jdk.Exported public enum AssocChangeEvent { /**
--- a/src/jdk.sctp/share/classes/com/sun/nio/sctp/HandlerResult.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.sctp/share/classes/com/sun/nio/sctp/HandlerResult.java Tue Jan 12 11:31:48 2016 -0800 @@ -34,7 +34,6 @@ * * @since 1.7 */ -@jdk.Exported public enum HandlerResult { /** * Try to receieve another message or notification.
--- a/src/jdk.sctp/share/classes/com/sun/nio/sctp/IllegalReceiveException.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.sctp/share/classes/com/sun/nio/sctp/IllegalReceiveException.java Tue Jan 12 11:31:48 2016 -0800 @@ -31,7 +31,6 @@ * * @since 1.7 */ -@jdk.Exported public class IllegalReceiveException extends IllegalStateException { private static final long serialVersionUID = 2296619040988576224L;
--- a/src/jdk.sctp/share/classes/com/sun/nio/sctp/IllegalUnbindException.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.sctp/share/classes/com/sun/nio/sctp/IllegalUnbindException.java Tue Jan 12 11:31:48 2016 -0800 @@ -31,7 +31,6 @@ * * @since 1.7 */ -@jdk.Exported public class IllegalUnbindException extends IllegalStateException { private static final long serialVersionUID = -310540883995532224L;
--- a/src/jdk.sctp/share/classes/com/sun/nio/sctp/InvalidStreamException.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.sctp/share/classes/com/sun/nio/sctp/InvalidStreamException.java Tue Jan 12 11:31:48 2016 -0800 @@ -30,7 +30,6 @@ * * @since 1.7 */ -@jdk.Exported public class InvalidStreamException extends IllegalArgumentException { private static final long serialVersionUID = -9172703378046665558L;
--- a/src/jdk.sctp/share/classes/com/sun/nio/sctp/MessageInfo.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.sctp/share/classes/com/sun/nio/sctp/MessageInfo.java Tue Jan 12 11:31:48 2016 -0800 @@ -56,7 +56,6 @@ * * @since 1.7 */ -@jdk.Exported public abstract class MessageInfo { /** * Initializes a new instance of this class.
--- a/src/jdk.sctp/share/classes/com/sun/nio/sctp/Notification.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.sctp/share/classes/com/sun/nio/sctp/Notification.java Tue Jan 12 11:31:48 2016 -0800 @@ -37,7 +37,6 @@ * * @since 1.7 */ -@jdk.Exported public interface Notification { /** * Returns the association that this notification is applicable to.
--- a/src/jdk.sctp/share/classes/com/sun/nio/sctp/NotificationHandler.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.sctp/share/classes/com/sun/nio/sctp/NotificationHandler.java Tue Jan 12 11:31:48 2016 -0800 @@ -49,7 +49,6 @@ * * @since 1.7 */ -@jdk.Exported public interface NotificationHandler<T> { /** * Invoked when a notification is received from the SCTP stack.
--- a/src/jdk.sctp/share/classes/com/sun/nio/sctp/PeerAddressChangeNotification.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.sctp/share/classes/com/sun/nio/sctp/PeerAddressChangeNotification.java Tue Jan 12 11:31:48 2016 -0800 @@ -32,7 +32,6 @@ * * @since 1.7 */ -@jdk.Exported public abstract class PeerAddressChangeNotification implements Notification { @@ -47,7 +46,6 @@ * * @since 1.7 */ - @jdk.Exported public enum AddressChangeEvent { /** * This address is now reachable.
--- a/src/jdk.sctp/share/classes/com/sun/nio/sctp/SctpChannel.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.sctp/share/classes/com/sun/nio/sctp/SctpChannel.java Tue Jan 12 11:31:48 2016 -0800 @@ -134,7 +134,6 @@ * * @since 1.7 */ -@jdk.Exported public abstract class SctpChannel extends AbstractSelectableChannel {
--- a/src/jdk.sctp/share/classes/com/sun/nio/sctp/SctpMultiChannel.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.sctp/share/classes/com/sun/nio/sctp/SctpMultiChannel.java Tue Jan 12 11:31:48 2016 -0800 @@ -134,7 +134,6 @@ * * @since 1.7 */ -@jdk.Exported public abstract class SctpMultiChannel extends AbstractSelectableChannel {
--- a/src/jdk.sctp/share/classes/com/sun/nio/sctp/SctpServerChannel.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.sctp/share/classes/com/sun/nio/sctp/SctpServerChannel.java Tue Jan 12 11:31:48 2016 -0800 @@ -68,7 +68,6 @@ * * @since 1.7 */ -@jdk.Exported public abstract class SctpServerChannel extends AbstractSelectableChannel {
--- a/src/jdk.sctp/share/classes/com/sun/nio/sctp/SctpSocketOption.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.sctp/share/classes/com/sun/nio/sctp/SctpSocketOption.java Tue Jan 12 11:31:48 2016 -0800 @@ -35,5 +35,4 @@ * * @see SctpStandardSocketOptions */ -@jdk.Exported public interface SctpSocketOption<T> extends SocketOption<T> { }
--- a/src/jdk.sctp/share/classes/com/sun/nio/sctp/SctpStandardSocketOptions.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.sctp/share/classes/com/sun/nio/sctp/SctpStandardSocketOptions.java Tue Jan 12 11:31:48 2016 -0800 @@ -34,7 +34,6 @@ * * @since 1.7 */ -@jdk.Exported public class SctpStandardSocketOptions { private SctpStandardSocketOptions() {} /** @@ -316,7 +315,6 @@ * * @since 1.7 */ - @jdk.Exported public static class InitMaxStreams { private int maxInStreams; private int maxOutStreams;
--- a/src/jdk.sctp/share/classes/com/sun/nio/sctp/SendFailedNotification.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.sctp/share/classes/com/sun/nio/sctp/SendFailedNotification.java Tue Jan 12 11:31:48 2016 -0800 @@ -37,7 +37,6 @@ * * @since 1.7 */ -@jdk.Exported public abstract class SendFailedNotification implements Notification { /** * Initializes a new instance of this class.
--- a/src/jdk.sctp/share/classes/com/sun/nio/sctp/ShutdownNotification.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.sctp/share/classes/com/sun/nio/sctp/ShutdownNotification.java Tue Jan 12 11:31:48 2016 -0800 @@ -32,7 +32,6 @@ * * @since 1.7 */ -@jdk.Exported public abstract class ShutdownNotification implements Notification { /** * Initializes a new instance of this class.
--- a/src/jdk.sctp/share/classes/com/sun/nio/sctp/package-info.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.sctp/share/classes/com/sun/nio/sctp/package-info.java Tue Jan 12 11:31:48 2016 -0800 @@ -72,5 +72,4 @@ * @since 1.7 */ -@jdk.Exported package com.sun.nio.sctp;
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/LdapPrincipal.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/LdapPrincipal.java Tue Jan 12 11:31:48 2016 -0800 @@ -45,7 +45,6 @@ * * @since 1.6 */ -@jdk.Exported public final class LdapPrincipal implements Principal, java.io.Serializable { private static final long serialVersionUID = 6820120005580754861L;
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/NTDomainPrincipal.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/NTDomainPrincipal.java Tue Jan 12 11:31:48 2016 -0800 @@ -45,7 +45,6 @@ * @see java.security.Principal * @see javax.security.auth.Subject */ -@jdk.Exported public class NTDomainPrincipal implements Principal, java.io.Serializable { private static final long serialVersionUID = -4408637351440771220L;
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/NTNumericCredential.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/NTNumericCredential.java Tue Jan 12 11:31:48 2016 -0800 @@ -30,7 +30,6 @@ * and provides a mechanism to do same-process security impersonation. */ -@jdk.Exported public class NTNumericCredential { private long impersonationToken;
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSid.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSid.java Tue Jan 12 11:31:48 2016 -0800 @@ -47,7 +47,6 @@ * @see java.security.Principal * @see javax.security.auth.Subject */ -@jdk.Exported public class NTSid implements Principal, java.io.Serializable { private static final long serialVersionUID = 4412290580770249885L;
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidDomainPrincipal.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidDomainPrincipal.java Tue Jan 12 11:31:48 2016 -0800 @@ -43,7 +43,6 @@ * @see java.security.Principal * @see javax.security.auth.Subject */ -@jdk.Exported public class NTSidDomainPrincipal extends NTSid { private static final long serialVersionUID = 5247810785821650912L;
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidGroupPrincipal.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidGroupPrincipal.java Tue Jan 12 11:31:48 2016 -0800 @@ -40,7 +40,6 @@ * @see javax.security.auth.Subject * @see com.sun.security.auth.NTSid */ -@jdk.Exported public class NTSidGroupPrincipal extends NTSid { private static final long serialVersionUID = -1373347438636198229L;
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidPrimaryGroupPrincipal.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidPrimaryGroupPrincipal.java Tue Jan 12 11:31:48 2016 -0800 @@ -39,7 +39,6 @@ * @see java.security.Principal * @see javax.security.auth.Subject */ -@jdk.Exported public class NTSidPrimaryGroupPrincipal extends NTSid { private static final long serialVersionUID = 8011978367305190527L;
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidUserPrincipal.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidUserPrincipal.java Tue Jan 12 11:31:48 2016 -0800 @@ -39,7 +39,6 @@ * @see java.security.Principal * @see javax.security.auth.Subject */ -@jdk.Exported public class NTSidUserPrincipal extends NTSid { private static final long serialVersionUID = -5573239889517749525L;
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/NTUserPrincipal.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/NTUserPrincipal.java Tue Jan 12 11:31:48 2016 -0800 @@ -41,7 +41,6 @@ * @see java.security.Principal * @see javax.security.auth.Subject */ -@jdk.Exported public class NTUserPrincipal implements Principal, java.io.Serializable { private static final long serialVersionUID = -8737649811939033735L;
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/PolicyFile.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/PolicyFile.java Tue Jan 12 11:31:48 2016 -0800 @@ -215,7 +215,6 @@ * @see java.security.ProtectionDomain * @see java.security.Security security properties */ -@jdk.Exported(false) @Deprecated public class PolicyFile extends javax.security.auth.Policy {
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/PrincipalComparator.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/PrincipalComparator.java Tue Jan 12 11:31:48 2016 -0800 @@ -50,7 +50,6 @@ * @see java.security.Principal * @see javax.security.auth.Subject */ -@jdk.Exported public interface PrincipalComparator { /** * Check if the specified {@code Subject} is implied by
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisNumericGroupPrincipal.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisNumericGroupPrincipal.java Tue Jan 12 11:31:48 2016 -0800 @@ -45,7 +45,6 @@ * @see java.security.Principal * @see javax.security.auth.Subject */ -@jdk.Exported(false) @Deprecated public class SolarisNumericGroupPrincipal implements Principal,
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisNumericUserPrincipal.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisNumericUserPrincipal.java Tue Jan 12 11:31:48 2016 -0800 @@ -44,7 +44,6 @@ * @see java.security.Principal * @see javax.security.auth.Subject */ -@jdk.Exported(false) @Deprecated public class SolarisNumericUserPrincipal implements Principal,
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisPrincipal.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisPrincipal.java Tue Jan 12 11:31:48 2016 -0800 @@ -44,7 +44,6 @@ * @see java.security.Principal * @see javax.security.auth.Subject */ -@jdk.Exported(false) @Deprecated public class SolarisPrincipal implements Principal, java.io.Serializable {
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/UnixNumericGroupPrincipal.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/UnixNumericGroupPrincipal.java Tue Jan 12 11:31:48 2016 -0800 @@ -41,7 +41,6 @@ * @see java.security.Principal * @see javax.security.auth.Subject */ -@jdk.Exported public class UnixNumericGroupPrincipal implements Principal, java.io.Serializable {
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/UnixNumericUserPrincipal.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/UnixNumericUserPrincipal.java Tue Jan 12 11:31:48 2016 -0800 @@ -41,7 +41,6 @@ * @see java.security.Principal * @see javax.security.auth.Subject */ -@jdk.Exported public class UnixNumericUserPrincipal implements Principal, java.io.Serializable {
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/UnixPrincipal.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/UnixPrincipal.java Tue Jan 12 11:31:48 2016 -0800 @@ -41,7 +41,6 @@ * @see java.security.Principal * @see javax.security.auth.Subject */ -@jdk.Exported public class UnixPrincipal implements Principal, java.io.Serializable { private static final long serialVersionUID = -2951667807323493631L;
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/UserPrincipal.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/UserPrincipal.java Tue Jan 12 11:31:48 2016 -0800 @@ -42,7 +42,6 @@ * * @since 1.6 */ -@jdk.Exported public final class UserPrincipal implements Principal, java.io.Serializable { private static final long serialVersionUID = 892106070870210969L;
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/X500Principal.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/X500Principal.java Tue Jan 12 11:31:48 2016 -0800 @@ -49,7 +49,6 @@ * class. * @see javax.security.auth.x500.X500Principal */ -@jdk.Exported(false) @Deprecated public class X500Principal implements Principal, java.io.Serializable {
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/callback/TextCallbackHandler.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/callback/TextCallbackHandler.java Tue Jan 12 11:31:48 2016 -0800 @@ -46,7 +46,6 @@ * @see javax.security.auth.callback */ -@jdk.Exported public class TextCallbackHandler implements CallbackHandler { private final CallbackHandler consoleHandler;
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/callback/package-info.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/callback/package-info.java Tue Jan 12 11:31:48 2016 -0800 @@ -23,5 +23,4 @@ * questions. */ -@jdk.Exported package com.sun.security.auth.callback;
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/login/ConfigFile.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/login/ConfigFile.java Tue Jan 12 11:31:48 2016 -0800 @@ -83,7 +83,6 @@ * @see javax.security.auth.login.LoginContext * @see java.security.Security security properties */ -@jdk.Exported public class ConfigFile extends Configuration { private final sun.security.provider.ConfigFile.Spi spi;
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/login/package-info.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/login/package-info.java Tue Jan 12 11:31:48 2016 -0800 @@ -23,5 +23,4 @@ * questions. */ -@jdk.Exported package com.sun.security.auth.login;
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/module/JndiLoginModule.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/module/JndiLoginModule.java Tue Jan 12 11:31:48 2016 -0800 @@ -151,7 +151,6 @@ * </pre> * */ -@jdk.Exported public class JndiLoginModule implements LoginModule { private static final ResourceBundle rb = AccessController.doPrivileged(
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/module/KeyStoreLoginModule.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/module/KeyStoreLoginModule.java Tue Jan 12 11:31:48 2016 -0800 @@ -110,7 +110,6 @@ * * </dl> */ -@jdk.Exported public class KeyStoreLoginModule implements LoginModule { private static final ResourceBundle rb = AccessController.doPrivileged(
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/module/Krb5LoginModule.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/module/Krb5LoginModule.java Tue Jan 12 11:31:48 2016 -0800 @@ -367,7 +367,6 @@ * @author Ram Marti */ -@jdk.Exported public class Krb5LoginModule implements LoginModule { // initial state
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/module/LdapLoginModule.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/module/LdapLoginModule.java Tue Jan 12 11:31:48 2016 -0800 @@ -303,7 +303,6 @@ * * @since 1.6 */ -@jdk.Exported public class LdapLoginModule implements LoginModule { // Use the default classloader for this class to load the prompt strings.
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/module/NTLoginModule.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/module/NTLoginModule.java Tue Jan 12 11:31:48 2016 -0800 @@ -57,7 +57,6 @@ * * @see javax.security.auth.spi.LoginModule */ -@jdk.Exported public class NTLoginModule implements LoginModule { private NTSystem ntSystem;
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/module/NTSystem.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/module/NTSystem.java Tue Jan 12 11:31:48 2016 -0800 @@ -30,7 +30,6 @@ * security information for the current user. * */ -@jdk.Exported public class NTSystem { private native void getCurrent(boolean debug);
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/module/SolarisLoginModule.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/module/SolarisLoginModule.java Tue Jan 12 11:31:48 2016 -0800 @@ -52,7 +52,6 @@ * UnixLoginModule. * */ -@jdk.Exported(false) @Deprecated public class SolarisLoginModule implements LoginModule {
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/module/SolarisSystem.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/module/SolarisSystem.java Tue Jan 12 11:31:48 2016 -0800 @@ -31,7 +31,6 @@ * * @deprecated replaced by {@link UnixSystem}. */ -@jdk.Exported(false) @Deprecated public class SolarisSystem {
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/module/UnixLoginModule.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/module/UnixLoginModule.java Tue Jan 12 11:31:48 2016 -0800 @@ -47,7 +47,6 @@ * debug messages will be output to the output stream, System.out. * */ -@jdk.Exported public class UnixLoginModule implements LoginModule { // initial state
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/module/UnixSystem.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/module/UnixSystem.java Tue Jan 12 11:31:48 2016 -0800 @@ -29,7 +29,6 @@ * This class implementation retrieves and makes available Unix * UID/GID/groups information for the current user. */ -@jdk.Exported public class UnixSystem { private native void getUnixInfo();
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/module/package-info.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/module/package-info.java Tue Jan 12 11:31:48 2016 -0800 @@ -23,5 +23,4 @@ * questions. */ -@jdk.Exported package com.sun.security.auth.module;
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/package-info.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/package-info.java Tue Jan 12 11:31:48 2016 -0800 @@ -23,5 +23,4 @@ * questions. */ -@jdk.Exported package com.sun.security.auth;
--- a/src/jdk.security.jgss/share/classes/com/sun/security/jgss/AuthorizationDataEntry.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.jgss/share/classes/com/sun/security/jgss/AuthorizationDataEntry.java Tue Jan 12 11:31:48 2016 -0800 @@ -28,7 +28,6 @@ /** * Kerberos 5 AuthorizationData entry. */ -@jdk.Exported public final class AuthorizationDataEntry { private final int type;
--- a/src/jdk.security.jgss/share/classes/com/sun/security/jgss/ExtendedGSSContext.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.jgss/share/classes/com/sun/security/jgss/ExtendedGSSContext.java Tue Jan 12 11:31:48 2016 -0800 @@ -34,7 +34,6 @@ * functionalities not defined by {@code org.ietf.jgss.GSSContext}, * such as querying context-specific attributes. */ -@jdk.Exported public interface ExtendedGSSContext extends GSSContext { // The impl is almost identical to GSSContextImpl with only 2 differences:
--- a/src/jdk.security.jgss/share/classes/com/sun/security/jgss/ExtendedGSSCredential.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.jgss/share/classes/com/sun/security/jgss/ExtendedGSSCredential.java Tue Jan 12 11:31:48 2016 -0800 @@ -33,7 +33,6 @@ * functionalities not defined by {@code org.ietf.jgss.GSSCredential}. * @since 1.8 */ -@jdk.Exported public interface ExtendedGSSCredential extends GSSCredential { static class ExtendedGSSCredentialImpl extends GSSCredentialImpl
--- a/src/jdk.security.jgss/share/classes/com/sun/security/jgss/GSSUtil.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.jgss/share/classes/com/sun/security/jgss/GSSUtil.java Tue Jan 12 11:31:48 2016 -0800 @@ -33,7 +33,6 @@ * GSS-API Utilities for using in conjunction with Sun Microsystem's * implementation of Java GSS-API. */ -@jdk.Exported public class GSSUtil { /**
--- a/src/jdk.security.jgss/share/classes/com/sun/security/jgss/InquireSecContextPermission.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.jgss/share/classes/com/sun/security/jgss/InquireSecContextPermission.java Tue Jan 12 11:31:48 2016 -0800 @@ -35,7 +35,6 @@ * * <p>The target name is the {@link InquireType} allowed. */ -@jdk.Exported public final class InquireSecContextPermission extends BasicPermission { private static final long serialVersionUID = -7131173349668647297L;
--- a/src/jdk.security.jgss/share/classes/com/sun/security/jgss/InquireType.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.jgss/share/classes/com/sun/security/jgss/InquireType.java Tue Jan 12 11:31:48 2016 -0800 @@ -29,7 +29,6 @@ * Attribute types that can be specified as an argument of * {@link com.sun.security.jgss.ExtendedGSSContext#inquireSecContext} */ -@jdk.Exported public enum InquireType { /** * Attribute type for retrieving the session key of an established
--- a/src/jdk.security.jgss/share/classes/com/sun/security/jgss/package-info.java Thu Jan 07 20:06:51 2016 +0000 +++ b/src/jdk.security.jgss/share/classes/com/sun/security/jgss/package-info.java Tue Jan 12 11:31:48 2016 -0800 @@ -23,5 +23,4 @@ * questions. */ -@jdk.Exported package com.sun.security.jgss;
--- a/test/ProblemList.txt Thu Jan 07 20:06:51 2016 +0000 +++ b/test/ProblemList.txt Tue Jan 12 11:31:48 2016 -0800 @@ -1,6 +1,6 @@ ########################################################################### # -# 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 @@ -299,6 +299,9 @@ # 8074580 sun/security/pkcs11/rsa/TestKeyPairGenerator.java generic-all +# 8146387 +javax/net/ssl/SSLSession/SessionCacheSizeTests.java windows-all,solaris-all + ############################################################################ # jdk_sound
--- a/test/TEST.groups Thu Jan 07 20:06:51 2016 +0000 +++ b/test/TEST.groups Tue Jan 12 11:31:48 2016 -0800 @@ -77,7 +77,6 @@ sun/misc \ sun/reflect \ jdk/lambda \ - jdk/internal/jimage \ vm # All of the java.util package
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/java/io/RandomAccessFile/FileLengthTest.java Tue Jan 12 11:31:48 2016 -0800 @@ -0,0 +1,137 @@ +/* + * 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 randomAccessFile 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 4823133 + * @summary optimize RandomAccessFile.length() and length() is thread safe now. + */ +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.RandomAccessFile; + +/** + * + * @author vyom.tewari@oracle.com + */ +public class FileLengthTest { + + private static final int BUF_SIZE = 4096; + private static RandomAccessFile randomAccessFile; + private static Thread fileLengthCaller; + private static Thread fileContentReader; + private static StringBuilder fileContents; + private static volatile boolean isFailed = false; + + /** + * this thread will call length() in loop + */ + private static void startLengthThread() { + if (randomAccessFile == null) { + return; + } + fileLengthCaller = new Thread(() -> { + while (true) { + try { + long length = randomAccessFile.length(); + if (length < 0) { + return; + } + } catch (IOException ex) { + return; + } + } + }); + fileLengthCaller.setName("RandomAccessFile-length-caller"); + fileLengthCaller.setDaemon(true); + fileLengthCaller.start(); + } + + /** + * this thread will call read() and store the content in internal buffer. + */ + private static void startReaderThread() { + if (randomAccessFile == null) { + return; + } + fileContentReader = new Thread(() -> { + StringBuilder sb = new StringBuilder(BUF_SIZE); + int i; + byte arr[] = new byte[8]; + try { + while ((i = randomAccessFile.read(arr)) != -1) { + sb.append(new String(arr, 0, i)); + } + if (!sb.toString().equals(fileContents.toString())) { + isFailed = true; + } + } catch (IOException ex) { + } + }); + fileContentReader.setName("RandomAccessFile-content-reader"); + fileContentReader.setDaemon(true); + fileContentReader.start(); + } + + public static void main(String args[]) { + byte arr[] = new byte[BUF_SIZE]; + String testFile = "testfile.txt"; + try { + createDummyFile(testFile); + File file = new File(testFile); + file.deleteOnExit(); + randomAccessFile = new RandomAccessFile(file, "r"); + int count = randomAccessFile.read(arr); + randomAccessFile.seek(0); + fileContents = new StringBuilder(BUF_SIZE); + fileContents.append(new String(arr, 0, count)); + startLengthThread(); + startReaderThread(); + fileContentReader.join(); + } catch (FileNotFoundException | InterruptedException ex) { + } catch (IOException ex) { + } finally { + try { + randomAccessFile.close(); + } catch (IOException ex) { + } + } + if (isFailed) { + throw new RuntimeException("RandomAccessFile.length() changed the underlying file pointer."); + } + } + + private static void createDummyFile(String fileName) throws FileNotFoundException, IOException { + try (FileOutputStream outputStream = new FileOutputStream(new File(fileName))) { + String str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"; + int count = 0; + while ((count + str.length()) < BUF_SIZE) { + outputStream.write(str.getBytes()); + count += str.length(); + } + outputStream.flush(); + } + } +}
--- a/test/java/lang/ProcessHandle/Basic.java Thu Jan 07 20:06:51 2016 +0000 +++ b/test/java/lang/ProcessHandle/Basic.java Tue Jan 12 11:31:48 2016 -0800 @@ -27,8 +27,8 @@ import static org.testng.Assert.fail; import java.io.IOException; +import java.util.List; import java.util.Optional; -import java.util.List; import java.util.stream.Collectors; import org.testng.TestNG; @@ -36,6 +36,8 @@ /* * @test + * @library /test/lib/share/classes + * @run testng InfoTest * @summary Basic tests for ProcessHandler * @author Roger Riggs */
--- a/test/java/lang/ProcessHandle/InfoTest.java Thu Jan 07 20:06:51 2016 +0000 +++ b/test/java/lang/ProcessHandle/InfoTest.java Tue Jan 12 11:31:48 2016 -0800 @@ -21,11 +21,10 @@ * questions. */ +import java.io.BufferedReader; import java.io.File; -import java.io.BufferedReader; import java.io.IOException; import java.io.UncheckedIOException; -import java.lang.ProcessBuilder; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; @@ -40,18 +39,18 @@ import java.util.Random; import java.util.concurrent.TimeUnit; -import jdk.testlibrary.Platform; -import jdk.testlibrary.Utils; - +import jdk.test.lib.Platform; +import jdk.test.lib.Utils; import org.testng.Assert; +import org.testng.TestNG; import org.testng.annotations.Test; -import org.testng.TestNG; /* * @test * @bug 8077350 8081566 8081567 8098852 8136597 - * @build jdk.testlibrary.* - * @library /lib/testlibrary + * @library /test/lib/share/classes + * @build jdk.test.lib.Platform jdk.test.lib.Utils + * @run testng InfoTest * @summary Functions of ProcessHandle.Info * @author Roger Riggs * @key intermittent
--- a/test/java/lang/ProcessHandle/OnExitTest.java Thu Jan 07 20:06:51 2016 +0000 +++ b/test/java/lang/ProcessHandle/OnExitTest.java Tue Jan 12 11:31:48 2016 -0800 @@ -22,7 +22,6 @@ */ import java.io.IOException; -import java.lang.InterruptedException; import java.time.Duration; import java.time.Instant; import java.util.ArrayList; @@ -31,7 +30,7 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutionException; -import jdk.testlibrary.Utils; +import jdk.test.lib.Utils; import org.testng.annotations.Test; import org.testng.Assert; @@ -39,7 +38,9 @@ /* * @test - * @build jdk.testlibrary.Utils + * @library /test/lib/share/classes + * @build jdk.test.lib.Platform jdk.test.lib.Utils + * @run testng OnExitTest * @summary Functions of Process.onExit and ProcessHandle.onExit * @author Roger Riggs */
--- a/test/java/lang/ProcessHandle/PermissionTest.java Thu Jan 07 20:06:51 2016 +0000 +++ b/test/java/lang/ProcessHandle/PermissionTest.java Tue Jan 12 11:31:48 2016 -0800 @@ -31,7 +31,6 @@ import java.security.ProtectionDomain; import java.security.SecurityPermission; import java.util.Arrays; -import java.util.Optional; import java.util.PropertyPermission; import org.testng.Assert; @@ -39,6 +38,12 @@ import org.testng.annotations.BeforeGroups; import org.testng.annotations.Test; +/* + * @test + * @run testng/othervm PermissionTest + * @summary Test Permissions to access Info + */ + public class PermissionTest { /** * Backing up policy.
--- a/test/java/lang/ProcessHandle/ProcessUtil.java Thu Jan 07 20:06:51 2016 +0000 +++ b/test/java/lang/ProcessHandle/ProcessUtil.java Tue Jan 12 11:31:48 2016 -0800 @@ -23,18 +23,13 @@ import java.io.IOException; import java.lang.management.ManagementFactory; -import java.lang.ProcessBuilder; import java.time.Duration; import java.util.List; -import java.util.Objects; import java.util.stream.Collectors; +import java.util.stream.Stream; import com.sun.management.OperatingSystemMXBean; - -import jdk.testlibrary.Platform; - -import java.util.stream.Collectors; -import java.util.stream.Stream; +import jdk.test.lib.Platform; /** * Useful utilities for testing Process and ProcessHandle.
--- a/test/java/lang/ProcessHandle/TEST.properties Thu Jan 07 20:06:51 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -# ProcessHandle tests use TestNG -TestNG.dirs = . -lib.dirs = /lib/testlibrary -modules = jdk.management
--- a/test/java/lang/ProcessHandle/TreeTest.java Thu Jan 07 20:06:51 2016 +0000 +++ b/test/java/lang/ProcessHandle/TreeTest.java Tue Jan 12 11:31:48 2016 -0800 @@ -23,30 +23,31 @@ import java.io.IOException; -import java.util.ArrayList; import java.time.Duration; import java.time.Instant; +import java.util.ArrayList; import java.util.Arrays; -import java.util.Collections; import java.util.List; import java.util.Optional; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CountDownLatch; +import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import java.util.stream.Stream; -import java.util.concurrent.ExecutionException; -import jdk.testlibrary.Utils; + +import jdk.test.lib.Utils; import org.testng.Assert; import org.testng.TestNG; import org.testng.annotations.Test; /* * @test - * @library /lib/testlibrary - * Test counting and JavaChild.spawning and counting of Processes. - * @run testng/othervm InfoTest + * @library /test/lib/share/classes + * @build jdk.test.lib.Utils + * @run testng/othervm TreeTest + * @summary Test counting and JavaChild.spawning and counting of Processes. * @key intermittent * @author Roger Riggs */
--- a/test/java/lang/StackWalker/LocalsAndOperands.java Thu Jan 07 20:06:51 2016 +0000 +++ b/test/java/lang/StackWalker/LocalsAndOperands.java Tue Jan 12 11:31:48 2016 -0800 @@ -86,29 +86,43 @@ System.out.println("frame: " + f); Object[] locals = (Object[]) getLocals.invoke(f); for (int i = 0; i < locals.length; i++) { - System.out.format("local %d: %s type %s%n", i, locals[i], type(locals[i])); + System.out.format(" local %d: %s type %s\n", i, locals[i], type(locals[i])); + + // check for non-null locals in LocalsAndOperands.test() + if (f.getClassName().equals("LocalsAndOperands") && + f.getMethodName().equals("test")) { + if (locals[i] == null) { + throw new RuntimeException("kept-alive locals should not be null"); + } + } } Object[] operands = (Object[]) getOperands.invoke(f); for (int i = 0; i < operands.length; i++) { - System.out.format("operand %d: %s type %s%n", i, operands[i], type(operands[i])); + System.out.format(" operand %d: %s type %s%n", i, operands[i], + type(operands[i])); } Object[] monitors = (Object[]) getMonitors.invoke(f); for (int i = 0; i < monitors.length; i++) { - System.out.format("monitor %d: %s%n", i, monitors[i]); + System.out.format(" monitor %d: %s%n", i, monitors[i]); } } } else { for (StackFrame f : frames) { - if (liveStackFrameClass.isInstance(f)) + if (liveStackFrameClass.isInstance(f)) { throw new RuntimeException("should not be LiveStackFrame"); + } } } + // Use local variables so they stay alive + System.out.println("Stayin' alive: "+x+" "+c+" "+hi+" "+l+" "+d); } String type(Object o) throws Exception { - if (primitiveValueClass.isInstance(o)) { + if (o == null) { + return "null"; + } else if (primitiveValueClass.isInstance(o)) { char c = (char)primitiveType.invoke(o); return String.valueOf(c); } else {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/java/lang/invoke/8076596/Test8076596.java Tue Jan 12 11:31:48 2016 -0800 @@ -0,0 +1,50 @@ +/* + * 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 + * 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 8076596 + * @run main/othervm/policy=Test8076596.security.policy/secure=Test8076596 -ea -esa Test8076596 + */ + +import java.security.AccessController; +import java.security.PrivilegedAction; + +public class Test8076596 extends SecurityManager { + public Test8076596() { + // 1. Using lambda + AccessController.doPrivileged((PrivilegedAction<Void>) () -> null); + // 2. Using inner class + AccessController.doPrivileged(new PrivilegedAction<Void>() { + @Override + public Void run() { + return null; + } + }); + } + + public static void main(String[] args) { + // empty + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/java/lang/invoke/8076596/Test8076596.security.policy Tue Jan 12 11:31:48 2016 -0800 @@ -0,0 +1,8 @@ +/* + * Security policy used by the Test8076596. + * Must allow file reads so that jtreg itself can run. + */ + +grant { + permission java.io.FilePermission "*", "read"; +};
--- a/test/java/lang/invoke/FindClassSecurityManager.java Thu Jan 07 20:06:51 2016 +0000 +++ b/test/java/lang/invoke/FindClassSecurityManager.java Tue Jan 12 11:31:48 2016 -0800 @@ -24,6 +24,7 @@ */ /* @test + * @bug 8139885 * @run main/othervm/policy=findclass.security.policy/secure=java.lang.SecurityManager -ea -esa test.java.lang.invoke.FindClassSecurityManager */
--- a/test/java/lang/invoke/T8139885.java Thu Jan 07 20:06:51 2016 +0000 +++ b/test/java/lang/invoke/T8139885.java Tue Jan 12 11:31:48 2016 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 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 @@ -24,6 +24,8 @@ */ /* @test + * @bug 8139885 + * @bug 8143798 * @run testng/othervm -ea -esa test.java.lang.invoke.T8139885 */
--- a/test/java/lang/management/MemoryMXBean/Pending.java Thu Jan 07 20:06:51 2016 +0000 +++ b/test/java/lang/management/MemoryMXBean/Pending.java Tue Jan 12 11:31:48 2016 -0800 @@ -24,7 +24,7 @@ /* * @test * @bug 4530538 - * @modules java.base/sun.misc + * @modules java.base/jdk.internal.misc * java.management * @summary Basic unit test of * RuntimeMXBean.getObjectPendingFinalizationCount() @@ -50,10 +50,10 @@ private static void printFinalizerInstanceCount() { if (!trace) return; - int count = sun.misc.VM.getFinalRefCount(); + int count = jdk.internal.misc.VM.getFinalRefCount(); System.out.println(INDENT + "Finalizable object Count = " + count); - count = sun.misc.VM.getPeakFinalRefCount(); + count = jdk.internal.misc.VM.getPeakFinalRefCount(); System.out.println(INDENT + "Peak Finalizable object Count = " + count); }
--- a/test/java/lang/ref/CleanerTest.java Thu Jan 07 20:06:51 2016 +0000 +++ b/test/java/lang/ref/CleanerTest.java Tue Jan 12 11:31:48 2016 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 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 @@ -34,9 +34,10 @@ import java.util.function.Consumer; import java.util.function.Supplier; -import jdk.internal.misc.CleanerImpl.PhantomCleanable; -import jdk.internal.misc.CleanerImpl.WeakCleanable; -import jdk.internal.misc.CleanerImpl.SoftCleanable; +import jdk.internal.ref.PhantomCleanable; +import jdk.internal.ref.WeakCleanable; +import jdk.internal.ref.SoftCleanable; +import jdk.internal.ref.CleanerFactory; import sun.hotspot.WhiteBox; @@ -48,7 +49,7 @@ * @test * @library /lib/testlibrary /test/lib * @build sun.hotspot.WhiteBox - * @modules java.base/jdk.internal.misc + * @modules java.base/jdk.internal.misc java.base/jdk.internal.ref * @run main ClassFileInstaller sun.hotspot.WhiteBox * @run testng/othervm * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. @@ -58,7 +59,7 @@ @Test public class CleanerTest { // A common CleaningService used by the test for notifications - static final Cleaner COMMON = Cleaner.create(); + static final Cleaner COMMON = CleanerFactory.cleaner(); // Access to WhiteBox utilities static final WhiteBox whitebox = WhiteBox.getWhiteBox(); @@ -702,4 +703,17 @@ cleaner = null; } + /** + * Test the Cleaner from the CleanerFactory. + */ + @Test + void testCleanerFactory() { + Cleaner cleaner = CleanerFactory.cleaner(); + + Object obj = new Object(); + CleanableCase s = setupPhantom(cleaner, obj); + obj = null; + Assert.assertTrue(checkCleaned(s.getSemaphore()), + "Object cleaning should have occurred using CleanerFactor.cleaner()"); + } }
--- a/test/java/net/DatagramSocket/SetDatagramSocketImplFactory/ADatagramSocket.java Thu Jan 07 20:06:51 2016 +0000 +++ b/test/java/net/DatagramSocket/SetDatagramSocketImplFactory/ADatagramSocket.java Tue Jan 12 11:31:48 2016 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -41,7 +41,11 @@ } catch (Exception ex) { throw new RuntimeException("Setting DatagramSocketImplFactory failed!"); } - new QuoteServerThread().start(); + + QuoteServerThread server = new QuoteServerThread(); + int port = server.getPort(); + System.out.println("Server port is " + port); + server.start(); // get a datagram socket DatagramSocket socket = new DatagramSocket(); @@ -49,7 +53,7 @@ // send request byte[] buf = new byte[256]; InetAddress address = InetAddress.getLocalHost(); - DatagramPacket packet = new DatagramPacket(buf, buf.length, address, 4445); + DatagramPacket packet = new DatagramPacket(buf, buf.length, address, port); socket.send(packet); // get response @@ -67,6 +71,7 @@ class QuoteServerThread extends Thread { protected DatagramSocket socket = null; + private final int port; public QuoteServerThread() throws IOException { this("QuoteServerThread"); @@ -74,7 +79,11 @@ public QuoteServerThread(String name) throws IOException { super(name); - socket = new DatagramSocket(4445); + socket = new DatagramSocket(0); + port = socket.getLocalPort(); + } + public int getPort(){ + return port; } public void run() { @@ -101,3 +110,4 @@ socket.close(); } } +
--- a/test/java/net/SocketOption/OptionsTest.java Thu Jan 07 20:06:51 2016 +0000 +++ b/test/java/net/SocketOption/OptionsTest.java Tue Jan 12 11:31:48 2016 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -80,8 +80,11 @@ static NetworkInterface getNetworkInterface() { try { Enumeration<NetworkInterface> nifs = NetworkInterface.getNetworkInterfaces(); - if (nifs.hasMoreElements()) { - return (NetworkInterface)nifs.nextElement(); + while (nifs.hasMoreElements()) { + NetworkInterface ni = (NetworkInterface)nifs.nextElement(); + if (ni.supportsMulticast()) { + return ni; + } } } catch (Exception e) { }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/java/net/URLConnection/TIFFContentGuesser.java Tue Jan 12 11:31:48 2016 -0800 @@ -0,0 +1,66 @@ +/* + * 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. + * + * 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 8146041 + * @summary java.net.URLConnection.guessContentTypeFromStream() does not + * recognize TIFF streams + */ + +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.net.URLConnection; + +public class TIFFContentGuesser { + private static final byte[] LITTLE_ENDIAN_MAGIC = + new byte[] {(byte)0x49, (byte)0x49, (byte)0x2a, (byte)0}; + private static final byte[] BIG_ENDIAN_MAGIC = + new byte[] {(byte)0x4d, (byte)0x4d, (byte)0, (byte)0x2a}; + + private static final String TIFF_MIME_TYPE = "image/tiff"; + + public static void main(String[] args) throws Throwable { + int failures = 0; + + InputStream stream = new ByteArrayInputStream(LITTLE_ENDIAN_MAGIC); + String contentType = URLConnection.guessContentTypeFromStream(stream); + if (contentType == null || !contentType.equals(TIFF_MIME_TYPE)) { + failures++; + System.err.println("Test failed for little endian magic"); + } + + stream = new ByteArrayInputStream(BIG_ENDIAN_MAGIC); + contentType = URLConnection.guessContentTypeFromStream(stream); + if (contentType == null || !contentType.equals(TIFF_MIME_TYPE)) { + failures++; + System.err.println("Test failed for big endian magic"); + } + + if (failures != 0) { + throw new RuntimeException + ("Test failed with " + failures + " error(s)"); + } + } +} +
--- a/test/java/net/ipv6tests/TcpTest.java Thu Jan 07 20:06:51 2016 +0000 +++ b/test/java/net/ipv6tests/TcpTest.java Tue Jan 12 11:31:48 2016 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -60,8 +60,7 @@ dprintln ("Local Addresses"); dprintln (ia4addr.toString()); dprintln (ia6addr.toString()); - test1 (0); - test1 (5100); + test1(); test2(); test3(); test4(); @@ -69,11 +68,9 @@ /* basic TCP connectivity test using IPv6 only and IPv4/IPv6 together */ - static void test1 (int port) throws Exception { - server = new ServerSocket (port); - if (port == 0) { - port = server.getLocalPort(); - } + static void test1 () throws Exception { + server = new ServerSocket (0); + int port = server.getLocalPort(); // try Ipv6 only c1 = new Socket ("::1", port); s1 = server.accept (); @@ -107,9 +104,7 @@ /** bind tests: * 1. bind to specific address IPv4 only (any port) * 2. bind to specific address IPv6 only (any port) - * 3. bind to specific address IPv4 only (specific port) - * 4. bind to specific address IPv4 only (specific port) - * 5. bind to any address IPv4 (test collision) + * 3. bind to any address IPv4 (test collision) */ static void test2 () throws Exception { @@ -147,39 +142,6 @@ server.close (); c1.close (); - /* now try IPv6 specific port only */ - - server = new ServerSocket (); - sadr = new InetSocketAddress (ia6addr, 5200); - server.bind (sadr); - port = server.getLocalPort(); - t_assert (port == 5200); - - c1 = new Socket (ia6addr, port); - try { - c2 = new Socket (ia4addr, port); - throw new RuntimeException ("connect to IPv4 address should be refused"); - } catch (IOException e) { } - server.close (); - c1.close (); - - /* now try IPv4 specific port only */ - - server = new ServerSocket (); - sadr = new InetSocketAddress (ia4addr, 5200); - server.bind (sadr); - port = server.getLocalPort(); - t_assert (port == 5200); - - c1 = new Socket (ia4addr, port); - - try { - c2 = new Socket (ia6addr, port); - throw new RuntimeException ("connect to IPv6 address should be refused"); - } catch (IOException e) { } - server.accept().close(); - c1.close (); - server.close(); System.out.println ("Test2: OK"); } @@ -242,3 +204,4 @@ System.out.println ("Test4: OK"); } } +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/java/nio/channels/DatagramChannel/StressNativeSignal.java Tue Jan 12 11:31:48 2016 -0800 @@ -0,0 +1,147 @@ +/* + * 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. + * + * 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 8050499 + * @summary Attempt to provoke error 316 on OS X in NativeSignal.signal() + */ + +import java.io.*; +import java.net.*; +import java.nio.ByteBuffer; +import java.nio.channels.DatagramChannel; + +public class StressNativeSignal { + private UDPThread udpThread; + private ServerSocketThread serverSocketThread; + + StressNativeSignal() { + try { + serverSocketThread = new ServerSocketThread(); + serverSocketThread.start(); + + udpThread = new UDPThread(); + udpThread.start(); + } catch (Exception z) { + z.printStackTrace(); + } + } + + public static void main(String[] args) throws Throwable { + StressNativeSignal test = new StressNativeSignal(); + try { + Thread.sleep(3000); + } catch (Exception z) { + z.printStackTrace(System.err); + } + + test.shutdown(); + } + + public void shutdown() { + udpThread.terminate(); + try { + udpThread.join(); + } catch (Exception z) { + z.printStackTrace(System.err); + } + + serverSocketThread.terminate(); + try { + serverSocketThread.join(); + } catch (Exception z) { + z.printStackTrace(System.err); + } + } + + public class ServerSocketThread extends Thread { + private volatile boolean shouldTerminate; + private ServerSocket socket; + + public void run() { + try { + socket = new ServerSocket(1122); + Socket client = socket.accept(); + BufferedReader reader = new BufferedReader(new InputStreamReader(client.getInputStream())); + shouldTerminate = false; + while (!shouldTerminate) { + String msg = reader.readLine(); + } + } catch (Exception z) { + if (!shouldTerminate) { + z.printStackTrace(System.err); + } + } + } + + public void terminate() { + shouldTerminate = true; + try { + socket.close(); + } catch (Exception z) { + z.printStackTrace(System.err); + // ignore + } + } + } + + public class UDPThread extends Thread { + private DatagramChannel channel; + private volatile boolean shouldTerminate; + + @Override + public void run() { + try { + channel = DatagramChannel.open(); + channel.setOption(StandardSocketOptions.SO_RCVBUF, 6553600); + channel.bind(new InetSocketAddress(19870)); + } catch (IOException z) { + z.printStackTrace(System.err); + } + + ByteBuffer buf = ByteBuffer.allocate(6553600); + shouldTerminate = false; + while (!shouldTerminate) { + try { + buf.rewind(); + channel.receive(buf); + } catch (IOException z) { + if (!shouldTerminate) { + z.printStackTrace(System.err); + } + } + } + } + + public void terminate() { + shouldTerminate = true; + try { + channel.close(); + } catch (Exception z) { + z.printStackTrace(System.err); + // ignore + } + } + } + +}
--- a/test/java/nio/file/attribute/BasicFileAttributeView/UnixSocketFile.java Thu Jan 07 20:06:51 2016 +0000 +++ b/test/java/nio/file/attribute/BasicFileAttributeView/UnixSocketFile.java Tue Jan 12 11:31:48 2016 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 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 @@ -28,6 +28,7 @@ */ import java.io.File; +import java.io.InputStream; import java.io.IOException; import java.nio.file.FileSystem; import java.nio.file.FileSystems; @@ -49,6 +50,17 @@ public static void main(String[] args) throws InterruptedException, IOException { + // Use 'which' to verify that 'nc' is available and skip the test + // if it is not. + Process proc = Runtime.getRuntime().exec("which nc"); + InputStream stdout = proc.getInputStream(); + int b = stdout.read(); + proc.destroy(); + if (b == -1) { + System.err.println("Netcat command unavailable; skipping test."); + return; + } + // Create a new sub-directory of the nominal test directory in which // 'nc' will create the socket file. String testSubDir = System.getProperty("test.dir", ".") @@ -62,7 +74,6 @@ // Create a process which executes the nc (netcat) utility to create // a socket file at the indicated location. - Process proc; FileSystem fs = FileSystems.getDefault(); try (WatchService ws = fs.newWatchService()) { // Watch the test sub-directory to receive notification when an
--- a/test/java/time/tck/java/time/TCKLocalDate.java Thu Jan 07 20:06:51 2016 +0000 +++ b/test/java/time/tck/java/time/TCKLocalDate.java Tue Jan 12 11:31:48 2016 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 @@ -1285,12 +1285,36 @@ public void test_plusWeeks_invalidMaxMinusMin() { LocalDate.of(Year.MAX_VALUE, 12, 25).plusWeeks(Long.MIN_VALUE); } + //----------------------------------------------------------------------- + @DataProvider(name="PlusDays") + Object[][] provider_plusDays() { + return new Object[][] { + {LocalDate.of(2007, 7, 15), 1, LocalDate.of(2007, 7, 16)}, + {LocalDate.of(2007, 7, 15), 17, LocalDate.of(2007, 8, 1)}, + {LocalDate.of(2007, 12, 31), 1, LocalDate.of(2008, 1, 1)}, + {LocalDate.of(2007, 1, 1), 58, LocalDate.of(2007, 2, 28)}, + {LocalDate.of(2007, 1, 1), 59, LocalDate.of(2007, 3, 1)}, + {LocalDate.of(2008, 1, 1), 60, LocalDate.of(2008, 3, 1)}, + {LocalDate.of(2007, 2, 1), 27, LocalDate.of(2007, 2, 28)}, + {LocalDate.of(2007, 2, 1), 28, LocalDate.of(2007, 3, 1)}, + {LocalDate.of(2007, 1, 1), 29, LocalDate.of(2007, 1, 30)}, + {LocalDate.of(2007, 1, 1), 30, LocalDate.of(2007, 1, 31)}, + {LocalDate.of(2007, 1, 15), 13, LocalDate.of(2007, 1, 28)}, + {LocalDate.of(2007, 1, 15), 14, LocalDate.of(2007, 1, 29)}, + {LocalDate.of(2007, 1, 15), 15, LocalDate.of(2007, 1, 30)}, + {LocalDate.of(2007, 1, 15), 16, LocalDate.of(2007, 1, 31)}, + {LocalDate.of(2007, 2, 15), 13, LocalDate.of(2007, 2, 28)}, + {LocalDate.of(2007, 2, 15), 14, LocalDate.of(2007, 3, 1)}, + {LocalDate.of(2007, 2, 15), 15, LocalDate.of(2007, 3, 2)}, + {LocalDate.of(2007, 2, 15), 16, LocalDate.of(2007, 3, 3)}, + }; + } - @Test - public void test_plusDays_normal() { - LocalDate t = TEST_2007_07_15.plusDays(1); - assertEquals(t, LocalDate.of(2007, 7, 16)); - } + @Test(dataProvider="PlusDays") + public void test_plusDays_normal(LocalDate input, int amountsToAdd, LocalDate expected) { + LocalDate actual = input.plusDays(amountsToAdd); + assertEquals(actual, expected); + } @Test public void test_plusDays_overMonths() {
--- a/test/java/util/logging/LogManager/Configuration/updateConfiguration/UpdateConfigurationTest.java Thu Jan 07 20:06:51 2016 +0000 +++ b/test/java/util/logging/LogManager/Configuration/updateConfiguration/UpdateConfigurationTest.java Tue Jan 12 11:31:48 2016 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 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 @@ -209,8 +209,9 @@ + barChild.getParent() +"\n\texpected: " + barRef.get()); } Reference<? extends Logger> ref2; - int max = 3; + int max = 10; barChild = null; + System.gc(); while ((ref2 = queue.poll()) == null) { System.gc(); Thread.sleep(100); @@ -276,24 +277,27 @@ } }); - // Now we need to forget the child, so that loggers are released, - // and so that we can run the test with the next configuration... - - fooChild = null; - System.out.println("Setting fooChild to: " + fooChild); - while ((ref2 = queue.poll()) == null) { - System.gc(); - Thread.sleep(1000); + if (suppressed == null) { + // Now we need to forget the child, so that loggers are released, + // and so that we can run the test with the next configuration... + // No need to do that if failed!=null however, as the first + // ref might not have been cleared yet and failing here would + // hide the original failure. + fooChild = null; + System.out.println("Setting fooChild to: " + fooChild); + while ((ref2 = queue.poll()) == null) { + System.gc(); + Thread.sleep(1000); + } + if (ref2 != fooRef) { + throw new RuntimeException("Unexpected reference: " + + ref2 +"\n\texpected: " + fooRef); + } + if (ref2.get() != null) { + throw new RuntimeException("Referent not cleared: " + ref2.get()); + } + System.out.println("Got fooRef after reset(), fooChild is " + fooChild); } - if (ref2 != fooRef) { - throw new RuntimeException("Unexpected reference: " - + ref2 +"\n\texpected: " + fooRef); - } - if (ref2.get() != null) { - throw new RuntimeException("Referent not cleared: " + ref2.get()); - } - System.out.println("Got fooRef after reset(), fooChild is " + fooChild); - } } if (failed != null) {
--- a/test/javax/management/ImplementationVersion/ImplVersionCommand.java Thu Jan 07 20:06:51 2016 +0000 +++ b/test/javax/management/ImplementationVersion/ImplVersionCommand.java Tue Jan 12 11:31:48 2016 -0800 @@ -53,21 +53,13 @@ // Check JMX implementation version vs. JVM implementation version // - if (Boolean.valueOf(args[1]).booleanValue()) { - if (!mbsdVersion.equals(args[0])) - throw new IllegalArgumentException( - "JMX and Java Runtime implementation versions do not match!"); - // Test OK! - // - System.out.println("JMX and Java Runtime implementation " + - "versions match!"); - } else { - // Test OK! - // - System.out.println("JMX and Java Runtime implementation " + - "versions do not match because the test " + - "is using an unbundled version of JMX!"); - } + if (!mbsdVersion.equals(args[0])) + throw new IllegalArgumentException( + "JMX and Java Runtime implementation versions do not match!"); + // Test OK! + // + System.out.println("JMX and Java Runtime implementation " + + "versions match!"); System.out.println("Bye! Bye!"); } }
--- a/test/javax/management/ImplementationVersion/ImplVersionTest.java Thu Jan 07 20:06:51 2016 +0000 +++ b/test/javax/management/ImplementationVersion/ImplVersionTest.java Tue Jan 12 11:31:48 2016 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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,9 +25,9 @@ * @test * @bug 4842196 * @summary Test that there is no difference between the JMX version and the - * JDK version when JMX is bundled into the Java platform and the application - * is run with a security manager and the test codebase has the java permission - * to read the "java.runtime.version" system property. + * JDK version when the application is run with a security manager and the + * test codebase has the java permission to read the "java.runtime.version" + * system property. * @author Luis-Miguel Alventosa * @modules java.management * @run clean ImplVersionTest ImplVersionCommand @@ -36,8 +36,6 @@ */ import java.io.File; -import java.security.CodeSource; -import javax.management.MBeanServer; public class ImplVersionTest { @@ -70,18 +68,13 @@ System.out.println("testClasses = " + testClasses); // Get boot class path // - boolean checkVersion = true; - String bootClassPath = System.getProperty("sun.boot.class.path"); - if (bootClassPath != null && - bootClassPath.indexOf("jmxri.jar") != -1) - checkVersion = false; String command = javaHome + File.separator + "bin" + File.separator + "java " + " -classpath " + testClasses + " -Djava.security.manager -Djava.security.policy==" + testSrc + File.separator + "policy -Dtest.classes=" + testClasses + " ImplVersionCommand " + - System.getProperty("java.runtime.version") + " " + checkVersion; + System.getProperty("java.runtime.version"); System.out.println("ImplVersionCommand Exec Command = " +command); Process proc = Runtime.getRuntime().exec(command); new ImplVersionReader(proc, proc.getInputStream()).start();
--- a/test/javax/management/remote/mandatory/version/ImplVersionTest.java Thu Jan 07 20:06:51 2016 +0000 +++ b/test/javax/management/remote/mandatory/version/ImplVersionTest.java Tue Jan 12 11:31:48 2016 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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,9 +25,9 @@ * @test * @bug 5046815 * @summary Test that RMIServer.getVersion() reflects the JDK version when - * JMX is bundled into the Java platform and the application is run with a - * security manager and the test codebase has the java permission to read - * the "java.runtime.version" system property. + * the Java platform and the application is run with a security manager and the + * test codebase has the java permission to read the "java.runtime.version" + * system property. * @author Luis-Miguel Alventosa, Joel Feraud * @modules java.management * @run clean ImplVersionTest ImplVersionCommand @@ -36,8 +36,6 @@ */ import java.io.File; -import java.security.CodeSource; -import javax.management.MBeanServer; public class ImplVersionTest {
--- a/test/javax/net/ssl/SSLSession/SessionCacheSizeTests.java Thu Jan 07 20:06:51 2016 +0000 +++ b/test/javax/net/ssl/SSLSession/SessionCacheSizeTests.java Tue Jan 12 11:31:48 2016 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 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 @@ -31,6 +31,7 @@ * @bug 4366807 * @summary Need new APIs to get/set session timeout and session cache size. * @run main/othervm SessionCacheSizeTests + * @key intermittent */ import java.io.*; @@ -108,28 +109,34 @@ void doServerSide(int serverPort, int serverConns) throws Exception { - SSLServerSocket sslServerSocket = - (SSLServerSocket) sslssf.createServerSocket(serverPort); - sslServerSocket.setSoTimeout(45000); // timeout to accept a connection - serverPorts[createdPorts++] = sslServerSocket.getLocalPort(); + try (SSLServerSocket sslServerSocket = + (SSLServerSocket) sslssf.createServerSocket(serverPort)) { + + // timeout to accept a connection + sslServerSocket.setSoTimeout(45000); + + // make sure createdPorts++ is atomic + synchronized(serverPorts) { + serverPorts[createdPorts++] = sslServerSocket.getLocalPort(); - /* - * Signal Client, we're ready for his connect. - */ - if (createdPorts == serverPorts.length) { - serverReady = true; - } - int read = 0; - int nConnections = 0; - /* - * Divide the max connections among the available server ports. - * The use of more than one server port ensures creation of more - * than one session. - */ - SSLSession sessions [] = new SSLSession [serverConns]; - SSLSessionContext sessCtx = sslctx.getServerSessionContext(); + /* + * Signal Client, we're ready for his connect. + */ + if (createdPorts == serverPorts.length) { + serverReady = true; + } + } + int read = 0; + int nConnections = 0; - try { + /* + * Divide the max connections among the available server ports. + * The use of more than one server port ensures creation of more + * than one session. + */ + SSLSession sessions [] = new SSLSession [serverConns]; + SSLSessionContext sessCtx = sslctx.getServerSessionContext(); + while (nConnections < serverConns) { try (SSLSocket sslSocket = (SSLSocket)sslServerSocket.accept()) { @@ -143,8 +150,6 @@ nConnections++; } } - } finally { - sslServerSocket.close(); } } @@ -270,8 +275,8 @@ * Using four ports (one per each connection), we are able to create * alteast four sessions. */ - volatile int serverPorts[] = new int[]{0, 0, 0, 0}; - volatile int createdPorts = 0; + int serverPorts[] = new int[]{0, 0, 0, 0}; // MAX_ACTIVE_CONNECTIONS: 4 + int createdPorts = 0; static SSLServerSocketFactory sslssf; static SSLSocketFactory sslsf; static SSLContext sslctx;
--- a/test/jdk/internal/jimage/JImageReadTest.java Thu Jan 07 20:06:51 2016 +0000 +++ b/test/jdk/internal/jimage/JImageReadTest.java Tue Jan 12 11:31:48 2016 -0800 @@ -313,7 +313,7 @@ static boolean isMetaName(String name) { return name.startsWith("/modules") || name.startsWith("/packages") - || name.startsWith("META-INF/services") + || name.startsWith("META-INF") || name.equals("bootmodules.jdata"); }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/jdk/internal/misc/VM/GetNanoTimeAdjustment.java Tue Jan 12 11:31:48 2016 -0800 @@ -0,0 +1,250 @@ +/* + * 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. + */ +import java.util.Objects; +import jdk.internal.misc.VM; + +/** + * @test + * @bug 8068730 + * @summary tests that VM.getgetNanoTimeAdjustment() works as expected. + * @modules java.base/jdk.internal.misc + * @run main GetNanoTimeAdjustment + * @author danielfuchs + */ +public class GetNanoTimeAdjustment { + + static final int MILLIS_IN_SECOND = 1000; + static final int NANOS_IN_MILLI = 1000_000; + static final int NANOS_IN_MICRO = 1000; + static final int NANOS_IN_SECOND = 1000_000_000; + + static final boolean verbose = true; + + static final class TestAssertException extends RuntimeException { + TestAssertException(String msg) { super(msg); } + } + + private static void assertEquals(long expected, long received, String msg) { + if (expected != received) { + throw new TestAssertException("Unexpected result for " + msg + + ".\n\texpected: " + expected + + "\n\tactual: " + received); + } else if (verbose) { + System.out.println("Got expected " + msg + ": " + received); + } + } + + private static void assertEquals(Object expected, Object received, String msg) { + if (!Objects.equals(expected, received)) { + throw new TestAssertException("Unexpected result for " + msg + + ".\n\texpected: " + expected + + "\n\tactual: " + received); + } else if (verbose) { + System.out.println("Got expected " + msg + ": " + received); + } + } + + static final long MAX_OFFSET = 0x0100000000L; + static final long MIN_OFFSET = -MAX_OFFSET; + static enum Answer { + YES, // isOffLimit = YES: we must get -1 + NO, // isOffLimit = NO: we must not not get -1 + MAYBE // isOffLimit = MAYBE: we might get -1 or a valid adjustment. + }; + static long distance(long one, long two) { + return one > two ? Math.subtractExact(one, two) + : Math.subtractExact(two, one); + } + + + static Answer isOffLimits(long before, long after, long offset) { + long relativeDistanceBefore = distance(before, offset); + long relativeDistanceAfter = distance(after, offset); + if (relativeDistanceBefore >= MAX_OFFSET && relativeDistanceAfter >= MAX_OFFSET) { + return Answer.YES; + } + if (relativeDistanceBefore < MAX_OFFSET && relativeDistanceAfter < MAX_OFFSET) { + if (relativeDistanceBefore == 0 || relativeDistanceAfter == 0) { + return Answer.MAYBE; // unlucky case where + } + return Answer.NO; + } + return Answer.MAYBE; + } + + static void testWithOffset(String name, long