Skip to content

Commit 7004b3f

Browse files
committed
8230626: Make UnknownFooException strings more informative
Reviewed-by: jjg, mr
1 parent 39465f4 commit 7004b3f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/java.compiler/share/classes/javax/lang/model/element/UnknownAnnotationValueException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -60,7 +60,7 @@ public class UnknownAnnotationValueException extends UnknownEntityException {
6060
* @param p an additional parameter, may be {@code null}
6161
*/
6262
public UnknownAnnotationValueException(AnnotationValue av, Object p) {
63-
super("Unknown annotation value: " + av);
63+
super("Unknown annotation value: \"" + av + "\"");
6464
this.av = av;
6565
this.parameter = p;
6666
}

src/java.compiler/share/classes/javax/lang/model/element/UnknownElementException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -58,7 +58,7 @@ public class UnknownElementException extends UnknownEntityException {
5858
* @param p an additional parameter, may be {@code null}
5959
*/
6060
public UnknownElementException(Element e, Object p) {
61-
super("Unknown element: " + e);
61+
super("Unknown element: \"" + e + "\"");
6262
element = e;
6363
this.parameter = p;
6464
}

src/java.compiler/share/classes/javax/lang/model/type/UnknownTypeException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -58,7 +58,7 @@ public class UnknownTypeException extends UnknownEntityException {
5858
* @param p an additional parameter, may be {@code null}
5959
*/
6060
public UnknownTypeException(TypeMirror t, Object p) {
61-
super("Unknown type: " + t);
61+
super("Unknown type: \"" + t + "\"");
6262
type = t;
6363
this.parameter = p;
6464
}

0 commit comments

Comments
 (0)