Merge jdk8-b55

Thu, 30 Aug 2012 20:14:48 -0700

author
lana
date
Thu, 30 Aug 2012 20:14:48 -0700
changeset 1311
e48e7e1f026b
parent 1304
c47742f53f99
parent 1310
542c87b8ce7f
child 1312
0f8cf3d89a7c
child 1315
3f36e22c8c39

Merge

     1.1 --- a/make/jprt.properties	Thu Aug 30 10:27:39 2012 -0700
     1.2 +++ b/make/jprt.properties	Thu Aug 30 20:14:48 2012 -0700
     1.3 @@ -1,5 +1,5 @@
     1.4  #
     1.5 -# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
     1.6 +# Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
     1.7  # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8  #
     1.9  # This code is free software; you can redistribute it and/or modify it
     2.1 --- a/make/tools/anttasks/CompilePropertiesTask.java	Thu Aug 30 10:27:39 2012 -0700
     2.2 +++ b/make/tools/anttasks/CompilePropertiesTask.java	Thu Aug 30 20:14:48 2012 -0700
     2.3 @@ -1,5 +1,5 @@
     2.4  /*
     2.5 - * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
     2.6 + * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
     2.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     2.8   *
     2.9   * This code is free software; you can redistribute it and/or modify it
     3.1 --- a/make/tools/anttasks/GenStubsTask.java	Thu Aug 30 10:27:39 2012 -0700
     3.2 +++ b/make/tools/anttasks/GenStubsTask.java	Thu Aug 30 20:14:48 2012 -0700
     3.3 @@ -1,5 +1,5 @@
     3.4  /*
     3.5 - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
     3.6 + * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
     3.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3.8   *
     3.9   * This code is free software; you can redistribute it and/or modify it
     4.1 --- a/make/tools/anttasks/SelectToolTask.java	Thu Aug 30 10:27:39 2012 -0700
     4.2 +++ b/make/tools/anttasks/SelectToolTask.java	Thu Aug 30 20:14:48 2012 -0700
     4.3 @@ -1,5 +1,5 @@
     4.4  /*
     4.5 - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
     4.6 + * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
     4.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4.8   *
     4.9   * This code is free software; you can redistribute it and/or modify it
     5.1 --- a/make/tools/compileproperties/CompileProperties.java	Thu Aug 30 10:27:39 2012 -0700
     5.2 +++ b/make/tools/compileproperties/CompileProperties.java	Thu Aug 30 20:14:48 2012 -0700
     5.3 @@ -1,5 +1,5 @@
     5.4  /*
     5.5 - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
     5.6 + * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
     5.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     5.8   *
     5.9   * This code is free software; you can redistribute it and/or modify it
     6.1 --- a/make/tools/genstubs/GenStubs.java	Thu Aug 30 10:27:39 2012 -0700
     6.2 +++ b/make/tools/genstubs/GenStubs.java	Thu Aug 30 20:14:48 2012 -0700
     6.3 @@ -1,5 +1,5 @@
     6.4  /*
     6.5 - * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
     6.6 + * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
     6.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     6.8   *
     6.9   * This code is free software; you can redistribute it and/or modify it
     7.1 --- a/src/share/classes/com/sun/tools/javac/code/Source.java	Thu Aug 30 10:27:39 2012 -0700
     7.2 +++ b/src/share/classes/com/sun/tools/javac/code/Source.java	Thu Aug 30 20:14:48 2012 -0700
     7.3 @@ -1,5 +1,5 @@
     7.4  /*
     7.5 - * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
     7.6 + * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
     7.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     7.8   *
     7.9   * This code is free software; you can redistribute it and/or modify it
     8.1 --- a/src/share/classes/com/sun/tools/javac/code/Type.java	Thu Aug 30 10:27:39 2012 -0700
     8.2 +++ b/src/share/classes/com/sun/tools/javac/code/Type.java	Thu Aug 30 20:14:48 2012 -0700
     8.3 @@ -1,5 +1,5 @@
     8.4  /*
     8.5 - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
     8.6 + * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
     8.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     8.8   *
     8.9   * This code is free software; you can redistribute it and/or modify it
     9.1 --- a/src/share/classes/com/sun/tools/javac/code/Types.java	Thu Aug 30 10:27:39 2012 -0700
     9.2 +++ b/src/share/classes/com/sun/tools/javac/code/Types.java	Thu Aug 30 20:14:48 2012 -0700
     9.3 @@ -1589,9 +1589,16 @@
     9.4       * type parameters in t are deleted.
     9.5       */
     9.6      public Type erasure(Type t) {
     9.7 -        return erasure(t, false);
     9.8 +        return eraseNotNeeded(t)? t : erasure(t, false);
     9.9      }
    9.10      //where
    9.11 +    private boolean eraseNotNeeded(Type t) {
    9.12 +        // We don't want to erase primitive types and String type as that
    9.13 +        // operation is idempotent. Also, erasing these could result in loss
    9.14 +        // of information such as constant values attached to such types.
    9.15 +        return (t.tag <= lastBaseTag) || (syms.stringType.tsym == t.tsym);
    9.16 +    }
    9.17 +
    9.18      private Type erasure(Type t, boolean recurse) {
    9.19          if (t.tag <= lastBaseTag)
    9.20              return t; /* fast special case */
    10.1 --- a/src/share/classes/com/sun/tools/javac/comp/AttrContext.java	Thu Aug 30 10:27:39 2012 -0700
    10.2 +++ b/src/share/classes/com/sun/tools/javac/comp/AttrContext.java	Thu Aug 30 20:14:48 2012 -0700
    10.3 @@ -1,5 +1,5 @@
    10.4  /*
    10.5 - * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
    10.6 + * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
    10.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    10.8   *
    10.9   * This code is free software; you can redistribute it and/or modify it
    11.1 --- a/src/share/classes/com/sun/tools/javac/comp/Lower.java	Thu Aug 30 10:27:39 2012 -0700
    11.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Lower.java	Thu Aug 30 20:14:48 2012 -0700
    11.3 @@ -3499,7 +3499,6 @@
    11.4                  JCExpression expression = oneCase.getExpression();
    11.5  
    11.6                  if (expression != null) { // expression for a "default" case is null
    11.7 -                    expression = TreeInfo.skipParens(expression);
    11.8                      String labelExpr = (String) expression.type.constValue();
    11.9                      Integer mapping = caseLabelToPosition.put(labelExpr, casePosition);
   11.10                      Assert.checkNull(mapping);
    12.1 --- a/src/share/classes/com/sun/tools/javac/comp/TransTypes.java	Thu Aug 30 10:27:39 2012 -0700
    12.2 +++ b/src/share/classes/com/sun/tools/javac/comp/TransTypes.java	Thu Aug 30 20:14:48 2012 -0700
    12.3 @@ -1,5 +1,5 @@
    12.4  /*
    12.5 - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
    12.6 + * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
    12.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    12.8   *
    12.9   * This code is free software; you can redistribute it and/or modify it
    13.1 --- a/src/share/classes/com/sun/tools/javac/file/ZipFileIndex.java	Thu Aug 30 10:27:39 2012 -0700
    13.2 +++ b/src/share/classes/com/sun/tools/javac/file/ZipFileIndex.java	Thu Aug 30 20:14:48 2012 -0700
    13.3 @@ -1,5 +1,5 @@
    13.4  /*
    13.5 - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
    13.6 + * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
    13.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    13.8   *
    13.9   * This code is free software; you can redistribute it and/or modify it
    14.1 --- a/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Thu Aug 30 10:27:39 2012 -0700
    14.2 +++ b/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Thu Aug 30 20:14:48 2012 -0700
    14.3 @@ -188,7 +188,7 @@
    14.4  
    14.5      /** The current input pointer.
    14.6       */
    14.7 -    int bp;
    14.8 +    protected int bp;
    14.9  
   14.10      /** The objects of the constant pool.
   14.11       */
   14.12 @@ -890,13 +890,13 @@
   14.13  
   14.14      protected enum AttributeKind { CLASS, MEMBER };
   14.15      protected abstract class AttributeReader {
   14.16 -        AttributeReader(Name name, ClassFile.Version version, Set<AttributeKind> kinds) {
   14.17 +        protected AttributeReader(Name name, ClassFile.Version version, Set<AttributeKind> kinds) {
   14.18              this.name = name;
   14.19              this.version = version;
   14.20              this.kinds = kinds;
   14.21          }
   14.22  
   14.23 -        boolean accepts(AttributeKind kind) {
   14.24 +        protected boolean accepts(AttributeKind kind) {
   14.25              if (kinds.contains(kind)) {
   14.26                  if (majorVersion > version.major || (majorVersion == version.major && minorVersion >= version.minor))
   14.27                      return true;
   14.28 @@ -915,11 +915,11 @@
   14.29              return false;
   14.30          }
   14.31  
   14.32 -        abstract void read(Symbol sym, int attrLen);
   14.33 +        protected abstract void read(Symbol sym, int attrLen);
   14.34  
   14.35 -        final Name name;
   14.36 -        final ClassFile.Version version;
   14.37 -        final Set<AttributeKind> kinds;
   14.38 +        protected final Name name;
   14.39 +        protected final ClassFile.Version version;
   14.40 +        protected final Set<AttributeKind> kinds;
   14.41      }
   14.42  
   14.43      protected Set<AttributeKind> CLASS_ATTRIBUTE =
   14.44 @@ -936,7 +936,7 @@
   14.45              // v45.3 attributes
   14.46  
   14.47              new AttributeReader(names.Code, V45_3, MEMBER_ATTRIBUTE) {
   14.48 -                void read(Symbol sym, int attrLen) {
   14.49 +                protected void read(Symbol sym, int attrLen) {
   14.50                      if (readAllOfClassFile || saveParameterNames)
   14.51                          ((MethodSymbol)sym).code = readCode(sym);
   14.52                      else
   14.53 @@ -945,7 +945,7 @@
   14.54              },
   14.55  
   14.56              new AttributeReader(names.ConstantValue, V45_3, MEMBER_ATTRIBUTE) {
   14.57 -                void read(Symbol sym, int attrLen) {
   14.58 +                protected void read(Symbol sym, int attrLen) {
   14.59                      Object v = readPool(nextChar());
   14.60                      // Ignore ConstantValue attribute if field not final.
   14.61                      if ((sym.flags() & FINAL) != 0)
   14.62 @@ -954,13 +954,13 @@
   14.63              },
   14.64  
   14.65              new AttributeReader(names.Deprecated, V45_3, CLASS_OR_MEMBER_ATTRIBUTE) {
   14.66 -                void read(Symbol sym, int attrLen) {
   14.67 +                protected void read(Symbol sym, int attrLen) {
   14.68                      sym.flags_field |= DEPRECATED;
   14.69                  }
   14.70              },
   14.71  
   14.72              new AttributeReader(names.Exceptions, V45_3, CLASS_OR_MEMBER_ATTRIBUTE) {
   14.73 -                void read(Symbol sym, int attrLen) {
   14.74 +                protected void read(Symbol sym, int attrLen) {
   14.75                      int nexceptions = nextChar();
   14.76                      List<Type> thrown = List.nil();
   14.77                      for (int j = 0; j < nexceptions; j++)
   14.78 @@ -971,14 +971,14 @@
   14.79              },
   14.80  
   14.81              new AttributeReader(names.InnerClasses, V45_3, CLASS_ATTRIBUTE) {
   14.82 -                void read(Symbol sym, int attrLen) {
   14.83 +                protected void read(Symbol sym, int attrLen) {
   14.84                      ClassSymbol c = (ClassSymbol) sym;
   14.85                      readInnerClasses(c);
   14.86                  }
   14.87              },
   14.88  
   14.89              new AttributeReader(names.LocalVariableTable, V45_3, CLASS_OR_MEMBER_ATTRIBUTE) {
   14.90 -                void read(Symbol sym, int attrLen) {
   14.91 +                protected void read(Symbol sym, int attrLen) {
   14.92                      int newbp = bp + attrLen;
   14.93                      if (saveParameterNames) {
   14.94                          // Pick up parameter names from the variable table.
   14.95 @@ -1014,7 +1014,7 @@
   14.96              },
   14.97  
   14.98              new AttributeReader(names.SourceFile, V45_3, CLASS_ATTRIBUTE) {
   14.99 -                void read(Symbol sym, int attrLen) {
  14.100 +                protected void read(Symbol sym, int attrLen) {
  14.101                      ClassSymbol c = (ClassSymbol) sym;
  14.102                      Name n = readName(nextChar());
  14.103                      c.sourcefile = new SourceFileObject(n, c.flatname);
  14.104 @@ -1022,7 +1022,7 @@
  14.105              },
  14.106  
  14.107              new AttributeReader(names.Synthetic, V45_3, CLASS_OR_MEMBER_ATTRIBUTE) {
  14.108 -                void read(Symbol sym, int attrLen) {
  14.109 +                protected void read(Symbol sym, int attrLen) {
  14.110                      // bridge methods are visible when generics not enabled
  14.111                      if (allowGenerics || (sym.flags_field & BRIDGE) == 0)
  14.112                          sym.flags_field |= SYNTHETIC;
  14.113 @@ -1032,7 +1032,7 @@
  14.114              // standard v49 attributes
  14.115  
  14.116              new AttributeReader(names.EnclosingMethod, V49, CLASS_ATTRIBUTE) {
  14.117 -                void read(Symbol sym, int attrLen) {
  14.118 +                protected void read(Symbol sym, int attrLen) {
  14.119                      int newbp = bp + attrLen;
  14.120                      readEnclosingMethodAttr(sym);
  14.121                      bp = newbp;
  14.122 @@ -1041,11 +1041,11 @@
  14.123  
  14.124              new AttributeReader(names.Signature, V49, CLASS_OR_MEMBER_ATTRIBUTE) {
  14.125                  @Override
  14.126 -                boolean accepts(AttributeKind kind) {
  14.127 +                protected boolean accepts(AttributeKind kind) {
  14.128                      return super.accepts(kind) && allowGenerics;
  14.129                  }
  14.130  
  14.131 -                void read(Symbol sym, int attrLen) {
  14.132 +                protected void read(Symbol sym, int attrLen) {
  14.133                      if (sym.kind == TYP) {
  14.134                          ClassSymbol c = (ClassSymbol) sym;
  14.135                          readingClassAttr = true;
  14.136 @@ -1074,31 +1074,31 @@
  14.137              // v49 annotation attributes
  14.138  
  14.139              new AttributeReader(names.AnnotationDefault, V49, CLASS_OR_MEMBER_ATTRIBUTE) {
  14.140 -                void read(Symbol sym, int attrLen) {
  14.141 +                protected void read(Symbol sym, int attrLen) {
  14.142                      attachAnnotationDefault(sym);
  14.143                  }
  14.144              },
  14.145  
  14.146              new AttributeReader(names.RuntimeInvisibleAnnotations, V49, CLASS_OR_MEMBER_ATTRIBUTE) {
  14.147 -                void read(Symbol sym, int attrLen) {
  14.148 +                protected void read(Symbol sym, int attrLen) {
  14.149                      attachAnnotations(sym);
  14.150                  }
  14.151              },
  14.152  
  14.153              new AttributeReader(names.RuntimeInvisibleParameterAnnotations, V49, CLASS_OR_MEMBER_ATTRIBUTE) {
  14.154 -                void read(Symbol sym, int attrLen) {
  14.155 +                protected void read(Symbol sym, int attrLen) {
  14.156                      attachParameterAnnotations(sym);
  14.157                  }
  14.158              },
  14.159  
  14.160              new AttributeReader(names.RuntimeVisibleAnnotations, V49, CLASS_OR_MEMBER_ATTRIBUTE) {
  14.161 -                void read(Symbol sym, int attrLen) {
  14.162 +                protected void read(Symbol sym, int attrLen) {
  14.163                      attachAnnotations(sym);
  14.164                  }
  14.165              },
  14.166  
  14.167              new AttributeReader(names.RuntimeVisibleParameterAnnotations, V49, CLASS_OR_MEMBER_ATTRIBUTE) {
  14.168 -                void read(Symbol sym, int attrLen) {
  14.169 +                protected void read(Symbol sym, int attrLen) {
  14.170                      attachParameterAnnotations(sym);
  14.171                  }
  14.172              },
  14.173 @@ -1106,14 +1106,14 @@
  14.174              // additional "legacy" v49 attributes, superceded by flags
  14.175  
  14.176              new AttributeReader(names.Annotation, V49, CLASS_OR_MEMBER_ATTRIBUTE) {
  14.177 -                void read(Symbol sym, int attrLen) {
  14.178 +                protected void read(Symbol sym, int attrLen) {
  14.179                      if (allowAnnotations)
  14.180                          sym.flags_field |= ANNOTATION;
  14.181                  }
  14.182              },
  14.183  
  14.184              new AttributeReader(names.Bridge, V49, MEMBER_ATTRIBUTE) {
  14.185 -                void read(Symbol sym, int attrLen) {
  14.186 +                protected void read(Symbol sym, int attrLen) {
  14.187                      sym.flags_field |= BRIDGE;
  14.188                      if (!allowGenerics)
  14.189                          sym.flags_field &= ~SYNTHETIC;
  14.190 @@ -1121,13 +1121,13 @@
  14.191              },
  14.192  
  14.193              new AttributeReader(names.Enum, V49, CLASS_OR_MEMBER_ATTRIBUTE) {
  14.194 -                void read(Symbol sym, int attrLen) {
  14.195 +                protected void read(Symbol sym, int attrLen) {
  14.196                      sym.flags_field |= ENUM;
  14.197                  }
  14.198              },
  14.199  
  14.200              new AttributeReader(names.Varargs, V49, CLASS_OR_MEMBER_ATTRIBUTE) {
  14.201 -                void read(Symbol sym, int attrLen) {
  14.202 +                protected void read(Symbol sym, int attrLen) {
  14.203                      if (allowVarargs)
  14.204                          sym.flags_field |= VARARGS;
  14.205                  }
  14.206 @@ -1153,7 +1153,7 @@
  14.207  
  14.208  
  14.209  
  14.210 -    void readEnclosingMethodAttr(Symbol sym) {
  14.211 +    protected void readEnclosingMethodAttr(Symbol sym) {
  14.212          // sym is a nested class with an "Enclosing Method" attribute
  14.213          // remove sym from it's current owners scope and place it in
  14.214          // the scope specified by the attribute
    15.1 --- a/src/share/classes/com/sun/tools/javac/jvm/ClassWriter.java	Thu Aug 30 10:27:39 2012 -0700
    15.2 +++ b/src/share/classes/com/sun/tools/javac/jvm/ClassWriter.java	Thu Aug 30 20:14:48 2012 -0700
    15.3 @@ -164,7 +164,7 @@
    15.4  
    15.5      /** Construct a class writer, given an options table.
    15.6       */
    15.7 -    private ClassWriter(Context context) {
    15.8 +    protected ClassWriter(Context context) {
    15.9          context.put(classWriterKey, this);
   15.10  
   15.11          log = Log.instance(context);
   15.12 @@ -601,12 +601,20 @@
   15.13       *  Returns the number of attributes written (0 or 1).
   15.14       */
   15.15      int writeEnclosingMethodAttribute(ClassSymbol c) {
   15.16 -        if (!target.hasEnclosingMethodAttribute() ||
   15.17 -            c.owner.kind != MTH && // neither a local class
   15.18 +        if (!target.hasEnclosingMethodAttribute())
   15.19 +            return 0;
   15.20 +        return writeEnclosingMethodAttribute(names.EnclosingMethod, c);
   15.21 +    }
   15.22 +
   15.23 +    /** Write the EnclosingMethod attribute with a specified name.
   15.24 +     *  Returns the number of attributes written (0 or 1).
   15.25 +     */
   15.26 +    protected int writeEnclosingMethodAttribute(Name attributeName, ClassSymbol c) {
   15.27 +        if (c.owner.kind != MTH && // neither a local class
   15.28              c.name != names.empty) // nor anonymous
   15.29              return 0;
   15.30  
   15.31 -        int alenIdx = writeAttr(names.EnclosingMethod);
   15.32 +        int alenIdx = writeAttr(attributeName);
   15.33          ClassSymbol enclClass = c.owner.enclClass();
   15.34          MethodSymbol enclMethod =
   15.35              (c.owner.type == null // local to init block
   15.36 @@ -1569,6 +1577,7 @@
   15.37          acount += writeFlagAttrs(c.flags());
   15.38          acount += writeJavaAnnotations(c.getAnnotationMirrors());
   15.39          acount += writeEnclosingMethodAttribute(c);
   15.40 +        acount += writeExtraClassAttributes(c);
   15.41  
   15.42          poolbuf.appendInt(JAVA_MAGIC);
   15.43          poolbuf.appendChar(target.minorVersion);
   15.44 @@ -1588,6 +1597,14 @@
   15.45          pool = c.pool = null; // to conserve space
   15.46       }
   15.47  
   15.48 +    /**Allows subclasses to write additional class attributes
   15.49 +     *
   15.50 +     * @return the number of attributes written
   15.51 +     */
   15.52 +    protected int writeExtraClassAttributes(ClassSymbol c) {
   15.53 +        return 0;
   15.54 +    }
   15.55 +
   15.56      int adjustFlags(final long flags) {
   15.57          int result = (int)flags;
   15.58          if ((flags & SYNTHETIC) != 0  && !target.useSyntheticFlag())
    16.1 --- a/src/share/classes/com/sun/tools/javac/main/Main.java	Thu Aug 30 10:27:39 2012 -0700
    16.2 +++ b/src/share/classes/com/sun/tools/javac/main/Main.java	Thu Aug 30 20:14:48 2012 -0700
    16.3 @@ -1,5 +1,5 @@
    16.4  /*
    16.5 - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
    16.6 + * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
    16.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    16.8   *
    16.9   * This code is free software; you can redistribute it and/or modify it
    17.1 --- a/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java	Thu Aug 30 10:27:39 2012 -0700
    17.2 +++ b/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java	Thu Aug 30 20:14:48 2012 -0700
    17.3 @@ -1,5 +1,5 @@
    17.4  /*
    17.5 - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
    17.6 + * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
    17.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    17.8   *
    17.9   * This code is free software; you can redistribute it and/or modify it
    18.1 --- a/test/tools/javac/ProtectedInnerClass/ProtectedInnerClass.sh	Thu Aug 30 10:27:39 2012 -0700
    18.2 +++ b/test/tools/javac/ProtectedInnerClass/ProtectedInnerClass.sh	Thu Aug 30 20:14:48 2012 -0700
    18.3 @@ -1,5 +1,5 @@
    18.4  #
    18.5 -# Copyright (c) 1998, 2009, Oracle and/or its affiliates. All rights reserved.
    18.6 +# Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
    18.7  # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    18.8  #
    18.9  # This code is free software; you can redistribute it and/or modify it
    19.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.2 +++ b/test/tools/javac/StringsInSwitch/7181320/BinOpInCaseLabel.java	Thu Aug 30 20:14:48 2012 -0700
    19.3 @@ -0,0 +1,38 @@
    19.4 +/*
    19.5 + * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
    19.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    19.7 + *
    19.8 + * This code is free software; you can redistribute it and/or modify it
    19.9 + * under the terms of the GNU General Public License version 2 only, as
   19.10 + * published by the Free Software Foundation.
   19.11 + *
   19.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
   19.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   19.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   19.15 + * version 2 for more details (a copy is included in the LICENSE file that
   19.16 + * accompanied this code).
   19.17 + *
   19.18 + * You should have received a copy of the GNU General Public License version
   19.19 + * 2 along with this work; if not, write to the Free Software Foundation,
   19.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   19.21 + *
   19.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   19.23 + * or visit www.oracle.com if you need additional information or have any
   19.24 + * questions.
   19.25 + */
   19.26 +
   19.27 +/*
   19.28 + * @test
   19.29 + * @bug     7181320
   19.30 + * @summary javac NullPointerException for switch labels with cast to String expressions
   19.31 + * @compile BinOpInCaseLabel.java
   19.32 + */
   19.33 +
   19.34 +public class BinOpInCaseLabel {
   19.35 +    public static void main(String [] args) {
   19.36 +        switch (args[0]) {
   19.37 +            case "hello" + "world":
   19.38 +                break;
   19.39 +        }
   19.40 +    }
   19.41 +}
    20.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.2 +++ b/test/tools/javac/StringsInSwitch/7181320/CastInCaseLabel.java	Thu Aug 30 20:14:48 2012 -0700
    20.3 @@ -0,0 +1,38 @@
    20.4 +/*
    20.5 + * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
    20.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    20.7 + *
    20.8 + * This code is free software; you can redistribute it and/or modify it
    20.9 + * under the terms of the GNU General Public License version 2 only, as
   20.10 + * published by the Free Software Foundation.
   20.11 + *
   20.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
   20.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   20.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   20.15 + * version 2 for more details (a copy is included in the LICENSE file that
   20.16 + * accompanied this code).
   20.17 + *
   20.18 + * You should have received a copy of the GNU General Public License version
   20.19 + * 2 along with this work; if not, write to the Free Software Foundation,
   20.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   20.21 + *
   20.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   20.23 + * or visit www.oracle.com if you need additional information or have any
   20.24 + * questions.
   20.25 + */
   20.26 +
   20.27 +/*
   20.28 + * @test
   20.29 + * @bug     7181320
   20.30 + * @summary javac NullPointerException for switch labels with cast to String expressions
   20.31 + * @compile CastInCaseLabel.java
   20.32 + */
   20.33 +
   20.34 +public class CastInCaseLabel {
   20.35 +    public static void main(String [] args) {
   20.36 +        switch (args[0]) {
   20.37 +            case (String)"hello":
   20.38 +                break;
   20.39 +        }
   20.40 +    }
   20.41 +}
    21.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.2 +++ b/test/tools/javac/StringsInSwitch/7181320/CondExprInCaseLabel.java	Thu Aug 30 20:14:48 2012 -0700
    21.3 @@ -0,0 +1,39 @@
    21.4 +/*
    21.5 + * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
    21.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    21.7 + *
    21.8 + * This code is free software; you can redistribute it and/or modify it
    21.9 + * under the terms of the GNU General Public License version 2 only, as
   21.10 + * published by the Free Software Foundation.
   21.11 + *
   21.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
   21.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   21.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   21.15 + * version 2 for more details (a copy is included in the LICENSE file that
   21.16 + * accompanied this code).
   21.17 + *
   21.18 + * You should have received a copy of the GNU General Public License version
   21.19 + * 2 along with this work; if not, write to the Free Software Foundation,
   21.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   21.21 + *
   21.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   21.23 + * or visit www.oracle.com if you need additional information or have any
   21.24 + * questions.
   21.25 + */
   21.26 +
   21.27 +/*
   21.28 + * @test
   21.29 + * @bug     7181320
   21.30 + * @summary javac NullPointerException for switch labels with cast to String expressions
   21.31 + * @compile CondExprInCaseLabel.java
   21.32 + */
   21.33 +
   21.34 +public class CondExprInCaseLabel {
   21.35 +    public static void main(String [] args) {
   21.36 +        final boolean cond = true;
   21.37 +        switch (args[0]) {
   21.38 +            case cond ? "hello" : "world":
   21.39 +                break;
   21.40 +        }
   21.41 +    }
   21.42 +}
    22.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.2 +++ b/test/tools/javac/StringsInSwitch/7181320/CondExprInCaseLabel1.java	Thu Aug 30 20:14:48 2012 -0700
    22.3 @@ -0,0 +1,39 @@
    22.4 +/*
    22.5 + * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
    22.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    22.7 + *
    22.8 + * This code is free software; you can redistribute it and/or modify it
    22.9 + * under the terms of the GNU General Public License version 2 only, as
   22.10 + * published by the Free Software Foundation.
   22.11 + *
   22.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
   22.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   22.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   22.15 + * version 2 for more details (a copy is included in the LICENSE file that
   22.16 + * accompanied this code).
   22.17 + *
   22.18 + * You should have received a copy of the GNU General Public License version
   22.19 + * 2 along with this work; if not, write to the Free Software Foundation,
   22.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   22.21 + *
   22.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   22.23 + * or visit www.oracle.com if you need additional information or have any
   22.24 + * questions.
   22.25 + */
   22.26 +
   22.27 +/*
   22.28 + * @test
   22.29 + * @bug     7181320
   22.30 + * @summary javac NullPointerException for switch labels with cast to String expressions
   22.31 + * @compile CondExprInCaseLabel1.java
   22.32 + */
   22.33 +
   22.34 +public class CondExprInCaseLabel1 {
   22.35 +    public static void main(String [] args) {
   22.36 +        final boolean cond = true;
   22.37 +        switch (args[0]) {
   22.38 +            case cond ? (String)"hello" : "world":
   22.39 +                break;
   22.40 +        }
   22.41 +    }
   22.42 +}
    23.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.2 +++ b/test/tools/javac/StringsInSwitch/7181320/CondExprInCaseLabel2.java	Thu Aug 30 20:14:48 2012 -0700
    23.3 @@ -0,0 +1,39 @@
    23.4 +/*
    23.5 + * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
    23.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    23.7 + *
    23.8 + * This code is free software; you can redistribute it and/or modify it
    23.9 + * under the terms of the GNU General Public License version 2 only, as
   23.10 + * published by the Free Software Foundation.
   23.11 + *
   23.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
   23.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   23.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   23.15 + * version 2 for more details (a copy is included in the LICENSE file that
   23.16 + * accompanied this code).
   23.17 + *
   23.18 + * You should have received a copy of the GNU General Public License version
   23.19 + * 2 along with this work; if not, write to the Free Software Foundation,
   23.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   23.21 + *
   23.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   23.23 + * or visit www.oracle.com if you need additional information or have any
   23.24 + * questions.
   23.25 + */
   23.26 +
   23.27 +/*
   23.28 + * @test
   23.29 + * @bug     7181320
   23.30 + * @summary javac NullPointerException for switch labels with cast to String expressions
   23.31 + * @compile CondExprInCaseLabel2.java
   23.32 + */
   23.33 +
   23.34 +public class CondExprInCaseLabel2 {
   23.35 +    public static void main(String [] args) {
   23.36 +        final boolean cond = true;
   23.37 +        switch (args[0]) {
   23.38 +            case cond ? "hello" : (String)"world":
   23.39 +                break;
   23.40 +        }
   23.41 +    }
   23.42 +}
    24.1 --- a/test/tools/javac/api/7086261/T7086261.java	Thu Aug 30 10:27:39 2012 -0700
    24.2 +++ b/test/tools/javac/api/7086261/T7086261.java	Thu Aug 30 20:14:48 2012 -0700
    24.3 @@ -1,5 +1,5 @@
    24.4  /*
    24.5 - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
    24.6 + * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
    24.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    24.8   *
    24.9   * This code is free software; you can redistribute it and/or modify it
    25.1 --- a/test/tools/javac/api/T6397104.java	Thu Aug 30 10:27:39 2012 -0700
    25.2 +++ b/test/tools/javac/api/T6397104.java	Thu Aug 30 20:14:48 2012 -0700
    25.3 @@ -1,5 +1,5 @@
    25.4  /*
    25.5 - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
    25.6 + * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
    25.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    25.8   *
    25.9   * This code is free software; you can redistribute it and/or modify it
    26.1 --- a/test/tools/javac/diags/CheckExamples.java	Thu Aug 30 10:27:39 2012 -0700
    26.2 +++ b/test/tools/javac/diags/CheckExamples.java	Thu Aug 30 20:14:48 2012 -0700
    26.3 @@ -1,5 +1,5 @@
    26.4  /*
    26.5 - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
    26.6 + * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
    26.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    26.8   *
    26.9   * This code is free software; you can redistribute it and/or modify it
    27.1 --- a/test/tools/javac/diags/MessageInfo.java	Thu Aug 30 10:27:39 2012 -0700
    27.2 +++ b/test/tools/javac/diags/MessageInfo.java	Thu Aug 30 20:14:48 2012 -0700
    27.3 @@ -1,5 +1,5 @@
    27.4  /*
    27.5 - * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
    27.6 + * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
    27.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    27.8   *
    27.9   * This code is free software; you can redistribute it and/or modify it
    28.1 --- a/test/tools/javac/diags/RunExamples.java	Thu Aug 30 10:27:39 2012 -0700
    28.2 +++ b/test/tools/javac/diags/RunExamples.java	Thu Aug 30 20:14:48 2012 -0700
    28.3 @@ -1,5 +1,5 @@
    28.4  /*
    28.5 - * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
    28.6 + * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
    28.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    28.8   *
    28.9   * This code is free software; you can redistribute it and/or modify it
    29.1 --- a/test/tools/javac/diags/examples/ApplicableMethodFound1.java	Thu Aug 30 10:27:39 2012 -0700
    29.2 +++ b/test/tools/javac/diags/examples/ApplicableMethodFound1.java	Thu Aug 30 20:14:48 2012 -0700
    29.3 @@ -1,5 +1,5 @@
    29.4  /*
    29.5 - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
    29.6 + * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
    29.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    29.8   *
    29.9   * This code is free software; you can redistribute it and/or modify it
    30.1 --- a/test/tools/javac/diags/examples/IllegalDot.java	Thu Aug 30 10:27:39 2012 -0700
    30.2 +++ b/test/tools/javac/diags/examples/IllegalDot.java	Thu Aug 30 20:14:48 2012 -0700
    30.3 @@ -1,5 +1,5 @@
    30.4  /*
    30.5 - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
    30.6 + * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
    30.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    30.8   *
    30.9   * This code is free software; you can redistribute it and/or modify it
    31.1 --- a/test/tools/javac/diags/examples/InconvertibleTypes.java	Thu Aug 30 10:27:39 2012 -0700
    31.2 +++ b/test/tools/javac/diags/examples/InconvertibleTypes.java	Thu Aug 30 20:14:48 2012 -0700
    31.3 @@ -1,5 +1,5 @@
    31.4  /*
    31.5 - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
    31.6 + * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
    31.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    31.8   *
    31.9   * This code is free software; you can redistribute it and/or modify it
    32.1 --- a/test/tools/javac/diags/examples/KindnameConstructor.java	Thu Aug 30 10:27:39 2012 -0700
    32.2 +++ b/test/tools/javac/diags/examples/KindnameConstructor.java	Thu Aug 30 20:14:48 2012 -0700
    32.3 @@ -1,5 +1,5 @@
    32.4  /*
    32.5 - * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
    32.6 + * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
    32.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    32.8   *
    32.9   * This code is free software; you can redistribute it and/or modify it
    33.1 --- a/test/tools/javac/diags/examples/NotApplicableMethodFound.java	Thu Aug 30 10:27:39 2012 -0700
    33.2 +++ b/test/tools/javac/diags/examples/NotApplicableMethodFound.java	Thu Aug 30 20:14:48 2012 -0700
    33.3 @@ -1,5 +1,5 @@
    33.4  /*
    33.5 - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
    33.6 + * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
    33.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    33.8   *
    33.9   * This code is free software; you can redistribute it and/or modify it
    34.1 --- a/test/tools/javac/diags/examples/PossibleLossPrecision.java	Thu Aug 30 10:27:39 2012 -0700
    34.2 +++ b/test/tools/javac/diags/examples/PossibleLossPrecision.java	Thu Aug 30 20:14:48 2012 -0700
    34.3 @@ -1,5 +1,5 @@
    34.4  /*
    34.5 - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
    34.6 + * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
    34.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    34.8   *
    34.9   * This code is free software; you can redistribute it and/or modify it
    35.1 --- a/test/tools/javac/diags/examples/ResourceNotApplicableToType.java	Thu Aug 30 10:27:39 2012 -0700
    35.2 +++ b/test/tools/javac/diags/examples/ResourceNotApplicableToType.java	Thu Aug 30 20:14:48 2012 -0700
    35.3 @@ -1,5 +1,5 @@
    35.4  /*
    35.5 - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
    35.6 + * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
    35.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    35.8   *
    35.9   * This code is free software; you can redistribute it and/or modify it
    36.1 --- a/test/tools/javac/diags/examples/VarargsArgumentMismatch.java	Thu Aug 30 10:27:39 2012 -0700
    36.2 +++ b/test/tools/javac/diags/examples/VarargsArgumentMismatch.java	Thu Aug 30 20:14:48 2012 -0700
    36.3 @@ -1,5 +1,5 @@
    36.4  /*
    36.5 - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
    36.6 + * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
    36.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    36.8   *
    36.9   * This code is free software; you can redistribute it and/or modify it
    37.1 --- a/test/tools/javac/diags/examples/VerboseResolveMulti1.java	Thu Aug 30 10:27:39 2012 -0700
    37.2 +++ b/test/tools/javac/diags/examples/VerboseResolveMulti1.java	Thu Aug 30 20:14:48 2012 -0700
    37.3 @@ -1,5 +1,5 @@
    37.4  /*
    37.5 - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
    37.6 + * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
    37.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    37.8   *
    37.9   * This code is free software; you can redistribute it and/or modify it
    38.1 --- a/test/tools/javac/diags/examples/WhereCaptured.java	Thu Aug 30 10:27:39 2012 -0700
    38.2 +++ b/test/tools/javac/diags/examples/WhereCaptured.java	Thu Aug 30 20:14:48 2012 -0700
    38.3 @@ -1,5 +1,5 @@
    38.4  /*
    38.5 - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
    38.6 + * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
    38.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    38.8   *
    38.9   * This code is free software; you can redistribute it and/or modify it
    39.1 --- a/test/tools/javac/diags/examples/WhereCaptured1.java	Thu Aug 30 10:27:39 2012 -0700
    39.2 +++ b/test/tools/javac/diags/examples/WhereCaptured1.java	Thu Aug 30 20:14:48 2012 -0700
    39.3 @@ -1,5 +1,5 @@
    39.4  /*
    39.5 - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
    39.6 + * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
    39.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    39.8   *
    39.9   * This code is free software; you can redistribute it and/or modify it
    40.1 --- a/test/tools/javac/diags/examples/WhereIntersection.java	Thu Aug 30 10:27:39 2012 -0700
    40.2 +++ b/test/tools/javac/diags/examples/WhereIntersection.java	Thu Aug 30 20:14:48 2012 -0700
    40.3 @@ -1,5 +1,5 @@
    40.4  /*
    40.5 - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
    40.6 + * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
    40.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    40.8   *
    40.9   * This code is free software; you can redistribute it and/or modify it
    41.1 --- a/test/tools/javac/diags/examples/WhereTypeVar.java	Thu Aug 30 10:27:39 2012 -0700
    41.2 +++ b/test/tools/javac/diags/examples/WhereTypeVar.java	Thu Aug 30 20:14:48 2012 -0700
    41.3 @@ -1,5 +1,5 @@
    41.4  /*
    41.5 - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
    41.6 + * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
    41.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    41.8   *
    41.9   * This code is free software; you can redistribute it and/or modify it
    42.1 --- a/test/tools/javac/generics/typevars/T7148242.java	Thu Aug 30 10:27:39 2012 -0700
    42.2 +++ b/test/tools/javac/generics/typevars/T7148242.java	Thu Aug 30 20:14:48 2012 -0700
    42.3 @@ -1,5 +1,5 @@
    42.4  /*
    42.5 - * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
    42.6 + * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
    42.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    42.8   *
    42.9   * This code is free software; you can redistribute it and/or modify it
    43.1 --- a/test/tools/javac/newlines/Newlines.sh	Thu Aug 30 10:27:39 2012 -0700
    43.2 +++ b/test/tools/javac/newlines/Newlines.sh	Thu Aug 30 20:14:48 2012 -0700
    43.3 @@ -1,5 +1,5 @@
    43.4  #
    43.5 -# Copyright (c) 2002, 2009, Oracle and/or its affiliates. All rights reserved.
    43.6 +# Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
    43.7  # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    43.8  #
    43.9  # This code is free software; you can redistribute it and/or modify it
    44.1 --- a/test/tools/javac/parser/T4881269.java	Thu Aug 30 10:27:39 2012 -0700
    44.2 +++ b/test/tools/javac/parser/T4881269.java	Thu Aug 30 20:14:48 2012 -0700
    44.3 @@ -1,5 +1,5 @@
    44.4  /*
    44.5 - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
    44.6 + * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
    44.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44.8   *
    44.9   * This code is free software; you can redistribute it and/or modify it
    45.1 --- a/test/tools/javac/processing/6348499/T6348499.java	Thu Aug 30 10:27:39 2012 -0700
    45.2 +++ b/test/tools/javac/processing/6348499/T6348499.java	Thu Aug 30 20:14:48 2012 -0700
    45.3 @@ -1,5 +1,5 @@
    45.4  /*
    45.5 - * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
    45.6 + * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
    45.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    45.8   *
    45.9   * This code is free software; you can redistribute it and/or modify it
   45.10 @@ -47,6 +47,7 @@
   45.11      public static void main(String... args) {
   45.12          String testSrc = System.getProperty("test.src", ".");
   45.13          String testClasses = System.getProperty("test.classes");
   45.14 +        String testClassPath = System.getProperty("test.class.path", testClasses);
   45.15          String A_java = new File(testSrc, "A.java").getPath();
   45.16          JavacTool tool = JavacTool.create();
   45.17          MyDiagListener dl = new MyDiagListener();
   45.18 @@ -55,7 +56,7 @@
   45.19              fm.getJavaFileObjectsFromFiles(Arrays.asList(new File(testSrc, "A.java")));
   45.20          Iterable<String> opts = Arrays.asList("-proc:only",
   45.21                                                "-processor", "A",
   45.22 -                                              "-processorpath", testClasses);
   45.23 +                                              "-processorpath", testClassPath);
   45.24          StringWriter out = new StringWriter();
   45.25          JavacTask task = tool.getTask(out, fm, dl, opts, null, files);
   45.26          task.call();
    46.1 --- a/test/tools/javac/processing/6414633/T6414633.java	Thu Aug 30 10:27:39 2012 -0700
    46.2 +++ b/test/tools/javac/processing/6414633/T6414633.java	Thu Aug 30 20:14:48 2012 -0700
    46.3 @@ -1,5 +1,5 @@
    46.4  /*
    46.5 - * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
    46.6 + * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
    46.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    46.8   *
    46.9   * This code is free software; you can redistribute it and/or modify it
   46.10 @@ -43,20 +43,20 @@
   46.11      public static void main(String... args) {
   46.12          String testSrc = System.getProperty("test.src", ".");
   46.13          String testClasses = System.getProperty("test.classes", ".");
   46.14 +        String testClassPath = System.getProperty("test.class.path", testClasses);
   46.15  
   46.16          JavacTool tool = JavacTool.create();
   46.17          MyDiagListener dl = new MyDiagListener();
   46.18          StandardJavaFileManager fm = tool.getStandardFileManager(dl, null, null);
   46.19          try {
   46.20 -            fm.setLocation(StandardLocation.CLASS_PATH, Arrays.asList(new File(testClasses)));
   46.21 +            fm.setLocation(StandardLocation.CLASS_PATH, pathToFiles(testClassPath));
   46.22          } catch (IOException e) {
   46.23              throw new AssertionError(e);
   46.24          }
   46.25          Iterable<? extends JavaFileObject> files =
   46.26              fm.getJavaFileObjectsFromFiles(Arrays.asList(new File(testSrc, A.class.getName()+".java")));
   46.27          String[] opts = { "-proc:only",
   46.28 -                          "-processor", A.class.getName(),
   46.29 -                          "-classpath", testClasses + System.getProperty("path.separator") + "../../lib" };
   46.30 +                          "-processor", A.class.getName() };
   46.31          JavacTask task = tool.getTask(null, fm, dl, Arrays.asList(opts), null, files);
   46.32          task.call();
   46.33  
   46.34 @@ -65,6 +65,15 @@
   46.35              throw new AssertionError(dl.diags + " diagnostics reported");
   46.36      }
   46.37  
   46.38 +    private static List<File> pathToFiles(String path) {
   46.39 +        List<File> list = new ArrayList<File>();
   46.40 +        for (String s: path.split(File.pathSeparator)) {
   46.41 +            if (!s.isEmpty())
   46.42 +                list.add(new File(s));
   46.43 +        }
   46.44 +        return list;
   46.45 +    }
   46.46 +
   46.47      private static class MyDiagListener implements DiagnosticListener<JavaFileObject>
   46.48      {
   46.49          public void report(Diagnostic d) {
    47.1 --- a/test/tools/javac/processing/T6920317.java	Thu Aug 30 10:27:39 2012 -0700
    47.2 +++ b/test/tools/javac/processing/T6920317.java	Thu Aug 30 20:14:48 2012 -0700
    47.3 @@ -1,5 +1,5 @@
    47.4  /*
    47.5 - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
    47.6 + * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
    47.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    47.8   *
    47.9   * This code is free software; you can redistribute it and/or modify it
   47.10 @@ -156,7 +156,9 @@
   47.11          String expect = null;
   47.12  
   47.13          opts.add("-processorpath");
   47.14 -        opts.add(System.getProperty("test.classes"));
   47.15 +        String testClasses = System.getProperty("test.classes");
   47.16 +        String testClassPath = System.getProperty("test.class.path", testClasses);
   47.17 +        opts.add(testClassPath);
   47.18          opts.add("-processor");
   47.19          opts.add(Processor.class.getName());
   47.20          opts.add("-proc:only");
    48.1 --- a/test/tools/javac/processing/TestWarnErrorCount.java	Thu Aug 30 10:27:39 2012 -0700
    48.2 +++ b/test/tools/javac/processing/TestWarnErrorCount.java	Thu Aug 30 20:14:48 2012 -0700
    48.3 @@ -1,5 +1,5 @@
    48.4  /*
    48.5 - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
    48.6 + * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
    48.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    48.8   *
    48.9   * This code is free software; you can redistribute it and/or modify it
    49.1 --- a/test/tools/javac/processing/options/testPrintProcessorInfo/TestWithXstdout.java	Thu Aug 30 10:27:39 2012 -0700
    49.2 +++ b/test/tools/javac/processing/options/testPrintProcessorInfo/TestWithXstdout.java	Thu Aug 30 20:14:48 2012 -0700
    49.3 @@ -1,5 +1,5 @@
    49.4  /*
    49.5 - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
    49.6 + * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
    49.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    49.8   *
    49.9   * This code is free software; you can redistribute it and/or modify it
   49.10 @@ -38,7 +38,8 @@
   49.11  public class TestWithXstdout {
   49.12      public static void main(String... args) throws Exception {
   49.13          File testSrc = new File(System.getProperty("test.src"));
   49.14 -        File testClasses = new File(System.getProperty("test.classes"));
   49.15 +        String testClasses = System.getProperty("test.classes", ".");
   49.16 +        String testClassPath = System.getProperty("test.class.path", testClasses);
   49.17          File stdout = new File("stdout.out");
   49.18          run_javac("-XDrawDiagnostics",
   49.19                  "-XprintProcessorInfo",
   49.20 @@ -46,7 +47,7 @@
   49.21                  "-proc:only",
   49.22                  "-processor",  "Test",
   49.23                  "-Xstdout", stdout.getPath(),
   49.24 -                "-classpath", testClasses.getPath(),
   49.25 +                "-classpath", testClassPath,
   49.26                  new File(testSrc, "Test.java").getPath());
   49.27          boolean ok = compare(stdout, new File(testSrc, "Test.out"));
   49.28          if (!ok)

mercurial