Merge jdk8-b58

Mon, 24 Sep 2012 21:11:11 -0700

author
lana
date
Mon, 24 Sep 2012 21:11:11 -0700
changeset 1330
804a3fbc86e2
parent 1320
bc42f20bfe48
parent 1329
a433bd8f3ba9
child 1331
f299927fc316
child 1345
e77841f2c74b

Merge

     1.1 --- a/src/share/classes/com/sun/javadoc/Doc.java	Thu Sep 20 13:45:59 2012 -0700
     1.2 +++ b/src/share/classes/com/sun/javadoc/Doc.java	Mon Sep 24 21:11:11 2012 -0700
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1998, 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
    1.10 @@ -76,7 +76,7 @@
    1.11  
    1.12      /**
    1.13       * Return comment as an array of tags. Includes inline tags
    1.14 -     * (i.e. {&#64link <i>reference</i>} tags)  but not
    1.15 +     * (i.e. {&#64;link <i>reference</i>} tags)  but not
    1.16       * block tags.
    1.17       * Each section of plain text is represented as a {@link Tag}
    1.18       * of {@linkplain Tag#kind() kind} "Text".
    1.19 @@ -90,7 +90,7 @@
    1.20      /**
    1.21       * Return the first sentence of the comment as an array of tags.
    1.22       * Includes inline tags
    1.23 -     * (i.e. {&#64link <i>reference</i>} tags)  but not
    1.24 +     * (i.e. {&#64;link <i>reference</i>} tags)  but not
    1.25       * block tags.
    1.26       * Each section of plain text is represented as a {@link Tag}
    1.27       * of {@linkplain Tag#kind() kind} "Text".
     2.1 --- a/src/share/classes/com/sun/javadoc/ExecutableMemberDoc.java	Thu Sep 20 13:45:59 2012 -0700
     2.2 +++ b/src/share/classes/com/sun/javadoc/ExecutableMemberDoc.java	Mon Sep 24 21:11:11 2012 -0700
     2.3 @@ -1,5 +1,5 @@
     2.4  /*
     2.5 - * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
     2.6 + * Copyright (c) 1998, 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
    2.10 @@ -90,8 +90,8 @@
    2.11      /**
    2.12       * Return the throws tags in this method.
    2.13       *
    2.14 -     * @return an array of ThrowTag containing all <code>&#64exception</code>
    2.15 -     * and <code>&#64throws</code> tags.
    2.16 +     * @return an array of ThrowTag containing all <code>&#64;exception</code>
    2.17 +     * and <code>&#64;throws</code> tags.
    2.18       */
    2.19      ThrowsTag[] throwsTags();
    2.20  
    2.21 @@ -99,7 +99,7 @@
    2.22       * Return the param tags in this method, excluding the type
    2.23       * parameter tags.
    2.24       *
    2.25 -     * @return an array of ParamTag containing all <code>&#64param</code> tags
    2.26 +     * @return an array of ParamTag containing all <code>&#64;param</code> tags
    2.27       * corresponding to the parameters of this method.
    2.28       */
    2.29      ParamTag[] paramTags();
    2.30 @@ -107,7 +107,7 @@
    2.31      /**
    2.32       * Return the type parameter tags in this method.
    2.33       *
    2.34 -     * @return an array of ParamTag containing all <code>&#64param</code> tags
    2.35 +     * @return an array of ParamTag containing all <code>&#64;param</code> tags
    2.36       * corresponding to the type parameters of this method.
    2.37       * @since 1.5
    2.38       */
     3.1 --- a/src/share/classes/com/sun/javadoc/Tag.java	Thu Sep 20 13:45:59 2012 -0700
     3.2 +++ b/src/share/classes/com/sun/javadoc/Tag.java	Mon Sep 24 21:11:11 2012 -0700
     3.3 @@ -1,5 +1,5 @@
     3.4  /*
     3.5 - * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
     3.6 + * Copyright (c) 1998, 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
    3.10 @@ -127,7 +127,7 @@
    3.11      /**
    3.12       * Return the first sentence of the comment as an array of tags.
    3.13       * Includes inline tags
    3.14 -     * (i.e. {&#64link <i>reference</i>} tags)  but not
    3.15 +     * (i.e. {&#64;link <i>reference</i>} tags)  but not
    3.16       * block tags.
    3.17       * Each section of plain text is represented as a {@link Tag}
    3.18       * of kind "Text".
     4.1 --- a/src/share/classes/com/sun/source/tree/LambdaExpressionTree.java	Thu Sep 20 13:45:59 2012 -0700
     4.2 +++ b/src/share/classes/com/sun/source/tree/LambdaExpressionTree.java	Mon Sep 24 21:11:11 2012 -0700
     4.3 @@ -1,5 +1,5 @@
     4.4  /*
     4.5 - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
     4.6 + * Copyright (c) 2011, 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
    4.10 @@ -31,11 +31,11 @@
    4.11   * A tree node for a lambda expression.
    4.12   *
    4.13   * For example:
    4.14 - * <pre>
    4.15 + * <pre>{@code
    4.16   *   ()->{}
    4.17   *   (List<String> ls)->ls.size()
    4.18   *   (x,y)-> { return x + y; }
    4.19 - * </pre>
    4.20 + * }</pre>
    4.21   */
    4.22  public interface LambdaExpressionTree extends ExpressionTree {
    4.23  
     5.1 --- a/src/share/classes/com/sun/source/tree/LineMap.java	Thu Sep 20 13:45:59 2012 -0700
     5.2 +++ b/src/share/classes/com/sun/source/tree/LineMap.java	Mon Sep 24 21:11:11 2012 -0700
     5.3 @@ -1,5 +1,5 @@
     5.4  /*
     5.5 - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
     5.6 + * Copyright (c) 2006, 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
    5.10 @@ -38,8 +38,8 @@
    5.11       * @param line line number (beginning at 1)
    5.12       * @return     position of first character in line
    5.13       * @throws  IndexOutOfBoundsException
    5.14 -     *           if <tt>lineNumber < 1</tt>
    5.15 -     *           if <tt>lineNumber > no. of lines</tt>
    5.16 +     *           if {@code lineNumber < 1}
    5.17 +     *           if {@code lineNumber > no. of lines}
    5.18       */
    5.19      long getStartPosition(long line);
    5.20  
     6.1 --- a/src/share/classes/com/sun/source/util/TreeScanner.java	Thu Sep 20 13:45:59 2012 -0700
     6.2 +++ b/src/share/classes/com/sun/source/util/TreeScanner.java	Mon Sep 24 21:11:11 2012 -0700
     6.3 @@ -1,5 +1,5 @@
     6.4  /*
     6.5 - * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
     6.6 + * Copyright (c) 2005, 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
    6.10 @@ -52,7 +52,7 @@
    6.11   *
    6.12   * <p>Here is an example to count the number of identifier nodes in a tree:
    6.13   * <pre>
    6.14 - *   class CountIdentifiers extends TreeScanner<Integer,Void> {
    6.15 + *   class CountIdentifiers extends TreeScanner&lt;Integer,Void&gt; {
    6.16   *      {@literal @}Override
    6.17   *      public Integer visitIdentifier(IdentifierTree node, Void p) {
    6.18   *          return 1;
     7.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java	Thu Sep 20 13:45:59 2012 -0700
     7.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java	Mon Sep 24 21:11:11 2012 -0700
     7.3 @@ -1,5 +1,5 @@
     7.4  /*
     7.5 - * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
     7.6 + * Copyright (c) 1998, 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
    7.10 @@ -227,46 +227,44 @@
    7.11              String[] os = options[oi];
    7.12              String opt = os[0].toLowerCase();
    7.13              if (opt.equals("-footer")) {
    7.14 -                footer =  os[1];
    7.15 -            } else  if (opt.equals("-header")) {
    7.16 -                header =  os[1];
    7.17 -            } else  if (opt.equals("-packagesheader")) {
    7.18 -                packagesheader =  os[1];
    7.19 -            } else  if (opt.equals("-doctitle")) {
    7.20 -                doctitle =  os[1];
    7.21 -            } else  if (opt.equals("-windowtitle")) {
    7.22 -                windowtitle =  os[1];
    7.23 -            } else  if (opt.equals("-top")) {
    7.24 -                top =  os[1];
    7.25 -            } else  if (opt.equals("-bottom")) {
    7.26 -                bottom =  os[1];
    7.27 -            } else  if (opt.equals("-helpfile")) {
    7.28 -                helpfile =  os[1];
    7.29 -            } else  if (opt.equals("-stylesheetfile")) {
    7.30 -                stylesheetfile =  os[1];
    7.31 -            } else  if (opt.equals("-charset")) {
    7.32 -                charset =  os[1];
    7.33 +                footer = os[1];
    7.34 +            } else if (opt.equals("-header")) {
    7.35 +                header = os[1];
    7.36 +            } else if (opt.equals("-packagesheader")) {
    7.37 +                packagesheader = os[1];
    7.38 +            } else if (opt.equals("-doctitle")) {
    7.39 +                doctitle = os[1];
    7.40 +            } else if (opt.equals("-windowtitle")) {
    7.41 +                windowtitle = os[1];
    7.42 +            } else if (opt.equals("-top")) {
    7.43 +                top = os[1];
    7.44 +            } else if (opt.equals("-bottom")) {
    7.45 +                bottom = os[1];
    7.46 +            } else if (opt.equals("-helpfile")) {
    7.47 +                helpfile = os[1];
    7.48 +            } else if (opt.equals("-stylesheetfile")) {
    7.49 +                stylesheetfile = os[1];
    7.50 +            } else if (opt.equals("-charset")) {
    7.51 +                charset = os[1];
    7.52              } else if (opt.equals("-xdocrootparent")) {
    7.53                  docrootparent = os[1];
    7.54 -            } else  if (opt.equals("-nohelp")) {
    7.55 +            } else if (opt.equals("-nohelp")) {
    7.56                  nohelp = true;
    7.57 -            } else  if (opt.equals("-splitindex")) {
    7.58 +            } else if (opt.equals("-splitindex")) {
    7.59                  splitindex = true;
    7.60 -            } else  if (opt.equals("-noindex")) {
    7.61 +            } else if (opt.equals("-noindex")) {
    7.62                  createindex = false;
    7.63 -            } else  if (opt.equals("-use")) {
    7.64 +            } else if (opt.equals("-use")) {
    7.65                  classuse = true;
    7.66 -            } else  if (opt.equals("-notree")) {
    7.67 +            } else if (opt.equals("-notree")) {
    7.68                  createtree = false;
    7.69 -            } else  if (opt.equals("-nodeprecatedlist")) {
    7.70 +            } else if (opt.equals("-nodeprecatedlist")) {
    7.71                  nodeprecatedlist = true;
    7.72 -            } else  if (opt.equals("-nosince")) {
    7.73 -                nosince = true;
    7.74 -            } else  if (opt.equals("-nonavbar")) {
    7.75 +            } else if (opt.equals("-nonavbar")) {
    7.76                  nonavbar = true;
    7.77 -            } else  if (opt.equals("-nooverview")) {
    7.78 +            } else if (opt.equals("-nooverview")) {
    7.79                  nooverview = true;
    7.80 -            } else  if (opt.equals("-overview")) {
    7.81 +            } else if (opt.equals("-overview")) {
    7.82                  overview = true;
    7.83              }
    7.84          }
     8.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Thu Sep 20 13:45:59 2012 -0700
     8.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Mon Sep 24 21:11:11 2012 -0700
     8.3 @@ -1,5 +1,5 @@
     8.4  /*
     8.5 - * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
     8.6 + * Copyright (c) 1998, 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
    8.10 @@ -1260,7 +1260,7 @@
    8.11      /**
    8.12       * Print the Html table tag for the index summary tables. The table tag
    8.13       * printed is
    8.14 -     * &lt;TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
    8.15 +     * {@code <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> }
    8.16       */
    8.17      public void tableIndexSummary() {
    8.18          table(1, "100%", 3, 0);
    8.19 @@ -1548,7 +1548,7 @@
    8.20      }
    8.21  
    8.22      /**
    8.23 -     * Print the heading in Html &lt;H2> format.
    8.24 +     * Print the heading in Html {@literal <H2>} format.
    8.25       *
    8.26       * @param str The Header string.
    8.27       */
    8.28 @@ -2416,15 +2416,15 @@
    8.29       * <p>
    8.30       * Here is the algorithm used to fix the link:
    8.31       * <p>
    8.32 -     * &lt;relative link&gt; => docRoot + &lt;relative path to file&gt; + &lt;relative link&gt;
    8.33 +     * {@literal <relative link> => docRoot + <relative path to file> + <relative link> }
    8.34       * <p>
    8.35       * For example, suppose com.sun.javadoc.RootDoc has this link:
    8.36 -     * &lt;a href="package-summary.html"&gt;The package Page&lt;/a&gt;
    8.37 +     * {@literal <a href="package-summary.html">The package Page</a> }
    8.38       * <p>
    8.39       * If this link appeared in the index, we would redirect
    8.40       * the link like this:
    8.41       *
    8.42 -     * &lt;a href="./com/sun/javadoc/package-summary.html"&gt;The package Page&lt;/a&gt;
    8.43 +     * {@literal <a href="./com/sun/javadoc/package-summary.html">The package Page</a>}
    8.44       *
    8.45       * @param doc the Doc object whose documentation is being written.
    8.46       * @param text the text being written.
     9.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java	Thu Sep 20 13:45:59 2012 -0700
     9.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java	Mon Sep 24 21:11:11 2012 -0700
     9.3 @@ -1,5 +1,5 @@
     9.4  /*
     9.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
     9.6 + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
     9.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     9.8   *
     9.9   * This code is free software; you can redistribute it and/or modify it
    9.10 @@ -352,19 +352,21 @@
    9.11              if (opt.equals("-d")) {
    9.12                  destDirName = addTrailingFileSep(os[1]);
    9.13                  docFileDestDirName = destDirName;
    9.14 -            } else  if (opt.equals("-docfilessubdirs")) {
    9.15 +            } else if (opt.equals("-docfilessubdirs")) {
    9.16                  copydocfilesubdirs = true;
    9.17 -            } else  if (opt.equals("-docencoding")) {
    9.18 +            } else if (opt.equals("-docencoding")) {
    9.19                  docencoding = os[1];
    9.20 -            } else  if (opt.equals("-encoding")) {
    9.21 +            } else if (opt.equals("-encoding")) {
    9.22                  encoding = os[1];
    9.23 -            } else  if (opt.equals("-author")) {
    9.24 +            } else if (opt.equals("-author")) {
    9.25                  showauthor = true;
    9.26 -            } else  if (opt.equals("-version")) {
    9.27 +            } else if (opt.equals("-nosince")) {
    9.28 +                nosince = true;
    9.29 +            } else if (opt.equals("-version")) {
    9.30                  showversion = true;
    9.31 -            } else  if (opt.equals("-nodeprecated")) {
    9.32 +            } else if (opt.equals("-nodeprecated")) {
    9.33                  nodeprecated = true;
    9.34 -            } else  if (opt.equals("-sourcepath")) {
    9.35 +            } else if (opt.equals("-sourcepath")) {
    9.36                  sourcepath = os[1];
    9.37              } else if (opt.equals("-classpath") &&
    9.38                         sourcepath.length() == 0) {
    9.39 @@ -388,17 +390,17 @@
    9.40                      message.warning("doclet.sourcetab_warning");
    9.41                      sourcetab = DocletConstants.DEFAULT_TAB_STOP_LENGTH;
    9.42                  }
    9.43 -            } else  if (opt.equals("-notimestamp")) {
    9.44 +            } else if (opt.equals("-notimestamp")) {
    9.45                  notimestamp = true;
    9.46 -            } else  if (opt.equals("-nocomment")) {
    9.47 +            } else if (opt.equals("-nocomment")) {
    9.48                  nocomment = true;
    9.49              } else if (opt.equals("-tag") || opt.equals("-taglet")) {
    9.50                  customTagStrs.add(os);
    9.51              } else if (opt.equals("-tagletpath")) {
    9.52                  tagletpath = os[1];
    9.53 -            } else  if (opt.equals("-keywords")) {
    9.54 +            } else if (opt.equals("-keywords")) {
    9.55                  keywords = true;
    9.56 -            } else  if (opt.equals("-serialwarn")) {
    9.57 +            } else if (opt.equals("-serialwarn")) {
    9.58                  serialwarn = true;
    9.59              } else if (opt.equals("-group")) {
    9.60                  group.checkPackageGroups(os[1], os[2]);
    10.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ClassBuilder.java	Thu Sep 20 13:45:59 2012 -0700
    10.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ClassBuilder.java	Mon Sep 24 21:11:11 2012 -0700
    10.3 @@ -1,5 +1,5 @@
    10.4  /*
    10.5 - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
    10.6 + * Copyright (c) 2003, 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
   10.10 @@ -125,7 +125,7 @@
   10.11      }
   10.12  
   10.13       /**
   10.14 -      * Handles the &lt;ClassDoc> tag.
   10.15 +      * Handles the {@literal <ClassDoc>} tag.
   10.16        *
   10.17        * @param node the XML element that specifies which components to document
   10.18        * @param contentTree the content tree to which the documentation will be added
    11.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletManager.java	Thu Sep 20 13:45:59 2012 -0700
    11.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletManager.java	Mon Sep 24 21:11:11 2012 -0700
    11.3 @@ -1,5 +1,5 @@
    11.4  /*
    11.5 - * Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved.
    11.6 + * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
    11.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    11.8   *
    11.9   * This code is free software; you can redistribute it and/or modify it
   11.10 @@ -600,6 +600,7 @@
   11.11          ArrayList<Taglet> mTags = new ArrayList<Taglet>(customTags.size());
   11.12          ArrayList<Taglet> iTags = new ArrayList<Taglet>(customTags.size());
   11.13          ArrayList<Taglet> oTags = new ArrayList<Taglet>(customTags.size());
   11.14 +        ArrayList<Taglet> sTags = new ArrayList<Taglet>();
   11.15          Taglet current;
   11.16          while (it.hasNext()) {
   11.17              current = it.next();
   11.18 @@ -634,11 +635,12 @@
   11.19          inlineTags = iTags.toArray(new Taglet[] {});
   11.20  
   11.21          //Init the serialized form tags
   11.22 -        serializedFormTags = new Taglet[4];
   11.23 -        serializedFormTags[0] = customTags.get("serialData");
   11.24 -        serializedFormTags[1] = customTags.get("throws");
   11.25 -        serializedFormTags[2] = customTags.get("since");
   11.26 -        serializedFormTags[3] = customTags.get("see");
   11.27 +        sTags.add(customTags.get("serialData"));
   11.28 +        sTags.add(customTags.get("throws"));
   11.29 +        if (!nosince)
   11.30 +            sTags.add(customTags.get("since"));
   11.31 +        sTags.add(customTags.get("see"));
   11.32 +        serializedFormTags = sTags.toArray(new Taglet[] {});
   11.33      }
   11.34  
   11.35      /**
    12.1 --- a/src/share/classes/com/sun/tools/javac/api/JavacTrees.java	Thu Sep 20 13:45:59 2012 -0700
    12.2 +++ b/src/share/classes/com/sun/tools/javac/api/JavacTrees.java	Mon Sep 24 21:11:11 2012 -0700
    12.3 @@ -117,7 +117,7 @@
    12.4          return instance;
    12.5      }
    12.6  
    12.7 -    private JavacTrees(Context context) {
    12.8 +    protected JavacTrees(Context context) {
    12.9          context.put(JavacTrees.class, this);
   12.10          init(context);
   12.11      }
   12.12 @@ -286,7 +286,7 @@
   12.13  
   12.14  
   12.15          JCCompilationUnit unit = (JCCompilationUnit) path.getCompilationUnit();
   12.16 -        Copier copier = new Copier(treeMaker.forToplevel(unit));
   12.17 +        Copier copier = createCopier(treeMaker.forToplevel(unit));
   12.18  
   12.19          Env<AttrContext> env = null;
   12.20          JCMethodDecl method = null;
   12.21 @@ -372,10 +372,10 @@
   12.22      /**
   12.23       * Makes a copy of a tree, noting the value resulting from copying a particular leaf.
   12.24       **/
   12.25 -    static class Copier extends TreeCopier<JCTree> {
   12.26 +    protected static class Copier extends TreeCopier<JCTree> {
   12.27          JCTree leafCopy = null;
   12.28  
   12.29 -        Copier(TreeMaker M) {
   12.30 +        protected Copier(TreeMaker M) {
   12.31              super(M);
   12.32          }
   12.33  
   12.34 @@ -388,6 +388,10 @@
   12.35          }
   12.36      }
   12.37  
   12.38 +    protected Copier createCopier(TreeMaker maker) {
   12.39 +        return new Copier(maker);
   12.40 +    }
   12.41 +
   12.42      /**
   12.43       * Gets the original type from the ErrorType object.
   12.44       * @param errorType The errorType for which we want to get the original type.
    13.1 --- a/src/share/classes/com/sun/tools/javac/code/Symtab.java	Thu Sep 20 13:45:59 2012 -0700
    13.2 +++ b/src/share/classes/com/sun/tools/javac/code/Symtab.java	Mon Sep 24 21:11:11 2012 -0700
    13.3 @@ -251,7 +251,8 @@
    13.4      }
    13.5  
    13.6      /** Enter a binary operation, as above but with two opcodes,
    13.7 -     *  which get encoded as (opcode1 << ByteCodeTags.preShift) + opcode2.
    13.8 +     *  which get encoded as
    13.9 +     *  {@code (opcode1 << ByteCodeTags.preShift) + opcode2 }.
   13.10       *  @param opcode1     First opcode.
   13.11       *  @param opcode2     Second opcode.
   13.12       */
    14.1 --- a/src/share/classes/com/sun/tools/javac/code/Type.java	Thu Sep 20 13:45:59 2012 -0700
    14.2 +++ b/src/share/classes/com/sun/tools/javac/code/Type.java	Mon Sep 24 21:11:11 2012 -0700
    14.3 @@ -692,7 +692,7 @@
    14.4          /** A class type is raw if it misses some
    14.5           *  of its type parameter sections.
    14.6           *  After validation, this is equivalent to:
    14.7 -         *  allparams.isEmpty() && tsym.type.allparams.nonEmpty();
    14.8 +         *  {@code allparams.isEmpty() && tsym.type.allparams.nonEmpty(); }
    14.9           */
   14.10          public boolean isRaw() {
   14.11              return
    15.1 --- a/src/share/classes/com/sun/tools/javac/comp/Annotate.java	Thu Sep 20 13:45:59 2012 -0700
    15.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Annotate.java	Mon Sep 24 21:11:11 2012 -0700
    15.3 @@ -26,7 +26,6 @@
    15.4  package com.sun.tools.javac.comp;
    15.5  
    15.6  import java.util.Map;
    15.7 -import java.util.Objects;
    15.8  
    15.9  import com.sun.tools.javac.util.*;
   15.10  import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
   15.11 @@ -151,10 +150,10 @@
   15.12                                         Map<Symbol.TypeSymbol, ListBuffer<Attribute.Compound>> annotated,
   15.13                                         Map<Attribute.Compound, JCDiagnostic.DiagnosticPosition> pos,
   15.14                                         Log log) {
   15.15 -            Objects.requireNonNull(env);
   15.16 -            Objects.requireNonNull(annotated);
   15.17 -            Objects.requireNonNull(pos);
   15.18 -            Objects.requireNonNull(log);
   15.19 +            Assert.checkNonNull(env);
   15.20 +            Assert.checkNonNull(annotated);
   15.21 +            Assert.checkNonNull(pos);
   15.22 +            Assert.checkNonNull(log);
   15.23  
   15.24              this.env = env;
   15.25              this.annotated = annotated;
    16.1 --- a/src/share/classes/com/sun/tools/javac/comp/Check.java	Thu Sep 20 13:45:59 2012 -0700
    16.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Check.java	Mon Sep 24 21:11:11 2012 -0700
    16.3 @@ -2373,9 +2373,12 @@
    16.4          tree.accept(new AnnotationValidator());
    16.5      }
    16.6  
    16.7 -    /** Annotation types are restricted to primitives, String, an
    16.8 +    /**
    16.9 +     *  {@literal
   16.10 +     *  Annotation types are restricted to primitives, String, an
   16.11       *  enum, an annotation, Class, Class<?>, Class<? extends
   16.12       *  Anything>, arrays of the preceding.
   16.13 +     *  }
   16.14       */
   16.15      void validateAnnotationType(JCTree restype) {
   16.16          // restype may be null if an error occurred, so don't bother validating it
    17.1 --- a/src/share/classes/com/sun/tools/javac/comp/Enter.java	Thu Sep 20 13:45:59 2012 -0700
    17.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Enter.java	Mon Sep 24 21:11:11 2012 -0700
    17.3 @@ -77,12 +77,12 @@
    17.4   *
    17.5   *  <p>Classes migrate from one phase to the next via queues:
    17.6   *
    17.7 - *  <pre>
    17.8 + *  <pre>{@literal
    17.9   *  class enter -> (Enter.uncompleted)         --> member enter (1)
   17.10   *              -> (MemberEnter.halfcompleted) --> member enter (2)
   17.11   *              -> (Todo)                      --> attribute
   17.12   *                                              (only for toplevel classes)
   17.13 - *  </pre>
   17.14 + *  }</pre>
   17.15   *
   17.16   *  <p><b>This is NOT part of any supported API.
   17.17   *  If you write code that depends on this, you do so at your own risk.
    18.1 --- a/src/share/classes/com/sun/tools/javac/comp/Lower.java	Thu Sep 20 13:45:59 2012 -0700
    18.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Lower.java	Mon Sep 24 21:11:11 2012 -0700
    18.3 @@ -1449,7 +1449,7 @@
    18.4              return access(v, make.at(pos).Ident(v), null, false);
    18.5          }
    18.6  
    18.7 -    /** Construct a tree simulating the expression <C.this>.
    18.8 +    /** Construct a tree simulating the expression {@code C.this}.
    18.9       *  @param pos           The source code position to be used for the tree.
   18.10       *  @param c             The qualifier class.
   18.11       */
   18.12 @@ -1623,7 +1623,7 @@
   18.13      }
   18.14  
   18.15      /** Construct a tree that represents the outer instance
   18.16 -     *  <C.this>. Never pick the current `this'.
   18.17 +     *  {@code C.this}. Never pick the current `this'.
   18.18       *  @param pos           The source code position to be used for the tree.
   18.19       *  @param c             The qualifier class.
   18.20       */
   18.21 @@ -1661,7 +1661,7 @@
   18.22      }
   18.23  
   18.24      /** Construct a tree that represents the closest outer instance
   18.25 -     *  <C.this> such that the given symbol is a member of C.
   18.26 +     *  {@code C.this} such that the given symbol is a member of C.
   18.27       *  @param pos           The source code position to be used for the tree.
   18.28       *  @param sym           The accessed symbol.
   18.29       *  @param preciseMatch  should we accept a type that is a subtype of
   18.30 @@ -1713,7 +1713,7 @@
   18.31          return tree;
   18.32      }
   18.33  
   18.34 -    /** Return tree simulating the assignment <this.name = name>, where
   18.35 +    /** Return tree simulating the assignment {@code this.name = name}, where
   18.36       *  name is the name of a free variable.
   18.37       */
   18.38      JCStatement initField(int pos, Name name) {
   18.39 @@ -1730,7 +1730,7 @@
   18.40                      make.Ident(rhs)).setType(lhs.erasure(types)));
   18.41      }
   18.42  
   18.43 -    /** Return tree simulating the assignment <this.this$n = this$n>.
   18.44 +    /** Return tree simulating the assignment {@code this.this$n = this$n}.
   18.45       */
   18.46      JCStatement initOuterThis(int pos) {
   18.47          VarSymbol rhs = outerThisStack.head;
   18.48 @@ -3194,7 +3194,7 @@
   18.49           *
   18.50           * (where arrayexpr is of an array type) gets translated to
   18.51           *
   18.52 -         * <pre>
   18.53 +         * <pre>{@code
   18.54           *     for ( { arraytype #arr = arrayexpr;
   18.55           *             int #len = array.length;
   18.56           *             int #i = 0; };
   18.57 @@ -3202,7 +3202,7 @@
   18.58           *         T v = arr$[#i];
   18.59           *         stmt;
   18.60           *     }
   18.61 -         * </pre>
   18.62 +         * }</pre>
   18.63           *
   18.64           * where #arr, #len, and #i are freshly named synthetic local variables.
   18.65           */
   18.66 @@ -3272,14 +3272,14 @@
   18.67           *     for ( T v : coll ) stmt ;
   18.68           * </pre>
   18.69           *
   18.70 -         * (where coll implements Iterable<? extends T>) gets translated to
   18.71 +         * (where coll implements {@code Iterable<? extends T>}) gets translated to
   18.72           *
   18.73 -         * <pre>
   18.74 +         * <pre>{@code
   18.75           *     for ( Iterator<? extends T> #i = coll.iterator(); #i.hasNext(); ) {
   18.76           *         T v = (T) #i.next();
   18.77           *         stmt;
   18.78           *     }
   18.79 -         * </pre>
   18.80 +         * }</pre>
   18.81           *
   18.82           * where #i is a freshly named synthetic local variable.
   18.83           */
    19.1 --- a/src/share/classes/com/sun/tools/javac/comp/Resolve.java	Thu Sep 20 13:45:59 2012 -0700
    19.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Resolve.java	Mon Sep 24 21:11:11 2012 -0700
    19.3 @@ -1516,7 +1516,7 @@
    19.4      /** If `sym' is a bad symbol: report error and return errSymbol
    19.5       *  else pass through unchanged,
    19.6       *  additional arguments duplicate what has been used in trying to find the
    19.7 -     *  symbol (--> flyweight pattern). This improves performance since we
    19.8 +     *  symbol {@literal (--> flyweight pattern)}. This improves performance since we
    19.9       *  expect misses to happen frequently.
   19.10       *
   19.11       *  @param sym       The symbol that was found, or a ResolveError.
   19.12 @@ -1903,9 +1903,9 @@
   19.13  
   19.14      /** This method scans all the constructor symbol in a given class scope -
   19.15       *  assuming that the original scope contains a constructor of the kind:
   19.16 -     *  Foo(X x, Y y), where X,Y are class type-variables declared in Foo,
   19.17 +     *  {@code Foo(X x, Y y)}, where X,Y are class type-variables declared in Foo,
   19.18       *  a method check is executed against the modified constructor type:
   19.19 -     *  <X,Y>Foo<X,Y>(X x, Y y). This is crucial in order to enable diamond
   19.20 +     *  {@code <X,Y>Foo<X,Y>(X x, Y y)}. This is crucial in order to enable diamond
   19.21       *  inference. The inferred return type of the synthetic constructor IS
   19.22       *  the inferred type for the diamond operator.
   19.23       */
   19.24 @@ -2223,7 +2223,7 @@
   19.25  
   19.26          /**
   19.27           * A name designates an operator if it consists
   19.28 -         * of a non-empty sequence of operator symbols +-~!/*%&|^<>=
   19.29 +         * of a non-empty sequence of operator symbols {@literal +-~!/*%&|^<>= }
   19.30           */
   19.31          boolean isOperator(Name name) {
   19.32              int i = 0;
    20.1 --- a/src/share/classes/com/sun/tools/javac/jvm/ByteCodes.java	Thu Sep 20 13:45:59 2012 -0700
    20.2 +++ b/src/share/classes/com/sun/tools/javac/jvm/ByteCodes.java	Mon Sep 24 21:11:11 2012 -0700
    20.3 @@ -1,5 +1,5 @@
    20.4  /*
    20.5 - * Copyright (c) 1999, 2005, Oracle and/or its affiliates. All rights reserved.
    20.6 + * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
    20.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    20.8   *
    20.9   * This code is free software; you can redistribute it and/or modify it
   20.10 @@ -277,7 +277,7 @@
   20.11  
   20.12      /** Shift and mask constants for shifting prefix instructions.
   20.13       *  a pair of instruction codes such as LCMP ; IFEQ is encoded
   20.14 -     *  in Symtab as (LCMP << preShift) + IFEQ.
   20.15 +     *  in Symtab as {@literal (LCMP << preShift) + IFEQ }.
   20.16       */
   20.17      int preShift        = 9;
   20.18      int preMask         = (1 << preShift) - 1;
    21.1 --- a/src/share/classes/com/sun/tools/javac/jvm/CRTable.java	Thu Sep 20 13:45:59 2012 -0700
    21.2 +++ b/src/share/classes/com/sun/tools/javac/jvm/CRTable.java	Mon Sep 24 21:11:11 2012 -0700
    21.3 @@ -162,7 +162,7 @@
    21.4      }
    21.5  
    21.6      /** Source file positions in CRT are integers in the format:
    21.7 -     *  line-number << LINESHIFT + column-number
    21.8 +     *  {@literal line-number << LINESHIFT + column-number }
    21.9       */
   21.10       private int encodePosition(int pos, Position.LineMap lineMap, Log log) {
   21.11           int line = lineMap.getLineNumber(pos);
    22.1 --- a/src/share/classes/com/sun/tools/javac/jvm/ClassFile.java	Thu Sep 20 13:45:59 2012 -0700
    22.2 +++ b/src/share/classes/com/sun/tools/javac/jvm/ClassFile.java	Mon Sep 24 21:11:11 2012 -0700
    22.3 @@ -1,5 +1,5 @@
    22.4  /*
    22.5 - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
    22.6 + * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
    22.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    22.8   *
    22.9   * This code is free software; you can redistribute it and/or modify it
   22.10 @@ -45,7 +45,7 @@
   22.11   *     classSignature         ::= [ typeparams ] supertype { interfacetype }
   22.12   *  </pre>
   22.13   *  <p>The type syntax in signatures is extended as follows:
   22.14 - *  <pre>
   22.15 + *  <pre>{@literal
   22.16   *     type       ::= ... | classtype | methodtype | typevar
   22.17   *     classtype  ::= classsig { '.' classsig }
   22.18   *     classig    ::= 'L' name [typeargs] ';'
   22.19 @@ -54,7 +54,7 @@
   22.20   *     typeargs   ::= '<' type { type } '>'
   22.21   *     typeparams ::= '<' typeparam { typeparam } '>'
   22.22   *     typeparam  ::= name ':' type
   22.23 - *  </pre>
   22.24 + *  }</pre>
   22.25   *  <p>This class defines constants used in class files as well
   22.26   *  as routines to convert between internal ``.'' and external ``/''
   22.27   *  separators in class names.
    23.1 --- a/src/share/classes/com/sun/tools/javac/jvm/Code.java	Thu Sep 20 13:45:59 2012 -0700
    23.2 +++ b/src/share/classes/com/sun/tools/javac/jvm/Code.java	Mon Sep 24 21:11:11 2012 -0700
    23.3 @@ -1,5 +1,5 @@
    23.4  /*
    23.5 - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
    23.6 + * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
    23.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    23.8   *
    23.9   * This code is free software; you can redistribute it and/or modify it
   23.10 @@ -122,7 +122,7 @@
   23.11  
   23.12  /*---------- internal fields: --------------- */
   23.13  
   23.14 -    /** Are we generating code with jumps >= 32K?
   23.15 +    /** Are we generating code with jumps &ge; 32K?
   23.16       */
   23.17      public boolean fatcode;
   23.18  
   23.19 @@ -1077,13 +1077,15 @@
   23.20              while (cp % incr != 0) emitop0(nop);
   23.21      }
   23.22  
   23.23 -    /** Place a byte into code at address pc. Pre: pc + 1 <= cp.
   23.24 +    /** Place a byte into code at address pc.
   23.25 +     *  Pre: {@literal pc + 1 <= cp }.
   23.26       */
   23.27      private void put1(int pc, int op) {
   23.28          code[pc] = (byte)op;
   23.29      }
   23.30  
   23.31 -    /** Place two bytes into code at address pc. Pre: pc + 2 <= cp.
   23.32 +    /** Place two bytes into code at address pc.
   23.33 +     *  Pre: {@literal pc + 2 <= cp }.
   23.34       */
   23.35      private void put2(int pc, int od) {
   23.36          // pre: pc + 2 <= cp
   23.37 @@ -1091,7 +1093,8 @@
   23.38          put1(pc+1, od);
   23.39      }
   23.40  
   23.41 -    /** Place four  bytes into code at address pc. Pre: pc + 4 <= cp.
   23.42 +    /** Place four  bytes into code at address pc.
   23.43 +     *  Pre: {@literal pc + 4 <= cp }.
   23.44       */
   23.45      public void put4(int pc, int od) {
   23.46          // pre: pc + 4 <= cp
   23.47 @@ -1990,7 +1993,7 @@
   23.48          nextreg = max_locals;
   23.49      }
   23.50  
   23.51 -    /** End scopes of all variables with registers >= first.
   23.52 +    /** End scopes of all variables with registers &ge; first.
   23.53       */
   23.54      public void endScopes(int first) {
   23.55          int prevNextReg = nextreg;
    24.1 --- a/src/share/classes/com/sun/tools/javac/jvm/Gen.java	Thu Sep 20 13:45:59 2012 -0700
    24.2 +++ b/src/share/classes/com/sun/tools/javac/jvm/Gen.java	Mon Sep 24 21:11:11 2012 -0700
    24.3 @@ -247,10 +247,10 @@
    24.4      /** Construct a symbol to reflect the qualifying type that should
    24.5       *  appear in the byte code as per JLS 13.1.
    24.6       *
    24.7 -     *  For target >= 1.2: Clone a method with the qualifier as owner (except
    24.8 +     *  For {@literal target >= 1.2}: Clone a method with the qualifier as owner (except
    24.9       *  for those cases where we need to work around VM bugs).
   24.10       *
   24.11 -     *  For target <= 1.1: If qualified variable or method is defined in a
   24.12 +     *  For {@literal target <= 1.1}: If qualified variable or method is defined in a
   24.13       *  non-accessible class, clone it with the qualifier class as owner.
   24.14       *
   24.15       *  @param sym    The accessed symbol
    25.1 --- a/src/share/classes/com/sun/tools/javac/parser/JavacParser.java	Thu Sep 20 13:45:59 2012 -0700
    25.2 +++ b/src/share/classes/com/sun/tools/javac/parser/JavacParser.java	Mon Sep 24 21:11:11 2012 -0700
    25.3 @@ -670,6 +670,7 @@
    25.4      }
    25.5  
    25.6      /**
    25.7 +     *  {@literal
    25.8       *  Expression = Expression1 [ExpressionRest]
    25.9       *  ExpressionRest = [AssignmentOperator Expression1]
   25.10       *  AssignmentOperator = "=" | "+=" | "-=" | "*=" | "/=" |
   25.11 @@ -679,6 +680,7 @@
   25.12       *  TypeNoParams = TypeNoParams1
   25.13       *  StatementExpression = Expression
   25.14       *  ConstantExpression = Expression
   25.15 +     *  }
   25.16       */
   25.17      JCExpression term() {
   25.18          JCExpression t = term1();
   25.19 @@ -884,9 +886,12 @@
   25.20              return opStack;
   25.21          }
   25.22  
   25.23 -    /** Expression3    = PrefixOp Expression3
   25.24 +    /**
   25.25 +     *  Expression3    = PrefixOp Expression3
   25.26       *                 | "(" Expr | TypeNoParams ")" Expression3
   25.27       *                 | Primary {Selector} {PostfixOp}
   25.28 +     *
   25.29 +     *  {@literal
   25.30       *  Primary        = "(" Expression ")"
   25.31       *                 | Literal
   25.32       *                 | [TypeArguments] THIS [Arguments]
   25.33 @@ -901,6 +906,8 @@
   25.34       *                   | "." ( CLASS | THIS | [TypeArguments] SUPER Arguments | NEW [TypeArguments] InnerCreator )
   25.35       *                   ]
   25.36       *                 | BasicType BracketsOpt "." CLASS
   25.37 +     *  }
   25.38 +     *
   25.39       *  PrefixOp       = "++" | "--" | "!" | "~" | "+" | "-"
   25.40       *  PostfixOp      = "++" | "--"
   25.41       *  Type3          = Ident { "." Ident } [TypeArguments] {TypeSelector} BracketsOpt
   25.42 @@ -1453,7 +1460,10 @@
   25.43          return null;
   25.44      }
   25.45  
   25.46 -    /**  TypeArguments  = "<" TypeArgument {"," TypeArgument} ">"
   25.47 +    /**
   25.48 +     *  {@literal
   25.49 +     *  TypeArguments  = "<" TypeArgument {"," TypeArgument} ">"
   25.50 +     *  }
   25.51       */
   25.52      List<JCExpression> typeArguments(boolean diamondAllowed) {
   25.53          if (token.kind == LT) {
   25.54 @@ -1490,10 +1500,13 @@
   25.55          }
   25.56      }
   25.57  
   25.58 -    /** TypeArgument = Type
   25.59 +    /**
   25.60 +     *  {@literal
   25.61 +     *  TypeArgument = Type
   25.62       *               | "?"
   25.63       *               | "?" EXTENDS Type {"&" Type}
   25.64       *               | "?" SUPER Type
   25.65 +     *  }
   25.66       */
   25.67      JCExpression typeArgument() {
   25.68          if (token.kind != QUES) return parseType();
   25.69 @@ -2991,7 +3004,10 @@
   25.70          return ts.toList();
   25.71      }
   25.72  
   25.73 -    /** TypeParametersOpt = ["<" TypeParameter {"," TypeParameter} ">"]
   25.74 +    /**
   25.75 +     *  {@literal
   25.76 +     *  TypeParametersOpt = ["<" TypeParameter {"," TypeParameter} ">"]
   25.77 +     *  }
   25.78       */
   25.79      List<JCTypeParameter> typeParametersOpt() {
   25.80          if (token.kind == LT) {
   25.81 @@ -3010,9 +3026,12 @@
   25.82          }
   25.83      }
   25.84  
   25.85 -    /** TypeParameter = TypeVariable [TypeParameterBound]
   25.86 +    /**
   25.87 +     *  {@literal
   25.88 +     *  TypeParameter = TypeVariable [TypeParameterBound]
   25.89       *  TypeParameterBound = EXTENDS Type {"&" Type}
   25.90       *  TypeVariable = Ident
   25.91 +     *  }
   25.92       */
   25.93      JCTypeParameter typeParameter() {
   25.94          int pos = token.pos;
    26.1 --- a/src/share/classes/com/sun/tools/javac/parser/Lexer.java	Thu Sep 20 13:45:59 2012 -0700
    26.2 +++ b/src/share/classes/com/sun/tools/javac/parser/Lexer.java	Mon Sep 24 21:11:11 2012 -0700
    26.3 @@ -1,5 +1,5 @@
    26.4  /*
    26.5 - * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
    26.6 + * Copyright (c) 2005, 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
   26.10 @@ -61,7 +61,8 @@
   26.11  
   26.12      /**
   26.13       * Splits the current token in two and return the first (splitted) token.
   26.14 -     * For instance '<<<' is splitted into two tokens '<' and '<<' respectively,
   26.15 +     * For instance {@literal '<<<'} is split into two tokens
   26.16 +     * {@literal '<'} and {@literal '<<'} respectively,
   26.17       * and the latter is returned.
   26.18       */
   26.19      Token split();
    27.1 --- a/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Thu Sep 20 13:45:59 2012 -0700
    27.2 +++ b/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Mon Sep 24 21:11:11 2012 -0700
    27.3 @@ -1072,8 +1072,10 @@
    27.4              Assert.checkNonNull(tokens);
    27.5              next.put(Tokens.tokensKey, tokens);
    27.6  
    27.7 +            Log nextLog = Log.instance(next);
    27.8              // propogate the log's writers directly, instead of going through context
    27.9 -            Log.instance(next).setWriters(log);
   27.10 +            nextLog.setWriters(log);
   27.11 +            nextLog.setSourceMap(log);
   27.12  
   27.13              JavaCompiler oldCompiler = JavaCompiler.instance(context);
   27.14              JavaCompiler nextCompiler = JavaCompiler.instance(next);
   27.15 @@ -1362,7 +1364,8 @@
   27.16       * {@inheritdoc}
   27.17       *
   27.18       * Command line options suitable for presenting to annotation
   27.19 -     * processors.  "-Afoo=bar" should be "-Afoo" => "bar".
   27.20 +     * processors.
   27.21 +     * {@literal "-Afoo=bar"} should be {@literal "-Afoo" => "bar"}.
   27.22       */
   27.23      public Map<String,String> getOptions() {
   27.24          return processorOptions;
    28.1 --- a/src/share/classes/com/sun/tools/javac/tree/JCTree.java	Thu Sep 20 13:45:59 2012 -0700
    28.2 +++ b/src/share/classes/com/sun/tools/javac/tree/JCTree.java	Mon Sep 24 21:11:11 2012 -0700
    28.3 @@ -2010,7 +2010,7 @@
    28.4      }
    28.5  
    28.6      /**
    28.7 -     * A parameterized type, T<...>
    28.8 +     * A parameterized type, {@literal T<...>}
    28.9       */
   28.10      public static class JCTypeApply extends JCExpression implements ParameterizedTypeTree {
   28.11          public JCExpression clazz;
    29.1 --- a/src/share/classes/com/sun/tools/javac/tree/Pretty.java	Thu Sep 20 13:45:59 2012 -0700
    29.2 +++ b/src/share/classes/com/sun/tools/javac/tree/Pretty.java	Mon Sep 24 21:11:11 2012 -0700
    29.3 @@ -256,7 +256,8 @@
    29.4          return pos;
    29.5      }
    29.6  
    29.7 -    /** If type parameter list is non-empty, print it enclosed in "<...>" brackets.
    29.8 +    /** If type parameter list is non-empty, print it enclosed in
    29.9 +     *  {@literal "<...>"} brackets.
   29.10       */
   29.11      public void printTypeParameters(List<JCTypeParameter> trees) throws IOException {
   29.12          if (trees.nonEmpty()) {
    30.1 --- a/src/share/classes/com/sun/tools/javac/tree/TreeMaker.java	Thu Sep 20 13:45:59 2012 -0700
    30.2 +++ b/src/share/classes/com/sun/tools/javac/tree/TreeMaker.java	Mon Sep 24 21:11:11 2012 -0700
    30.3 @@ -87,7 +87,7 @@
    30.4  
    30.5      /** Create a tree maker with a given toplevel and FIRSTPOS as initial position.
    30.6       */
    30.7 -    TreeMaker(JCCompilationUnit toplevel, Names names, Types types, Symtab syms) {
    30.8 +    protected TreeMaker(JCCompilationUnit toplevel, Names names, Types types, Symtab syms) {
    30.9          this.pos = Position.FIRSTPOS;
   30.10          this.toplevel = toplevel;
   30.11          this.names = names;
    31.1 --- a/src/share/classes/com/sun/tools/javac/util/Bits.java	Thu Sep 20 13:45:59 2012 -0700
    31.2 +++ b/src/share/classes/com/sun/tools/javac/util/Bits.java	Mon Sep 24 21:11:11 2012 -0700
    31.3 @@ -1,5 +1,5 @@
    31.4  /*
    31.5 - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
    31.6 + * Copyright (c) 1999, 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
   31.10 @@ -127,7 +127,7 @@
   31.11              (bits[x >>> wordshift] & (1 << (x & wordmask))) != 0;
   31.12      }
   31.13  
   31.14 -    /** this set = this set & xs.
   31.15 +    /** {@literal this set = this set & xs}.
   31.16       */
   31.17      public Bits andSet(Bits xs) {
   31.18          sizeTo(xs.bits.length);
   31.19 @@ -179,12 +179,12 @@
   31.20          return n - (x&1);
   31.21      }
   31.22  
   31.23 -    /** Return the index of the least bit position >= x that is set.
   31.24 +    /** Return the index of the least bit position &ge; x that is set.
   31.25       *  If none are set, returns -1.  This provides a nice way to iterate
   31.26       *  over the members of a bit set:
   31.27 -     *  <pre>
   31.28 +     *  <pre>{@code
   31.29       *  for (int i = bits.nextBit(0); i>=0; i = bits.nextBit(i+1)) ...
   31.30 -     *  </pre>
   31.31 +     *  }</pre>
   31.32       */
   31.33      public int nextBit(int x) {
   31.34          int windex = x >>> wordshift;
    32.1 --- a/src/share/classes/com/sun/tools/javac/util/Context.java	Thu Sep 20 13:45:59 2012 -0700
    32.2 +++ b/src/share/classes/com/sun/tools/javac/util/Context.java	Mon Sep 24 21:11:11 2012 -0700
    32.3 @@ -1,5 +1,5 @@
    32.4  /*
    32.5 - * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
    32.6 + * Copyright (c) 2001, 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
   32.10 @@ -115,7 +115,10 @@
   32.11       * The underlying map storing the data.
   32.12       * We maintain the invariant that this table contains only
   32.13       * mappings of the form
   32.14 -     * Key<T> -> T or Key<T> -> Factory<T> */
   32.15 +     * {@literal Key<T> -> T }
   32.16 +     * or
   32.17 +     * {@literal Key<T> -> Factory<T> }
   32.18 +     */
   32.19      private Map<Key<?>,Object> ht = new HashMap<Key<?>,Object>();
   32.20  
   32.21      /** Set the factory for the key in this context. */
    33.1 --- a/src/share/classes/com/sun/tools/javac/util/Log.java	Thu Sep 20 13:45:59 2012 -0700
    33.2 +++ b/src/share/classes/com/sun/tools/javac/util/Log.java	Mon Sep 24 21:11:11 2012 -0700
    33.3 @@ -301,6 +301,10 @@
    33.4          this.errWriter = other.errWriter;
    33.5      }
    33.6  
    33.7 +    public void setSourceMap(Log other) {
    33.8 +        this.sourceMap = other.sourceMap;
    33.9 +    }
   33.10 +
   33.11      /** Flush the logs
   33.12       */
   33.13      public void flush() {
    34.1 --- a/src/share/classes/com/sun/tools/javac/util/Name.java	Thu Sep 20 13:45:59 2012 -0700
    34.2 +++ b/src/share/classes/com/sun/tools/javac/util/Name.java	Mon Sep 24 21:11:11 2012 -0700
    34.3 @@ -1,5 +1,5 @@
    34.4  /*
    34.5 - * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
    34.6 + * Copyright (c) 1999, 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
   34.10 @@ -43,28 +43,28 @@
   34.11      }
   34.12  
   34.13      /**
   34.14 -     * @inheritDoc
   34.15 +     * {@inheritDoc}
   34.16       */
   34.17      public boolean contentEquals(CharSequence cs) {
   34.18          return toString().equals(cs.toString());
   34.19      }
   34.20  
   34.21      /**
   34.22 -     * @inheritDoc
   34.23 +     * {@inheritDoc}
   34.24       */
   34.25      public int length() {
   34.26          return toString().length();
   34.27      }
   34.28  
   34.29      /**
   34.30 -     * @inheritDoc
   34.31 +     * {@inheritDoc}
   34.32       */
   34.33      public char charAt(int index) {
   34.34          return toString().charAt(index);
   34.35      }
   34.36  
   34.37      /**
   34.38 -     * @inheritDoc
   34.39 +     * {@inheritDoc}
   34.40       */
   34.41      public CharSequence subSequence(int start, int end) {
   34.42          return toString().subSequence(start, end);
   34.43 @@ -142,6 +142,7 @@
   34.44  
   34.45      /** Return the string representation of this name.
   34.46       */
   34.47 +    @Override
   34.48      public String toString() {
   34.49          return Convert.utf2string(getByteArray(), getByteOffset(), getByteLength());
   34.50      }
    35.1 --- a/src/share/classes/com/sun/tools/javac/util/Position.java	Thu Sep 20 13:45:59 2012 -0700
    35.2 +++ b/src/share/classes/com/sun/tools/javac/util/Position.java	Mon Sep 24 21:11:11 2012 -0700
    35.3 @@ -1,5 +1,5 @@
    35.4  /*
    35.5 - * Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved.
    35.6 + * Copyright (c) 1999, 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
   35.10 @@ -79,12 +79,12 @@
   35.11      }
   35.12  
   35.13      /** Encode line and column numbers in an integer as:
   35.14 -     *  line-number << LINESHIFT + column-number
   35.15 -     *  {@link Position.NOPOS represents an undefined position.
   35.16 +     *  {@code line-number << LINESHIFT + column-number }.
   35.17 +     *  {@link Position.NOPOS} represents an undefined position.
   35.18       *
   35.19       * @param  line  number of line (first is 1)
   35.20       * @param  col   number of character on line (first is 1)
   35.21 -     * @return       an encoded position or {@link Position.NOPOS
   35.22 +     * @return       an encoded position or {@link Position.NOPOS}
   35.23       *               if the line or column number is too big to
   35.24       *               represent in the encoded format
   35.25       * @throws IllegalArgumentException if line or col is less than 1
   35.26 @@ -107,8 +107,8 @@
   35.27           * @param line number of line (first is 1)
   35.28           * @return     position of first character in line
   35.29           * @throws  ArrayIndexOutOfBoundsException
   35.30 -         *           if <tt>lineNumber < 1</tt>
   35.31 -         *           if <tt>lineNumber > no. of lines</tt>
   35.32 +         *           if {@code lineNumber < 1}
   35.33 +         *           if {@code lineNumber > no. of lines}
   35.34           */
   35.35          int getStartPosition(int line);
   35.36  
   35.37 @@ -119,8 +119,8 @@
   35.38           *
   35.39           * @return  position of character
   35.40           * @throws  ArrayIndexOutOfBoundsException
   35.41 -         *           if <tt>line < 1</tt>
   35.42 -         *           if <tt>line > no. of lines</tt>
   35.43 +         *           if {@code line < 1}
   35.44 +         *           if {@code line > no. of lines}
   35.45           */
   35.46          int getPosition(int line, int column);
   35.47  
    36.1 --- a/src/share/classes/com/sun/tools/javadoc/Comment.java	Thu Sep 20 13:45:59 2012 -0700
    36.2 +++ b/src/share/classes/com/sun/tools/javadoc/Comment.java	Mon Sep 24 21:11:11 2012 -0700
    36.3 @@ -1,5 +1,5 @@
    36.4  /*
    36.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
    36.6 + * Copyright (c) 1997, 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
   36.10 @@ -386,7 +386,7 @@
   36.11      }
   36.12  
   36.13      /**
   36.14 -     * Recursively search for the string "{@" followed by
   36.15 +     * Recursively search for the characters '{', '@', followed by
   36.16       * name of inline tag and white space,
   36.17       * if found
   36.18       *    return the index of the text following the white space.
    37.1 --- a/src/share/classes/com/sun/tools/javadoc/DocImpl.java	Thu Sep 20 13:45:59 2012 -0700
    37.2 +++ b/src/share/classes/com/sun/tools/javadoc/DocImpl.java	Mon Sep 24 21:11:11 2012 -0700
    37.3 @@ -1,5 +1,5 @@
    37.4  /*
    37.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
    37.6 + * Copyright (c) 1997, 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
   37.10 @@ -138,7 +138,7 @@
   37.11      /**
   37.12       * Return the see also tags in this Doc item.
   37.13       *
   37.14 -     * @return an array of SeeTag containing all &#64see tags.
   37.15 +     * @return an array of SeeTag containing all &#64;see tags.
   37.16       */
   37.17      public SeeTag[] seeTags() {
   37.18          return comment().seeTags();
    38.1 --- a/src/share/classes/com/sun/tools/javadoc/FieldDocImpl.java	Thu Sep 20 13:45:59 2012 -0700
    38.2 +++ b/src/share/classes/com/sun/tools/javadoc/FieldDocImpl.java	Mon Sep 24 21:11:11 2012 -0700
    38.3 @@ -1,5 +1,5 @@
    38.4  /*
    38.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
    38.6 + * Copyright (c) 1997, 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
   38.10 @@ -241,7 +241,7 @@
   38.11       * Return the serialField tags in this FieldDocImpl item.
   38.12       *
   38.13       * @return an array of <tt>SerialFieldTagImpl</tt> containing all
   38.14 -     *         <code>&#64serialField</code> tags.
   38.15 +     *         <code>&#64;serialField</code> tags.
   38.16       */
   38.17      public SerialFieldTag[] serialFieldTags() {
   38.18          return comment().serialFieldTags();
    39.1 --- a/src/share/classes/com/sun/tools/javah/JavahTask.java	Thu Sep 20 13:45:59 2012 -0700
    39.2 +++ b/src/share/classes/com/sun/tools/javah/JavahTask.java	Mon Sep 24 21:11:11 2012 -0700
    39.3 @@ -79,7 +79,7 @@
    39.4  
    39.5  /**
    39.6   * Javah generates support files for native methods.
    39.7 - * Parse commandline options & Invokes javadoc to execute those commands.
    39.8 + * Parse commandline options and invokes javadoc to execute those commands.
    39.9   *
   39.10   * <p><b>This is NOT part of any supported API.
   39.11   * If you write code that depends on this, you do so at your own
    40.1 --- a/src/share/classes/com/sun/tools/javap/JavapTask.java	Thu Sep 20 13:45:59 2012 -0700
    40.2 +++ b/src/share/classes/com/sun/tools/javap/JavapTask.java	Mon Sep 24 21:11:11 2012 -0700
    40.3 @@ -1,5 +1,5 @@
    40.4  /*
    40.5 - * Copyright (c) 2007, 2009, Oracle and/or its affiliates. All rights reserved.
    40.6 + * Copyright (c) 2007, 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
   40.10 @@ -374,8 +374,8 @@
   40.11          task_locale = locale;
   40.12      }
   40.13  
   40.14 -    public void setLog(PrintWriter log) {
   40.15 -        this.log = log;
   40.16 +    public void setLog(Writer log) {
   40.17 +        this.log = getPrintWriterForWriter(log);
   40.18      }
   40.19  
   40.20      public void setLog(OutputStream s) {
   40.21 @@ -383,7 +383,7 @@
   40.22      }
   40.23  
   40.24      private static PrintWriter getPrintWriterForStream(OutputStream s) {
   40.25 -        return new PrintWriter(s, true);
   40.26 +        return new PrintWriter(s == null ? System.err : s, true);
   40.27      }
   40.28  
   40.29      private static PrintWriter getPrintWriterForWriter(Writer w) {
    41.1 --- a/src/share/classes/javax/lang/model/util/Elements.java	Thu Sep 20 13:45:59 2012 -0700
    41.2 +++ b/src/share/classes/javax/lang/model/util/Elements.java	Mon Sep 24 21:11:11 2012 -0700
    41.3 @@ -1,5 +1,5 @@
    41.4  /*
    41.5 - * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
    41.6 + * Copyright (c) 2005, 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
   41.10 @@ -79,12 +79,12 @@
   41.11       *
   41.12       * <p> A documentation comment of an element is a comment that
   41.13       * begins with "{@code /**}" , ends with a separate
   41.14 -     * "<code>*&#47</code>", and immediately precedes the element,
   41.15 +     * "<code>*&#47;</code>", and immediately precedes the element,
   41.16       * ignoring white space.  Therefore, a documentation comment
   41.17       * contains at least three"{@code *}" characters.  The text
   41.18       * returned for the documentation comment is a processed form of
   41.19       * the comment as it appears in source code.  The leading "{@code
   41.20 -     * /**}" and trailing "<code>*&#47</code>" are removed.  For lines
   41.21 +     * /**}" and trailing "<code>*&#47;</code>" are removed.  For lines
   41.22       * of the comment starting after the initial "{@code /**}",
   41.23       * leading white space characters are discarded as are any
   41.24       * consecutive "{@code *}" characters appearing after the white
    42.1 --- a/src/share/classes/javax/tools/JavaCompiler.java	Thu Sep 20 13:45:59 2012 -0700
    42.2 +++ b/src/share/classes/javax/tools/JavaCompiler.java	Mon Sep 24 21:11:11 2012 -0700
    42.3 @@ -1,5 +1,5 @@
    42.4  /*
    42.5 - * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
    42.6 + * Copyright (c) 2005, 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
   42.10 @@ -137,7 +137,7 @@
   42.11   *       StandardJavaFileManager fileManager = compiler.getStandardFileManager(diagnostics, null, null);
   42.12   *       compiler.getTask(null, fileManager, diagnostics, null, null, compilationUnits).call();
   42.13   *
   42.14 - *       for (Diagnostic<? extends JavaFileObject> diagnostic : diagnostics.getDiagnostics())
   42.15 + *       for ({@code Diagnostic<? extends JavaFileObject>} diagnostic : diagnostics.getDiagnostics())
   42.16   *           System.out.format("Error on line %d in %s%n",
   42.17   *                             diagnostic.getLineNumber(),
   42.18   *                             diagnostic.getSource().toUri());
    43.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    43.2 +++ b/test/com/sun/javadoc/testSinceTag/TestSinceTag.java	Mon Sep 24 21:11:11 2012 -0700
    43.3 @@ -0,0 +1,84 @@
    43.4 +/*
    43.5 + * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
    43.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    43.7 + *
    43.8 + * This code is free software; you can redistribute it and/or modify it
    43.9 + * under the terms of the GNU General Public License version 2 only, as
   43.10 + * published by the Free Software Foundation.
   43.11 + *
   43.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
   43.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   43.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   43.15 + * version 2 for more details (a copy is included in the LICENSE file that
   43.16 + * accompanied this code).
   43.17 + *
   43.18 + * You should have received a copy of the GNU General Public License version
   43.19 + * 2 along with this work; if not, write to the Free Software Foundation,
   43.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   43.21 + *
   43.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   43.23 + * or visit www.oracle.com if you need additional information or have any
   43.24 + * questions.
   43.25 + */
   43.26 +
   43.27 +/*
   43.28 + * @test
   43.29 + * @bug      7180906
   43.30 + * @summary  Test to make sure that the since tag works correctly
   43.31 + * @author   Bhavesh Patel
   43.32 + * @library  ../lib/
   43.33 + * @build    JavadocTester TestSinceTag
   43.34 + * @run main TestSinceTag
   43.35 + */
   43.36 +
   43.37 +public class TestSinceTag extends JavadocTester {
   43.38 +
   43.39 +    //Test information.
   43.40 +    private static final String BUG_ID = "7180906";
   43.41 +
   43.42 +    //Javadoc arguments.
   43.43 +    private static final String[] ARGS1 = new String[] {
   43.44 +        "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg1"
   43.45 +    };
   43.46 +
   43.47 +    private static final String[] ARGS2 = new String[] {
   43.48 +        "-d", BUG_ID, "-sourcepath", SRC_DIR, "-nosince", "pkg1"
   43.49 +    };
   43.50 +
   43.51 +    //Input for string search tests.
   43.52 +    private static final String[][] TEST = {
   43.53 +        {BUG_ID + FS + "pkg1" + FS + "C1.html",
   43.54 +            "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL +
   43.55 +            "  <dd>JDK1.0</dd>"
   43.56 +        },
   43.57 +        {BUG_ID + FS + "serialized-form.html",
   43.58 +            "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL +
   43.59 +            "  <dd>1.4</dd>"
   43.60 +        }
   43.61 +    };
   43.62 +
   43.63 +    /**
   43.64 +     * The entry point of the test.
   43.65 +     * @param args the array of command line arguments.
   43.66 +     */
   43.67 +    public static void main(String[] args) {
   43.68 +        TestSinceTag tester = new TestSinceTag();
   43.69 +        run(tester, ARGS1, TEST, NO_TEST);
   43.70 +        run(tester, ARGS2, NO_TEST, TEST);
   43.71 +        tester.printSummary();
   43.72 +    }
   43.73 +
   43.74 +    /**
   43.75 +     * {@inheritDoc}
   43.76 +     */
   43.77 +    public String getBugId() {
   43.78 +        return BUG_ID;
   43.79 +    }
   43.80 +
   43.81 +    /**
   43.82 +     * {@inheritDoc}
   43.83 +     */
   43.84 +    public String getBugName() {
   43.85 +        return getClass().getName();
   43.86 +    }
   43.87 +}
    44.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    44.2 +++ b/test/com/sun/javadoc/testSinceTag/pkg1/C1.java	Mon Sep 24 21:11:11 2012 -0700
    44.3 @@ -0,0 +1,101 @@
    44.4 +/*
    44.5 + * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
    44.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    44.7 + *
    44.8 + * This code is free software; you can redistribute it and/or modify it
    44.9 + * under the terms of the GNU General Public License version 2 only, as
   44.10 + * published by the Free Software Foundation.  Oracle designates this
   44.11 + * particular file as subject to the "Classpath" exception as provided
   44.12 + * by Oracle in the LICENSE file that accompanied this code.
   44.13 + *
   44.14 + * This code is distributed in the hope that it will be useful, but WITHOUT
   44.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   44.16 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   44.17 + * version 2 for more details (a copy is included in the LICENSE file that
   44.18 + * accompanied this code).
   44.19 + *
   44.20 + * You should have received a copy of the GNU General Public License version
   44.21 + * 2 along with this work; if not, write to the Free Software Foundation,
   44.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   44.23 + *
   44.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   44.25 + * or visit www.oracle.com if you need additional information or have any
   44.26 + * questions.
   44.27 + */
   44.28 +package pkg1;
   44.29 +
   44.30 +import java.io.IOException;
   44.31 +import java.io.Serializable;
   44.32 +
   44.33 +/**
   44.34 + * A class comment for testing.
   44.35 + *
   44.36 + * @author      Bhavesh Patel
   44.37 + * @since       JDK1.0
   44.38 + */
   44.39 +public class C1 implements Serializable {
   44.40 +
   44.41 +    /**
   44.42 +     * This field indicates whether the C1 is undecorated.
   44.43 +     *
   44.44 +     * @see #setUndecorated(boolean)
   44.45 +     * @since 1.4
   44.46 +     * @serial
   44.47 +     * @deprecated As of JDK version 1.5, replaced by
   44.48 +     * {@link C1#setUndecorated(boolean) setUndecorated(boolean)}.
   44.49 +     */
   44.50 +    @Deprecated
   44.51 +    public boolean undecorated = false;
   44.52 +
   44.53 +    /**
   44.54 +     * This enum specifies the possible modal exclusion types.
   44.55 +     *
   44.56 +     * @since 1.6
   44.57 +     */
   44.58 +    public static enum ModalExclusionType {
   44.59 +
   44.60 +        /**
   44.61 +         * No modal exclusion.
   44.62 +         */
   44.63 +        NO_EXCLUDE,
   44.64 +        /**
   44.65 +         * <code>APPLICATION_EXCLUDE</code> indicates that a top-level window
   44.66 +         * won't be blocked by any application-modal dialogs. Also, it isn't
   44.67 +         * blocked by document-modal dialogs from outside of its child hierarchy.
   44.68 +         */
   44.69 +        APPLICATION_EXCLUDE
   44.70 +    };
   44.71 +
   44.72 +    /**
   44.73 +     * Constructor.
   44.74 +     *
   44.75 +     * @param title the title
   44.76 +     * @param test boolean value
   44.77 +     * @exception IllegalArgumentException if the <code>owner</code>'s
   44.78 +     *     <code>GraphicsConfiguration</code> is not from a screen device
   44.79 +     * @exception HeadlessException
   44.80 +     */
   44.81 +    public C1(String title, boolean test) {
   44.82 +    }
   44.83 +
   44.84 +    public C1(String title) {
   44.85 +    }
   44.86 +
   44.87 +    /**
   44.88 +     * Method comments.
   44.89 +     * @param  undecorated <code>true</code> if no decorations are
   44.90 +     *         to be enabled;
   44.91 +     *         <code>false</code> if decorations are to be enabled.
   44.92 +     * @see    #readObject()
   44.93 +     * @since 1.4
   44.94 +     */
   44.95 +    public void setUndecorated(boolean undecorated) {
   44.96 +        /* Make sure we don't run in the middle of peer creation.*/
   44.97 +    }
   44.98 +
   44.99 +    /**
  44.100 +     * @see #setUndecorated(boolean)
  44.101 +     */
  44.102 +    public void readObject() throws IOException {
  44.103 +    }
  44.104 +}
    45.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    45.2 +++ b/test/tools/javac/api/EndPositions.java	Mon Sep 24 21:11:11 2012 -0700
    45.3 @@ -0,0 +1,98 @@
    45.4 +/*
    45.5 + * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
    45.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    45.7 + *
    45.8 + * This code is free software; you can redistribute it and/or modify it
    45.9 + * under the terms of the GNU General Public License version 2 only, as
   45.10 + * published by the Free Software Foundation.
   45.11 + *
   45.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
   45.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   45.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   45.15 + * version 2 for more details (a copy is included in the LICENSE file that
   45.16 + * accompanied this code).
   45.17 + *
   45.18 + * You should have received a copy of the GNU General Public License version
   45.19 + * 2 along with this work; if not, write to the Free Software Foundation,
   45.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   45.21 + *
   45.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   45.23 + * or visit www.oracle.com if you need additional information or have any
   45.24 + * questions.
   45.25 + */
   45.26 +
   45.27 +/*
   45.28 + * @test
   45.29 + * @bug 7196760
   45.30 + * @summary javac doesn't report Diagnostic end positions properly when
   45.31 + * an annotation processor is present
   45.32 + */
   45.33 +
   45.34 +import com.sun.source.tree.ClassTree;
   45.35 +import com.sun.source.tree.CompilationUnitTree;
   45.36 +import com.sun.source.tree.Tree;
   45.37 +import com.sun.source.util.JavacTask;
   45.38 +import com.sun.source.util.Trees;
   45.39 +import java.io.IOException;
   45.40 +import java.net.URI;
   45.41 +import java.util.Arrays;
   45.42 +import java.util.Collections;
   45.43 +import java.util.List;
   45.44 +import java.util.Set;
   45.45 +import javax.annotation.processing.*;
   45.46 +import javax.lang.model.*;
   45.47 +import javax.lang.model.element.*;
   45.48 +import javax.tools.JavaCompiler;
   45.49 +import javax.tools.JavaFileObject;
   45.50 +import javax.tools.SimpleJavaFileObject;
   45.51 +import javax.tools.Diagnostic;
   45.52 +import javax.tools.DiagnosticCollector;
   45.53 +import static javax.tools.JavaFileObject.Kind.SOURCE;
   45.54 +import javax.tools.ToolProvider;
   45.55 +
   45.56 +@SupportedAnnotationTypes("*")
   45.57 +public class EndPositions extends AbstractProcessor {
   45.58 +    public static void main(String... args) throws IOException {
   45.59 +        class MyFileObject extends SimpleJavaFileObject {
   45.60 +            MyFileObject() {
   45.61 +                super(URI.create("myfo:///Test.java"), SOURCE);
   45.62 +            }
   45.63 +            @Override
   45.64 +            public String getCharContent(boolean ignoreEncodingErrors) {
   45.65 +                //      0         1         2         3
   45.66 +                //      012345678901234567890123456789012345
   45.67 +                return "class Test { String s = 1234; }";
   45.68 +            }
   45.69 +        }
   45.70 +        JavaCompiler javac = ToolProvider.getSystemJavaCompiler();
   45.71 +        List<JavaFileObject> compilationUnits =
   45.72 +                Collections.<JavaFileObject>singletonList(new MyFileObject());
   45.73 +        DiagnosticCollector<JavaFileObject> diagnostics = new DiagnosticCollector<JavaFileObject>();
   45.74 +        List<String> options = Arrays.asList("-processor", EndPositions.class.getCanonicalName());
   45.75 +        JavacTask task = (JavacTask)javac.getTask(null, null, diagnostics, options, null, compilationUnits);
   45.76 +        boolean valid = task.call();
   45.77 +        if (valid)
   45.78 +            throw new AssertionError("Compilation succeeded unexpectedly");
   45.79 +
   45.80 +        List<Diagnostic<? extends JavaFileObject>> errors = diagnostics.getDiagnostics();
   45.81 +        if (errors.size() != 1)
   45.82 +            throw new AssertionError("Expected one error only, but found " + errors.size() + " errors");
   45.83 +
   45.84 +        Diagnostic<?> error = errors.get(0);
   45.85 +        if (error.getStartPosition() >= error.getEndPosition())
   45.86 +            throw new AssertionError("Expected start to be less than end position: start [" +
   45.87 +                    error.getStartPosition() + "], end [" + error.getEndPosition() +"]");
   45.88 +
   45.89 +        System.out.println("All is good!");
   45.90 +    }
   45.91 +
   45.92 +    @Override
   45.93 +    public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
   45.94 +        return true;
   45.95 +    }
   45.96 +
   45.97 +    @Override
   45.98 +    public SourceVersion getSupportedSourceVersion() {
   45.99 +        return SourceVersion.latest();
  45.100 +    }
  45.101 +}
    46.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    46.2 +++ b/test/tools/javap/T7186925.java	Mon Sep 24 21:11:11 2012 -0700
    46.3 @@ -0,0 +1,78 @@
    46.4 +/*
    46.5 + * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
    46.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    46.7 + *
    46.8 + * This code is free software; you can redistribute it and/or modify it
    46.9 + * under the terms of the GNU General Public License version 2 only, as
   46.10 + * published by the Free Software Foundation.
   46.11 + *
   46.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
   46.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   46.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   46.15 + * version 2 for more details (a copy is included in the LICENSE file that
   46.16 + * accompanied this code).
   46.17 + *
   46.18 + * You should have received a copy of the GNU General Public License version
   46.19 + * 2 along with this work; if not, write to the Free Software Foundation,
   46.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   46.21 + *
   46.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   46.23 + * or visit www.oracle.com if you need additional information or have any
   46.24 + * questions.
   46.25 + */
   46.26 +
   46.27 +/*
   46.28 + * @test
   46.29 + * @bug 7186925
   46.30 + * @summary JavapTask passes null to java.io.Writer
   46.31 + */
   46.32 +
   46.33 +import java.io.*;
   46.34 +import java.util.*;
   46.35 +import javax.tools.*;
   46.36 +import com.sun.tools.javap.*;
   46.37 +
   46.38 +public class T7186925
   46.39 +{
   46.40 +    public static void main(String... args) {
   46.41 +        new T7186925().run();
   46.42 +    }
   46.43 +
   46.44 +    void run() {
   46.45 +        verify("java.lang.Object");
   46.46 +        if (errors > 0)
   46.47 +            throw new Error(errors + " found.");
   46.48 +    }
   46.49 +
   46.50 +    void verify(String className) {
   46.51 +        try {
   46.52 +            JavaFileManager fileManager = JavapFileManager.create(null, null);
   46.53 +            JavaFileObject fo = fileManager.getJavaFileForInput(StandardLocation.PLATFORM_CLASS_PATH, className, JavaFileObject.Kind.CLASS);
   46.54 +            if (fo == null) {
   46.55 +                error("Can't find " + className);
   46.56 +            } else {
   46.57 +                JavapTask t = new JavapTask(null, fileManager, null);
   46.58 +                t.handleOptions(new String[] { "-sysinfo", className });
   46.59 +                JavapTask.ClassFileInfo cfInfo = t.read(fo);
   46.60 +                expectEqual(cfInfo.cf.byteLength(), cfInfo.size);
   46.61 +            }
   46.62 +        } catch (NullPointerException ee) {
   46.63 +            ee.printStackTrace();
   46.64 +            error("Exception: " + ee);
   46.65 +        } catch (Exception ee) {
   46.66 +            System.err.println("Caught exception: " + ee);
   46.67 +        }
   46.68 +    }
   46.69 +
   46.70 +    void expectEqual(int found, int expected) {
   46.71 +        if (found != expected)
   46.72 +            error("bad value found: " + found + " expected: " + expected);
   46.73 +    }
   46.74 +
   46.75 +    void error(String msg) {
   46.76 +        System.err.println(msg);
   46.77 +        errors++;
   46.78 +    }
   46.79 +
   46.80 +    int errors;
   46.81 +}

mercurial