# HG changeset patch # User darcy # Date 1286427328 25200 # Node ID 1a454f5b7209d68bd6cd48f532f5819df13262a3 # Parent b45ff1bbe52fcce54f6277e55f806ce1960de650 6917323: serializable classes in java.dyn do not specify serialVersionUIDs Reviewed-by: jrose diff -r b45ff1bbe52f -r 1a454f5b7209 jdk/src/share/classes/java/dyn/InvokeDynamicBootstrapError.java --- a/jdk/src/share/classes/java/dyn/InvokeDynamicBootstrapError.java Wed Oct 06 10:11:45 2010 -0400 +++ b/jdk/src/share/classes/java/dyn/InvokeDynamicBootstrapError.java Wed Oct 06 21:55:28 2010 -0700 @@ -39,8 +39,11 @@ * {@link Linkage#registerBootstrapMethod registerBootstrapMethod}. * * @author John Rose, JSR 292 EG + * @since 1.7 */ public class InvokeDynamicBootstrapError extends LinkageError { + private static final long serialVersionUID = 292L; + /** * Constructs an {@code InvokeDynamicBootstrapError} with no detail message. */ @@ -63,10 +66,9 @@ * detail message and cause. * * @param s the detail message. - * @param cause the cause. + * @param cause the cause, may be {@code null}. */ public InvokeDynamicBootstrapError(String s, Throwable cause) { - super(s); - this.initCause(cause); + super(s, cause); } } diff -r b45ff1bbe52f -r 1a454f5b7209 jdk/src/share/classes/java/dyn/LinkagePermission.java --- a/jdk/src/share/classes/java/dyn/LinkagePermission.java Wed Oct 06 10:11:45 2010 -0400 +++ b/jdk/src/share/classes/java/dyn/LinkagePermission.java Wed Oct 06 21:55:28 2010 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2010, 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 @@ -81,6 +81,8 @@ */ public final class LinkagePermission extends BasicPermission { + private static final long serialVersionUID = 292L; + /** * Create a new LinkagePermission with the given name. * The name is the symbolic name of the LinkagePermission, such as diff -r b45ff1bbe52f -r 1a454f5b7209 jdk/src/share/classes/java/dyn/NoAccessException.java --- a/jdk/src/share/classes/java/dyn/NoAccessException.java Wed Oct 06 10:11:45 2010 -0400 +++ b/jdk/src/share/classes/java/dyn/NoAccessException.java Wed Oct 06 21:55:28 2010 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2010, 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 @@ -35,8 +35,11 @@ * on behalf of the method handle creator, * at the time of creation. * @author John Rose, JSR 292 EG + * @since 1.7 */ public class NoAccessException extends RuntimeException { + private static final long serialVersionUID = 292L; + /** * Constructs a {@code NoAccessException} with no detail message. */ diff -r b45ff1bbe52f -r 1a454f5b7209 jdk/src/share/classes/java/dyn/WrongMethodTypeException.java --- a/jdk/src/share/classes/java/dyn/WrongMethodTypeException.java Wed Oct 06 10:11:45 2010 -0400 +++ b/jdk/src/share/classes/java/dyn/WrongMethodTypeException.java Wed Oct 06 21:55:28 2010 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,8 +38,11 @@ * instead of when the mismatched method handle is called. * * @author John Rose, JSR 292 EG + * @since 1.7 */ public class WrongMethodTypeException extends RuntimeException { + private static final long serialVersionUID = 292L; + /** * Constructs a {@code WrongMethodTypeException} with no detail message. */ diff -r b45ff1bbe52f -r 1a454f5b7209 jdk/src/share/classes/java/lang/LinkageError.java --- a/jdk/src/share/classes/java/lang/LinkageError.java Wed Oct 06 10:11:45 2010 -0400 +++ b/jdk/src/share/classes/java/lang/LinkageError.java Wed Oct 06 21:55:28 2010 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,7 +26,7 @@ package java.lang; /** - * Subclasses of LinkageError indicate that a class has + * Subclasses of {@code LinkageError} indicate that a class has * some dependency on another class; however, the latter class has * incompatibly changed after the compilation of the former class. * @@ -39,14 +39,14 @@ private static final long serialVersionUID = 3579600108157160122L; /** - * Constructs a LinkageError with no detail message. + * Constructs a {@code LinkageError} with no detail message. */ public LinkageError() { super(); } /** - * Constructs a LinkageError with the specified detail + * Constructs a {@code LinkageError} with the specified detail * message. * * @param s the detail message. @@ -54,4 +54,16 @@ public LinkageError(String s) { super(s); } + + /** + * Constructs a {@code LinkageError} with the specified detail + * message and cause. + * + * @param s the detail message. + * @param cause the cause, may be {@code null} + * @since 1.7 + */ + public LinkageError(String s, Throwable cause) { + super(s, cause); + } }