# HG changeset patch # User valeriep # Date 1381349278 25200 # Node ID e3f8b7f63dc73d1afa4e2ae8cad6d14d6e513659 # Parent 3d7b2fafc34be392fd2925d92c5123fd903654bd# Parent 330bf22c39fa1845747b86192503bb64dda1efea Merge diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/AbsentInformationException.java --- a/jdk/src/share/classes/com/sun/jdi/AbsentInformationException.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/AbsentInformationException.java Wed Oct 09 13:07:58 2013 -0700 @@ -31,6 +31,7 @@ * @author Gordon Hirsch * @since 1.3 */ +@jdk.Exported public class AbsentInformationException extends Exception { private static final long serialVersionUID = 4988939309582416373L; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/Accessible.java --- a/jdk/src/share/classes/com/sun/jdi/Accessible.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/Accessible.java Wed Oct 09 13:07:58 2013 -0700 @@ -36,6 +36,7 @@ * @author James McIlree * @since 1.3 */ +@jdk.Exported public interface Accessible { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/ArrayReference.java --- a/jdk/src/share/classes/com/sun/jdi/ArrayReference.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/ArrayReference.java Wed Oct 09 13:07:58 2013 -0700 @@ -39,6 +39,7 @@ * @author James McIlree * @since 1.3 */ +@jdk.Exported public interface ArrayReference extends ObjectReference { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/ArrayType.java --- a/jdk/src/share/classes/com/sun/jdi/ArrayType.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/ArrayType.java Wed Oct 09 13:07:58 2013 -0700 @@ -38,6 +38,7 @@ * @author James McIlree * @since 1.3 */ +@jdk.Exported public interface ArrayType extends ReferenceType { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/BooleanType.java --- a/jdk/src/share/classes/com/sun/jdi/BooleanType.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/BooleanType.java Wed Oct 09 13:07:58 2013 -0700 @@ -35,5 +35,6 @@ * @author James McIlree * @since 1.3 */ +@jdk.Exported public interface BooleanType extends PrimitiveType { } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/BooleanValue.java --- a/jdk/src/share/classes/com/sun/jdi/BooleanValue.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/BooleanValue.java Wed Oct 09 13:07:58 2013 -0700 @@ -34,8 +34,9 @@ * @author James McIlree * @since 1.3 */ -public interface BooleanValue extends PrimitiveValue -{ +@jdk.Exported +public interface BooleanValue extends PrimitiveValue { + /** * Returns this BooleanValue as a boolean. * diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/Bootstrap.java --- a/jdk/src/share/classes/com/sun/jdi/Bootstrap.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/Bootstrap.java Wed Oct 09 13:07:58 2013 -0700 @@ -34,6 +34,7 @@ * @since 1.3 */ +@jdk.Exported public class Bootstrap extends Object { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/ByteType.java --- a/jdk/src/share/classes/com/sun/jdi/ByteType.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/ByteType.java Wed Oct 09 13:07:58 2013 -0700 @@ -35,6 +35,6 @@ * @author James McIlree * @since 1.3 */ -public interface ByteType extends PrimitiveType -{ +@jdk.Exported +public interface ByteType extends PrimitiveType { } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/ByteValue.java --- a/jdk/src/share/classes/com/sun/jdi/ByteValue.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/ByteValue.java Wed Oct 09 13:07:58 2013 -0700 @@ -33,8 +33,9 @@ * @author James McIlree * @since 1.3 */ -public interface ByteValue extends PrimitiveValue, Comparable -{ +@jdk.Exported +public interface ByteValue extends PrimitiveValue, Comparable { + /** * Returns this ByteValue as a byte. * diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/CharType.java --- a/jdk/src/share/classes/com/sun/jdi/CharType.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/CharType.java Wed Oct 09 13:07:58 2013 -0700 @@ -35,6 +35,6 @@ * @author James McIlree * @since 1.3 */ -public interface CharType extends PrimitiveType -{ +@jdk.Exported +public interface CharType extends PrimitiveType { } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/CharValue.java --- a/jdk/src/share/classes/com/sun/jdi/CharValue.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/CharValue.java Wed Oct 09 13:07:58 2013 -0700 @@ -34,8 +34,9 @@ * @author James McIlree * @since 1.3 */ -public interface CharValue extends PrimitiveValue, Comparable -{ +@jdk.Exported +public interface CharValue extends PrimitiveValue, Comparable { + /** * Returns this CharValue as a char. * diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/ClassLoaderReference.java --- a/jdk/src/share/classes/com/sun/jdi/ClassLoaderReference.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/ClassLoaderReference.java Wed Oct 09 13:07:58 2013 -0700 @@ -39,6 +39,7 @@ * @author Gordon Hirsch * @since 1.3 */ +@jdk.Exported public interface ClassLoaderReference extends ObjectReference { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/ClassNotLoadedException.java --- a/jdk/src/share/classes/com/sun/jdi/ClassNotLoadedException.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/ClassNotLoadedException.java Wed Oct 09 13:07:58 2013 -0700 @@ -67,6 +67,7 @@ * @author Gordon Hirsch * @since 1.3 */ +@jdk.Exported public class ClassNotLoadedException extends Exception { private static final long serialVersionUID = -6242978768444298722L; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/ClassNotPreparedException.java --- a/jdk/src/share/classes/com/sun/jdi/ClassNotPreparedException.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/ClassNotPreparedException.java Wed Oct 09 13:07:58 2013 -0700 @@ -32,6 +32,7 @@ * @author Gordon Hirsch * @since 1.3 */ +@jdk.Exported public class ClassNotPreparedException extends RuntimeException { private static final long serialVersionUID = -6120698967144079642L; public ClassNotPreparedException() diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/ClassObjectReference.java --- a/jdk/src/share/classes/com/sun/jdi/ClassObjectReference.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/ClassObjectReference.java Wed Oct 09 13:07:58 2013 -0700 @@ -35,6 +35,7 @@ * @author Gordon Hirsch * @since 1.3 */ +@jdk.Exported public interface ClassObjectReference extends ObjectReference { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/ClassType.java --- a/jdk/src/share/classes/com/sun/jdi/ClassType.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/ClassType.java Wed Oct 09 13:07:58 2013 -0700 @@ -41,6 +41,7 @@ * @author James McIlree * @since 1.3 */ +@jdk.Exported public interface ClassType extends ReferenceType { /** * Gets the superclass of this class. diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/DoubleType.java --- a/jdk/src/share/classes/com/sun/jdi/DoubleType.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/DoubleType.java Wed Oct 09 13:07:58 2013 -0700 @@ -35,6 +35,6 @@ * @author James McIlree * @since 1.3 */ -public interface DoubleType extends PrimitiveType -{ +@jdk.Exported +public interface DoubleType extends PrimitiveType { } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/DoubleValue.java --- a/jdk/src/share/classes/com/sun/jdi/DoubleValue.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/DoubleValue.java Wed Oct 09 13:07:58 2013 -0700 @@ -34,8 +34,9 @@ * @author James McIlree * @since 1.3 */ -public interface DoubleValue extends PrimitiveValue, Comparable -{ +@jdk.Exported +public interface DoubleValue extends PrimitiveValue, Comparable { + /** * Returns this DoubleValue as a double. * diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/Field.java --- a/jdk/src/share/classes/com/sun/jdi/Field.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/Field.java Wed Oct 09 13:07:58 2013 -0700 @@ -38,6 +38,7 @@ * @author James McIlree * @since 1.3 */ +@jdk.Exported public interface Field extends TypeComponent, Comparable { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/FloatType.java --- a/jdk/src/share/classes/com/sun/jdi/FloatType.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/FloatType.java Wed Oct 09 13:07:58 2013 -0700 @@ -35,6 +35,6 @@ * @author James McIlree * @since 1.3 */ -public interface FloatType extends PrimitiveType -{ +@jdk.Exported +public interface FloatType extends PrimitiveType { } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/FloatValue.java --- a/jdk/src/share/classes/com/sun/jdi/FloatValue.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/FloatValue.java Wed Oct 09 13:07:58 2013 -0700 @@ -34,8 +34,9 @@ * @author James McIlree * @since 1.3 */ -public interface FloatValue extends PrimitiveValue, Comparable -{ +@jdk.Exported +public interface FloatValue extends PrimitiveValue, Comparable { + /** * Returns this FloatValue as a float. * diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/IncompatibleThreadStateException.java --- a/jdk/src/share/classes/com/sun/jdi/IncompatibleThreadStateException.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/IncompatibleThreadStateException.java Wed Oct 09 13:07:58 2013 -0700 @@ -32,16 +32,15 @@ * @author Gordon Hirsch * @since 1.3 */ -public class IncompatibleThreadStateException extends Exception -{ +@jdk.Exported +public class IncompatibleThreadStateException extends Exception { private static final long serialVersionUID = 6199174323414551389L; - public IncompatibleThreadStateException() - { + + public IncompatibleThreadStateException() { super(); } - public IncompatibleThreadStateException(String s) - { + public IncompatibleThreadStateException(String s) { super(s); } } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/InconsistentDebugInfoException.java --- a/jdk/src/share/classes/com/sun/jdi/InconsistentDebugInfoException.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/InconsistentDebugInfoException.java Wed Oct 09 13:07:58 2013 -0700 @@ -34,6 +34,7 @@ * @author Gordon Hirsch * @since 1.3 */ +@jdk.Exported public class InconsistentDebugInfoException extends RuntimeException { private static final long serialVersionUID = 7964236415376861808L; public InconsistentDebugInfoException() { diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/IntegerType.java --- a/jdk/src/share/classes/com/sun/jdi/IntegerType.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/IntegerType.java Wed Oct 09 13:07:58 2013 -0700 @@ -35,6 +35,6 @@ * @author James McIlree * @since 1.3 */ -public interface IntegerType extends PrimitiveType -{ +@jdk.Exported +public interface IntegerType extends PrimitiveType { } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/IntegerValue.java --- a/jdk/src/share/classes/com/sun/jdi/IntegerValue.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/IntegerValue.java Wed Oct 09 13:07:58 2013 -0700 @@ -34,8 +34,9 @@ * @author James McIlree * @since 1.3 */ -public interface IntegerValue extends PrimitiveValue, Comparable -{ +@jdk.Exported +public interface IntegerValue extends PrimitiveValue, Comparable { + /** * Returns this IntegerValue as an int. * diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/InterfaceType.java --- a/jdk/src/share/classes/com/sun/jdi/InterfaceType.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/InterfaceType.java Wed Oct 09 13:07:58 2013 -0700 @@ -43,6 +43,7 @@ * @author James McIlree * @since 1.3 */ +@jdk.Exported public interface InterfaceType extends ReferenceType { /** * Gets the interfaces directly extended by this interface. diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/InternalException.java --- a/jdk/src/share/classes/com/sun/jdi/InternalException.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/InternalException.java Wed Oct 09 13:07:58 2013 -0700 @@ -32,6 +32,7 @@ * @author Gordon Hirsch * @since 1.3 */ +@jdk.Exported public class InternalException extends RuntimeException { private static final long serialVersionUID = -9171606393104480607L; private int errorCode; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/InvalidCodeIndexException.java --- a/jdk/src/share/classes/com/sun/jdi/InvalidCodeIndexException.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/InvalidCodeIndexException.java Wed Oct 09 13:07:58 2013 -0700 @@ -34,6 +34,7 @@ * @author Gordon Hirsch * @since 1.3 */ +@jdk.Exported @Deprecated public class InvalidCodeIndexException extends RuntimeException { private static final long serialVersionUID = 7416010225133747805L; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/InvalidLineNumberException.java --- a/jdk/src/share/classes/com/sun/jdi/InvalidLineNumberException.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/InvalidLineNumberException.java Wed Oct 09 13:07:58 2013 -0700 @@ -34,6 +34,7 @@ * @author Gordon Hirsch * @since 1.3 */ +@jdk.Exported @Deprecated public class InvalidLineNumberException extends RuntimeException { private static final long serialVersionUID = 4048709912372692875L; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/InvalidStackFrameException.java --- a/jdk/src/share/classes/com/sun/jdi/InvalidStackFrameException.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/InvalidStackFrameException.java Wed Oct 09 13:07:58 2013 -0700 @@ -32,6 +32,7 @@ * @author Gordon Hirsch * @since 1.3 */ +@jdk.Exported public class InvalidStackFrameException extends RuntimeException { private static final long serialVersionUID = -1919378296505827922L; public InvalidStackFrameException() { diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/InvalidTypeException.java --- a/jdk/src/share/classes/com/sun/jdi/InvalidTypeException.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/InvalidTypeException.java Wed Oct 09 13:07:58 2013 -0700 @@ -32,16 +32,15 @@ * @author James McIlree * @since 1.3 */ -public class InvalidTypeException extends Exception -{ +@jdk.Exported +public class InvalidTypeException extends Exception { private static final long serialVersionUID = 2256667231949650806L; - public InvalidTypeException() - { + + public InvalidTypeException() { super(); } - public InvalidTypeException(String s) - { + public InvalidTypeException(String s) { super(s); } } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/InvocationException.java --- a/jdk/src/share/classes/com/sun/jdi/InvocationException.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/InvocationException.java Wed Oct 09 13:07:58 2013 -0700 @@ -32,19 +32,17 @@ * @author Gordon Hirsch * @since 1.3 */ -public class InvocationException extends Exception -{ +@jdk.Exported +public class InvocationException extends Exception { private static final long serialVersionUID = 6066780907971918568L; ObjectReference exception; - public InvocationException(ObjectReference exception) - { + public InvocationException(ObjectReference exception) { super("Exception occurred in target VM"); this.exception = exception; } - public ObjectReference exception() - { + public ObjectReference exception() { return exception; } } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/JDIPermission.java --- a/jdk/src/share/classes/com/sun/jdi/JDIPermission.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/JDIPermission.java Wed Oct 09 13:07:58 2013 -0700 @@ -78,6 +78,7 @@ * */ +@jdk.Exported public final class JDIPermission extends java.security.BasicPermission { private static final long serialVersionUID = -6988461416938786271L; /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/LocalVariable.java --- a/jdk/src/share/classes/com/sun/jdi/LocalVariable.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/LocalVariable.java Wed Oct 09 13:07:58 2013 -0700 @@ -42,6 +42,7 @@ * @since 1.3 */ +@jdk.Exported public interface LocalVariable extends Mirror, Comparable { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/Locatable.java --- a/jdk/src/share/classes/com/sun/jdi/Locatable.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/Locatable.java Wed Oct 09 13:07:58 2013 -0700 @@ -33,6 +33,7 @@ * @author James McIlree * @since 1.3 */ +@jdk.Exported public interface Locatable { /** * Returns the {@link Location} of this mirror, if there diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/Location.java --- a/jdk/src/share/classes/com/sun/jdi/Location.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/Location.java Wed Oct 09 13:07:58 2013 -0700 @@ -86,6 +86,7 @@ * @author James McIlree * @since 1.3 */ +@jdk.Exported public interface Location extends Mirror, Comparable { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/LongType.java --- a/jdk/src/share/classes/com/sun/jdi/LongType.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/LongType.java Wed Oct 09 13:07:58 2013 -0700 @@ -35,6 +35,6 @@ * @author James McIlree * @since 1.3 */ -public interface LongType extends PrimitiveType -{ +@jdk.Exported +public interface LongType extends PrimitiveType { } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/LongValue.java --- a/jdk/src/share/classes/com/sun/jdi/LongValue.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/LongValue.java Wed Oct 09 13:07:58 2013 -0700 @@ -34,8 +34,9 @@ * @author James McIlree * @since 1.3 */ -public interface LongValue extends PrimitiveValue, Comparable -{ +@jdk.Exported +public interface LongValue extends PrimitiveValue, Comparable { + /** * Returns this LongValue as a long. * diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/Method.java --- a/jdk/src/share/classes/com/sun/jdi/Method.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/Method.java Wed Oct 09 13:07:58 2013 -0700 @@ -39,6 +39,7 @@ * @author James McIlree * @since 1.3 */ +@jdk.Exported public interface Method extends TypeComponent, Locatable, Comparable { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/Mirror.java --- a/jdk/src/share/classes/com/sun/jdi/Mirror.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/Mirror.java Wed Oct 09 13:07:58 2013 -0700 @@ -56,6 +56,7 @@ * @author James McIlree * @since 1.3 */ +@jdk.Exported public interface Mirror { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/MonitorInfo.java --- a/jdk/src/share/classes/com/sun/jdi/MonitorInfo.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/MonitorInfo.java Wed Oct 09 13:07:58 2013 -0700 @@ -32,6 +32,7 @@ * @since 1.6 */ +@jdk.Exported public interface MonitorInfo extends Mirror { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/NativeMethodException.java --- a/jdk/src/share/classes/com/sun/jdi/NativeMethodException.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/NativeMethodException.java Wed Oct 09 13:07:58 2013 -0700 @@ -32,6 +32,7 @@ * @author Gordon Hirsch * @since 1.3 */ +@jdk.Exported public class NativeMethodException extends RuntimeException { private static final long serialVersionUID = 3924951669039469992L; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/ObjectCollectedException.java --- a/jdk/src/share/classes/com/sun/jdi/ObjectCollectedException.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/ObjectCollectedException.java Wed Oct 09 13:07:58 2013 -0700 @@ -32,6 +32,7 @@ * @author Gordon Hirsch * @since 1.3 */ +@jdk.Exported public class ObjectCollectedException extends RuntimeException { private static final long serialVersionUID = -1928428056197269588L; public ObjectCollectedException() { diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/ObjectReference.java --- a/jdk/src/share/classes/com/sun/jdi/ObjectReference.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/ObjectReference.java Wed Oct 09 13:07:58 2013 -0700 @@ -55,8 +55,9 @@ * @author James McIlree * @since 1.3 */ -public interface ObjectReference extends Value -{ +@jdk.Exported +public interface ObjectReference extends Value { + /** * Gets the {@link ReferenceType} that mirrors the type * of this object. The type may be a subclass or implementor of the diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/PathSearchingVirtualMachine.java --- a/jdk/src/share/classes/com/sun/jdi/PathSearchingVirtualMachine.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/PathSearchingVirtualMachine.java Wed Oct 09 13:07:58 2013 -0700 @@ -33,6 +33,7 @@ * @author Gordon Hirsch * @since 1.3 */ +@jdk.Exported public interface PathSearchingVirtualMachine extends VirtualMachine { /** * Get the class path for this virtual machine. diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/PrimitiveType.java --- a/jdk/src/share/classes/com/sun/jdi/PrimitiveType.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/PrimitiveType.java Wed Oct 09 13:07:58 2013 -0700 @@ -37,5 +37,6 @@ * @author James McIlree * @since 1.3 */ +@jdk.Exported public interface PrimitiveType extends Type { } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/PrimitiveValue.java --- a/jdk/src/share/classes/com/sun/jdi/PrimitiveValue.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/PrimitiveValue.java Wed Oct 09 13:07:58 2013 -0700 @@ -35,8 +35,9 @@ * @author James McIlree * @since 1.3 */ -public interface PrimitiveValue extends Value -{ +@jdk.Exported +public interface PrimitiveValue extends Value { + /** * Converts this value to a BooleanValue and returns the result * as a boolean. diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/ReferenceType.java --- a/jdk/src/share/classes/com/sun/jdi/ReferenceType.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/ReferenceType.java Wed Oct 09 13:07:58 2013 -0700 @@ -77,6 +77,7 @@ * @author James McIlree * @since 1.3 */ +@jdk.Exported public interface ReferenceType extends Type, Comparable, Accessible { diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/ShortType.java --- a/jdk/src/share/classes/com/sun/jdi/ShortType.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/ShortType.java Wed Oct 09 13:07:58 2013 -0700 @@ -35,5 +35,6 @@ * @author James McIlree * @since 1.3 */ +@jdk.Exported public interface ShortType extends PrimitiveType { } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/ShortValue.java --- a/jdk/src/share/classes/com/sun/jdi/ShortValue.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/ShortValue.java Wed Oct 09 13:07:58 2013 -0700 @@ -34,8 +34,9 @@ * @author James McIlree * @since 1.3 */ -public interface ShortValue extends PrimitiveValue, Comparable -{ +@jdk.Exported +public interface ShortValue extends PrimitiveValue, Comparable { + /** * Returns this ShortValue as a short. * diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/StackFrame.java --- a/jdk/src/share/classes/com/sun/jdi/StackFrame.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/StackFrame.java Wed Oct 09 13:07:58 2013 -0700 @@ -58,8 +58,9 @@ * @author James McIlree * @since 1.3 */ -public interface StackFrame extends Mirror, Locatable -{ +@jdk.Exported +public interface StackFrame extends Mirror, Locatable { + /** * Returns the {@link Location} of the current instruction in the frame. * The method for which this frame was created can also be accessed diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/StringReference.java --- a/jdk/src/share/classes/com/sun/jdi/StringReference.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/StringReference.java Wed Oct 09 13:07:58 2013 -0700 @@ -35,8 +35,8 @@ * @author James McIlree * @since 1.3 */ -public interface StringReference extends ObjectReference -{ +@jdk.Exported +public interface StringReference extends ObjectReference { /** * Returns the StringReference as a String. The returned string * is the equivalent of the mirrored string, but is an entity in the diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/ThreadGroupReference.java --- a/jdk/src/share/classes/com/sun/jdi/ThreadGroupReference.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/ThreadGroupReference.java Wed Oct 09 13:07:58 2013 -0700 @@ -37,8 +37,9 @@ * @author James McIlree * @since 1.3 */ -public interface ThreadGroupReference extends ObjectReference -{ +@jdk.Exported +public interface ThreadGroupReference extends ObjectReference { + /** * Returns the name of this thread group. * diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/ThreadReference.java --- a/jdk/src/share/classes/com/sun/jdi/ThreadReference.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/ThreadReference.java Wed Oct 09 13:07:58 2013 -0700 @@ -36,8 +36,8 @@ * @author James McIlree * @since 1.3 */ -public interface ThreadReference extends ObjectReference -{ +@jdk.Exported +public interface ThreadReference extends ObjectReference { /** Thread status is unknown */ public final int THREAD_STATUS_UNKNOWN =-1; /** Thread has completed execution */ diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/Type.java --- a/jdk/src/share/classes/com/sun/jdi/Type.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/Type.java Wed Oct 09 13:07:58 2013 -0700 @@ -127,8 +127,9 @@ * @author James McIlree * @since 1.3 */ -public interface Type extends Mirror -{ +@jdk.Exported +public interface Type extends Mirror { + /** * Returns the JNI-style signature for this type. *

diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/TypeComponent.java --- a/jdk/src/share/classes/com/sun/jdi/TypeComponent.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/TypeComponent.java Wed Oct 09 13:07:58 2013 -0700 @@ -44,6 +44,7 @@ * @author James McIlree * @since 1.3 */ +@jdk.Exported public interface TypeComponent extends Mirror, Accessible { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/VMCannotBeModifiedException.java --- a/jdk/src/share/classes/com/sun/jdi/VMCannotBeModifiedException.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/VMCannotBeModifiedException.java Wed Oct 09 13:07:58 2013 -0700 @@ -32,6 +32,7 @@ * @author Jim Holmlund * @since 1.5 */ +@jdk.Exported public class VMCannotBeModifiedException extends UnsupportedOperationException { private static final long serialVersionUID = -4063879815130164009L; public VMCannotBeModifiedException() { diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/VMDisconnectedException.java --- a/jdk/src/share/classes/com/sun/jdi/VMDisconnectedException.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/VMDisconnectedException.java Wed Oct 09 13:07:58 2013 -0700 @@ -33,6 +33,7 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public class VMDisconnectedException extends RuntimeException { private static final long serialVersionUID = 2892975269768351637L; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/VMMismatchException.java --- a/jdk/src/share/classes/com/sun/jdi/VMMismatchException.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/VMMismatchException.java Wed Oct 09 13:07:58 2013 -0700 @@ -33,6 +33,7 @@ * @author Gordon Hirsch * @since 1.3 */ +@jdk.Exported public class VMMismatchException extends RuntimeException { private static final long serialVersionUID = 289169358790459564L; public VMMismatchException() { diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/VMOutOfMemoryException.java --- a/jdk/src/share/classes/com/sun/jdi/VMOutOfMemoryException.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/VMOutOfMemoryException.java Wed Oct 09 13:07:58 2013 -0700 @@ -32,6 +32,7 @@ * @author Gordon Hirsch * @since 1.3 */ +@jdk.Exported public class VMOutOfMemoryException extends RuntimeException { private static final long serialVersionUID = 71504228548910686L; public VMOutOfMemoryException() { diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/Value.java --- a/jdk/src/share/classes/com/sun/jdi/Value.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/Value.java Wed Oct 09 13:07:58 2013 -0700 @@ -168,8 +168,8 @@ * @since 1.3 */ -public interface Value extends Mirror -{ +@jdk.Exported +public interface Value extends Mirror { /** * Returns the run-time type of this value. * diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/VirtualMachine.java --- a/jdk/src/share/classes/com/sun/jdi/VirtualMachine.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/VirtualMachine.java Wed Oct 09 13:07:58 2013 -0700 @@ -70,6 +70,7 @@ * @author James McIlree * @since 1.3 */ +@jdk.Exported public interface VirtualMachine extends Mirror { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/VirtualMachineManager.java --- a/jdk/src/share/classes/com/sun/jdi/VirtualMachineManager.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/VirtualMachineManager.java Wed Oct 09 13:07:58 2013 -0700 @@ -271,6 +271,7 @@ * @author Gordon Hirsch * @since 1.3 */ +@jdk.Exported public interface VirtualMachineManager { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/VoidType.java --- a/jdk/src/share/classes/com/sun/jdi/VoidType.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/VoidType.java Wed Oct 09 13:07:58 2013 -0700 @@ -35,5 +35,6 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public interface VoidType extends Type { } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/VoidValue.java --- a/jdk/src/share/classes/com/sun/jdi/VoidValue.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/VoidValue.java Wed Oct 09 13:07:58 2013 -0700 @@ -32,6 +32,7 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public interface VoidValue extends Value { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/connect/AttachingConnector.java --- a/jdk/src/share/classes/com/sun/jdi/connect/AttachingConnector.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/connect/AttachingConnector.java Wed Oct 09 13:07:58 2013 -0700 @@ -35,6 +35,7 @@ * @author Gordon Hirsch * @since 1.3 */ +@jdk.Exported public interface AttachingConnector extends Connector { /** * Attaches to a running application and and returns a diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/connect/Connector.java --- a/jdk/src/share/classes/com/sun/jdi/connect/Connector.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/connect/Connector.java Wed Oct 09 13:07:58 2013 -0700 @@ -45,6 +45,7 @@ * @author Gordon Hirsch * @since 1.3 */ +@jdk.Exported public interface Connector { /** * Returns a short identifier for the connector. Connector implementors @@ -91,6 +92,7 @@ * {@link Connector.IntegerArgument}, * or {@link Connector.SelectedArgument}. */ + @jdk.Exported public interface Argument extends Serializable { /** * Returns a short, unique identifier for the argument. @@ -156,6 +158,7 @@ * 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. @@ -196,6 +199,7 @@ * 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. @@ -257,6 +261,7 @@ * 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. @@ -269,6 +274,7 @@ * 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 diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/connect/IllegalConnectorArgumentsException.java --- a/jdk/src/share/classes/com/sun/jdi/connect/IllegalConnectorArgumentsException.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/connect/IllegalConnectorArgumentsException.java Wed Oct 09 13:07:58 2013 -0700 @@ -36,8 +36,9 @@ * @author Gordon Hirsch * @since 1.3 */ -public class IllegalConnectorArgumentsException extends Exception -{ +@jdk.Exported +public class IllegalConnectorArgumentsException extends Exception { + private static final long serialVersionUID = -3042212603611350941L; List names; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/connect/LaunchingConnector.java --- a/jdk/src/share/classes/com/sun/jdi/connect/LaunchingConnector.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/connect/LaunchingConnector.java Wed Oct 09 13:07:58 2013 -0700 @@ -35,6 +35,7 @@ * @author Gordon Hirsch * @since 1.3 */ +@jdk.Exported public interface LaunchingConnector extends Connector { /** * Launches an application and connects to its VM. Properties diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/connect/ListeningConnector.java --- a/jdk/src/share/classes/com/sun/jdi/connect/ListeningConnector.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/connect/ListeningConnector.java Wed Oct 09 13:07:58 2013 -0700 @@ -35,6 +35,7 @@ * @author Gordon Hirsch * @since 1.3 */ +@jdk.Exported public interface ListeningConnector extends Connector { /** * Indicates whether this listening connector supports multiple diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/connect/Transport.java --- a/jdk/src/share/classes/com/sun/jdi/connect/Transport.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/connect/Transport.java Wed Oct 09 13:07:58 2013 -0700 @@ -42,6 +42,7 @@ * @author Gordon Hirsch * @since 1.3 */ +@jdk.Exported public interface Transport { /** * Returns a short identifier for the transport. diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/connect/TransportTimeoutException.java --- a/jdk/src/share/classes/com/sun/jdi/connect/TransportTimeoutException.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/connect/TransportTimeoutException.java Wed Oct 09 13:07:58 2013 -0700 @@ -54,6 +54,7 @@ * * @since 1.5 */ +@jdk.Exported public class TransportTimeoutException extends java.io.IOException { private static final long serialVersionUID = 4107035242623365074L; /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/connect/VMStartException.java --- a/jdk/src/share/classes/com/sun/jdi/connect/VMStartException.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/connect/VMStartException.java Wed Oct 09 13:07:58 2013 -0700 @@ -34,8 +34,9 @@ * @author Gordon Hirsch * @since 1.3 */ -public class VMStartException extends Exception -{ +@jdk.Exported +public class VMStartException extends Exception { + private static final long serialVersionUID = 6408644824640801020L; Process process; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/connect/package-info.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/src/share/classes/com/sun/jdi/connect/package-info.java Wed Oct 09 13:07:58 2013 -0700 @@ -0,0 +1,39 @@ +/* + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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. + */ + +/** + * This package defines connections between the virtual machine + * using the JDI and the target virtual machine. + * In concert with {@link com.sun.jdi.VirtualMachineManager} + * it is the mechanism for launching, attaching, etc to + * target virtual machines. + *

+ * Methods may be added to the interfaces in the JDI packages in future + * releases. Existing packages may be renamed if the JDI becomes a standard + * extension. + */ + +@jdk.Exported +package com.sun.jdi.connect; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/connect/package.html --- a/jdk/src/share/classes/com/sun/jdi/connect/package.html Tue Oct 08 14:41:46 2013 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ - - -com.sun.jdi.connect description - - - - -This package defines -connections between the virtual machine -using the JDI and the target virtual machine. -In concert with {@link com.sun.jdi.VirtualMachineManager} -it is the mechanism for launching, attaching, etc to -target virtual machines. -

-Methods may be added to the interfaces in the JDI packages in future -releases. Existing packages may be renamed if the JDI becomes a standard -extension. - - diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/connect/spi/ClosedConnectionException.java --- a/jdk/src/share/classes/com/sun/jdi/connect/spi/ClosedConnectionException.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/connect/spi/ClosedConnectionException.java Wed Oct 09 13:07:58 2013 -0700 @@ -45,6 +45,7 @@ * * @since 1.5 */ +@jdk.Exported public class ClosedConnectionException extends java.io.IOException { private static final long serialVersionUID = 3877032124297204774L; /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/connect/spi/Connection.java --- a/jdk/src/share/classes/com/sun/jdi/connect/spi/Connection.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/connect/spi/Connection.java Wed Oct 09 13:07:58 2013 -0700 @@ -56,6 +56,7 @@ * @since 1.5 */ +@jdk.Exported public abstract class Connection { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/connect/spi/TransportService.java --- a/jdk/src/share/classes/com/sun/jdi/connect/spi/TransportService.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/connect/spi/TransportService.java Wed Oct 09 13:07:58 2013 -0700 @@ -77,6 +77,7 @@ * @since 1.5 */ +@jdk.Exported public abstract class TransportService { /** @@ -96,6 +97,7 @@ /** * The transport service capabilities. */ + @jdk.Exported public static abstract class Capabilities { /** @@ -229,6 +231,7 @@ * #stopListening stopListening} to stop the transport * service from listening on an address. */ + @jdk.Exported public static abstract class ListenKey { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/connect/spi/package-info.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/src/share/classes/com/sun/jdi/connect/spi/package-info.java Wed Oct 09 13:07:58 2013 -0700 @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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. + */ + +/** + * This package comprises the interfaces and classes used to + * develop new {@link com.sun.jdi.connect.spi.TransportService} + * implementations. + */ + +@jdk.Exported +package com.sun.jdi.connect.spi; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/connect/spi/package.html --- a/jdk/src/share/classes/com/sun/jdi/connect/spi/package.html Tue Oct 08 14:41:46 2013 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ - - - com.sun.jdi.connect.spi description - - - -This package comprises the interfaces and classes used to -develop new {@link com.sun.jdi.connect.spi.TransportService} -implementations. - - diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/event/AccessWatchpointEvent.java --- a/jdk/src/share/classes/com/sun/jdi/event/AccessWatchpointEvent.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/event/AccessWatchpointEvent.java Wed Oct 09 13:07:58 2013 -0700 @@ -37,5 +37,6 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public interface AccessWatchpointEvent extends WatchpointEvent { } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/event/BreakpointEvent.java --- a/jdk/src/share/classes/com/sun/jdi/event/BreakpointEvent.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/event/BreakpointEvent.java Wed Oct 09 13:07:58 2013 -0700 @@ -47,6 +47,6 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public interface BreakpointEvent extends LocatableEvent { - } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/event/ClassPrepareEvent.java --- a/jdk/src/share/classes/com/sun/jdi/event/ClassPrepareEvent.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/event/ClassPrepareEvent.java Wed Oct 09 13:07:58 2013 -0700 @@ -39,6 +39,7 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public interface ClassPrepareEvent extends Event { /** * Returns the thread in which this event has occurred. diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/event/ClassUnloadEvent.java --- a/jdk/src/share/classes/com/sun/jdi/event/ClassUnloadEvent.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/event/ClassUnloadEvent.java Wed Oct 09 13:07:58 2013 -0700 @@ -39,6 +39,7 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public interface ClassUnloadEvent extends Event { /** * Returns the name of the class that has been unloaded. diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/event/Event.java --- a/jdk/src/share/classes/com/sun/jdi/event/Event.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/event/Event.java Wed Oct 09 13:07:58 2013 -0700 @@ -43,6 +43,7 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public interface Event extends Mirror { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/event/EventIterator.java --- a/jdk/src/share/classes/com/sun/jdi/event/EventIterator.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/event/EventIterator.java Wed Oct 09 13:07:58 2013 -0700 @@ -40,6 +40,7 @@ * @since 1.3 */ +@jdk.Exported public interface EventIterator extends Iterator { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/event/EventQueue.java --- a/jdk/src/share/classes/com/sun/jdi/event/EventQueue.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/event/EventQueue.java Wed Oct 09 13:07:58 2013 -0700 @@ -57,6 +57,7 @@ * @since 1.3 */ +@jdk.Exported public interface EventQueue extends Mirror { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/event/EventSet.java --- a/jdk/src/share/classes/com/sun/jdi/event/EventSet.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/event/EventSet.java Wed Oct 09 13:07:58 2013 -0700 @@ -127,6 +127,7 @@ * @since 1.3 */ +@jdk.Exported public interface EventSet extends Mirror, Set { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/event/ExceptionEvent.java --- a/jdk/src/share/classes/com/sun/jdi/event/ExceptionEvent.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/event/ExceptionEvent.java Wed Oct 09 13:07:58 2013 -0700 @@ -44,6 +44,7 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public interface ExceptionEvent extends LocatableEvent { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/event/LocatableEvent.java --- a/jdk/src/share/classes/com/sun/jdi/event/LocatableEvent.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/event/LocatableEvent.java Wed Oct 09 13:07:58 2013 -0700 @@ -36,6 +36,7 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public interface LocatableEvent extends Event, Locatable { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/event/MethodEntryEvent.java --- a/jdk/src/share/classes/com/sun/jdi/event/MethodEntryEvent.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/event/MethodEntryEvent.java Wed Oct 09 13:07:58 2013 -0700 @@ -43,6 +43,7 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public interface MethodEntryEvent extends LocatableEvent { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/event/MethodExitEvent.java --- a/jdk/src/share/classes/com/sun/jdi/event/MethodExitEvent.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/event/MethodExitEvent.java Wed Oct 09 13:07:58 2013 -0700 @@ -40,6 +40,7 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public interface MethodExitEvent extends LocatableEvent { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/event/ModificationWatchpointEvent.java --- a/jdk/src/share/classes/com/sun/jdi/event/ModificationWatchpointEvent.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/event/ModificationWatchpointEvent.java Wed Oct 09 13:07:58 2013 -0700 @@ -38,6 +38,7 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public interface ModificationWatchpointEvent extends WatchpointEvent { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/event/MonitorContendedEnterEvent.java --- a/jdk/src/share/classes/com/sun/jdi/event/MonitorContendedEnterEvent.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/event/MonitorContendedEnterEvent.java Wed Oct 09 13:07:58 2013 -0700 @@ -40,6 +40,7 @@ * @author Swamy Venkataramanappa * @since 1.6 */ +@jdk.Exported public interface MonitorContendedEnterEvent extends LocatableEvent { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/event/MonitorContendedEnteredEvent.java --- a/jdk/src/share/classes/com/sun/jdi/event/MonitorContendedEnteredEvent.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/event/MonitorContendedEnteredEvent.java Wed Oct 09 13:07:58 2013 -0700 @@ -39,6 +39,7 @@ * @author Swamy Venkataramanappa * @since 1.6 */ +@jdk.Exported public interface MonitorContendedEnteredEvent extends LocatableEvent { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/event/MonitorWaitEvent.java --- a/jdk/src/share/classes/com/sun/jdi/event/MonitorWaitEvent.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/event/MonitorWaitEvent.java Wed Oct 09 13:07:58 2013 -0700 @@ -38,6 +38,7 @@ * @author Swamy Venkataramanappa * @since 1.6 */ +@jdk.Exported public interface MonitorWaitEvent extends LocatableEvent { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/event/MonitorWaitedEvent.java --- a/jdk/src/share/classes/com/sun/jdi/event/MonitorWaitedEvent.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/event/MonitorWaitedEvent.java Wed Oct 09 13:07:58 2013 -0700 @@ -38,6 +38,7 @@ * @author Swamy Venkataramanappa * @since 1.6 */ +@jdk.Exported public interface MonitorWaitedEvent extends LocatableEvent { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/event/StepEvent.java --- a/jdk/src/share/classes/com/sun/jdi/event/StepEvent.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/event/StepEvent.java Wed Oct 09 13:07:58 2013 -0700 @@ -46,6 +46,6 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public interface StepEvent extends LocatableEvent { - } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/event/ThreadDeathEvent.java --- a/jdk/src/share/classes/com/sun/jdi/event/ThreadDeathEvent.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/event/ThreadDeathEvent.java Wed Oct 09 13:07:58 2013 -0700 @@ -45,6 +45,7 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public interface ThreadDeathEvent extends Event { /** * Returns the thread which is terminating. diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/event/ThreadStartEvent.java --- a/jdk/src/share/classes/com/sun/jdi/event/ThreadStartEvent.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/event/ThreadStartEvent.java Wed Oct 09 13:07:58 2013 -0700 @@ -52,6 +52,7 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public interface ThreadStartEvent extends Event { /** * Returns the thread which has started. diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/event/VMDeathEvent.java --- a/jdk/src/share/classes/com/sun/jdi/event/VMDeathEvent.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/event/VMDeathEvent.java Wed Oct 09 13:07:58 2013 -0700 @@ -68,5 +68,6 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public interface VMDeathEvent extends Event { } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/event/VMDisconnectEvent.java --- a/jdk/src/share/classes/com/sun/jdi/event/VMDisconnectEvent.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/event/VMDisconnectEvent.java Wed Oct 09 13:07:58 2013 -0700 @@ -52,5 +52,6 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public interface VMDisconnectEvent extends Event { } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/event/VMStartEvent.java --- a/jdk/src/share/classes/com/sun/jdi/event/VMStartEvent.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/event/VMStartEvent.java Wed Oct 09 13:07:58 2013 -0700 @@ -43,6 +43,7 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public interface VMStartEvent extends Event { /** * Returns the initial thread of the VM which has started. diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/event/WatchpointEvent.java --- a/jdk/src/share/classes/com/sun/jdi/event/WatchpointEvent.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/event/WatchpointEvent.java Wed Oct 09 13:07:58 2013 -0700 @@ -37,6 +37,7 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public interface WatchpointEvent extends LocatableEvent { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/event/package-info.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/src/share/classes/com/sun/jdi/event/package-info.java Wed Oct 09 13:07:58 2013 -0700 @@ -0,0 +1,47 @@ +/* + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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. + */ + +/** + * This package defines JDI events and event processing. + * An {@link com.sun.jdi.event.Event} is always a member of an + * {@link com.sun.jdi.event.EventSet}, which + * is retrieved from the {@link com.sun.jdi.event.EventQueue}. + * Examples of Events include + * {@link com.sun.jdi.event.BreakpointEvent "breakpoints events"}, + * {@link com.sun.jdi.event.ThreadStartEvent "thread creation events"} and + * {@link com.sun.jdi.event.VMDeathEvent "virtual machine death event"}. + * With the exception + * of termination events, all events received must be requested with an + * {@link com.sun.jdi.request.EventRequest "EventRequest"}. The + * {@link com.sun.jdi.request} package defines event requests and event + * request management. + *

+ * Methods may be added to the interfaces in the JDI packages in future + * releases. Existing packages may be renamed if the JDI becomes a standard + * extension. + */ + +@jdk.Exported +package com.sun.jdi.event; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/event/package.html --- a/jdk/src/share/classes/com/sun/jdi/event/package.html Tue Oct 08 14:41:46 2013 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ - - - com.sun.jdi.event description - - - -This package defines JDI events and event processing. -An {@link com.sun.jdi.event.Event} is always a member of an -{@link com.sun.jdi.event.EventSet}, which -is retrieved from the {@link com.sun.jdi.event.EventQueue}. -Examples of Events include -{@link com.sun.jdi.event.BreakpointEvent "breakpoints events"}, -{@link com.sun.jdi.event.ThreadStartEvent "thread creation events"} and -{@link com.sun.jdi.event.VMDeathEvent "virtual machine death event"}. -With the exception -of termination events, all events received must be requested with an -{@link com.sun.jdi.request.EventRequest "EventRequest"}. The -{@link com.sun.jdi.request} package defines event requests and event -request management. -

-Methods may be added to the interfaces in the JDI packages in future -releases. Existing packages may be renamed if the JDI becomes a standard -extension. - - diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/package-info.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/src/share/classes/com/sun/jdi/package-info.java Wed Oct 09 13:07:58 2013 -0700 @@ -0,0 +1,48 @@ +/* + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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. + */ + +/** + * This is the core package of the Java Debug + * Interface (JDI), it defines mirrors for values, types, and the target + * VirtualMachine itself - as well bootstrapping facilities. + * {@link com.sun.jdi.VirtualMachine} mirrors the target virtual machine and + * is the origin of all information provided by the JDI. A VirtualMachine + * is typically created by using the + * {@link com.sun.jdi.VirtualMachineManager} to create + * a connection to the target virtual machine (see the + * {@link com.sun.jdi.connect} package). In turn the + * {@link com.sun.jdi.VirtualMachineManager} is typically created by calling + * {@link com.sun.jdi.Bootstrap#virtualMachineManager()}. + *

+ * Most of the methods within this package can throw the unchecked exception + * {@link com.sun.jdi.VMDisconnectedException}. + *

+ * Methods may be added to the interfaces in the JDI packages in future + * releases. Existing packages may be renamed if the JDI becomes a standard + * extension. + */ + +@jdk.Exported +package com.sun.jdi; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/package.html --- a/jdk/src/share/classes/com/sun/jdi/package.html Tue Oct 08 14:41:46 2013 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ - - - com.sun.jdi package description - - - -This is the core package of the Java Debug -Interface (JDI), it defines mirrors for values, types, and the target -VirtualMachine itself - as well bootstrapping facilities. -{@link com.sun.jdi.VirtualMachine} mirrors the target virtual machine and -is the origin of all information provided by the JDI. A VirtualMachine -is typically created by using the -{@link com.sun.jdi.VirtualMachineManager} to create -a connection to the target virtual machine (see the -{@link com.sun.jdi.connect} package). In turn the -{@link com.sun.jdi.VirtualMachineManager} is typically created by calling -{@link com.sun.jdi.Bootstrap#virtualMachineManager()}. -

-Most of the methods within this package can throw the unchecked exception -{@link com.sun.jdi.VMDisconnectedException}. -

-Methods may be added to the interfaces in the JDI packages in future -releases. Existing packages may be renamed if the JDI becomes a standard -extension. - - diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/request/AccessWatchpointRequest.java --- a/jdk/src/share/classes/com/sun/jdi/request/AccessWatchpointRequest.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/request/AccessWatchpointRequest.java Wed Oct 09 13:07:58 2013 -0700 @@ -56,5 +56,6 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public interface AccessWatchpointRequest extends WatchpointRequest { } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/request/BreakpointRequest.java --- a/jdk/src/share/classes/com/sun/jdi/request/BreakpointRequest.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/request/BreakpointRequest.java Wed Oct 09 13:07:58 2013 -0700 @@ -46,6 +46,7 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public interface BreakpointRequest extends EventRequest, Locatable { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/request/ClassPrepareRequest.java --- a/jdk/src/share/classes/com/sun/jdi/request/ClassPrepareRequest.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/request/ClassPrepareRequest.java Wed Oct 09 13:07:58 2013 -0700 @@ -47,6 +47,7 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public interface ClassPrepareRequest extends EventRequest { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/request/ClassUnloadRequest.java --- a/jdk/src/share/classes/com/sun/jdi/request/ClassUnloadRequest.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/request/ClassUnloadRequest.java Wed Oct 09 13:07:58 2013 -0700 @@ -46,6 +46,7 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public interface ClassUnloadRequest extends EventRequest { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/request/DuplicateRequestException.java --- a/jdk/src/share/classes/com/sun/jdi/request/DuplicateRequestException.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/request/DuplicateRequestException.java Wed Oct 09 13:07:58 2013 -0700 @@ -31,16 +31,15 @@ * @author Robert Field * @since 1.3 */ -public class DuplicateRequestException extends RuntimeException -{ +@jdk.Exported +public class DuplicateRequestException extends RuntimeException { private static final long serialVersionUID = -3719784920313411060L; - public DuplicateRequestException() - { + + public DuplicateRequestException() { super(); } - public DuplicateRequestException(String s) - { + public DuplicateRequestException(String s) { super(s); } } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/request/EventRequest.java --- a/jdk/src/share/classes/com/sun/jdi/request/EventRequest.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/request/EventRequest.java Wed Oct 09 13:07:58 2013 -0700 @@ -78,6 +78,7 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public interface EventRequest extends Mirror { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/request/EventRequestManager.java --- a/jdk/src/share/classes/com/sun/jdi/request/EventRequestManager.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/request/EventRequestManager.java Wed Oct 09 13:07:58 2013 -0700 @@ -44,6 +44,7 @@ * @since 1.3 */ +@jdk.Exported public interface EventRequestManager extends Mirror { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/request/ExceptionRequest.java --- a/jdk/src/share/classes/com/sun/jdi/request/ExceptionRequest.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/request/ExceptionRequest.java Wed Oct 09 13:07:58 2013 -0700 @@ -43,6 +43,7 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public interface ExceptionRequest extends EventRequest { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/request/InvalidRequestStateException.java --- a/jdk/src/share/classes/com/sun/jdi/request/InvalidRequestStateException.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/request/InvalidRequestStateException.java Wed Oct 09 13:07:58 2013 -0700 @@ -35,6 +35,7 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public class InvalidRequestStateException extends RuntimeException { private static final long serialVersionUID = -3774632428543322148L; public InvalidRequestStateException() diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/request/MethodEntryRequest.java --- a/jdk/src/share/classes/com/sun/jdi/request/MethodEntryRequest.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/request/MethodEntryRequest.java Wed Oct 09 13:07:58 2013 -0700 @@ -44,6 +44,7 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public interface MethodEntryRequest extends EventRequest { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/request/MethodExitRequest.java --- a/jdk/src/share/classes/com/sun/jdi/request/MethodExitRequest.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/request/MethodExitRequest.java Wed Oct 09 13:07:58 2013 -0700 @@ -44,6 +44,7 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public interface MethodExitRequest extends EventRequest { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/request/ModificationWatchpointRequest.java --- a/jdk/src/share/classes/com/sun/jdi/request/ModificationWatchpointRequest.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/request/ModificationWatchpointRequest.java Wed Oct 09 13:07:58 2013 -0700 @@ -55,5 +55,6 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public interface ModificationWatchpointRequest extends WatchpointRequest { } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/request/MonitorContendedEnterRequest.java --- a/jdk/src/share/classes/com/sun/jdi/request/MonitorContendedEnterRequest.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/request/MonitorContendedEnterRequest.java Wed Oct 09 13:07:58 2013 -0700 @@ -45,6 +45,7 @@ * @author Swamy Venkataramanappa * @since 1.6 */ +@jdk.Exported public interface MonitorContendedEnterRequest extends EventRequest { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/request/MonitorContendedEnteredRequest.java --- a/jdk/src/share/classes/com/sun/jdi/request/MonitorContendedEnteredRequest.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/request/MonitorContendedEnteredRequest.java Wed Oct 09 13:07:58 2013 -0700 @@ -45,6 +45,7 @@ * @author Swamy Venkataramanappa * @since 1.6 */ +@jdk.Exported public interface MonitorContendedEnteredRequest extends EventRequest { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/request/MonitorWaitRequest.java --- a/jdk/src/share/classes/com/sun/jdi/request/MonitorWaitRequest.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/request/MonitorWaitRequest.java Wed Oct 09 13:07:58 2013 -0700 @@ -45,6 +45,7 @@ * @author Swamy Venkataramanappa * @since 1.6 */ +@jdk.Exported public interface MonitorWaitRequest extends EventRequest { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/request/MonitorWaitedRequest.java --- a/jdk/src/share/classes/com/sun/jdi/request/MonitorWaitedRequest.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/request/MonitorWaitedRequest.java Wed Oct 09 13:07:58 2013 -0700 @@ -45,6 +45,7 @@ * @author Swamy Venkataramanappa * @since 1.6 */ +@jdk.Exported public interface MonitorWaitedRequest extends EventRequest { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/request/StepRequest.java --- a/jdk/src/share/classes/com/sun/jdi/request/StepRequest.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/request/StepRequest.java Wed Oct 09 13:07:58 2013 -0700 @@ -43,6 +43,7 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public interface StepRequest extends EventRequest { /** Step into any newly pushed frames */ diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/request/ThreadDeathRequest.java --- a/jdk/src/share/classes/com/sun/jdi/request/ThreadDeathRequest.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/request/ThreadDeathRequest.java Wed Oct 09 13:07:58 2013 -0700 @@ -44,6 +44,7 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public interface ThreadDeathRequest extends EventRequest { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/request/ThreadStartRequest.java --- a/jdk/src/share/classes/com/sun/jdi/request/ThreadStartRequest.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/request/ThreadStartRequest.java Wed Oct 09 13:07:58 2013 -0700 @@ -44,6 +44,7 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public interface ThreadStartRequest extends EventRequest { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/request/VMDeathRequest.java --- a/jdk/src/share/classes/com/sun/jdi/request/VMDeathRequest.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/request/VMDeathRequest.java Wed Oct 09 13:07:58 2013 -0700 @@ -56,6 +56,7 @@ * @author Robert Field * @since 1.4 */ +@jdk.Exported public interface VMDeathRequest extends EventRequest { } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/request/WatchpointRequest.java --- a/jdk/src/share/classes/com/sun/jdi/request/WatchpointRequest.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/jdi/request/WatchpointRequest.java Wed Oct 09 13:07:58 2013 -0700 @@ -38,6 +38,7 @@ * @author Robert Field * @since 1.3 */ +@jdk.Exported public interface WatchpointRequest extends EventRequest { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/request/package-info.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/src/share/classes/com/sun/jdi/request/package-info.java Wed Oct 09 13:07:58 2013 -0700 @@ -0,0 +1,46 @@ +/* + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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. + */ + +/** + * This package is used to request that a JDI + * event be sent under specified conditions. + * With the exception of termination events, which are + * always sent, there is one kind of + * {@link com.sun.jdi.request.EventRequest} for each kind of + * {@link com.sun.jdi.event.Event Event} - for example, + * {@link com.sun.jdi.request.BreakpointRequest} is used to request a + * {@link com.sun.jdi.event.BreakpointEvent BreakpointEvent}. + * Event requests are created by the + * {@link com.sun.jdi.request.EventRequestManager}. + * Events and event processing are defined in the + * {@link com.sun.jdi.event} package. + *

+ * Methods may be added to the interfaces in the JDI packages in future + * releases. Existing packages may be renamed if the JDI becomes a standard + * extension. + */ + +@jdk.Exported +package com.sun.jdi.request; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/jdi/request/package.html --- a/jdk/src/share/classes/com/sun/jdi/request/package.html Tue Oct 08 14:41:46 2013 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ - - - com.sun.jdi.request description - - - -This package is used to request that a JDI -event be sent under specified conditions. -With the exception of termination events, which are -always sent, there is one kind of -{@link com.sun.jdi.request.EventRequest} for each kind of -{@link com.sun.jdi.event.Event Event} - for example, -{@link com.sun.jdi.request.BreakpointRequest} is used to request a -{@link com.sun.jdi.event.BreakpointEvent BreakpointEvent}. -Event requests are created by the -{@link com.sun.jdi.request.EventRequestManager}. -Events and event processing are defined in the -{@link com.sun.jdi.event} package. -

-Methods may be added to the interfaces in the JDI packages in future -releases. Existing packages may be renamed if the JDI becomes a standard -extension. - - diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/management/GarbageCollectionNotificationInfo.java --- a/jdk/src/share/classes/com/sun/management/GarbageCollectionNotificationInfo.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/management/GarbageCollectionNotificationInfo.java Wed Oct 09 13:07:58 2013 -0700 @@ -85,6 +85,7 @@ * **/ +@jdk.Exported public class GarbageCollectionNotificationInfo implements CompositeDataView { private final String gcName; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/management/GarbageCollectorMXBean.java --- a/jdk/src/share/classes/com/sun/management/GarbageCollectorMXBean.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/management/GarbageCollectorMXBean.java Wed Oct 09 13:07:58 2013 -0700 @@ -37,6 +37,7 @@ * @author Mandy Chung * @since 1.5 */ +@jdk.Exported public interface GarbageCollectorMXBean extends java.lang.management.GarbageCollectorMXBean { diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/management/GcInfo.java --- a/jdk/src/share/classes/com/sun/management/GcInfo.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/management/GcInfo.java Wed Oct 09 13:07:58 2013 -0700 @@ -64,6 +64,7 @@ * @author Mandy Chung * @since 1.5 */ +@jdk.Exported public class GcInfo implements CompositeData, CompositeDataView { private final long index; private final long startTime; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/management/HotSpotDiagnosticMXBean.java --- a/jdk/src/share/classes/com/sun/management/HotSpotDiagnosticMXBean.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/management/HotSpotDiagnosticMXBean.java Wed Oct 09 13:07:58 2013 -0700 @@ -48,6 +48,7 @@ * * @see ManagementFactory#getPlatformMXBeans(Class) */ +@jdk.Exported public interface HotSpotDiagnosticMXBean extends PlatformManagedObject { /** * Dumps the heap to the outputFile file in the same diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/management/OperatingSystemMXBean.java --- a/jdk/src/share/classes/com/sun/management/OperatingSystemMXBean.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/management/OperatingSystemMXBean.java Wed Oct 09 13:07:58 2013 -0700 @@ -39,6 +39,7 @@ * @author Mandy Chung * @since 1.5 */ +@jdk.Exported public interface OperatingSystemMXBean extends java.lang.management.OperatingSystemMXBean { diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/management/ThreadMXBean.java --- a/jdk/src/share/classes/com/sun/management/ThreadMXBean.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/management/ThreadMXBean.java Wed Oct 09 13:07:58 2013 -0700 @@ -38,6 +38,7 @@ * @since 6u25 */ +@jdk.Exported public interface ThreadMXBean extends java.lang.management.ThreadMXBean { /** * Returns the total CPU time for each thread whose ID is diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/management/UnixOperatingSystemMXBean.java --- a/jdk/src/share/classes/com/sun/management/UnixOperatingSystemMXBean.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/management/UnixOperatingSystemMXBean.java Wed Oct 09 13:07:58 2013 -0700 @@ -32,6 +32,7 @@ * @author Mandy Chung * @since 1.5 */ +@jdk.Exported public interface UnixOperatingSystemMXBean extends com.sun.management.OperatingSystemMXBean { diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/management/VMOption.java --- a/jdk/src/share/classes/com/sun/management/VMOption.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/management/VMOption.java Wed Oct 09 13:07:58 2013 -0700 @@ -52,6 +52,7 @@ * @author Mandy Chung * @since 1.6 */ +@jdk.Exported public class VMOption { private String name; private String value; @@ -64,6 +65,7 @@ * * @since 1.6 */ + @jdk.Exported public enum Origin { /** * The VM option has not been set and its value diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/management/package-info.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/src/share/classes/com/sun/management/package-info.java Wed Oct 09 13:07:58 2013 -0700 @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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. + */ + +/** + * This package contains Oracle Corporation's platform extension to + * the implementation of the + * + * java.lang.management API and also defines the management + * interface for some other components for the platform. + * + *

+ * All platform MBeans are registered in the platform MBeanServer + * which can be obtained via the + * + * java.lang.management.ManagementFactory.getPlatformMBeanServer + * + * @author Mandy Chung + * @since 1.5 + */ + +@jdk.Exported +package com.sun.management; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/management/package.html --- a/jdk/src/share/classes/com/sun/management/package.html Tue Oct 08 14:41:46 2013 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ - - - - - - - - -This package contains Oracle Corporation's platform extension to -the implementation of the - -java.lang.management API and also defines the management -interface for some other components for the platform. - -

-All platform MBeans are registered in the platform MBeanServer -which can be obtained via the - -java.lang.management.ManagementFactory.getPlatformMBeanServer - -@author Mandy Chung -@since 1.5 - - - - - diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/net/httpserver/Authenticator.java --- a/jdk/src/share/classes/com/sun/net/httpserver/Authenticator.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/net/httpserver/Authenticator.java Wed Oct 09 13:07:58 2013 -0700 @@ -36,6 +36,7 @@ * 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 { /** @@ -47,6 +48,7 @@ * Indicates an authentication failure. The authentication * attempt has completed. */ + @jdk.Exported public static class Failure extends Result { private int responseCode; @@ -68,6 +70,7 @@ * authenticated user principal can be acquired by calling * getPrincipal(). */ + @jdk.Exported public static class Success extends Result { private HttpPrincipal principal; @@ -89,6 +92,7 @@ * 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; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/net/httpserver/BasicAuthenticator.java --- a/jdk/src/share/classes/com/sun/net/httpserver/BasicAuthenticator.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/net/httpserver/BasicAuthenticator.java Wed Oct 09 13:07:58 2013 -0700 @@ -33,6 +33,7 @@ * 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; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/net/httpserver/Filter.java --- a/jdk/src/share/classes/com/sun/net/httpserver/Filter.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/net/httpserver/Filter.java Wed Oct 09 13:07:58 2013 -0700 @@ -39,6 +39,7 @@ * exchange handler. * @since 1.6 */ +@jdk.Exported public abstract class Filter { protected Filter () {} @@ -48,6 +49,7 @@ * 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 diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/net/httpserver/Headers.java --- a/jdk/src/share/classes/com/sun/net/httpserver/Headers.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/net/httpserver/Headers.java Wed Oct 09 13:07:58 2013 -0700 @@ -58,6 +58,7 @@ * as a header line containing the key but no associated value. * @since 1.6 */ +@jdk.Exported public class Headers implements Map> { HashMap> map; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/net/httpserver/HttpContext.java --- a/jdk/src/share/classes/com/sun/net/httpserver/HttpContext.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/net/httpserver/HttpContext.java Wed Oct 09 13:07:58 2013 -0700 @@ -40,6 +40,7 @@ * context can be pre- and post-processed by each Filter in the chain. * @since 1.6 */ +@jdk.Exported public abstract class HttpContext { protected HttpContext () { diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/net/httpserver/HttpExchange.java --- a/jdk/src/share/classes/com/sun/net/httpserver/HttpExchange.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/net/httpserver/HttpExchange.java Wed Oct 09 13:07:58 2013 -0700 @@ -65,6 +65,7 @@ * @since 1.6 */ +@jdk.Exported public abstract class HttpExchange { protected HttpExchange () { diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/net/httpserver/HttpHandler.java --- a/jdk/src/share/classes/com/sun/net/httpserver/HttpHandler.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/net/httpserver/HttpHandler.java Wed Oct 09 13:07:58 2013 -0700 @@ -32,6 +32,7 @@ * 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. diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/net/httpserver/HttpPrincipal.java --- a/jdk/src/share/classes/com/sun/net/httpserver/HttpPrincipal.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/net/httpserver/HttpPrincipal.java Wed Oct 09 13:07:58 2013 -0700 @@ -33,6 +33,7 @@ * Represents a user authenticated by HTTP Basic or Digest * authentication. */ +@jdk.Exported public class HttpPrincipal implements Principal { private String username, realm; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/net/httpserver/HttpServer.java --- a/jdk/src/share/classes/com/sun/net/httpserver/HttpServer.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/net/httpserver/HttpServer.java Wed Oct 09 13:07:58 2013 -0700 @@ -87,6 +87,7 @@ * @since 1.6 */ +@jdk.Exported public abstract class HttpServer { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/net/httpserver/HttpsConfigurator.java --- a/jdk/src/share/classes/com/sun/net/httpserver/HttpsConfigurator.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/net/httpserver/HttpsConfigurator.java Wed Oct 09 13:07:58 2013 -0700 @@ -67,6 +67,7 @@ * * @since 1.6 */ +@jdk.Exported public class HttpsConfigurator { private SSLContext context; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/net/httpserver/HttpsExchange.java --- a/jdk/src/share/classes/com/sun/net/httpserver/HttpsExchange.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/net/httpserver/HttpsExchange.java Wed Oct 09 13:07:58 2013 -0700 @@ -39,6 +39,7 @@ * @since 1.6 */ +@jdk.Exported public abstract class HttpsExchange extends HttpExchange { protected HttpsExchange () { diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/net/httpserver/HttpsParameters.java --- a/jdk/src/share/classes/com/sun/net/httpserver/HttpsParameters.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/net/httpserver/HttpsParameters.java Wed Oct 09 13:07:58 2013 -0700 @@ -49,6 +49,7 @@ * are used, and any settings made in this object are ignored. * @since 1.6 */ +@jdk.Exported public abstract class HttpsParameters { private String[] cipherSuites; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/net/httpserver/HttpsServer.java --- a/jdk/src/share/classes/com/sun/net/httpserver/HttpsServer.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/net/httpserver/HttpsServer.java Wed Oct 09 13:07:58 2013 -0700 @@ -45,6 +45,7 @@ * @since 1.6 */ +@jdk.Exported public abstract class HttpsServer extends HttpServer { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/net/httpserver/package-info.java --- a/jdk/src/share/classes/com/sun/net/httpserver/package-info.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/net/httpserver/package-info.java Wed Oct 09 13:07:58 2013 -0700 @@ -123,4 +123,5 @@

@since 1.6 */ +@jdk.Exported package com.sun.net.httpserver; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/net/httpserver/spi/HttpServerProvider.java --- a/jdk/src/share/classes/com/sun/net/httpserver/spi/HttpServerProvider.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/net/httpserver/spi/HttpServerProvider.java Wed Oct 09 13:07:58 2013 -0700 @@ -40,6 +40,7 @@ * {@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 { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/net/httpserver/spi/package-info.java --- a/jdk/src/share/classes/com/sun/net/httpserver/spi/package-info.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/net/httpserver/spi/package-info.java Wed Oct 09 13:07:58 2013 -0700 @@ -24,7 +24,8 @@ */ /** - Provides a pluggable service provider interface, which allows the HTTP server - implementation to be replaced with other implementations. -*/ + * 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; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/nio/sctp/AbstractNotificationHandler.java --- a/jdk/src/share/classes/com/sun/nio/sctp/AbstractNotificationHandler.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/nio/sctp/AbstractNotificationHandler.java Wed Oct 09 13:07:58 2013 -0700 @@ -39,6 +39,7 @@ * * @since 1.7 */ +@jdk.Exported public class AbstractNotificationHandler implements NotificationHandler { diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/nio/sctp/Association.java --- a/jdk/src/share/classes/com/sun/nio/sctp/Association.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/nio/sctp/Association.java Wed Oct 09 13:07:58 2013 -0700 @@ -51,6 +51,7 @@ * * @since 1.7 */ +@jdk.Exported public class Association { private final int associationID; private final int maxInStreams; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/nio/sctp/AssociationChangeNotification.java --- a/jdk/src/share/classes/com/sun/nio/sctp/AssociationChangeNotification.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/nio/sctp/AssociationChangeNotification.java Wed Oct 09 13:07:58 2013 -0700 @@ -29,6 +29,7 @@ * * @since 1.7 */ +@jdk.Exported public abstract class AssociationChangeNotification implements Notification { @@ -37,6 +38,7 @@ * * @since 1.7 */ + @jdk.Exported public enum AssocChangeEvent { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/nio/sctp/HandlerResult.java --- a/jdk/src/share/classes/com/sun/nio/sctp/HandlerResult.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/nio/sctp/HandlerResult.java Wed Oct 09 13:07:58 2013 -0700 @@ -34,6 +34,7 @@ * * @since 1.7 */ +@jdk.Exported public enum HandlerResult { /** * Try to receieve another message or notification. diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/nio/sctp/IllegalReceiveException.java --- a/jdk/src/share/classes/com/sun/nio/sctp/IllegalReceiveException.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/nio/sctp/IllegalReceiveException.java Wed Oct 09 13:07:58 2013 -0700 @@ -31,6 +31,7 @@ * * @since 1.7 */ +@jdk.Exported public class IllegalReceiveException extends IllegalStateException { private static final long serialVersionUID = 2296619040988576224L; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/nio/sctp/IllegalUnbindException.java --- a/jdk/src/share/classes/com/sun/nio/sctp/IllegalUnbindException.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/nio/sctp/IllegalUnbindException.java Wed Oct 09 13:07:58 2013 -0700 @@ -31,6 +31,7 @@ * * @since 1.7 */ +@jdk.Exported public class IllegalUnbindException extends IllegalStateException { private static final long serialVersionUID = -310540883995532224L; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/nio/sctp/InvalidStreamException.java --- a/jdk/src/share/classes/com/sun/nio/sctp/InvalidStreamException.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/nio/sctp/InvalidStreamException.java Wed Oct 09 13:07:58 2013 -0700 @@ -30,6 +30,7 @@ * * @since 1.7 */ +@jdk.Exported public class InvalidStreamException extends IllegalArgumentException { private static final long serialVersionUID = -9172703378046665558L; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/nio/sctp/MessageInfo.java --- a/jdk/src/share/classes/com/sun/nio/sctp/MessageInfo.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/nio/sctp/MessageInfo.java Wed Oct 09 13:07:58 2013 -0700 @@ -56,6 +56,7 @@ * * @since 1.7 */ +@jdk.Exported public abstract class MessageInfo { /** * Initializes a new instance of this class. diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/nio/sctp/Notification.java --- a/jdk/src/share/classes/com/sun/nio/sctp/Notification.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/nio/sctp/Notification.java Wed Oct 09 13:07:58 2013 -0700 @@ -37,6 +37,7 @@ * * @since 1.7 */ +@jdk.Exported public interface Notification { /** * Returns the association that this notification is applicable to. diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/nio/sctp/NotificationHandler.java --- a/jdk/src/share/classes/com/sun/nio/sctp/NotificationHandler.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/nio/sctp/NotificationHandler.java Wed Oct 09 13:07:58 2013 -0700 @@ -49,6 +49,7 @@ * * @since 1.7 */ +@jdk.Exported public interface NotificationHandler { /** * Invoked when a notification is received from the SCTP stack. diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/nio/sctp/PeerAddressChangeNotification.java --- a/jdk/src/share/classes/com/sun/nio/sctp/PeerAddressChangeNotification.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/nio/sctp/PeerAddressChangeNotification.java Wed Oct 09 13:07:58 2013 -0700 @@ -32,6 +32,7 @@ * * @since 1.7 */ +@jdk.Exported public abstract class PeerAddressChangeNotification implements Notification { @@ -46,6 +47,7 @@ * * @since 1.7 */ + @jdk.Exported public enum AddressChangeEvent { /** * This address is now reachable. diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/nio/sctp/SctpChannel.java --- a/jdk/src/share/classes/com/sun/nio/sctp/SctpChannel.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/nio/sctp/SctpChannel.java Wed Oct 09 13:07:58 2013 -0700 @@ -134,6 +134,7 @@ * * @since 1.7 */ +@jdk.Exported public abstract class SctpChannel extends AbstractSelectableChannel { diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/nio/sctp/SctpMultiChannel.java --- a/jdk/src/share/classes/com/sun/nio/sctp/SctpMultiChannel.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/nio/sctp/SctpMultiChannel.java Wed Oct 09 13:07:58 2013 -0700 @@ -134,6 +134,7 @@ * * @since 1.7 */ +@jdk.Exported public abstract class SctpMultiChannel extends AbstractSelectableChannel { diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/nio/sctp/SctpServerChannel.java --- a/jdk/src/share/classes/com/sun/nio/sctp/SctpServerChannel.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/nio/sctp/SctpServerChannel.java Wed Oct 09 13:07:58 2013 -0700 @@ -68,6 +68,7 @@ * * @since 1.7 */ +@jdk.Exported public abstract class SctpServerChannel extends AbstractSelectableChannel { diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/nio/sctp/SctpSocketOption.java --- a/jdk/src/share/classes/com/sun/nio/sctp/SctpSocketOption.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/nio/sctp/SctpSocketOption.java Wed Oct 09 13:07:58 2013 -0700 @@ -35,4 +35,5 @@ * * @see SctpStandardSocketOptions */ +@jdk.Exported public interface SctpSocketOption extends SocketOption { } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/nio/sctp/SctpStandardSocketOptions.java --- a/jdk/src/share/classes/com/sun/nio/sctp/SctpStandardSocketOptions.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/nio/sctp/SctpStandardSocketOptions.java Wed Oct 09 13:07:58 2013 -0700 @@ -34,6 +34,7 @@ * * @since 1.7 */ +@jdk.Exported public class SctpStandardSocketOptions { private SctpStandardSocketOptions() {} /** @@ -315,6 +316,7 @@ * * @since 1.7 */ + @jdk.Exported public static class InitMaxStreams { private int maxInStreams; private int maxOutStreams; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/nio/sctp/SendFailedNotification.java --- a/jdk/src/share/classes/com/sun/nio/sctp/SendFailedNotification.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/nio/sctp/SendFailedNotification.java Wed Oct 09 13:07:58 2013 -0700 @@ -37,6 +37,7 @@ * * @since 1.7 */ +@jdk.Exported public abstract class SendFailedNotification implements Notification { /** * Initializes a new instance of this class. diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/nio/sctp/ShutdownNotification.java --- a/jdk/src/share/classes/com/sun/nio/sctp/ShutdownNotification.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/nio/sctp/ShutdownNotification.java Wed Oct 09 13:07:58 2013 -0700 @@ -32,6 +32,7 @@ * * @since 1.7 */ +@jdk.Exported public abstract class ShutdownNotification implements Notification { /** * Initializes a new instance of this class. diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/nio/sctp/package-info.java --- a/jdk/src/share/classes/com/sun/nio/sctp/package-info.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/nio/sctp/package-info.java Wed Oct 09 13:07:58 2013 -0700 @@ -72,4 +72,5 @@ * @since 1.7 */ +@jdk.Exported package com.sun.nio.sctp; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/LdapPrincipal.java --- a/jdk/src/share/classes/com/sun/security/auth/LdapPrincipal.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/auth/LdapPrincipal.java Wed Oct 09 13:07:58 2013 -0700 @@ -45,6 +45,7 @@ * * @since 1.6 */ +@jdk.Exported public final class LdapPrincipal implements Principal, java.io.Serializable { private static final long serialVersionUID = 6820120005580754861L; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/NTDomainPrincipal.java --- a/jdk/src/share/classes/com/sun/security/auth/NTDomainPrincipal.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/auth/NTDomainPrincipal.java Wed Oct 09 13:07:58 2013 -0700 @@ -45,6 +45,7 @@ * @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; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/NTNumericCredential.java --- a/jdk/src/share/classes/com/sun/security/auth/NTNumericCredential.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/auth/NTNumericCredential.java Wed Oct 09 13:07:58 2013 -0700 @@ -31,6 +31,7 @@ * */ +@jdk.Exported public class NTNumericCredential { private long impersonationToken; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/NTSid.java --- a/jdk/src/share/classes/com/sun/security/auth/NTSid.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/auth/NTSid.java Wed Oct 09 13:07:58 2013 -0700 @@ -47,6 +47,7 @@ * @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; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/NTSidDomainPrincipal.java --- a/jdk/src/share/classes/com/sun/security/auth/NTSidDomainPrincipal.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/auth/NTSidDomainPrincipal.java Wed Oct 09 13:07:58 2013 -0700 @@ -43,6 +43,7 @@ * @see java.security.Principal * @see javax.security.auth.Subject */ +@jdk.Exported public class NTSidDomainPrincipal extends NTSid { private static final long serialVersionUID = 5247810785821650912L; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/NTSidGroupPrincipal.java --- a/jdk/src/share/classes/com/sun/security/auth/NTSidGroupPrincipal.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/auth/NTSidGroupPrincipal.java Wed Oct 09 13:07:58 2013 -0700 @@ -40,6 +40,7 @@ * @see javax.security.auth.Subject * @see com.sun.security.auth.NTSid */ +@jdk.Exported public class NTSidGroupPrincipal extends NTSid { private static final long serialVersionUID = -1373347438636198229L; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/NTSidPrimaryGroupPrincipal.java --- a/jdk/src/share/classes/com/sun/security/auth/NTSidPrimaryGroupPrincipal.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/auth/NTSidPrimaryGroupPrincipal.java Wed Oct 09 13:07:58 2013 -0700 @@ -39,6 +39,7 @@ * @see java.security.Principal * @see javax.security.auth.Subject */ +@jdk.Exported public class NTSidPrimaryGroupPrincipal extends NTSid { private static final long serialVersionUID = 8011978367305190527L; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/NTSidUserPrincipal.java --- a/jdk/src/share/classes/com/sun/security/auth/NTSidUserPrincipal.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/auth/NTSidUserPrincipal.java Wed Oct 09 13:07:58 2013 -0700 @@ -39,6 +39,7 @@ * @see java.security.Principal * @see javax.security.auth.Subject */ +@jdk.Exported public class NTSidUserPrincipal extends NTSid { private static final long serialVersionUID = -5573239889517749525L; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/NTUserPrincipal.java --- a/jdk/src/share/classes/com/sun/security/auth/NTUserPrincipal.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/auth/NTUserPrincipal.java Wed Oct 09 13:07:58 2013 -0700 @@ -41,6 +41,7 @@ * @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; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/PolicyFile.java --- a/jdk/src/share/classes/com/sun/security/auth/PolicyFile.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/auth/PolicyFile.java Wed Oct 09 13:07:58 2013 -0700 @@ -215,6 +215,7 @@ * @see java.security.ProtectionDomain * @see java.security.Security security properties */ +@jdk.Exported(false) @Deprecated public class PolicyFile extends javax.security.auth.Policy { diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/PrincipalComparator.java --- a/jdk/src/share/classes/com/sun/security/auth/PrincipalComparator.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/auth/PrincipalComparator.java Wed Oct 09 13:07:58 2013 -0700 @@ -50,6 +50,7 @@ * @see java.security.Principal * @see javax.security.auth.Subject */ +@jdk.Exported public interface PrincipalComparator { /** * Check if the specified Subject is implied by diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/SolarisNumericGroupPrincipal.java --- a/jdk/src/share/classes/com/sun/security/auth/SolarisNumericGroupPrincipal.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/auth/SolarisNumericGroupPrincipal.java Wed Oct 09 13:07:58 2013 -0700 @@ -45,6 +45,7 @@ * @see java.security.Principal * @see javax.security.auth.Subject */ +@jdk.Exported(false) @Deprecated public class SolarisNumericGroupPrincipal implements Principal, diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/SolarisNumericUserPrincipal.java --- a/jdk/src/share/classes/com/sun/security/auth/SolarisNumericUserPrincipal.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/auth/SolarisNumericUserPrincipal.java Wed Oct 09 13:07:58 2013 -0700 @@ -44,6 +44,7 @@ * @see java.security.Principal * @see javax.security.auth.Subject */ +@jdk.Exported(false) @Deprecated public class SolarisNumericUserPrincipal implements Principal, diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/SolarisPrincipal.java --- a/jdk/src/share/classes/com/sun/security/auth/SolarisPrincipal.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/auth/SolarisPrincipal.java Wed Oct 09 13:07:58 2013 -0700 @@ -44,6 +44,7 @@ * @see java.security.Principal * @see javax.security.auth.Subject */ +@jdk.Exported(false) @Deprecated public class SolarisPrincipal implements Principal, java.io.Serializable { diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/UnixNumericGroupPrincipal.java --- a/jdk/src/share/classes/com/sun/security/auth/UnixNumericGroupPrincipal.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/auth/UnixNumericGroupPrincipal.java Wed Oct 09 13:07:58 2013 -0700 @@ -41,6 +41,7 @@ * @see java.security.Principal * @see javax.security.auth.Subject */ +@jdk.Exported public class UnixNumericGroupPrincipal implements Principal, java.io.Serializable { diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/UnixNumericUserPrincipal.java --- a/jdk/src/share/classes/com/sun/security/auth/UnixNumericUserPrincipal.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/auth/UnixNumericUserPrincipal.java Wed Oct 09 13:07:58 2013 -0700 @@ -41,6 +41,7 @@ * @see java.security.Principal * @see javax.security.auth.Subject */ +@jdk.Exported public class UnixNumericUserPrincipal implements Principal, java.io.Serializable { diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/UnixPrincipal.java --- a/jdk/src/share/classes/com/sun/security/auth/UnixPrincipal.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/auth/UnixPrincipal.java Wed Oct 09 13:07:58 2013 -0700 @@ -41,6 +41,7 @@ * @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; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/UserPrincipal.java --- a/jdk/src/share/classes/com/sun/security/auth/UserPrincipal.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/auth/UserPrincipal.java Wed Oct 09 13:07:58 2013 -0700 @@ -42,6 +42,7 @@ * * @since 1.6 */ +@jdk.Exported public final class UserPrincipal implements Principal, java.io.Serializable { private static final long serialVersionUID = 892106070870210969L; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/X500Principal.java --- a/jdk/src/share/classes/com/sun/security/auth/X500Principal.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/auth/X500Principal.java Wed Oct 09 13:07:58 2013 -0700 @@ -49,6 +49,7 @@ * class. * @see javax.security.auth.x500.X500Principal */ +@jdk.Exported(false) @Deprecated public class X500Principal implements Principal, java.io.Serializable { diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/callback/DialogCallbackHandler.java --- a/jdk/src/share/classes/com/sun/security/auth/callback/DialogCallbackHandler.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/auth/callback/DialogCallbackHandler.java Wed Oct 09 13:07:58 2013 -0700 @@ -54,6 +54,7 @@ * @see javax.security.auth.callback * @deprecated This class will be removed in a future release. */ +@jdk.Exported(false) @Deprecated public class DialogCallbackHandler implements CallbackHandler { diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/callback/TextCallbackHandler.java --- a/jdk/src/share/classes/com/sun/security/auth/callback/TextCallbackHandler.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/auth/callback/TextCallbackHandler.java Wed Oct 09 13:07:58 2013 -0700 @@ -53,6 +53,7 @@ * @see javax.security.auth.callback */ +@jdk.Exported public class TextCallbackHandler implements CallbackHandler { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/callback/package-info.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/src/share/classes/com/sun/security/auth/callback/package-info.java Wed Oct 09 13:07:58 2013 -0700 @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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. + */ + +@jdk.Exported +package com.sun.security.auth.callback; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/login/ConfigFile.java --- a/jdk/src/share/classes/com/sun/security/auth/login/ConfigFile.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/auth/login/ConfigFile.java Wed Oct 09 13:07:58 2013 -0700 @@ -83,6 +83,7 @@ * @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; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/login/package-info.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/src/share/classes/com/sun/security/auth/login/package-info.java Wed Oct 09 13:07:58 2013 -0700 @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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. + */ + +@jdk.Exported +package com.sun.security.auth.login; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/module/JndiLoginModule.java --- a/jdk/src/share/classes/com/sun/security/auth/module/JndiLoginModule.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/auth/module/JndiLoginModule.java Wed Oct 09 13:07:58 2013 -0700 @@ -151,6 +151,7 @@ * * */ +@jdk.Exported public class JndiLoginModule implements LoginModule { private static final ResourceBundle rb = AccessController.doPrivileged( diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/module/KeyStoreLoginModule.java --- a/jdk/src/share/classes/com/sun/security/auth/module/KeyStoreLoginModule.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/auth/module/KeyStoreLoginModule.java Wed Oct 09 13:07:58 2013 -0700 @@ -110,6 +110,7 @@ * * */ +@jdk.Exported public class KeyStoreLoginModule implements LoginModule { private static final ResourceBundle rb = AccessController.doPrivileged( diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/module/Krb5LoginModule.java --- a/jdk/src/share/classes/com/sun/security/auth/module/Krb5LoginModule.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/auth/module/Krb5LoginModule.java Wed Oct 09 13:07:58 2013 -0700 @@ -379,6 +379,7 @@ * @author Ram Marti */ +@jdk.Exported public class Krb5LoginModule implements LoginModule { // initial state diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/module/LdapLoginModule.java --- a/jdk/src/share/classes/com/sun/security/auth/module/LdapLoginModule.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/auth/module/LdapLoginModule.java Wed Oct 09 13:07:58 2013 -0700 @@ -304,6 +304,7 @@ * * @since 1.6 */ +@jdk.Exported public class LdapLoginModule implements LoginModule { // Use the default classloader for this class to load the prompt strings. diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/module/NTLoginModule.java --- a/jdk/src/share/classes/com/sun/security/auth/module/NTLoginModule.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/auth/module/NTLoginModule.java Wed Oct 09 13:07:58 2013 -0700 @@ -57,6 +57,7 @@ * * @see javax.security.auth.spi.LoginModule */ +@jdk.Exported public class NTLoginModule implements LoginModule { private NTSystem ntSystem; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/module/NTSystem.java --- a/jdk/src/share/classes/com/sun/security/auth/module/NTSystem.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/auth/module/NTSystem.java Wed Oct 09 13:07:58 2013 -0700 @@ -30,6 +30,7 @@ * security information for the current user. * */ +@jdk.Exported public class NTSystem { private native void getCurrent(boolean debug); diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/module/SolarisLoginModule.java --- a/jdk/src/share/classes/com/sun/security/auth/module/SolarisLoginModule.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/auth/module/SolarisLoginModule.java Wed Oct 09 13:07:58 2013 -0700 @@ -52,6 +52,7 @@ * UnixLoginModule. * */ +@jdk.Exported(false) @Deprecated public class SolarisLoginModule implements LoginModule { diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/module/SolarisSystem.java --- a/jdk/src/share/classes/com/sun/security/auth/module/SolarisSystem.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/auth/module/SolarisSystem.java Wed Oct 09 13:07:58 2013 -0700 @@ -30,6 +30,7 @@ * UID/GID/groups information for the current user. * */ +@jdk.Exported public class SolarisSystem { private native void getSolarisInfo(); diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/module/UnixLoginModule.java --- a/jdk/src/share/classes/com/sun/security/auth/module/UnixLoginModule.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/auth/module/UnixLoginModule.java Wed Oct 09 13:07:58 2013 -0700 @@ -47,6 +47,7 @@ * debug messages will be output to the output stream, System.out. * */ +@jdk.Exported public class UnixLoginModule implements LoginModule { // initial state diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/module/UnixSystem.java --- a/jdk/src/share/classes/com/sun/security/auth/module/UnixSystem.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/auth/module/UnixSystem.java Wed Oct 09 13:07:58 2013 -0700 @@ -30,6 +30,7 @@ * UID/GID/groups information for the current user. * */ +@jdk.Exported public class UnixSystem { private native void getUnixInfo(); diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/module/package-info.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/src/share/classes/com/sun/security/auth/module/package-info.java Wed Oct 09 13:07:58 2013 -0700 @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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. + */ + +@jdk.Exported +package com.sun.security.auth.module; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/auth/package-info.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/src/share/classes/com/sun/security/auth/package-info.java Wed Oct 09 13:07:58 2013 -0700 @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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. + */ + +@jdk.Exported +package com.sun.security.auth; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/jgss/AuthorizationDataEntry.java --- a/jdk/src/share/classes/com/sun/security/jgss/AuthorizationDataEntry.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/jgss/AuthorizationDataEntry.java Wed Oct 09 13:07:58 2013 -0700 @@ -28,7 +28,8 @@ /** * Kerberos 5 AuthorizationData entry. */ -final public class AuthorizationDataEntry { +@jdk.Exported +public final class AuthorizationDataEntry { private final int type; private final byte[] data; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/jgss/ExtendedGSSContext.java --- a/jdk/src/share/classes/com/sun/security/jgss/ExtendedGSSContext.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/jgss/ExtendedGSSContext.java Wed Oct 09 13:07:58 2013 -0700 @@ -32,6 +32,7 @@ * functionalities not defined by {@code org.ietf.jgss.GSSContext}, * such as querying context-specific attributes. */ +@jdk.Exported public interface ExtendedGSSContext extends GSSContext { /** * Return the mechanism-specific attribute associated with {@code type}. diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/jgss/ExtendedGSSCredential.java --- a/jdk/src/share/classes/com/sun/security/jgss/ExtendedGSSCredential.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/jgss/ExtendedGSSCredential.java Wed Oct 09 13:07:58 2013 -0700 @@ -32,6 +32,7 @@ * functionalities not defined by {@code org.ietf.jgss.GSSCredential}. * @since 1.8 */ +@jdk.Exported public interface ExtendedGSSCredential extends GSSCredential { /** * Impersonates a principal. In Kerberos, this can be implemented diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/jgss/GSSUtil.java --- a/jdk/src/share/classes/com/sun/security/jgss/GSSUtil.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/jgss/GSSUtil.java Wed Oct 09 13:07:58 2013 -0700 @@ -33,6 +33,7 @@ * GSS-API Utilities for using in conjunction with Sun Microsystem's * implementation of Java GSS-API. */ +@jdk.Exported public class GSSUtil { /** diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/jgss/InquireSecContextPermission.java --- a/jdk/src/share/classes/com/sun/security/jgss/InquireSecContextPermission.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/jgss/InquireSecContextPermission.java Wed Oct 09 13:07:58 2013 -0700 @@ -35,6 +35,7 @@ * *

The target name is the {@link InquireType} allowed. */ +@jdk.Exported public final class InquireSecContextPermission extends BasicPermission { private static final long serialVersionUID = -7131173349668647297L; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/jgss/InquireType.java --- a/jdk/src/share/classes/com/sun/security/jgss/InquireType.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/security/jgss/InquireType.java Wed Oct 09 13:07:58 2013 -0700 @@ -29,6 +29,7 @@ * 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 diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/security/jgss/package-info.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/src/share/classes/com/sun/security/jgss/package-info.java Wed Oct 09 13:07:58 2013 -0700 @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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. + */ + +@jdk.Exported +package com.sun.security.jgss; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/tools/attach/AgentInitializationException.java --- a/jdk/src/share/classes/com/sun/tools/attach/AgentInitializationException.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/tools/attach/AgentInitializationException.java Wed Oct 09 13:07:58 2013 -0700 @@ -40,6 +40,7 @@ * the error returned by the agent's 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 */ diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/tools/attach/AgentLoadException.java --- a/jdk/src/share/classes/com/sun/tools/attach/AgentLoadException.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/tools/attach/AgentLoadException.java Wed Oct 09 13:07:58 2013 -0700 @@ -36,6 +36,7 @@ * 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 */ diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/tools/attach/AttachNotSupportedException.java --- a/jdk/src/share/classes/com/sun/tools/attach/AttachNotSupportedException.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/tools/attach/AttachNotSupportedException.java Wed Oct 09 13:07:58 2013 -0700 @@ -36,6 +36,7 @@ * 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 */ diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/tools/attach/AttachPermission.java --- a/jdk/src/share/classes/com/sun/tools/attach/AttachPermission.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/tools/attach/AttachPermission.java Wed Oct 09 13:07:58 2013 -0700 @@ -79,6 +79,7 @@ * @see com.sun.tools.attach.spi.AttachProvider */ +@jdk.Exported public final class AttachPermission extends java.security.BasicPermission { /** use serialVersionUID for interoperability */ diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/tools/attach/VirtualMachine.java --- a/jdk/src/share/classes/com/sun/tools/attach/VirtualMachine.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/tools/attach/VirtualMachine.java Wed Oct 09 13:07:58 2013 -0700 @@ -102,6 +102,7 @@ * @since 1.6 */ +@jdk.Exported public abstract class VirtualMachine { private AttachProvider provider; private String id; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/tools/attach/VirtualMachineDescriptor.java --- a/jdk/src/share/classes/com/sun/tools/attach/VirtualMachineDescriptor.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/tools/attach/VirtualMachineDescriptor.java Wed Oct 09 13:07:58 2013 -0700 @@ -55,6 +55,7 @@ * * @since 1.6 */ +@jdk.Exported public class VirtualMachineDescriptor { private AttachProvider provider; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/tools/attach/package-info.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/src/share/classes/com/sun/tools/attach/package-info.java Wed Oct 09 13:07:58 2013 -0700 @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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. + */ + +/** + * Provides the API to attach to a JavaTM + * virtual machine. + *

+ * A tool, written in the Java Language, uses this API to attach to a target + * virtual machine (VM) and load its tool agent into the target VM. For + * example, a management console might have a management agent which it uses + * to obtain management information from instrumented objects in a Java + * virtual machine. If the management console is required to manage + * an application that is running in a virtual machine that does not include + * the management agent, then this API can be used to attach to the target + * VM and load the agent. + * + * @since 1.6 + */ + +@jdk.Exported +package com.sun.tools.attach; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/tools/attach/package.html --- a/jdk/src/share/classes/com/sun/tools/attach/package.html Tue Oct 08 14:41:46 2013 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ - - - - - - -Provides the API to attach to a JavaTM -virtual machine. - -A tool, written in the Java Language, uses this API to attach to a target -virtual machine (VM) and load its tool agent into the target VM. For -example, a management console might have a management agent which it uses -to obtain management information from instrumented objects in a Java -virtual machine. If the management console is required to manage -an application that is running in a virtual machine that does not include -the management agent, then this API can be used to attach to the target -VM and load the agent. - -@since 1.6 - - - - - - diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/tools/attach/spi/AttachProvider.java --- a/jdk/src/share/classes/com/sun/tools/attach/spi/AttachProvider.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/tools/attach/spi/AttachProvider.java Wed Oct 09 13:07:58 2013 -0700 @@ -74,6 +74,7 @@ * @since 1.6 */ +@jdk.Exported public abstract class AttachProvider { private static final Object lock = new Object(); diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/tools/attach/spi/package-info.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/src/share/classes/com/sun/tools/attach/spi/package-info.java Wed Oct 09 13:07:58 2013 -0700 @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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. + */ + + +/** + * Only developers who are defining new attach providers should need to make + * direct use of this package. + * + * @since 1.6 + */ + +@jdk.Exported +package com.sun.tools.attach.spi; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/tools/attach/spi/package.html --- a/jdk/src/share/classes/com/sun/tools/attach/spi/package.html Tue Oct 08 14:41:46 2013 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ - - - - - - -Provider classes for the {@link com.sun.tools.attach} package. - -

Only developers who are defining new attach providers should need to make -direct use of this package.

- -@since 1.6 - - - diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/tools/jconsole/JConsoleContext.java --- a/jdk/src/share/classes/com/sun/tools/jconsole/JConsoleContext.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/tools/jconsole/JConsoleContext.java Wed Oct 09 13:07:58 2013 -0700 @@ -43,6 +43,7 @@ * * @since 1.6 */ +@jdk.Exported public interface JConsoleContext { /** * The {@link ConnectionState ConnectionState} bound property name. @@ -53,6 +54,7 @@ * Values for the {@linkplain #CONNECTION_STATE_PROPERTY * ConnectionState} bound property. */ + @jdk.Exported public enum ConnectionState { /** * The connection has been successfully established. diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/tools/jconsole/JConsolePlugin.java --- a/jdk/src/share/classes/com/sun/tools/jconsole/JConsolePlugin.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/com/sun/tools/jconsole/JConsolePlugin.java Wed Oct 09 13:07:58 2013 -0700 @@ -72,6 +72,7 @@ * * @since 1.6 */ +@jdk.Exported public abstract class JConsolePlugin { private volatile JConsoleContext context = null; private List listeners = null; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/tools/jconsole/package-info.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/src/share/classes/com/sun/tools/jconsole/package-info.java Wed Oct 09 13:07:58 2013 -0700 @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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. + */ + +/** + * This package contains the JConsole API. + * + * @since 1.6 + */ + +@jdk.Exported +package com.sun.tools.jconsole; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/com/sun/tools/jconsole/package.html --- a/jdk/src/share/classes/com/sun/tools/jconsole/package.html Tue Oct 08 14:41:46 2013 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ - - - - - - - - -This package contains the JConsole API. - -@since 1.6 - - - diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java --- a/jdk/src/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java Wed Oct 09 13:07:58 2013 -0700 @@ -27,12 +27,15 @@ import jdk.internal.org.objectweb.asm.*; import sun.misc.Unsafe; +import sun.security.action.GetPropertyAction; +import java.io.FilePermission; import java.lang.reflect.Constructor; import java.security.AccessController; import java.security.PrivilegedAction; import java.security.ProtectionDomain; import java.util.concurrent.atomic.AtomicInteger; +import java.util.PropertyPermission; import static jdk.internal.org.objectweb.asm.Opcodes.*; @@ -66,12 +69,23 @@ // Used to ensure that each spun class name is unique private static final AtomicInteger counter = new AtomicInteger(0); + // For dumping generated classes to disk, for debugging purposes + private static final ProxyClassesDumper dumper; + + static { + final String key = "jdk.internal.lambda.dumpProxyClasses"; + String path = AccessController.doPrivileged( + new GetPropertyAction(key), null, + new PropertyPermission(key , "read")); + dumper = (null == path) ? null : ProxyClassesDumper.getInstance(path); + } + // See context values in AbstractValidatingLambdaMetafactory private final String implMethodClassName; // Name of type containing implementation "CC" private final String implMethodName; // Name of implementation method "impl" private final String implMethodDesc; // Type descriptor for implementation methods "(I)Ljava/lang/String;" - private final Type[] implMethodArgumentTypes; // ASM types for implementaion method parameters - private final Type implMethodReturnType; // ASM type for implementaion method return type "Ljava/lang/String;" + private final Type[] implMethodArgumentTypes; // ASM types for implementation method parameters + private final Type implMethodReturnType; // ASM type for implementation method return type "Ljava/lang/String;" private final MethodType constructorType; // Generated class constructor type "(CC)void" private final String constructorDesc; // Type descriptor for constructor "(LCC;)V" private final ClassWriter cw; // ASM class writer @@ -259,29 +273,31 @@ final byte[] classBytes = cw.toByteArray(); - /*** Uncomment to dump the generated file - System.out.printf("Loaded: %s (%d bytes) %n", lambdaClassName, - classBytes.length); - try (FileOutputStream fos = new FileOutputStream(lambdaClassName - .replace('/', '.') + ".class")) { - fos.write(classBytes); - } catch (IOException ex) { - PlatformLogger.getLogger(InnerClassLambdaMetafactory.class - .getName()).severe(ex.getMessage(), ex); - } - ***/ + // If requested, dump out to a file for debugging purposes + if (dumper != null) { + AccessController.doPrivileged(new PrivilegedAction() { + @Override + public Void run() { + dumper.dumpClass(lambdaClassName, classBytes); + return null; + } + }, null, + new FilePermission("<>", "read, write"), + // createDirectories may need it + new PropertyPermission("user.dir", "read")); + } ClassLoader loader = targetClass.getClassLoader(); ProtectionDomain pd = (loader == null) - ? null - : AccessController.doPrivileged( - new PrivilegedAction() { - @Override - public ProtectionDomain run() { - return targetClass.getProtectionDomain(); - } - } - ); + ? null + : AccessController.doPrivileged( + new PrivilegedAction() { + @Override + public ProtectionDomain run() { + return targetClass.getProtectionDomain(); + } + } + ); return UNSAFE.defineClass(lambdaClassName, classBytes, 0, classBytes.length, diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/java/lang/invoke/ProxyClassesDumper.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/src/share/classes/java/lang/invoke/ProxyClassesDumper.java Wed Oct 09 13:07:58 2013 -0700 @@ -0,0 +1,147 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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 java.lang.invoke; + +import sun.util.logging.PlatformLogger; + +import java.io.FilePermission; +import java.nio.file.Files; +import java.nio.file.InvalidPathException; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.security.AccessController; +import java.security.PrivilegedAction; +import java.util.Objects; +import java.util.concurrent.atomic.AtomicBoolean; + +/** + * Helper class used by InnerClassLambdaMetafactory to log generated classes + * + * @implNote + *

Because this class is called by LambdaMetafactory, make use + * of lambda lead to recursive calls cause stack overflow. + */ +final class ProxyClassesDumper { + private static final char[] HEX = { + '0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' + }; + private static final char[] BAD_CHARS = { + '\\', ':', '*', '?', '"', '<', '>', '|' + }; + private static final String[] REPLACEMENT = { + "%5C", "%3A", "%2A", "%3F", "%22", "%3C", "%3E", "%7C" + }; + + private final Path dumpDir; + + public static ProxyClassesDumper getInstance(String path) { + if (null == path) { + return null; + } + try { + path = path.trim(); + final Path dir = Paths.get(path.length() == 0 ? "." : path); + AccessController.doPrivileged(new PrivilegedAction() { + @Override + public Void run() { + validateDumpDir(dir); + return null; + } + }, null, new FilePermission("<>", "read, write")); + return new ProxyClassesDumper(dir); + } catch (InvalidPathException ex) { + PlatformLogger.getLogger(ProxyClassesDumper.class.getName()) + .warning("Path " + path + " is not valid - dumping disabled", ex); + } catch (IllegalArgumentException iae) { + PlatformLogger.getLogger(ProxyClassesDumper.class.getName()) + .warning(iae.getMessage() + " - dumping disabled"); + } + return null; + } + + private ProxyClassesDumper(Path path) { + dumpDir = Objects.requireNonNull(path); + } + + private static void validateDumpDir(Path path) { + if (!Files.exists(path)) { + throw new IllegalArgumentException("Directory " + path + " does not exist"); + } else if (!Files.isDirectory(path)) { + throw new IllegalArgumentException("Path " + path + " is not a directory"); + } else if (!Files.isWritable(path)) { + throw new IllegalArgumentException("Directory " + path + " is not writable"); + } + } + + public static String encodeForFilename(String className) { + final int len = className.length(); + StringBuilder sb = new StringBuilder(len); + + for (int i = 0; i < len; i++) { + char c = className.charAt(i); + // control characters + if (c <= 31) { + sb.append('%'); + sb.append(HEX[c >> 4 & 0x0F]); + sb.append(HEX[c & 0x0F]); + } else { + int j = 0; + for (; j < BAD_CHARS.length; j++) { + if (c == BAD_CHARS[j]) { + sb.append(REPLACEMENT[j]); + break; + } + } + if (j >= BAD_CHARS.length) { + sb.append(c); + } + } + } + + return sb.toString(); + } + + public void dumpClass(String className, final byte[] classBytes) { + Path file; + try { + file = dumpDir.resolve(encodeForFilename(className) + ".class"); + } catch (InvalidPathException ex) { + PlatformLogger.getLogger(ProxyClassesDumper.class.getName()) + .warning("Invalid path for class " + className); + return; + } + + try { + Path dir = file.getParent(); + Files.createDirectories(dir); + Files.write(file, classBytes); + } catch (Exception ignore) { + PlatformLogger.getLogger(ProxyClassesDumper.class.getName()) + .warning("Exception writing to path at " + file.toString()); + // simply don't care if this operation failed + } + } +} diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/java/security/DomainLoadStoreParameter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/src/share/classes/java/security/DomainLoadStoreParameter.java Wed Oct 09 13:07:58 2013 -0700 @@ -0,0 +1,171 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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 java.security; + +import java.net.URI; +import java.util.*; +import static java.security.KeyStore.*; + +/** + * Configuration data that specifies the keystores in a keystore domain. + * A keystore domain is a collection of keystores that are presented as a + * single logical keystore. The configuration data is used during + * {@code KeyStore} + * {@link KeyStore#load(KeyStore.LoadStoreParameter) load} and + * {@link KeyStore#store(KeyStore.LoadStoreParameter) store} operations. + *

+ * The following syntax is supported for configuration data: + *

{@code
+ *     domain  [ ...] {
+ *         keystore  [ ...] ;
+ *         ...
+ *     };
+ *     ...
+ * }
+ * where {@code domainName} and {@code keystoreName} are identifiers + * and {@code property} is a key/value pairing. The key and value are + * separated by an 'equals' symbol and the value is enclosed in double + * quotes. A property value may be either a printable string or a binary + * string of colon-separated pairs of hexadecimal digits. Multi-valued + * properties are represented as a comma-separated list of values, + * enclosed in square brackets. + * See {@link Arrays#toString(java.lang.Object[])}. + *

+ * To ensure that keystore entries are uniquely identified, each + * entry's alias is prefixed by its {@code keystoreName} followed + * by the entry name separator and each {@code keystoreName} must be + * unique within its domain. Entry name prefixes are omitted when + * storing a keystore. + *

+ * Properties are context-sensitive: properties that apply to + * all the keystores in a domain are located in the domain clause, + * and properties that apply only to a specific keystore are located + * in that keystore's clause. + * Unless otherwise specified, a property in a keystore clause overrides + * a property of the same name in the domain clause. All property names + * are case-insensitive. The following properties are supported: + *

+ *
{@code keystoreType=""}
+ *
The keystore type.
+ *
{@code keystoreURI=""}
+ *
The keystore location.
+ *
{@code keystoreProviderName=""}
+ *
The name of the keystore's JCE provider.
+ *
{@code keystorePasswordEnv=""}
+ *
The environment variable that stores a keystore password. + * Alternatively, passwords may be supplied to the constructor + * method in a {@code Map}.
+ *
{@code entryNameSeparator=""}
+ *
The separator between a keystore name prefix and an entry name. + * When specified, it applies to all the entries in a domain. + * Its default value is a space.
+ *
+ *

+ * For example, configuration data for a simple keystore domain + * comprising three keystores is shown below: + *

+ *
+ * domain app1 {
+ *     keystore app1-truststore
+ *         keystoreURI="file:///app1/etc/truststore.jks";
+ *
+ *     keystore system-truststore
+ *         keystoreURI="${java.home}/lib/security/cacerts";
+ *
+ *     keystore app1-keystore
+ *         keystoreType="PKCS12"
+ *         keystoreURI="file:///app1/etc/keystore.p12";
+ * };
+ *
+ * 
+ * @since 1.8 + */ +public final class DomainLoadStoreParameter implements LoadStoreParameter { + + private final URI configuration; + private final Map protectionParams; + + /** + * Constructs a DomainLoadStoreParameter for a keystore domain with + * the parameters used to protect keystore data. + * + * @param configuration identifier for the domain configuration data. + * The name of the target domain should be specified in the + * {@code java.net.URI} fragment component when it is necessary + * to distinguish between several domain configurations at the + * same location. + * + * @param protectionParams the map from keystore name to the parameter + * used to protect keystore data. + * A {@code java.util.Collections.EMPTY_MAP} should be used + * when protection parameters are not required or when they have + * been specified by properties in the domain configuration data. + * It is cloned to prevent subsequent modification. + * + * @exception NullPointerException if {@code configuration} or + * {@code protectionParams} is {@code null} + */ + public DomainLoadStoreParameter(URI configuration, + Map protectionParams) { + if (configuration == null || protectionParams == null) { + throw new NullPointerException("invalid null input"); + } + this.configuration = configuration; + this.protectionParams = + Collections.unmodifiableMap(new HashMap<>(protectionParams)); + } + + /** + * Gets the identifier for the domain configuration data. + * + * @return the identifier for the configuration data + */ + public URI getConfiguration() { + return configuration; + } + + /** + * Gets the keystore protection parameters for keystores in this + * domain. + * + * @return an unmodifiable map of keystore names to protection + * parameters + */ + public Map getProtectionParams() { + return protectionParams; + } + + /** + * Gets the keystore protection parameters for this domain. + * Keystore domains do not support a protection parameter. + * + * @return always returns {@code null} + */ + @Override + public KeyStore.ProtectionParameter getProtectionParameter() { + return null; + } +} diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/java/security/KeyStore.java --- a/jdk/src/share/classes/java/security/KeyStore.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/java/security/KeyStore.java Wed Oct 09 13:07:58 2013 -0700 @@ -219,148 +219,6 @@ } /** - * Configuration data that specifies the keystores in a keystore domain. - * A keystore domain is a collection of keystores that are presented as a - * single logical keystore. The configuration data is used during - * {@code KeyStore} - * {@link #load(KeyStore.LoadStoreParameter) load} and - * {@link #store(KeyStore.LoadStoreParameter) store} operations. - *

- * The following syntax is supported for configuration data: - *

{@code
-     *     domain  [ ...] {
-     *         keystore  [ ...] ;
-     *         ...
-     *     };
-     *     ...
-     * }
- * where {@code domainName} and {@code keystoreName} are identifiers - * and {@code property} is a key/value pairing. The key and value are - * separated by an 'equals' symbol and the value is enclosed in double - * quotes. A property value may be either a printable string or a binary - * string of colon-separated pairs of hexadecimal digits. Multi-valued - * properties are represented as a comma-separated list of values, - * enclosed in square brackets. - * See {@link Arrays#toString(java.lang.Object[])}. - *

- * To ensure that keystore entries are uniquely identified, each - * entry's alias is prefixed by its {@code keystoreName} followed - * by the entry name separator and each {@code keystoreName} must be - * unique within its domain. Entry name prefixes are omitted when - * storing a keystore. - *

- * Properties are context-sensitive: properties that apply to - * all the keystores in a domain are located in the domain clause, - * and properties that apply only to a specific keystore are located - * in that keystore's clause. - * Unless otherwise specified, a property in a keystore clause overrides - * a property of the same name in the domain clause. All property names - * are case-insensitive. The following properties are supported: - *

- *
{@code keystoreType=""}
- *
The keystore type.
- *
{@code keystoreURI=""}
- *
The keystore location.
- *
{@code keystoreProviderName=""}
- *
The name of the keystore's JCE provider.
- *
{@code keystorePasswordEnv=""}
- *
The environment variable that stores a keystore password. - * Alternatively, passwords may be supplied to the constructor - * method in a {@code Map}.
- *
{@code entryNameSeparator=""}
- *
The separator between a keystore name prefix and an entry name. - * When specified, it applies to all the entries in a domain. - * Its default value is a space.
- *
- *

- * For example, configuration data for a simple keystore domain - * comprising three keystores is shown below: - *

-     *
-     * domain app1 {
-     *     keystore app1-truststore
-     *         keystoreURI="file:///app1/etc/truststore.jks"
-     *
-     *     keystore system-truststore
-     *         keystoreURI="${java.home}/lib/security/cacerts"
-     *
-     *     keystore app1-keystore
-     *         keystoreType="PKCS12"
-     *         keystoreURI="file:///app1/etc/keystore.p12"
-     * };
-     *
-     * 
- * @since 1.8 - */ - public static final class DomainLoadStoreParameter - implements LoadStoreParameter { - - private final URI configuration; - private final Map protectionParams; - - /** - * Constructs a DomainLoadStoreParameter for a keystore domain with - * the parameters used to protect keystore data. - * - * @param configuration identifier for the domain configuration data. - * The name of the target domain should be specified in the - * {@code java.net.URI} fragment component when it is necessary - * to distinguish between several domain configurations at the - * same location. - * - * @param protectionParams the map from keystore name to the parameter - * used to protect keystore data. - * A {@code java.util.Collections.EMPTY_MAP} should be used - * when protection parameters are not required or when they have - * been specified by properties in the domain configuration data. - * It is cloned to prevent subsequent modification. - * - * @exception NullPointerException if {@code configuration} or - * {@code protectionParams} is {@code null} - */ - public DomainLoadStoreParameter(URI configuration, - Map protectionParams) { - if (configuration == null || protectionParams == null) { - throw new NullPointerException("invalid null input"); - } - this.configuration = configuration; - this.protectionParams = - Collections.unmodifiableMap(new HashMap<>(protectionParams)); - } - - /** - * Gets the identifier for the domain configuration data. - * - * @return the identifier for the configuration data - */ - public URI getConfiguration() { - return configuration; - } - - /** - * Gets the keystore protection parameters for keystores in this - * domain. - * - * @return an unmodifiable map of keystore names to protection - * parameters - */ - public Map getProtectionParams() { - return protectionParams; - } - - /** - * Gets the keystore protection parameters for this domain. - * Keystore domains do not support a protection parameter. - * - * @return always returns {@code null} - */ - @Override - public KeyStore.ProtectionParameter getProtectionParameter() { - return null; - } - } - - /** * A marker interface for keystore protection parameters. * *

The information stored in a {@code ProtectionParameter} diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/java/time/DayOfWeek.java --- a/jdk/src/share/classes/java/time/DayOfWeek.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/java/time/DayOfWeek.java Wed Oct 09 13:07:58 2013 -0700 @@ -187,7 +187,12 @@ if (temporal instanceof DayOfWeek) { return (DayOfWeek) temporal; } - return of(temporal.get(DAY_OF_WEEK)); + try { + return of(temporal.get(DAY_OF_WEEK)); + } catch (DateTimeException ex) { + throw new DateTimeException("Unable to obtain DayOfWeek from TemporalAccessor: " + + temporal + " of type " + temporal.getClass().getName(), ex); + } } //----------------------------------------------------------------------- diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/java/time/Instant.java --- a/jdk/src/share/classes/java/time/Instant.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/java/time/Instant.java Wed Oct 09 13:07:58 2013 -0700 @@ -366,9 +366,14 @@ return (Instant) temporal; } Objects.requireNonNull(temporal, "temporal"); - long instantSecs = temporal.getLong(INSTANT_SECONDS); - int nanoOfSecond = temporal.get(NANO_OF_SECOND); - return Instant.ofEpochSecond(instantSecs, nanoOfSecond); + try { + long instantSecs = temporal.getLong(INSTANT_SECONDS); + int nanoOfSecond = temporal.get(NANO_OF_SECOND); + return Instant.ofEpochSecond(instantSecs, nanoOfSecond); + } catch (DateTimeException ex) { + throw new DateTimeException("Unable to obtain Instant from TemporalAccessor: " + + temporal + " of type " + temporal.getClass().getName()); + } } //----------------------------------------------------------------------- diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/java/time/LocalDate.java --- a/jdk/src/share/classes/java/time/LocalDate.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/java/time/LocalDate.java Wed Oct 09 13:07:58 2013 -0700 @@ -356,7 +356,8 @@ Objects.requireNonNull(temporal, "temporal"); LocalDate date = temporal.query(TemporalQuery.localDate()); if (date == null) { - throw new DateTimeException("Unable to obtain LocalDate from TemporalAccessor: " + temporal.getClass()); + throw new DateTimeException("Unable to obtain LocalDate from TemporalAccessor: " + + temporal + " of type " + temporal.getClass().getName()); } return date; } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/java/time/LocalDateTime.java --- a/jdk/src/share/classes/java/time/LocalDateTime.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/java/time/LocalDateTime.java Wed Oct 09 13:07:58 2013 -0700 @@ -449,7 +449,8 @@ LocalTime time = LocalTime.from(temporal); return new LocalDateTime(date, time); } catch (DateTimeException ex) { - throw new DateTimeException("Unable to obtain LocalDateTime from TemporalAccessor: " + temporal.getClass(), ex); + throw new DateTimeException("Unable to obtain LocalDateTime from TemporalAccessor: " + + temporal + " of type " + temporal.getClass().getName(), ex); } } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/java/time/LocalTime.java --- a/jdk/src/share/classes/java/time/LocalTime.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/java/time/LocalTime.java Wed Oct 09 13:07:58 2013 -0700 @@ -397,7 +397,8 @@ Objects.requireNonNull(temporal, "temporal"); LocalTime time = temporal.query(TemporalQuery.localTime()); if (time == null) { - throw new DateTimeException("Unable to obtain LocalTime from TemporalAccessor: " + temporal.getClass()); + throw new DateTimeException("Unable to obtain LocalTime from TemporalAccessor: " + + temporal + " of type " + temporal.getClass().getName()); } return time; } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/java/time/Month.java --- a/jdk/src/share/classes/java/time/Month.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/java/time/Month.java Wed Oct 09 13:07:58 2013 -0700 @@ -217,7 +217,8 @@ } return of(temporal.get(MONTH_OF_YEAR)); } catch (DateTimeException ex) { - throw new DateTimeException("Unable to obtain Month from TemporalAccessor: " + temporal.getClass(), ex); + throw new DateTimeException("Unable to obtain Month from TemporalAccessor: " + + temporal + " of type " + temporal.getClass().getName(), ex); } } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/java/time/MonthDay.java --- a/jdk/src/share/classes/java/time/MonthDay.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/java/time/MonthDay.java Wed Oct 09 13:07:58 2013 -0700 @@ -266,7 +266,8 @@ } return of(temporal.get(MONTH_OF_YEAR), temporal.get(DAY_OF_MONTH)); } catch (DateTimeException ex) { - throw new DateTimeException("Unable to obtain MonthDay from TemporalAccessor: " + temporal.getClass(), ex); + throw new DateTimeException("Unable to obtain MonthDay from TemporalAccessor: " + + temporal + " of type " + temporal.getClass().getName(), ex); } } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/java/time/OffsetDateTime.java --- a/jdk/src/share/classes/java/time/OffsetDateTime.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/java/time/OffsetDateTime.java Wed Oct 09 13:07:58 2013 -0700 @@ -347,8 +347,8 @@ if (temporal instanceof OffsetDateTime) { return (OffsetDateTime) temporal; } - ZoneOffset offset = ZoneOffset.from(temporal); try { + ZoneOffset offset = ZoneOffset.from(temporal); try { LocalDateTime ldt = LocalDateTime.from(temporal); return OffsetDateTime.of(ldt, offset); @@ -357,7 +357,8 @@ return OffsetDateTime.ofInstant(instant, offset); } } catch (DateTimeException ex) { - throw new DateTimeException("Unable to obtain OffsetDateTime from TemporalAccessor: " + temporal.getClass(), ex); + throw new DateTimeException("Unable to obtain OffsetDateTime from TemporalAccessor: " + + temporal + " of type " + temporal.getClass().getName(), ex); } } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/java/time/OffsetTime.java --- a/jdk/src/share/classes/java/time/OffsetTime.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/java/time/OffsetTime.java Wed Oct 09 13:07:58 2013 -0700 @@ -284,7 +284,8 @@ ZoneOffset offset = ZoneOffset.from(temporal); return new OffsetTime(time, offset); } catch (DateTimeException ex) { - throw new DateTimeException("Unable to obtain OffsetTime from TemporalAccessor: " + temporal.getClass(), ex); + throw new DateTimeException("Unable to obtain OffsetTime from TemporalAccessor: " + + temporal + " of type " + temporal.getClass().getName(), ex); } } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/java/time/Year.java --- a/jdk/src/share/classes/java/time/Year.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/java/time/Year.java Wed Oct 09 13:07:58 2013 -0700 @@ -249,7 +249,8 @@ } return of(temporal.get(YEAR)); } catch (DateTimeException ex) { - throw new DateTimeException("Unable to obtain Year from TemporalAccessor: " + temporal.getClass(), ex); + throw new DateTimeException("Unable to obtain Year from TemporalAccessor: " + + temporal + " of type " + temporal.getClass().getName(), ex); } } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/java/time/YearMonth.java --- a/jdk/src/share/classes/java/time/YearMonth.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/java/time/YearMonth.java Wed Oct 09 13:07:58 2013 -0700 @@ -252,7 +252,8 @@ } return of(temporal.get(YEAR), temporal.get(MONTH_OF_YEAR)); } catch (DateTimeException ex) { - throw new DateTimeException("Unable to obtain YearMonth from TemporalAccessor: " + temporal.getClass(), ex); + throw new DateTimeException("Unable to obtain YearMonth from TemporalAccessor: " + + temporal + " of type " + temporal.getClass().getName(), ex); } } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/java/time/ZoneId.java --- a/jdk/src/share/classes/java/time/ZoneId.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/java/time/ZoneId.java Wed Oct 09 13:07:58 2013 -0700 @@ -504,7 +504,8 @@ public static ZoneId from(TemporalAccessor temporal) { ZoneId obj = temporal.query(TemporalQuery.zone()); if (obj == null) { - throw new DateTimeException("Unable to obtain ZoneId from TemporalAccessor: " + temporal.getClass()); + throw new DateTimeException("Unable to obtain ZoneId from TemporalAccessor: " + + temporal + " of type " + temporal.getClass().getName()); } return obj; } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/java/time/ZoneOffset.java --- a/jdk/src/share/classes/java/time/ZoneOffset.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/java/time/ZoneOffset.java Wed Oct 09 13:07:58 2013 -0700 @@ -336,7 +336,8 @@ Objects.requireNonNull(temporal, "temporal"); ZoneOffset offset = temporal.query(TemporalQuery.offset()); if (offset == null) { - throw new DateTimeException("Unable to obtain ZoneOffset from TemporalAccessor: " + temporal.getClass()); + throw new DateTimeException("Unable to obtain ZoneOffset from TemporalAccessor: " + + temporal + " of type " + temporal.getClass().getName()); } return offset; } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/java/time/ZonedDateTime.java --- a/jdk/src/share/classes/java/time/ZonedDateTime.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/java/time/ZonedDateTime.java Wed Oct 09 13:07:58 2013 -0700 @@ -553,7 +553,8 @@ return of(ldt, zone); } } catch (DateTimeException ex) { - throw new DateTimeException("Unable to create ZonedDateTime from TemporalAccessor: " + temporal.getClass(), ex); + throw new DateTimeException("Unable to obtain ZonedDateTime from TemporalAccessor: " + + temporal + " of type " + temporal.getClass().getName(), ex); } } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/java/time/format/DateTimeFormatterBuilder.java --- a/jdk/src/share/classes/java/time/format/DateTimeFormatterBuilder.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/java/time/format/DateTimeFormatterBuilder.java Wed Oct 09 13:07:58 2013 -0700 @@ -78,9 +78,11 @@ import java.text.ParsePosition; import java.time.DateTimeException; import java.time.Instant; +import java.time.LocalDate; import java.time.LocalDateTime; import java.time.ZoneId; import java.time.ZoneOffset; +import java.time.chrono.ChronoLocalDate; import java.time.chrono.Chronology; import java.time.chrono.IsoChronology; import java.time.format.DateTimeTextProvider.LocaleStore; @@ -499,51 +501,16 @@ //----------------------------------------------------------------------- /** - * Appends the reduced value of a date-time field with fixed width to the formatter. - *

- * This is typically used for formatting and parsing a two digit year. - * The {@code width} is the printed and parsed width. - * The {@code baseValue} is used during parsing to determine the valid range. - *

- * For formatting, the width is used to determine the number of characters to format. - * The rightmost characters are output to match the width, left padding with zero. - *

- * For strict parsing, the number of characters allowed by the width are parsed. - * For lenient parsing, the number of characters must be at least 1 and less than 10. - * If the number of digits parsed is equal to {@code width} and the value is positive, - * the value of the field is computed to be the first number greater than - * or equal to the {@code baseValue} with the same least significant characters, - * otherwise the value parsed is the field value. - * This allows a reduced value to be entered for values in range of the baseValue - * and width and absolute values can be entered for values outside the range. + * Appends the reduced value of a date-time field to the formatter. *

- * For example, a base value of {@code 1980} and a width of {@code 2} will have - * valid values from {@code 1980} to {@code 2079}. - * During parsing, the text {@code "12"} will result in the value {@code 2012} as that - * is the value within the range where the last two characters are "12". - * Compare with lenient parsing the text {@code "1915"} that will result in the - * value {@code 1915}. - * - * @param field the field to append, not null - * @param width the field width of the printed and parsed field, from 1 to 10 - * @param baseValue the base value of the range of valid values - * @return this, for chaining, not null - * @throws IllegalArgumentException if the width or base value is invalid - * @see #appendValueReduced(java.time.temporal.TemporalField, int, int, int) - */ - public DateTimeFormatterBuilder appendValueReduced(TemporalField field, - int width, int baseValue) { - return appendValueReduced(field, width, width, baseValue); - } - - /** - * Appends the reduced value of a date-time field with a flexible width to the formatter. - *

- * This is typically used for formatting and parsing a two digit year - * but allowing for the year value to be up to maxWidth. + * Since fields such as year vary by chronology, it is recommended to use the + * {@link #appendValueReduced(TemporalField, int, int, ChronoLocalDate)} date} + * variant of this method in most cases. This variant is suitable for + * simple fields or working with only the ISO chronology. *

* For formatting, the {@code width} and {@code maxWidth} are used to * determine the number of characters to format. + * If they are equal then the format is fixed width. * If the value of the field is within the range of the {@code baseValue} using * {@code width} characters then the reduced value is formatted otherwise the value is * truncated to fit {@code maxWidth}. @@ -562,8 +529,7 @@ * valid values from {@code 1980} to {@code 2079}. * During parsing, the text {@code "12"} will result in the value {@code 2012} as that * is the value within the range where the last two characters are "12". - * Compare with parsing the text {@code "1915"} that will result in the - * value {@code 1915}. + * By contrast, parsing the text {@code "1915"} will result in the value {@code 1915}. * * @param field the field to append, not null * @param width the field width of the printed and parsed field, from 1 to 10 @@ -575,7 +541,67 @@ public DateTimeFormatterBuilder appendValueReduced(TemporalField field, int width, int maxWidth, int baseValue) { Objects.requireNonNull(field, "field"); - ReducedPrinterParser pp = new ReducedPrinterParser(field, width, maxWidth, baseValue); + ReducedPrinterParser pp = new ReducedPrinterParser(field, width, maxWidth, baseValue, null); + appendValue(pp); + return this; + } + + /** + * Appends the reduced value of a date-time field to the formatter. + *

+ * This is typically used for formatting and parsing a two digit year. + *

+ * The base date is used to calculate the full value during parsing. + * For example, if the base date is 1950-01-01 then parsed values for + * a two digit year parse will be in the range 1950-01-01 to 2049-12-31. + * Only the year would be extracted from the date, thus a base date of + * 1950-08-25 would also parse to the range 1950-01-01 to 2049-12-31. + * This behaviour is necessary to support fields such as week-based-year + * or other calendar systems where the parsed value does not align with + * standard ISO years. + *

+ * The exact behavior is as follows. Parse the full set of fields and + * determine the effective chronology. Then convert the base date to the + * effective chronology. Then extract the specified field from the + * chronology-specific base date and use it to determine the + * {@code baseValue} used below. + *

+ * For formatting, the {@code width} and {@code maxWidth} are used to + * determine the number of characters to format. + * If they are equal then the format is fixed width. + * If the value of the field is within the range of the {@code baseValue} using + * {@code width} characters then the reduced value is formatted otherwise the value is + * truncated to fit {@code maxWidth}. + * The rightmost characters are output to match the width, left padding with zero. + *

+ * For strict parsing, the number of characters allowed by {@code width} to {@code maxWidth} are parsed. + * For lenient parsing, the number of characters must be at least 1 and less than 10. + * If the number of digits parsed is equal to {@code width} and the value is positive, + * the value of the field is computed to be the first number greater than + * or equal to the {@code baseValue} with the same least significant characters, + * otherwise the value parsed is the field value. + * This allows a reduced value to be entered for values in range of the baseValue + * and width and absolute values can be entered for values outside the range. + *

+ * For example, a base value of {@code 1980} and a width of {@code 2} will have + * valid values from {@code 1980} to {@code 2079}. + * During parsing, the text {@code "12"} will result in the value {@code 2012} as that + * is the value within the range where the last two characters are "12". + * By contrast, parsing the text {@code "1915"} will result in the value {@code 1915}. + * + * @param field the field to append, not null + * @param width the field width of the printed and parsed field, from 1 to 10 + * @param maxWidth the maximum field width of the printed field, from 1 to 10 + * @param baseDate the base date used to calculate the base value for the range + * of valid values in the parsed chronology, not null + * @return this, for chaining, not null + * @throws IllegalArgumentException if the width or base value is invalid + */ + public DateTimeFormatterBuilder appendValueReduced( + TemporalField field, int width, int maxWidth, ChronoLocalDate baseDate) { + Objects.requireNonNull(field, "field"); + Objects.requireNonNull(baseDate, "baseDate"); + ReducedPrinterParser pp = new ReducedPrinterParser(field, width, maxWidth, 0, baseDate); appendValue(pp); return this; } @@ -1682,7 +1708,7 @@ case 'u': case 'y': if (count == 2) { - appendValueReduced(field, 2, 2000); + appendValueReduced(field, 2, 2, ReducedPrinterParser.BASE_DATE); } else if (count < 4) { appendValue(field, count, 19, SignStyle.NORMAL); } else { @@ -2516,7 +2542,7 @@ if (valueLong == null) { return false; } - long value = getValue(valueLong); + long value = getValue(context, valueLong); DecimalStyle decimalStyle = context.getDecimalStyle(); String str = (value == Long.MIN_VALUE ? "9223372036854775808" : Long.toString(Math.abs(value))); if (str.length() > maxWidth) { @@ -2560,10 +2586,11 @@ /** * Gets the value to output. * - * @param value the base value of the field, not null + * @param context the context + * @param value the value of the field, not null * @return the value */ - long getValue(long value) { + long getValue(DateTimePrintContext context, long value) { return value; } @@ -2703,7 +2730,13 @@ * Prints and parses a reduced numeric date-time field. */ static final class ReducedPrinterParser extends NumberPrinterParser { + /** + * The base date for reduced value parsing. + */ + static final LocalDate BASE_DATE = LocalDate.of(2000, 1, 1); + private final int baseValue; + private final ChronoLocalDate baseDate; /** * Constructor. @@ -2712,10 +2745,11 @@ * @param minWidth the minimum field width, from 1 to 10 * @param maxWidth the maximum field width, from 1 to 10 * @param baseValue the base value + * @param baseDate the base date */ ReducedPrinterParser(TemporalField field, int minWidth, int maxWidth, - int baseValue) { - this(field, minWidth, maxWidth, baseValue, 0); + int baseValue, ChronoLocalDate baseDate) { + this(field, minWidth, maxWidth, baseValue, baseDate, 0); if (minWidth < 1 || minWidth > 10) { throw new IllegalArgumentException("The minWidth must be from 1 to 10 inclusive but was " + minWidth); } @@ -2726,11 +2760,13 @@ throw new IllegalArgumentException("Maximum width must exceed or equal the minimum width but " + maxWidth + " < " + minWidth); } - if (field.range().isValidValue(baseValue) == false) { - throw new IllegalArgumentException("The base value must be within the range of the field"); - } - if ((((long) baseValue) + EXCEED_POINTS[maxWidth]) > Integer.MAX_VALUE) { - throw new DateTimeException("Unable to add printer-parser as the range exceeds the capacity of an int"); + if (baseDate == null) { + if (field.range().isValidValue(baseValue) == false) { + throw new IllegalArgumentException("The base value must be within the range of the field"); + } + if ((((long) baseValue) + EXCEED_POINTS[maxWidth]) > Integer.MAX_VALUE) { + throw new DateTimeException("Unable to add printer-parser as the range exceeds the capacity of an int"); + } } } @@ -2742,17 +2778,24 @@ * @param minWidth the minimum field width, from 1 to 10 * @param maxWidth the maximum field width, from 1 to 10 * @param baseValue the base value + * @param baseDate the base date * @param subsequentWidth the subsequentWidth for this instance */ private ReducedPrinterParser(TemporalField field, int minWidth, int maxWidth, - int baseValue, int subsequentWidth) { + int baseValue, ChronoLocalDate baseDate, int subsequentWidth) { super(field, minWidth, maxWidth, SignStyle.NOT_NEGATIVE, subsequentWidth); this.baseValue = baseValue; + this.baseDate = baseDate; } @Override - long getValue(long value) { + long getValue(DateTimePrintContext context, long value) { long absValue = Math.abs(value); + int baseValue = this.baseValue; + if (baseDate != null) { + Chronology chrono = Chronology.from(context.getTemporal()); + baseValue = chrono.date(baseDate).get(field); + } if (value >= baseValue && value < baseValue + EXCEED_POINTS[minWidth]) { // Use the reduced value if it fits in minWidth return absValue % EXCEED_POINTS[minWidth]; @@ -2763,6 +2806,12 @@ @Override int setValue(DateTimeParseContext context, long value, int errorPos, int successPos) { + int baseValue = this.baseValue; + if (baseDate != null) { + // TODO: effective chrono is inaccurate at this point + Chronology chrono = context.getEffectiveChronology(); + baseValue = chrono.date(baseDate).get(field); + } int parseLen = successPos - errorPos; if (parseLen == minWidth && value >= 0) { long range = EXCEED_POINTS[minWidth]; @@ -2773,7 +2822,7 @@ } else { value = basePart - value; } - if (basePart != 0 && value < baseValue) { + if (value < baseValue) { value += range; } } @@ -2790,7 +2839,7 @@ if (subsequentWidth == -1) { return this; } - return new ReducedPrinterParser(field, minWidth, maxWidth, baseValue, -1); + return new ReducedPrinterParser(field, minWidth, maxWidth, baseValue, baseDate, -1); } /** @@ -2801,13 +2850,13 @@ */ @Override ReducedPrinterParser withSubsequentWidth(int subsequentWidth) { - return new ReducedPrinterParser(field, minWidth, maxWidth, baseValue, + return new ReducedPrinterParser(field, minWidth, maxWidth, baseValue, baseDate, this.subsequentWidth + subsequentWidth); } @Override public String toString() { - return "ReducedValue(" + field + "," + minWidth + "," + maxWidth + "," + baseValue + ")"; + return "ReducedValue(" + field + "," + minWidth + "," + maxWidth + "," + (baseDate != null ? baseDate : baseValue) + ")"; } } @@ -4351,7 +4400,7 @@ case 'Y': field = weekDef.weekBasedYear(); if (count == 2) { - return new ReducedPrinterParser(field, 2, 2, 2000, 0); + return new ReducedPrinterParser(field, 2, 2, 0, ReducedPrinterParser.BASE_DATE, 0); } else { return new NumberPrinterParser(field, count, 19, (count < 4) ? SignStyle.NORMAL : SignStyle.EXCEEDS_PAD, -1); @@ -4380,7 +4429,7 @@ if (count == 1) { sb.append("WeekBasedYear"); } else if (count == 2) { - sb.append("ReducedValue(WeekBasedYear,2,2000)"); + sb.append("ReducedValue(WeekBasedYear,2,2,2000-01-01)"); } else { sb.append("WeekBasedYear,").append(count).append(",") .append(19).append(",") diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/java/time/format/Parsed.java --- a/jdk/src/share/classes/java/time/format/Parsed.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/java/time/format/Parsed.java Wed Oct 09 13:07:58 2013 -0700 @@ -588,11 +588,23 @@ //----------------------------------------------------------------------- @Override public String toString() { - String str = fieldValues.toString() + "," + chrono + "," + zone; + StringBuilder buf = new StringBuilder(64); + buf.append(fieldValues).append(',').append(chrono); + if (zone != null) { + buf.append(',').append(zone); + } if (date != null || time != null) { - str += " resolved to " + date + "," + time; + buf.append(" resolved to "); + if (date != null) { + buf.append(date); + if (time != null) { + buf.append('T').append(time); + } + } else { + buf.append(time); + } } - return str; + return buf.toString(); } } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/java/util/HashSet.java --- a/jdk/src/share/classes/java/util/HashSet.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/java/util/HashSet.java Wed Oct 09 13:07:58 2013 -0700 @@ -25,6 +25,8 @@ package java.util; +import java.io.InvalidObjectException; + /** * This class implements the Set interface, backed by a hash table * (actually a HashMap instance). It makes no guarantees as to the @@ -294,16 +296,37 @@ // Read in any hidden serialization magic s.defaultReadObject(); - // Read in HashMap capacity and load factor and create backing HashMap + // Read capacity and verify non-negative. int capacity = s.readInt(); + if (capacity < 0) { + throw new InvalidObjectException("Illegal capacity: " + + capacity); + } + + // Read load factor and verify positive and non NaN. float loadFactor = s.readFloat(); + if (loadFactor <= 0 || Float.isNaN(loadFactor)) { + throw new InvalidObjectException("Illegal load factor: " + + loadFactor); + } + + // Read size and verify non-negative. + int size = s.readInt(); + if (size < 0) { + throw new InvalidObjectException("Illegal size: " + + size); + } + + // Set the capacity according to the size and load factor ensuring that + // the HashMap is at least 25% full but clamping to maximum capacity. + capacity = (int) Math.min(size * Math.min(1 / loadFactor, 4.0f), + HashMap.MAXIMUM_CAPACITY); + + // Create backing HashMap map = (((HashSet)this) instanceof LinkedHashSet ? new LinkedHashMap(capacity, loadFactor) : new HashMap(capacity, loadFactor)); - // Read in size - int size = s.readInt(); - // Read in all elements in the proper order. for (int i=0; iIf a Spliterator reports an inconsistent set of * characteristics (either those returned from a single invocation * or across multiple invocations), no guarantees can be made * about any computation using this Spliterator. * + * @apiNote The characteristics of a given spliterator before splitting + * may differ from the characteristics after splitting. For specific + * examples see the characteristic values {@link #SIZED}, {@link #SUBSIZED} + * and {@link #CONCURRENT}. + * * @return a representation of characteristics */ int characteristics(); diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/java/util/logging/Level.java --- a/jdk/src/share/classes/java/util/logging/Level.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/java/util/logging/Level.java Wed Oct 09 13:07:58 2013 -0700 @@ -204,6 +204,12 @@ * @throws NullPointerException if the name is null */ protected Level(String name, int value, String resourceBundleName) { + this(name, value, resourceBundleName, true); + } + + // private constructor to specify whether this instance should be added + // to the KnownLevel list from which Level.parse method does its look up + private Level(String name, int value, String resourceBundleName, boolean visible) { if (name == null) { throw new NullPointerException(); } @@ -212,7 +218,9 @@ this.resourceBundleName = resourceBundleName; this.localizedLevelName = resourceBundleName == null ? name : null; this.cachedLocale = null; - KnownLevel.add(this); + if (visible) { + KnownLevel.add(this); + } } /** @@ -465,7 +473,7 @@ // Finally, look for a known level with the given localized name, // in the current default locale. // This is relatively expensive, but not excessively so. - level = KnownLevel.findByLocalizedName(name); + level = KnownLevel.findByLocalizedLevelName(name); if (level != null) { return level.levelObject; } @@ -521,13 +529,14 @@ private static Map> nameToLevels = new HashMap<>(); private static Map> intToLevels = new HashMap<>(); final Level levelObject; // instance of Level class or Level subclass - final Level mirroredLevel; // instance of Level class + final Level mirroredLevel; // mirror of the custom Level KnownLevel(Level l) { this.levelObject = l; if (l.getClass() == Level.class) { this.mirroredLevel = l; } else { - this.mirroredLevel = new Level(l.name, l.value, l.resourceBundleName); + // this mirrored level object is hidden + this.mirroredLevel = new Level(l.name, l.value, l.resourceBundleName, false); } } @@ -585,20 +594,6 @@ return null; } - // Returns a KnownLevel with the given localized name matching - // by calling the Level.getLocalizedName() method - static synchronized KnownLevel findByLocalizedName(String name) { - for (List levels : nameToLevels.values()) { - for (KnownLevel l : levels) { - String lname = l.levelObject.getLocalizedName(); - if (name.equals(lname)) { - return l; - } - } - } - return null; - } - static synchronized KnownLevel matches(Level l) { List list = nameToLevels.get(l.name); if (list != null) { diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/share/classes/sun/security/provider/DomainKeyStore.java --- a/jdk/src/share/classes/sun/security/provider/DomainKeyStore.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/share/classes/sun/security/provider/DomainKeyStore.java Wed Oct 09 13:07:58 2013 -0700 @@ -41,7 +41,7 @@ * This class provides the domain keystore type identified as "DKS". * DKS presents a collection of separate keystores as a single logical keystore. * The collection of keystores is specified in a domain configuration file which - * is passed to DKS in a {@link KeyStore.DomainLoadStoreParameter}. + * is passed to DKS in a {@link DomainLoadStoreParameter}. *

* The following properties are supported: *

@@ -622,17 +622,16 @@ } throw new UnsupportedOperationException( - "This keystore must be stored using a " + - "KeyStore.DomainLoadStoreParameter"); + "This keystore must be stored using a DomainLoadStoreParameter"); } @Override public void engineStore(KeyStore.LoadStoreParameter param) throws IOException, NoSuchAlgorithmException, CertificateException { - if (param instanceof KeyStore.DomainLoadStoreParameter) { - KeyStore.DomainLoadStoreParameter domainParameter = - (KeyStore.DomainLoadStoreParameter) param; + if (param instanceof DomainLoadStoreParameter) { + DomainLoadStoreParameter domainParameter = + (DomainLoadStoreParameter) param; List builders = getBuilders( domainParameter.getConfiguration(), domainParameter.getProtectionParams()); @@ -645,7 +644,7 @@ if (!(pp instanceof KeyStore.PasswordProtection)) { throw new KeyStoreException( new IllegalArgumentException("ProtectionParameter" + - " must be a KeyStore.PasswordPartection")); + " must be a KeyStore.PasswordProtection")); } char[] password = ((KeyStore.PasswordProtection) builder.protection) @@ -663,7 +662,7 @@ } else { throw new UnsupportedOperationException( "This keystore must be stored using a " + - "KeyStore.DomainLoadStoreParameter"); + "DomainLoadStoreParameter"); } } @@ -710,7 +709,7 @@ } catch (Exception e) { throw new UnsupportedOperationException( "This keystore must be loaded using a " + - "KeyStore.DomainLoadStoreParameter"); + "DomainLoadStoreParameter"); } } @@ -718,9 +717,9 @@ public void engineLoad(KeyStore.LoadStoreParameter param) throws IOException, NoSuchAlgorithmException, CertificateException { - if (param instanceof KeyStore.DomainLoadStoreParameter) { - KeyStore.DomainLoadStoreParameter domainParameter = - (KeyStore.DomainLoadStoreParameter) param; + if (param instanceof DomainLoadStoreParameter) { + DomainLoadStoreParameter domainParameter = + (DomainLoadStoreParameter) param; List builders = getBuilders( domainParameter.getConfiguration(), domainParameter.getProtectionParams()); @@ -748,7 +747,7 @@ } else { throw new UnsupportedOperationException( "This keystore must be loaded using a " + - "KeyStore.DomainLoadStoreParameter"); + "DomainLoadStoreParameter"); } } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/solaris/classes/com/sun/management/OSMBeanFactory.java --- a/jdk/src/solaris/classes/com/sun/management/OSMBeanFactory.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/solaris/classes/com/sun/management/OSMBeanFactory.java Wed Oct 09 13:07:58 2013 -0700 @@ -35,6 +35,7 @@ * public API and its API may change in incompatable ways between dot dot * releases and even patch releases. You should not rely on this class. */ +@jdk.Exported(false) public class OSMBeanFactory { /* static factory class */ private OSMBeanFactory() {}; diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/solaris/native/java/net/Inet4AddressImpl.c --- a/jdk/src/solaris/native/java/net/Inet4AddressImpl.c Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/solaris/native/java/net/Inet4AddressImpl.c Wed Oct 09 13:07:58 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -51,6 +51,24 @@ #define HAS_GLIBC_GETHOSTBY_R 1 #endif +static jclass ni_iacls; +static jclass ni_ia4cls; +static jmethodID ni_ia4ctrID; + +static void initializeInetClasses(JNIEnv *env) +{ + static int initialized = 0; + if (!initialized) { + ni_iacls = (*env)->FindClass(env, "java/net/InetAddress"); + ni_iacls = (*env)->NewGlobalRef(env, ni_iacls); + ni_ia4cls = (*env)->FindClass(env, "java/net/Inet4Address"); + ni_ia4cls = (*env)->NewGlobalRef(env, ni_ia4cls); + ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "", "()V"); + initialized = 1; + } +} + + #if defined(_ALLBSD_SOURCE) && !defined(HAS_GLIBC_GETHOSTBY_R) /* Use getaddrinfo(3), which is thread safe */ /************************************************************************ @@ -99,14 +117,6 @@ return (*env)->NewStringUTF(env, hostname); } -static jclass ni_iacls; -static jclass ni_ia4cls; -static jmethodID ni_ia4ctrID; -static jfieldID ni_iaaddressID; -static jfieldID ni_iahostID; -static jfieldID ni_iafamilyID; -static int initialized = 0; - /* * Find an internet address for a given hostname. Note that this * code only works for addresses of type INET. The translation @@ -129,14 +139,7 @@ int error=0; struct addrinfo hints, *res, *resNew = NULL; - if (!initialized) { - ni_iacls = (*env)->FindClass(env, "java/net/InetAddress"); - ni_iacls = (*env)->NewGlobalRef(env, ni_iacls); - ni_ia4cls = (*env)->FindClass(env, "java/net/Inet4Address"); - ni_ia4cls = (*env)->NewGlobalRef(env, ni_ia4cls); - ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "", "()V"); - initialized = 1; - } + initializeInetClasses(env); if (IS_NULL(host)) { JNU_ThrowNullPointerException(env, "host is null"); @@ -160,6 +163,17 @@ return NULL; } +#ifdef MACOSX + /* If we're looking up the local machine, bypass DNS lookups and get + * address from getifaddrs. + */ + ret = lookupIfLocalhost(env, hostname, JNI_FALSE); + if (ret != NULL || (*env)->ExceptionCheck(env)) { + JNU_ReleaseStringPlatformChars(env, host, hostname); + return ret; + } +#endif + error = getaddrinfo(hostname, NULL, &hints, &res); if (error) { @@ -365,10 +379,7 @@ return (*env)->NewStringUTF(env, hostname); } -static jclass ni_iacls; -static jclass ni_ia4cls; -static jmethodID ni_ia4ctrID; -static int initialized = 0; +extern jobjectArray lookupIfLocalhost(JNIEnv *env, const char *hostname, jboolean includeV6); /* * Find an internet address for a given hostname. Note that this @@ -390,14 +401,7 @@ int error = 0; struct addrinfo hints, *res, *resNew = NULL; - if (!initialized) { - ni_iacls = (*env)->FindClass(env, "java/net/InetAddress"); - ni_iacls = (*env)->NewGlobalRef(env, ni_iacls); - ni_ia4cls = (*env)->FindClass(env, "java/net/Inet4Address"); - ni_ia4cls = (*env)->NewGlobalRef(env, ni_ia4cls); - ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "", "()V"); - initialized = 1; - } + initializeInetClasses(env); if (IS_NULL(host)) { JNU_ThrowNullPointerException(env, "host is null"); diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/src/solaris/native/java/net/Inet6AddressImpl.c --- a/jdk/src/solaris/native/java/net/Inet6AddressImpl.c Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/src/solaris/native/java/net/Inet6AddressImpl.c Wed Oct 09 13:07:58 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,7 +33,9 @@ #include #include #include -#ifdef _ALLBSD_SOURCE +#ifdef MACOSX +#include +#include #include /* gethostname */ #endif @@ -121,7 +123,145 @@ static jmethodID ni_ia4ctrID; static jmethodID ni_ia6ctrID; static jfieldID ni_ia6ipaddressID; -static int initialized = 0; + +static void initializeInetClasses(JNIEnv *env) +{ + static int initialized = 0; + if (!initialized) { + ni_iacls = (*env)->FindClass(env, "java/net/InetAddress"); + ni_iacls = (*env)->NewGlobalRef(env, ni_iacls); + ni_ia4cls = (*env)->FindClass(env, "java/net/Inet4Address"); + ni_ia4cls = (*env)->NewGlobalRef(env, ni_ia4cls); + ni_ia6cls = (*env)->FindClass(env, "java/net/Inet6Address"); + ni_ia6cls = (*env)->NewGlobalRef(env, ni_ia6cls); + ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "", "()V"); + ni_ia6ctrID = (*env)->GetMethodID(env, ni_ia6cls, "", "()V"); + ni_ia6ipaddressID = (*env)->GetFieldID(env, ni_ia6cls, "ipaddress", "[B"); + initialized = 1; + } +} + +#ifdef MACOSX +/* also called from Inet4AddressImpl.c */ +__private_extern__ jobjectArray +lookupIfLocalhost(JNIEnv *env, const char *hostname, jboolean includeV6) +{ + jobjectArray result = NULL; + jboolean preferIPv6Address; + char myhostname[NI_MAXHOST+1]; + struct ifaddrs *ifa = NULL; + int familyOrder = 0; + int count = 0, i, j; + int addrs4 = 0, addrs6 = 0, numV4Loopbacks = 0, numV6Loopbacks = 0; + jboolean includeLoopback = JNI_FALSE; + jobject name; + + // Make sure static variables we need are set. + initializeInetClasses(env); + + /* get the address preference */ + preferIPv6Address = (*env)->GetStaticBooleanField(env, ia_class, ia_preferIPv6AddressID); + + /* If the requested name matches this host's hostname, return IP addresses + * from all attached interfaces. (#2844683 et al) This prevents undesired + * PPP dialup, but may return addresses that don't actually correspond to + * the name (if the name actually matches something in DNS etc. + */ + myhostname[0] = '\0'; + if (JVM_GetHostName(myhostname, NI_MAXHOST)) { + /* Something went wrong, maybe networking is not setup? */ + return NULL; + } + myhostname[NI_MAXHOST] = '\0'; + + if (strcmp(myhostname, hostname) != 0) { + // Non-self lookup + return NULL; + } + + if (getifaddrs(&ifa) != 0) { + NET_ThrowNew(env, errno, "Can't get local interface addresses"); + return NULL; + } + + name = (*env)->NewStringUTF(env, hostname); + + /* Iterate over the interfaces, and total up the number of IPv4 and IPv6 + * addresses we have. Also keep a count of loopback addresses. We need to + * exclude them in the normal case, but return them if we don't get an IP + * address. + */ + struct ifaddrs *iter = ifa; + while (iter) { + int family = iter->ifa_addr->sa_family; + if (iter->ifa_name[0] != '\0' && iter->ifa_addr) + { + jboolean isLoopback = iter->ifa_flags & IFF_LOOPBACK; + if (family == AF_INET) { + addrs4++; + if (isLoopback) numV4Loopbacks++; + } else if (family == AF_INET6 && includeV6) { + addrs6++; + if (isLoopback) numV6Loopbacks++; + } else { + /* We don't care e.g. AF_LINK */ + } + } + iter = iter->ifa_next; + } + + if (addrs4 == numV4Loopbacks && addrs6 == numV6Loopbacks) { + // We don't have a real IP address, just loopback. We need to include + // loopback in our results. + includeLoopback = JNI_TRUE; + } + + /* Create and fill the Java array. */ + int arraySize = addrs4 + addrs6 - + (includeLoopback ? 0 : (numV4Loopbacks + numV6Loopbacks)); + result = (*env)->NewObjectArray(env, arraySize, ni_iacls, NULL); + if (!result) goto done; + + if (preferIPv6Address) { + i = includeLoopback ? addrs6 : (addrs6 - numV6Loopbacks); + j = 0; + } else { + i = 0; + j = includeLoopback ? addrs4 : (addrs4 - numV4Loopbacks); + } + + // Now loop around the ifaddrs + iter = ifa; + while (iter != NULL) { + jboolean isLoopback = iter->ifa_flags & IFF_LOOPBACK; + int family = iter->ifa_addr->sa_family; + + if (iter->ifa_name[0] != '\0' && iter->ifa_addr + && (family == AF_INET || (family == AF_INET6 && includeV6)) + && (!isLoopback || includeLoopback)) + { + int port; + int index = (family == AF_INET) ? i++ : j++; + jobject o = NET_SockaddrToInetAddress(env, iter->ifa_addr, &port); + if (!o) { + freeifaddrs(ifa); + if (!(*env)->ExceptionCheck(env)) + JNU_ThrowOutOfMemoryError(env, "Object allocation failed"); + return NULL; + } + setInetAddress_hostName(env, o, name); + (*env)->SetObjectArrayElement(env, result, index, o); + (*env)->DeleteLocalRef(env, o); + } + iter = iter->ifa_next; + } + + done: + freeifaddrs(ifa); + + return result; +} +#endif /* * Find an internet address for a given hostname. Note that this @@ -147,18 +287,7 @@ struct addrinfo hints, *res, *resNew = NULL; #endif /* AF_INET6 */ - if (!initialized) { - ni_iacls = (*env)->FindClass(env, "java/net/InetAddress"); - ni_iacls = (*env)->NewGlobalRef(env, ni_iacls); - ni_ia4cls = (*env)->FindClass(env, "java/net/Inet4Address"); - ni_ia4cls = (*env)->NewGlobalRef(env, ni_ia4cls); - ni_ia6cls = (*env)->FindClass(env, "java/net/Inet6Address"); - ni_ia6cls = (*env)->NewGlobalRef(env, ni_ia6cls); - ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "", "()V"); - ni_ia6ctrID = (*env)->GetMethodID(env, ni_ia6cls, "", "()V"); - ni_ia6ipaddressID = (*env)->GetFieldID(env, ni_ia6cls, "ipaddress", "[B"); - initialized = 1; - } + initializeInetClasses(env); if (IS_NULL(host)) { JNU_ThrowNullPointerException(env, "host is null"); @@ -167,6 +296,21 @@ hostname = JNU_GetStringPlatformChars(env, host, JNI_FALSE); CHECK_NULL_RETURN(hostname, NULL); +#ifdef MACOSX + /* + * If getaddrinfo has failed and we're looking up the local machine, we + * attempt to get the address from getifaddrs. This ensures we get an + * IPv6 address for the local machine. + */ + if (error) { + ret = lookupIfLocalhost(env, hostname, JNI_TRUE); + if (ret != NULL || (*env)->ExceptionCheck(env)) { + JNU_ReleaseStringPlatformChars(env, host, hostname); + return ret; + } + } +#endif + #ifdef AF_INET6 static jfieldID ia_preferIPv6AddressID; if (ia_preferIPv6AddressID == NULL) { diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/test/java/lang/invoke/lambda/LogGeneratedClassesTest.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/test/java/lang/invoke/lambda/LogGeneratedClassesTest.java Wed Oct 09 13:07:58 2013 -0700 @@ -0,0 +1,208 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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 8023524 + * @summary tests logging generated classes for lambda + * @library /java/nio/file + * @run testng LogGeneratedClassesTest + */ +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.nio.file.Files; +import java.nio.file.LinkOption; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.attribute.PosixFileAttributeView; +import java.util.stream.Stream; + +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; +import org.testng.SkipException; + +import static java.nio.file.attribute.PosixFilePermissions.*; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertFalse; +import static org.testng.Assert.assertTrue; + +public class LogGeneratedClassesTest extends LUtils { + String longFQCN; + + @BeforeClass + public void setup() throws IOException { + final List scratch = new ArrayList<>(); + scratch.clear(); + scratch.add("package com.example;"); + scratch.add("public class TestLambda {"); + scratch.add(" interface I {"); + scratch.add(" int foo();"); + scratch.add(" }"); + scratch.add(" public static void main(String[] args) {"); + scratch.add(" I lam = () -> 10;"); + scratch.add(" Runnable r = () -> {"); + scratch.add(" System.out.println(\"Runnable\");"); + scratch.add(" };"); + scratch.add(" r.run();"); + scratch.add(" System.out.println(\"Finish\");"); + scratch.add(" }"); + scratch.add("}"); + + File test = new File("TestLambda.java"); + createFile(test, scratch); + compile("-d", ".", test.getName()); + + scratch.remove(0); + scratch.remove(0); + scratch.add(0, "public class LongPackageName {"); + StringBuilder sb = new StringBuilder("com.example."); + // longer than 255 which exceed max length of most filesystems + for (int i = 0; i < 30; i++) { + sb.append("nonsense."); + } + sb.append("enough"); + longFQCN = sb.toString() + ".LongPackageName"; + sb.append(";"); + sb.insert(0, "package "); + scratch.add(0, sb.toString()); + test = new File("LongPackageName.java"); + createFile(test, scratch); + compile("-d", ".", test.getName()); + + // create target + Files.createDirectory(Paths.get("dump")); + Files.createDirectories(Paths.get("dumpLong/com/example/nonsense")); + Files.createFile(Paths.get("dumpLong/com/example/nonsense/nonsense")); + Files.createFile(Paths.get("file")); + } + + @AfterClass + public void cleanup() throws IOException { + Files.delete(Paths.get("TestLambda.java")); + Files.delete(Paths.get("LongPackageName.java")); + Files.delete(Paths.get("file")); + TestUtil.removeAll(Paths.get("com")); + TestUtil.removeAll(Paths.get("dump")); + TestUtil.removeAll(Paths.get("dumpLong")); + } + + @Test + public void testNotLogging() { + TestResult tr = doExec(JAVA_CMD.getAbsolutePath(), + "-cp", ".", + "-Djava.security.manager", + "com.example.TestLambda"); + tr.assertZero("Should still return 0"); + } + + @Test + public void testLogging() throws IOException { + assertTrue(Files.exists(Paths.get("dump"))); + TestResult tr = doExec(JAVA_CMD.getAbsolutePath(), + "-cp", ".", + "-Djdk.internal.lambda.dumpProxyClasses=dump", + "-Djava.security.manager", + "com.example.TestLambda"); + // dump/com/example + 2 class files + assertEquals(Files.walk(Paths.get("dump")).count(), 5, "Two lambda captured"); + tr.assertZero("Should still return 0"); + } + + @Test + public void testDumpDirNotExist() throws IOException { + assertFalse(Files.exists(Paths.get("notExist"))); + TestResult tr = doExec(JAVA_CMD.getAbsolutePath(), + "-cp", ".", + "-Djdk.internal.lambda.dumpProxyClasses=notExist", + "-Djava.security.manager", + "com.example.TestLambda"); + assertEquals(tr.testOutput.stream() + .filter(s -> s.startsWith("WARNING")) + .peek(s -> assertTrue(s.contains("does not exist"))) + .count(), + 1, "only show error once"); + tr.assertZero("Should still return 0"); + } + + @Test + public void testDumpDirIsFile() throws IOException { + assertTrue(Files.isRegularFile(Paths.get("file"))); + TestResult tr = doExec(JAVA_CMD.getAbsolutePath(), + "-cp", ".", + "-Djdk.internal.lambda.dumpProxyClasses=file", + "-Djava.security.manager", + "com.example.TestLambda"); + assertEquals(tr.testOutput.stream() + .filter(s -> s.startsWith("WARNING")) + .peek(s -> assertTrue(s.contains("not a directory"))) + .count(), + 1, "only show error once"); + tr.assertZero("Should still return 0"); + } + + @Test + public void testDumpDirNotWritable() throws IOException { + if (! Files.getFileStore(Paths.get(".")) + .supportsFileAttributeView(PosixFileAttributeView.class)) { + // No easy way to setup readonly directory + throw new SkipException("Posix not supported"); + } + + Files.createDirectory(Paths.get("readOnly"), + asFileAttribute(fromString("r-xr-xr-x"))); + + TestResult tr = doExec(JAVA_CMD.getAbsolutePath(), + "-cp", ".", + "-Djdk.internal.lambda.dumpProxyClasses=readOnly", + "-Djava.security.manager", + "com.example.TestLambda"); + assertEquals(tr.testOutput.stream() + .filter(s -> s.startsWith("WARNING")) + .peek(s -> assertTrue(s.contains("not writable"))) + .count(), + 1, "only show error once"); + tr.assertZero("Should still return 0"); + + TestUtil.removeAll(Paths.get("readOnly")); + } + + @Test + public void testLoggingException() throws IOException { + assertTrue(Files.exists(Paths.get("dumpLong"))); + TestResult tr = doExec(JAVA_CMD.getAbsolutePath(), + "-cp", ".", + "-Djdk.internal.lambda.dumpProxyClasses=dumpLong", + "-Djava.security.manager", + longFQCN); + assertEquals(tr.testOutput.stream() + .filter(s -> s.startsWith("WARNING: Exception")) + .count(), + 2, "show error each capture"); + // dumpLong/com/example/nosense/nosense + assertEquals(Files.walk(Paths.get("dumpLong")).count(), 5, "Two lambda captured failed to log"); + tr.assertZero("Should still return 0"); + } +} diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/test/java/time/tck/java/time/format/TCKDateTimeFormatterBuilder.java --- a/jdk/test/java/time/tck/java/time/format/TCKDateTimeFormatterBuilder.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/test/java/time/tck/java/time/format/TCKDateTimeFormatterBuilder.java Wed Oct 09 13:07:58 2013 -0700 @@ -190,8 +190,69 @@ //----------------------------------------------------------------------- @Test(expectedExceptions=NullPointerException.class) - public void test_appendValueReduced_null() throws Exception { - builder.appendValueReduced(null, 2, 2000); + public void test_appendValueReduced_int_nullField() throws Exception { + builder.appendValueReduced(null, 2, 2, 2000); + } + + @Test(expectedExceptions=IllegalArgumentException.class) + public void test_appendValueReduced_int_minWidthTooSmall() throws Exception { + builder.appendValueReduced(YEAR, 0, 2, 2000); + } + + @Test(expectedExceptions=IllegalArgumentException.class) + public void test_appendValueReduced_int_minWidthTooBig() throws Exception { + builder.appendValueReduced(YEAR, 11, 2, 2000); + } + + @Test(expectedExceptions=IllegalArgumentException.class) + public void test_appendValueReduced_int_maxWidthTooSmall() throws Exception { + builder.appendValueReduced(YEAR, 2, 0, 2000); + } + + @Test(expectedExceptions=IllegalArgumentException.class) + public void test_appendValueReduced_int_maxWidthTooBig() throws Exception { + builder.appendValueReduced(YEAR, 2, 11, 2000); + } + + @Test(expectedExceptions=IllegalArgumentException.class) + public void test_appendValueReduced_int_maxWidthLessThanMin() throws Exception { + builder.appendValueReduced(YEAR, 2, 1, 2000); + } + + //----------------------------------------------------------------------- + @Test(expectedExceptions=NullPointerException.class) + public void test_appendValueReduced_date_nullField() throws Exception { + builder.appendValueReduced(null, 2, 2, LocalDate.of(2000, 1, 1)); + } + + @Test(expectedExceptions=NullPointerException.class) + public void test_appendValueReduced_date_nullDate() throws Exception { + builder.appendValueReduced(YEAR, 2, 2, null); + } + + @Test(expectedExceptions=IllegalArgumentException.class) + public void test_appendValueReduced_date_minWidthTooSmall() throws Exception { + builder.appendValueReduced(YEAR, 0, 2, LocalDate.of(2000, 1, 1)); + } + + @Test(expectedExceptions=IllegalArgumentException.class) + public void test_appendValueReduced_date_minWidthTooBig() throws Exception { + builder.appendValueReduced(YEAR, 11, 2, LocalDate.of(2000, 1, 1)); + } + + @Test(expectedExceptions=IllegalArgumentException.class) + public void test_appendValueReduced_date_maxWidthTooSmall() throws Exception { + builder.appendValueReduced(YEAR, 2, 0, LocalDate.of(2000, 1, 1)); + } + + @Test(expectedExceptions=IllegalArgumentException.class) + public void test_appendValueReduced_date_maxWidthTooBig() throws Exception { + builder.appendValueReduced(YEAR, 2, 11, LocalDate.of(2000, 1, 1)); + } + + @Test(expectedExceptions=IllegalArgumentException.class) + public void test_appendValueReduced_date_maxWidthLessThanMin() throws Exception { + builder.appendValueReduced(YEAR, 2, 1, LocalDate.of(2000, 1, 1)); } //----------------------------------------------------------------------- diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/test/java/time/tck/java/time/format/TCKDateTimeFormatters.java --- a/jdk/test/java/time/tck/java/time/format/TCKDateTimeFormatters.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/test/java/time/tck/java/time/format/TCKDateTimeFormatters.java Wed Oct 09 13:07:58 2013 -0700 @@ -126,9 +126,10 @@ @Test public void test_pattern_String() { DateTimeFormatter test = DateTimeFormatter.ofPattern("d MMM yyyy"); + Locale fmtLocale = Locale.getDefault(Locale.Category.FORMAT); assertEquals(test.format(LocalDate.of(2012, 6, 30)), "30 " + - Month.JUNE.getDisplayName(TextStyle.SHORT, Locale.getDefault()) + " 2012"); - assertEquals(test.getLocale(), Locale.getDefault()); + Month.JUNE.getDisplayName(TextStyle.SHORT, fmtLocale) + " 2012"); + assertEquals(test.getLocale(), fmtLocale, "Locale.Category.FORMAT"); } @Test(expectedExceptions=IllegalArgumentException.class) diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/test/java/time/test/java/time/format/TestDateTimeFormatter.java --- a/jdk/test/java/time/test/java/time/format/TestDateTimeFormatter.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/test/java/time/test/java/time/format/TestDateTimeFormatter.java Wed Oct 09 13:07:58 2013 -0700 @@ -61,12 +61,32 @@ import static java.time.temporal.ChronoField.DAY_OF_MONTH; import static org.testng.Assert.assertSame; +import static org.testng.Assert.assertTrue; +import static org.testng.Assert.fail; -import java.time.format.DecimalStyle; +import java.time.DateTimeException; +import java.time.DayOfWeek; +import java.time.Instant; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.time.Month; +import java.time.MonthDay; +import java.time.OffsetDateTime; +import java.time.OffsetTime; +import java.time.Year; +import java.time.YearMonth; +import java.time.ZoneId; +import java.time.ZoneOffset; +import java.time.ZonedDateTime; +import java.time.chrono.ThaiBuddhistChronology; import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatterBuilder; +import java.time.format.DecimalStyle; import java.time.format.SignStyle; +import java.time.temporal.TemporalAccessor; import java.util.Locale; +import java.util.function.Function; import org.testng.annotations.Test; @@ -87,4 +107,93 @@ assertSame(test, base); } + @Test + public void test_parse_errorMessage() throws Exception { + assertGoodErrorDate(DayOfWeek::from, "DayOfWeek"); + assertGoodErrorDate(Month::from, "Month"); + assertGoodErrorDate(YearMonth::from, "YearMonth"); + assertGoodErrorDate(MonthDay::from, "MonthDay"); + assertGoodErrorDate(LocalDate::from, "LocalDate"); + assertGoodErrorDate(LocalTime::from, "LocalTime"); + assertGoodErrorDate(LocalDateTime::from, "LocalDateTime"); + assertGoodErrorDate(OffsetTime::from, "OffsetTime"); + assertGoodErrorDate(OffsetDateTime::from, "OffsetDateTime"); + assertGoodErrorDate(ZonedDateTime::from, "ZonedDateTime"); + assertGoodErrorDate(Instant::from, "Instant"); + assertGoodErrorDate(ZoneOffset::from, "ZoneOffset"); + assertGoodErrorDate(ZoneId::from, "ZoneId"); + assertGoodErrorDate(ThaiBuddhistChronology.INSTANCE::date, ""); + + assertGoodErrorTime(DayOfWeek::from, "DayOfWeek"); + assertGoodErrorTime(Month::from, "Month"); + assertGoodErrorTime(Year::from, "Year"); + assertGoodErrorTime(YearMonth::from, "YearMonth"); + assertGoodErrorTime(MonthDay::from, "MonthDay"); + assertGoodErrorTime(LocalDate::from, "LocalDate"); + assertGoodErrorTime(LocalTime::from, "LocalTime"); + assertGoodErrorTime(LocalDateTime::from, "LocalDateTime"); + assertGoodErrorTime(OffsetTime::from, "OffsetTime"); + assertGoodErrorTime(OffsetDateTime::from, "OffsetDateTime"); + assertGoodErrorTime(ZonedDateTime::from, "ZonedDateTime"); + assertGoodErrorTime(Instant::from, "Instant"); + assertGoodErrorTime(ZoneOffset::from, "ZoneOffset"); + assertGoodErrorTime(ZoneId::from, "ZoneId"); + assertGoodErrorTime(ThaiBuddhistChronology.INSTANCE::date, ""); + } + + private void assertGoodErrorDate(Function function, String expectedText) { + DateTimeFormatter f = DateTimeFormatter.ofPattern("yyyy-mm-dd"); + TemporalAccessor temporal = f.parse("2010-06-30"); + try { + function.apply(temporal); + fail("Should have failed"); + } catch (DateTimeException ex) { + String msg = ex.getMessage(); + assertTrue(msg.contains(expectedText), msg); + assertTrue(msg.contains("Year"), msg); + assertTrue(msg.contains("MinuteOfHour"), msg); + assertTrue(msg.contains("DayOfMonth"), msg); + } + } + + private void assertGoodErrorTime(Function function, String expectedText) { + DateTimeFormatter f = DateTimeFormatter.ofPattern("HH:MM:ss"); + TemporalAccessor temporal = f.parse("11:30:56"); + try { + function.apply(temporal); + fail("Should have failed"); + } catch (DateTimeException ex) { + String msg = ex.getMessage(); + assertTrue(msg.contains(expectedText), msg); + assertTrue(msg.contains("HourOfDay"), msg); + assertTrue(msg.contains("MonthOfYear"), msg); + assertTrue(msg.contains("SecondOfMinute"), msg); + } + } + + @Test + public void test_parsed_toString_resolvedTime() { + DateTimeFormatter f = DateTimeFormatter.ofPattern("HH:mm:ss"); + TemporalAccessor temporal = f.parse("11:30:56"); + String msg = temporal.toString(); + assertTrue(msg.contains("11:30:56"), msg); + } + + @Test + public void test_parsed_toString_resolvedDate() { + DateTimeFormatter f = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + TemporalAccessor temporal = f.parse("2010-06-30"); + String msg = temporal.toString(); + assertTrue(msg.contains("2010-06-30"), msg); + } + + @Test + public void test_parsed_toString_resolvedDateTime() { + DateTimeFormatter f = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); + TemporalAccessor temporal = f.parse("2010-06-30 11:30:56"); + String msg = temporal.toString(); + assertTrue(msg.contains("2010-06-30"), msg); + assertTrue(msg.contains("11:30:56"), msg); + } + } diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/test/java/time/test/java/time/format/TestDateTimeFormatterBuilder.java --- a/jdk/test/java/time/test/java/time/format/TestDateTimeFormatterBuilder.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/test/java/time/test/java/time/format/TestDateTimeFormatterBuilder.java Wed Oct 09 13:07:58 2013 -0700 @@ -267,12 +267,12 @@ //----------------------------------------------------------------------- @Test(expectedExceptions=NullPointerException.class) public void test_appendValueReduced_null() throws Exception { - builder.appendValueReduced(null, 2, 2000); + builder.appendValueReduced(null, 2, 2, 2000); } @Test public void test_appendValueReduced() throws Exception { - builder.appendValueReduced(YEAR, 2, 2000); + builder.appendValueReduced(YEAR, 2, 2, 2000); DateTimeFormatter f = builder.toFormatter(); assertEquals(f.toString(), "ReducedValue(Year,2,2,2000)"); TemporalAccessor parsed = f.parseUnresolved("12", new ParsePosition(0)); @@ -281,7 +281,7 @@ @Test public void test_appendValueReduced_subsequent_parse() throws Exception { - builder.appendValue(MONTH_OF_YEAR, 1, 2, SignStyle.NORMAL).appendValueReduced(YEAR, 2, 2000); + builder.appendValue(MONTH_OF_YEAR, 1, 2, SignStyle.NORMAL).appendValueReduced(YEAR, 2, 2, 2000); DateTimeFormatter f = builder.toFormatter(); assertEquals(f.toString(), "Value(MonthOfYear,1,2,NORMAL)ReducedValue(Year,2,2,2000)"); ParsePosition ppos = new ParsePosition(0); @@ -654,19 +654,19 @@ {"GGGGG", "Text(Era,NARROW)"}, {"u", "Value(Year)"}, - {"uu", "ReducedValue(Year,2,2,2000)"}, + {"uu", "ReducedValue(Year,2,2,2000-01-01)"}, {"uuu", "Value(Year,3,19,NORMAL)"}, {"uuuu", "Value(Year,4,19,EXCEEDS_PAD)"}, {"uuuuu", "Value(Year,5,19,EXCEEDS_PAD)"}, {"y", "Value(YearOfEra)"}, - {"yy", "ReducedValue(YearOfEra,2,2,2000)"}, + {"yy", "ReducedValue(YearOfEra,2,2,2000-01-01)"}, {"yyy", "Value(YearOfEra,3,19,NORMAL)"}, {"yyyy", "Value(YearOfEra,4,19,EXCEEDS_PAD)"}, {"yyyyy", "Value(YearOfEra,5,19,EXCEEDS_PAD)"}, {"Y", "Localized(WeekBasedYear)"}, - {"YY", "Localized(ReducedValue(WeekBasedYear,2,2000))"}, + {"YY", "Localized(ReducedValue(WeekBasedYear,2,2,2000-01-01))"}, {"YYY", "Localized(WeekBasedYear,3,19,NORMAL)"}, {"YYYY", "Localized(WeekBasedYear,4,19,EXCEEDS_PAD)"}, {"YYYYY", "Localized(WeekBasedYear,5,19,EXCEEDS_PAD)"}, diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/test/java/time/test/java/time/format/TestReducedParser.java --- a/jdk/test/java/time/test/java/time/format/TestReducedParser.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/test/java/time/test/java/time/format/TestReducedParser.java Wed Oct 09 13:07:58 2013 -0700 @@ -64,11 +64,20 @@ import static java.time.temporal.ChronoField.MONTH_OF_YEAR; import static java.time.temporal.ChronoField.YEAR; import static java.time.temporal.ChronoField.YEAR_OF_ERA; +import static java.time.temporal.ChronoUnit.YEARS; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; import static org.testng.Assert.assertNotNull; import java.text.ParsePosition; +import java.time.LocalDate; +import java.time.chrono.Chronology; +import java.time.chrono.ChronoLocalDate; +import java.time.chrono.HijrahChronology; +import java.time.chrono.IsoChronology; +import java.time.chrono.JapaneseChronology; +import java.time.chrono.MinguoChronology; +import java.time.chrono.ThaiBuddhistChronology; import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatterBuilder; import java.time.temporal.TemporalAccessor; @@ -86,13 +95,17 @@ private static final boolean LENIENT = false; private DateTimeFormatter getFormatter0(TemporalField field, int width, int baseValue) { - return builder.appendValueReduced(field, width, baseValue).toFormatter(locale).withDecimalStyle(decimalStyle); + return builder.appendValueReduced(field, width, width, baseValue).toFormatter(locale).withDecimalStyle(decimalStyle); } private DateTimeFormatter getFormatter0(TemporalField field, int minWidth, int maxWidth, int baseValue) { return builder.appendValueReduced(field, minWidth, maxWidth, baseValue).toFormatter(locale).withDecimalStyle(decimalStyle); } + private DateTimeFormatter getFormatterBaseDate(TemporalField field, int minWidth, int maxWidth, int baseValue) { + return builder.appendValueReduced(field, minWidth, maxWidth, LocalDate.of(baseValue, 1, 1)).toFormatter(locale).withDecimalStyle(decimalStyle); + } + //----------------------------------------------------------------------- @DataProvider(name="error") Object[][] data_error() { @@ -243,6 +256,10 @@ // Negative baseValue {YEAR, 2, 4, -2005, "123", 0, strict(3, 123), lenient(3, 123)}, + + // Basics + {YEAR, 2, 4, 2010, "10", 0, strict(2, 2010), lenient(2, 2010)}, + {YEAR, 2, 4, 2010, "09", 0, strict(2, 2109), lenient(2, 2109)}, }; } @@ -264,6 +281,21 @@ } } + @Test(dataProvider="ParseLenientSensitive") + public void test_parseStrict_baseDate(TemporalField field, int minWidth, int maxWidth, int baseValue, String input, int pos, + Pair strict, Pair lenient) { + ParsePosition ppos = new ParsePosition(pos); + setStrict(true); + TemporalAccessor parsed = getFormatterBaseDate(field, minWidth, maxWidth, baseValue).parseUnresolved(input, ppos); + if (ppos.getErrorIndex() != -1) { + assertEquals(ppos.getErrorIndex(), strict.parseLen, "error case parse position"); + assertEquals(parsed, strict.parseVal, "unexpected parse result"); + } else { + assertEquals(ppos.getIndex(), strict.parseLen, "parse position"); + assertParsed(parsed, YEAR, strict.parseVal != null ? (long) strict.parseVal : null); + } + } + //----------------------------------------------------------------------- // Parsing tests for lenient mode //----------------------------------------------------------------------- @@ -282,6 +314,21 @@ } } + @Test(dataProvider="ParseLenientSensitive") + public void test_parseLenient_baseDate(TemporalField field, int minWidth, int maxWidth, int baseValue, String input, int pos, + Pair strict, Pair lenient) { + ParsePosition ppos = new ParsePosition(pos); + setStrict(false); + TemporalAccessor parsed = getFormatterBaseDate(field, minWidth, maxWidth, baseValue).parseUnresolved(input, ppos); + if (ppos.getErrorIndex() != -1) { + assertEquals(ppos.getErrorIndex(), lenient.parseLen, "error case parse position"); + assertEquals(parsed, lenient.parseVal, "unexpected parse result"); + } else { + assertEquals(ppos.getIndex(), lenient.parseLen, "parse position"); + assertParsed(parsed, YEAR, lenient.parseVal != null ? (long) lenient.parseVal : null); + } + } + private void assertParsed(TemporalAccessor parsed, TemporalField field, Long value) { if (value == null) { assertEquals(parsed, null, "Parsed Value"); @@ -335,6 +382,68 @@ } //----------------------------------------------------------------------- + // Cases and values in reduced value parsing mode + //----------------------------------------------------------------------- + @DataProvider(name="ReducedWithChrono") + Object[][] provider_reducedWithChrono() { + LocalDate baseYear = LocalDate.of(2000, 1, 1); + return new Object[][] { + {IsoChronology.INSTANCE.date(baseYear)}, + {IsoChronology.INSTANCE.date(baseYear).plus(1, YEARS)}, + {IsoChronology.INSTANCE.date(baseYear).plus(99, YEARS)}, + {HijrahChronology.INSTANCE.date(baseYear)}, + {HijrahChronology.INSTANCE.date(baseYear).plus(1, YEARS)}, + {HijrahChronology.INSTANCE.date(baseYear).plus(99, YEARS)}, + {JapaneseChronology.INSTANCE.date(baseYear)}, + {JapaneseChronology.INSTANCE.date(baseYear).plus(1, YEARS)}, + {JapaneseChronology.INSTANCE.date(baseYear).plus(99, YEARS)}, + {MinguoChronology.INSTANCE.date(baseYear)}, + {MinguoChronology.INSTANCE.date(baseYear).plus(1, YEARS)}, + {MinguoChronology.INSTANCE.date(baseYear).plus(99, YEARS)}, + {ThaiBuddhistChronology.INSTANCE.date(baseYear)}, + {ThaiBuddhistChronology.INSTANCE.date(baseYear).plus(1, YEARS)}, + {ThaiBuddhistChronology.INSTANCE.date(baseYear).plus(99, YEARS)}, + }; + } + + @Test(dataProvider="ReducedWithChrono") + public void test_reducedWithChronoYear(ChronoLocalDate date) { + Chronology chrono = date.getChronology(); + DateTimeFormatter df + = new DateTimeFormatterBuilder().appendValueReduced(YEAR, 2, 2, LocalDate.of(2000, 1, 1)) + .toFormatter() + .withChronology(chrono); + int expected = date.get(YEAR); + String input = df.format(date); + + ParsePosition pos = new ParsePosition(0); + TemporalAccessor parsed = df.parseUnresolved(input, pos); + int actual = parsed.get(YEAR); + assertEquals(actual, expected, + String.format("Wrong date parsed, chrono: %s, input: %s", + chrono, input)); + + } + @Test(dataProvider="ReducedWithChrono") + public void test_reducedWithChronoYearOfEra(ChronoLocalDate date) { + Chronology chrono = date.getChronology(); + DateTimeFormatter df + = new DateTimeFormatterBuilder().appendValueReduced(YEAR_OF_ERA, 2, 2, LocalDate.of(2000, 1, 1)) + .toFormatter() + .withChronology(chrono); + int expected = date.get(YEAR_OF_ERA); + String input = df.format(date); + + ParsePosition pos = new ParsePosition(0); + TemporalAccessor parsed = df.parseUnresolved(input, pos); + int actual = parsed.get(YEAR_OF_ERA); + assertEquals(actual, expected, + String.format("Wrong date parsed, chrono: %s, input: %s", + chrono, input)); + + } + + //----------------------------------------------------------------------- // Class to structure the test data //----------------------------------------------------------------------- diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/test/java/time/test/java/time/format/TestReducedPrinter.java --- a/jdk/test/java/time/test/java/time/format/TestReducedPrinter.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/test/java/time/test/java/time/format/TestReducedPrinter.java Wed Oct 09 13:07:58 2013 -0700 @@ -59,19 +59,15 @@ */ package test.java.time.format; -import java.text.ParsePosition; import static java.time.temporal.ChronoField.YEAR; import static org.testng.Assert.assertEquals; import static org.testng.Assert.fail; import java.time.DateTimeException; import java.time.LocalDate; +import java.time.chrono.MinguoDate; import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatterBuilder; -import static java.time.temporal.ChronoField.DAY_OF_MONTH; -import static java.time.temporal.ChronoField.MONTH_OF_YEAR; -import static java.time.temporal.ChronoField.YEAR_OF_ERA; -import java.time.temporal.TemporalAccessor; import java.time.temporal.TemporalField; import org.testng.annotations.DataProvider; @@ -85,13 +81,17 @@ public class TestReducedPrinter extends AbstractTestPrinterParser { private DateTimeFormatter getFormatter0(TemporalField field, int width, int baseValue) { - return builder.appendValueReduced(field, width, baseValue).toFormatter(locale).withDecimalStyle(decimalStyle); + return builder.appendValueReduced(field, width, width, baseValue).toFormatter(locale).withDecimalStyle(decimalStyle); } private DateTimeFormatter getFormatter0(TemporalField field, int minWidth, int maxWidth, int baseValue) { return builder.appendValueReduced(field, minWidth, maxWidth, baseValue).toFormatter(locale).withDecimalStyle(decimalStyle); } + private DateTimeFormatter getFormatterBaseDate(TemporalField field, int minWidth, int maxWidth, int baseValue) { + return builder.appendValueReduced(field, minWidth, maxWidth, LocalDate.of(baseValue, 1, 1)).toFormatter(locale).withDecimalStyle(decimalStyle); + } + //----------------------------------------------------------------------- @Test(expectedExceptions=DateTimeException.class) public void test_print_emptyCalendrical() throws Exception { @@ -192,6 +192,58 @@ } } + @Test(dataProvider="Pivot") + public void test_pivot_baseDate(int minWidth, int maxWidth, int baseValue, int value, String result) throws Exception { + try { + getFormatterBaseDate(YEAR, minWidth, maxWidth, baseValue).formatTo(new MockFieldValue(YEAR, value), buf); + if (result == null) { + fail("Expected exception"); + } + assertEquals(buf.toString(), result); + } catch (DateTimeException ex) { + if (result == null || value < 0) { + assertEquals(ex.getMessage().contains(YEAR.toString()), true); + } else { + throw ex; + } + } + } + + //----------------------------------------------------------------------- + public void test_minguoChrono_fixedWidth() throws Exception { + // ISO 2021 is Minguo 110 + DateTimeFormatter f = getFormatterBaseDate(YEAR, 2, 2, 2021); + MinguoDate date = MinguoDate.of(109, 6, 30); + assertEquals(f.format(date), "09"); + date = MinguoDate.of(110, 6, 30); + assertEquals(f.format(date), "10"); + date = MinguoDate.of(199, 6, 30); + assertEquals(f.format(date), "99"); + date = MinguoDate.of(200, 6, 30); + assertEquals(f.format(date), "00"); + date = MinguoDate.of(209, 6, 30); + assertEquals(f.format(date), "09"); + date = MinguoDate.of(210, 6, 30); + assertEquals(f.format(date), "10"); + } + + public void test_minguoChrono_extendedWidth() throws Exception { + // ISO 2021 is Minguo 110 + DateTimeFormatter f = getFormatterBaseDate(YEAR, 2, 4, 2021); + MinguoDate date = MinguoDate.of(109, 6, 30); + assertEquals(f.format(date), "109"); + date = MinguoDate.of(110, 6, 30); + assertEquals(f.format(date), "10"); + date = MinguoDate.of(199, 6, 30); + assertEquals(f.format(date), "99"); + date = MinguoDate.of(200, 6, 30); + assertEquals(f.format(date), "00"); + date = MinguoDate.of(209, 6, 30); + assertEquals(f.format(date), "09"); + date = MinguoDate.of(210, 6, 30); + assertEquals(f.format(date), "210"); + } + //----------------------------------------------------------------------- public void test_toString() throws Exception { assertEquals(getFormatter0(YEAR, 2, 2, 2005).toString(), "ReducedValue(Year,2,2,2005)"); diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/test/java/util/HashSet/Serialization.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/test/java/util/HashSet/Serialization.java Wed Oct 09 13:07:58 2013 -0700 @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.util.HashSet; +import java.util.Random; +import java.util.concurrent.ThreadLocalRandom; + +/* + * @test + * @bug 8016252 + * @summary Verify that a serialized HashSet may successfully be deserialized. + */ +public class Serialization { + + private static final int NUM_SETS = 43; + private static final int MAX_CAPACITY = 257; + private static final float MAX_LOAD_FACTOR = 100.0F; + + private static final Random rnd = ThreadLocalRandom.current(); + + private static HashSet createHashSet() { + int capacity = rnd.nextInt(MAX_CAPACITY); + float loadFactor = Float.MIN_VALUE + rnd.nextFloat()*MAX_LOAD_FACTOR; + HashSet hashSet = new HashSet(capacity, loadFactor); + float multiplier = 2*rnd.nextFloat(); // range [0,2] + int size = (int)(capacity*loadFactor*multiplier); + for (int i = 0; i < size; i++) { + hashSet.add(rnd.nextInt()); + } + return hashSet; + } + + private static HashSet serDeser(HashSet hashSet) throws IOException, ClassNotFoundException { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + ObjectOutputStream oos = new ObjectOutputStream(baos); + oos.writeObject(hashSet); + oos.flush(); + + ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); + ObjectInputStream ois = new ObjectInputStream(bais); + HashSet result = (HashSet)ois.readObject(); + + oos.close(); + ois.close(); + + return result; + } + + private static void printHashSet(HashSet hashSet) { + System.err.println("Size: "+hashSet.size()); + for (Object o : hashSet) { + System.err.println(o); + } + } + + public static void main(String[] args) { + int failures = 0; + + for (int i = 0; i < NUM_SETS; i++) { + HashSet hashSet = createHashSet(); + + HashSet result = null; + try { + result = serDeser(hashSet); + } catch (IOException ioe) { + System.err.println(ioe); + failures++; + } catch (ClassNotFoundException cnfe) { + System.err.println(cnfe); + failures++; + } + + if (!hashSet.equals(result)) { + System.err.println("Unequal HashSets!"); + printHashSet(hashSet); + System.err.println(); + failures++; + } + } + + if (failures != 0) { + throw new RuntimeException("HashSet/Serialzation failed with "+ + failures+" failures!"); + } + } +} diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/test/java/util/logging/Level/CustomLevel.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/test/java/util/logging/Level/CustomLevel.java Wed Oct 09 13:07:58 2013 -0700 @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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.io.*; +import java.util.*; +import java.util.logging.*; + +/* + * @test + * @bug 8026027 + * @summary Test Level.parse to look up custom levels by name and its + * localized name + * + * @run main/othervm CustomLevel + */ + +public class CustomLevel extends Level { + public CustomLevel(String name, int value, String resourceBundleName) { + super(name, value, resourceBundleName); + } + + private static final List levels = new ArrayList<>(); + private static final String RB_NAME = "myresource"; + public static void main(String[] args) throws Exception { + setupCustomLevels(); + + // Level.parse will return the custom Level instance + ResourceBundle rb = ResourceBundle.getBundle(RB_NAME); + for (Level level : levels) { + String name = level.getName(); + if (!name.equals("WARNING") && !name.equals("INFO")) { + // custom level whose name doesn't conflict with any standard one + checkCustomLevel(Level.parse(name), level); + } + String localizedName = rb.getString(level.getName()); + Level l = Level.parse(localizedName); + if (l != level) { + throw new RuntimeException("Unexpected level " + l + " " + l.getClass()); + } + } + } + + private static void setupCustomLevels() throws IOException { + levels.add(new CustomLevel("EMERGENCY", 1090, RB_NAME)); + levels.add(new CustomLevel("ALERT", 1060, RB_NAME)); + levels.add(new CustomLevel("CRITICAL", 1030, RB_NAME)); + levels.add(new CustomLevel("WARNING", 1010, RB_NAME)); + levels.add(new CustomLevel("INFO", 1000, RB_NAME)); + } + static void checkCustomLevel(Level level, Level expected) { + // Level value must be the same + if (!level.equals(expected)) { + throw new RuntimeException(formatLevel(level) + " != " + formatLevel(expected)); + } + + if (!level.getName().equals(expected.getName())) { + throw new RuntimeException(formatLevel(level) + " != " + formatLevel(expected)); + } + + // Level.parse is expected to return the custom Level + if (level != expected) { + throw new RuntimeException(formatLevel(level) + " != " + formatLevel(expected)); + } + + ResourceBundle rb = ResourceBundle.getBundle(RB_NAME); + String name = rb.getString(level.getName()); + if (!level.getLocalizedName().equals(name)) { + // must have the same localized name + throw new RuntimeException(level.getLocalizedName() + " != " + name); + } + } + + static String formatLevel(Level l) { + return l + ":" + l.intValue() + ":" + l.getClass().getName(); + } +} diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/test/java/util/logging/Level/myresource.properties --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/test/java/util/logging/Level/myresource.properties Wed Oct 09 13:07:58 2013 -0700 @@ -0,0 +1,5 @@ +EMERGENCY=localized.emergency +ALERT=localized.alert +CRITICAL=localized.critical +WARNING=localized.warning +INFO=localized.info diff -r 3d7b2fafc34b -r e3f8b7f63dc7 jdk/test/sun/security/provider/KeyStore/DKSTest.java --- a/jdk/test/sun/security/provider/KeyStore/DKSTest.java Tue Oct 08 14:41:46 2013 -0700 +++ b/jdk/test/sun/security/provider/KeyStore/DKSTest.java Wed Oct 09 13:07:58 2013 -0700 @@ -81,8 +81,7 @@ int expected; KeyStore keystore = KeyStore.getInstance("DKS"); // load entries - keystore.load( - new KeyStore.DomainLoadStoreParameter(config, PASSWORDS)); + keystore.load(new DomainLoadStoreParameter(config, PASSWORDS)); cacertsCount = expected = keystore.size(); System.out.println("\nLoading domain keystore: " + config + "\t[" + expected + " entries]"); @@ -95,8 +94,7 @@ expected = cacertsCount + 1; keystore = KeyStore.getInstance("DKS"); // load entries - keystore.load( - new KeyStore.DomainLoadStoreParameter(config, PASSWORDS)); + keystore.load(new DomainLoadStoreParameter(config, PASSWORDS)); System.out.println("\nLoading domain keystore: " + config + "\t[" + expected + " entries]"); checkEntries(keystore, expected); @@ -109,7 +107,7 @@ keystore = KeyStore.getInstance("DKS"); // load entries keystore.load( - new KeyStore.DomainLoadStoreParameter(config, + new DomainLoadStoreParameter(config, Collections.emptyMap())); System.out.println("\nLoading domain keystore: " + config + "\t[" + expected + " entries]"); @@ -129,8 +127,7 @@ expected = 0; keystore = KeyStore.getInstance("DKS"); // load entries - keystore.load( - new KeyStore.DomainLoadStoreParameter(config, PASSWORDS)); + keystore.load(new DomainLoadStoreParameter(config, PASSWORDS)); System.out.println("\nLoading domain keystore: " + config + "\t[" + expected + " entries]"); checkEntries(keystore, expected); @@ -142,8 +139,7 @@ expected = 2 + 1 + 1 + 1; keystore = KeyStore.getInstance("DKS"); // load entries - keystore.load( - new KeyStore.DomainLoadStoreParameter(config, PASSWORDS)); + keystore.load(new DomainLoadStoreParameter(config, PASSWORDS)); System.out.println("\nLoading domain keystore: " + config + "\t[" + expected + " entries]"); checkEntries(keystore, expected); @@ -158,12 +154,10 @@ config = new URI(CONFIG + "#keystores_tmp"); System.out.println("Storing domain keystore: " + config + "\t[" + expected + " entries]"); - keystore.store( - new KeyStore.DomainLoadStoreParameter(config, PASSWORDS)); + keystore.store(new DomainLoadStoreParameter(config, PASSWORDS)); keystore = KeyStore.getInstance("DKS"); // reload entries - keystore.load( - new KeyStore.DomainLoadStoreParameter(config, PASSWORDS)); + keystore.load(new DomainLoadStoreParameter(config, PASSWORDS)); System.out.println("Reloading domain keystore: " + config + "\t[" + expected + " entries]"); checkEntries(keystore, expected);