[java.lang.annotation.IncompleteAnnotationException] 9003386: call toString() on String in java.lang.annotation.IncompleteAnnotationException

Alan Bateman Alan.Bateman at oracle.com
Tue May 28 02:27:33 PDT 2013


On 28/05/2013 10:15, Otávio Gonçalves de Santana wrote:
> diff --git
> a/src/share/classes/java/lang/annotation/IncompleteAnnotationException.java
> b/src/share/classes/java/lang/annotation/IncompleteAnnotationException.java
> ---
> a/src/share/classes/java/lang/annotation/IncompleteAnnotationException.java
> +++
> b/src/share/classes/java/lang/annotation/IncompleteAnnotationException.java
> @@ -55,9 +55,9 @@
>       public IncompleteAnnotationException(
>               Class<? extends Annotation>  annotationType,
>               String elementName) {
> -        super(annotationType.getName().toString() +
> +        super(annotationType.getName() +
>                 " missing element " +
> -              elementName.toString());
> +              elementName);
>
>           this.annotationType = annotationType;
>           this.elementName = elementName;
>
I would suggest bring this clean-up to core-libs-dev. Also the bug for 
this in the bug database is:

8015470: (ann) IncompleteAnnotationException does not need to call toString

-Alan


More information about the jdk8-dev mailing list