JDK 8 code review request for 7055295: (reflect) add conventional constructor to GenericSignatureFormatError
Mike Duigou
mike.duigou at oracle.com
Thu Jun 16 16:21:44 UTC 2011
Perhaps the chained exception constructor would also be useful. I can imagine that whatever was parsing the signature might throw an exception with it's parse state that could then be captured (without needing to use initCause()) in the thrown GenericSignatureFormatError
Mike
On Jun 15 2011, at 17:51 , Joe Darcy wrote:
> Hello.
>
> Please review this simple JDK 8 patch below to add a second constructor to the GenericSignatureFormatError class:
>
> Thanks,
>
> -Joe
>
> --- a/src/share/classes/java/lang/reflect/GenericSignatureFormatError.java
> +++ b/src/share/classes/java/lang/reflect/GenericSignatureFormatError.java
> @@ -1,5 +1,5 @@
> /*
> - * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
> + * Copyright (c) 2003, 2011, 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,4 +35,23 @@
> */
> public class GenericSignatureFormatError extends ClassFormatError {
> private static final long serialVersionUID = 6709919147137911034L;
> +
> + /**
> + * Constructs a new {@code GenericSignatureFormatError}.
> + *
> + */
> + public GenericSignatureFormatError() {
> + super();
> + }
> +
> +
> + /**
> + * Constructs a new {@code GenericSignatureFormatError} with the
> + * specified message.
> + *
> + * @param message the detail message, may be {@code null}
> + */
> + public GenericSignatureFormatError(String message) {
> + super(message);
> + }
> }
More information about the core-libs-dev
mailing list