test failures

Jonathan Gibbons jonathan.gibbons at oracle.com
Thu Apr 25 13:06:57 PDT 2013


On 04/24/2013 09:51 PM, Jonathan Gibbons wrote:
>
> The generics test is mostly OK -- the failure is a white-space change, 
> so someone has messed with generating a string. 

The problem is the space character written to the output in Pretty.java, 
line 951.   This patch fixes it, but I would like Werner to confirm it 
before I push it.  In particular, I don't yet understand the "if 
(da.size() > i)" part of the expression.

diff -r ac33d03e35b8 src/share/classes/com/sun/tools/javac/tree/Pretty.java
--- a/src/share/classes/com/sun/tools/javac/tree/Pretty.java    Thu Apr 
25 08:27:04 2013 +0200
+++ b/src/share/classes/com/sun/tools/javac/tree/Pretty.java    Thu Apr 
25 12:56:21 2013 -0700
@@ -951,7 +951,7 @@
                  int i = 0;
                  List<List<JCAnnotation>> da = tree.dimAnnotations;
                  for (List<JCExpression> l = tree.dims; l.nonEmpty(); l 
= l.tail) {
-                    if (da.size() > i) {
+                    if (da.size() > i && !da.get(i).isEmpty()) {
                          print(' ');
                          printTypeAnnotations(da.get(i));
                      }

-- Jon


More information about the type-annotations-dev mailing list