Merge
authorlana
Mon, 24 Feb 2014 13:06:07 -0800
changeset 23125 6fec42407d2b
parent 23103 66e1f732540a (current diff)
parent 23124 63050cb08583 (diff)
child 23138 497fb20a5754
Merge
langtools/test/tools/javac/T8029240/DefaultMethodsNotVisibileForSource7Test.java
--- a/langtools/THIRD_PARTY_README	Fri Feb 21 11:40:51 2014 -0800
+++ b/langtools/THIRD_PARTY_README	Mon Feb 24 13:06:07 2014 -0800
@@ -2,11 +2,12 @@
 -----------------------------
 
 %% This notice is provided with respect to ASM Bytecode Manipulation 
-Framework v3.1, which is included with JRE 7, JDK 7, and OpenJDK 7.
+Framework v5.0, which may be included with JRE 8, and JDK 8, and 
+OpenJDK 8.
 
 --- begin of LICENSE ---
 
-Copyright (c) 2000-2005 INRIA, France Telecom
+Copyright (c) 2000-2011 France Télécom
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
@@ -40,8 +41,41 @@
 
 --------------------------------------------------------------------------------
 
-%% This notice is provided with respect to CodeViewer 1.0, which is included 
-with JDK 7.
+%% This notice is provided with respect to BSDiff v4.3, which may be 
+included with JRE 8, JDK 8, and OpenJDK 8.
+
+--- begin of LICENSE ---
+
+Copyright 2003-2005 Colin Percival
+All rights reserved
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted providing that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+--- end of LICENSE ---
+
+-------------------------------------------------------------------------------
+
+%% This notice is provided with respect to CodeViewer 1.0, which may be
+included with JDK 8.
 
 --- begin of LICENSE ---
 
@@ -81,8 +115,8 @@
 
 -------------------------------------------------------------------------------
 
-%% This notice is provided with respect to Cryptix AES 3.2.0, which is
-included with JRE 7, JDK 7, and OpenJDK 7.
+%% This notice is provided with respect to Cryptix AES 3.2.0, which may be
+included with JRE 8, JDK 8, and OpenJDK 8.
 
 --- begin of LICENSE ---
 
@@ -121,7 +155,7 @@
 -------------------------------------------------------------------------------
 
 %% This notice is provided with respect to CUP Parser Generator for 
-Java 0.10k, which is included with JRE 7, JDK 7, and OpenJDK 7.
+Java 0.10k, which may be included with JRE 8, JDK 8, and OpenJDK 8.
 
 --- begin of LICENSE ---
 
@@ -148,7 +182,7 @@
 -------------------------------------------------------------------------------
 
 %% This notice is provided with respect to Document Object Model (DOM) Level 2
-& 3, which is included with JRE 7, JDK 7, and OpenJDK 7.
+& 3, which may be included with JRE 8, JDK 8, and OpenJDK 8.
 
 --- begin of LICENSE ---
 
@@ -212,19 +246,52 @@
 
 -------------------------------------------------------------------------------
 
+%% This notice is provided with respect to Dynalink v0.5, which may be 
+included with JRE 8, JDK 8, and OpenJDK 8.
+
+--- begin of LICENSE ---
+
+Copyright (c) 2009-2013, Attila Szegedi
+
+All rights reserved.Redistribution and use in source and binary forms, with or
+without modification, are permitted provided that the following conditions are
+met:* Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.  * Redistributions in
+binary form must reproduce the above copyright notice,   this list of
+conditions and the following disclaimer in the documentation  and/or other
+materials provided with the distribution.  * Neither the name of Attila
+Szegedi nor the names of its contributors may be used to endorse or promote
+products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THEPOSSIBILITY OF SUCH DAMAGE.
+
+--- end of LICENSE ---
+
+-------------------------------------------------------------------------------
+
 %% This notice is provided with respect to Elliptic Curve Cryptography, which 
-is included with JRE 7, JDK 7, and OpenJDK 7.
+may be included with JRE 8, JDK 8, and OpenJDK 8.
 
 You are receiving a copy of the Elliptic Curve Cryptography library in source
-form with the JDK 7 source distribution and object code in the JRE 7 & JDK 7
-runtime.
-
-The terms of the Oracle license do NOT apply to the Elliptic Curve
-Cryptography library program; it is licensed under the following license,
-separately from the Oracle programs you receive. If you do not wish to install
-this program, you may delete the library named libsunec.so (on Solaris and
-Linux systems) or sunec.dll (on Windows systems) from the JRE bin directory
-reserved for native libraries.
+form with the JDK 8 and OpenJDK 8 source distributions, and as object code in
+the JRE 8 & JDK 8 runtimes.
+
+In the case of the JRE 8 & JDK 8 runtimes, the terms of the Oracle license do
+NOT apply to the Elliptic Curve Cryptography library; it is licensed under the
+following license, separately from Oracle's JDK & JRE.  If you do not wish to
+install the Elliptic Curve Cryptography library, you may delete the library
+named libsunec.so (on Solaris and Linux systems) or sunec.dll (on Windows
+systems) from the JRE bin directory reserved for native libraries.
+
 
 --- begin of LICENSE ---
 
@@ -735,13 +802,138 @@
 
 -------------------------------------------------------------------------------
 
-%% This notice is provided with respect to FontConfig 2.5, which is 
-included with JRE 7, JDK 7, and OpenJDK 7 source distributions on
+%% This notice is provided with respect to  ECMAScript Language
+Specification ECMA-262 Edition 5.1 which may be included with 
+JRE 8, JDK 8, and OpenJDK 8.
+
+--- begin of LICENSE ---
+
+Copyright notice
+Copyright © 2011 Ecma International
+Ecma International
+Rue du Rhone 114
+CH-1204 Geneva
+Tel: +41 22 849 6000
+Fax: +41 22 849 6001
+Web: http://www.ecma-international.org
+
+This document and possible translations of it may be copied and furnished to
+others, and derivative works that comment on or otherwise explain it or assist
+in its implementation may be prepared, copied, published, and distributed, in
+whole or in part, without restriction of any kind, provided that the above
+copyright notice and this section are included on all such copies and derivative
+works. However, this document itself may not be modified in any way, including
+by removing the copyright notice or references to Ecma International, except as
+needed for the purpose of developing any document or deliverable produced by
+Ecma International (in which case the rules applied to copyrights must be
+followed) or as required to translate it into languages other than English. The
+limited permissions granted above are perpetual and will not be revoked by Ecma
+International or its successors or assigns. This document and the information
+contained herein is provided on an "AS IS" basis and ECMA INTERNATIONAL
+DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
+WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP
+RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
+PURPOSE." Software License
+
+All Software contained in this document ("Software)" is protected by copyright
+and is being made available under the "BSD License", included below. This
+Software may be subject to third party rights (rights from parties other than
+Ecma International), including patent rights, and no licenses under such third
+party rights are granted under this license even if the third party concerned is
+a member of Ecma International. SEE THE ECMA CODE OF CONDUCT IN PATENT MATTERS
+AVAILABLE AT http://www.ecma-international.org/memento/codeofconduct.htm FOR
+INFORMATION REGARDING THE LICENSING OF PATENT CLAIMS THAT ARE REQUIRED TO
+IMPLEMENT ECMA INTERNATIONAL STANDARDS*. Redistribution and use in source and
+binary forms, with or without modification, are permitted provided that the
+following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation and/or
+other materials provided with the distribution.
+
+3. Neither the name of the authors nor Ecma International may be used to endorse
+or promote products derived from this software without specific prior written
+permission.
+
+THIS SOFTWARE IS PROVIDED BY THE ECMA INTERNATIONAL "AS IS" AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+SHALL ECMA INTERNATIONAL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+OF SUCH DAMAGE.
+--- end of LICENSE ---
+
+%% This notice is provided with respect to Dynalink library which is included
+with the Nashorn technology.
+
+--- begin of LICENSE ---
+Copyright (c) 2009-2013, Attila Szegedi
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+* Redistributions of source code must retain the above copyright
+  notice, this list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright
+  notice, this list of conditions and the following disclaimer in the
+  documentation and/or other materials provided with the distribution.
+* Neither the name of the copyright holder nor the names of
+  contributors may be used to endorse or promote products derived from
+  this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+--- end of LICENSE ---
+
+%% This notice is provided with respect to Joni library which is included
+with the Nashorn technology.
+
+--- begin of LICENSE ---
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+--- end of LICENSE ---
+
+-------------------------------------------------------------------------------
+
+%% This notice is provided with respect to FontConfig 2.5, which may be 
+included with JRE 8, JDK 8, and OpenJDK 8 source distributions on
 Linux and Solaris.
 
 --- begin of LICENSE ---
 
-Copyright © 2001,2003 Keith Packard
+Copyright © 2001,2003 Keith Packard
 
 Permission to use, copy, modify, distribute, and sell this software and its
 documentation for any purpose is hereby granted without fee, provided that the
@@ -765,7 +957,7 @@
 -------------------------------------------------------------------------------
 
 %% This notice is provided with respect to IAIK PKCS#11 Wrapper, 
-which is included with JRE 7, JDK 7, and OpenJDK 7.
+which may be included with JRE 8, JDK 8, and OpenJDK 8.
 
 --- begin of LICENSE ---
 
@@ -816,7 +1008,7 @@
 -------------------------------------------------------------------------------
 
 %% This notice is provided with respect to ICU4C 4.0.1 and ICU4J 4.4, which 
-is included with JRE 7, JDK 7, and OpenJDK 7.
+may be included with JRE 8, JDK 8, and OpenJDK 8.
 
 --- begin of LICENSE ---
 
@@ -852,8 +1044,8 @@
 
 -------------------------------------------------------------------------------
 
-%% This notice is provided with respect to IJG JPEG 6b, which is 
-included with JRE 7, JDK 7, and OpenJDK 7.
+%% This notice is provided with respect to IJG JPEG 6b, which may be 
+included with JRE 8, JDK 8, and OpenJDK 8.
 
 --- begin of LICENSE ---
 
@@ -891,8 +1083,35 @@
 
 --------------------------------------------------------------------------------
 
-%% This notice is provided with respect to JOpt-Simple v3.0,  which is 
-included with JRE 7, JDK 7, and OpenJDK 7.
+%% This notice is provided with respect to Joni v1.1.9, which may be 
+included with JRE 8, JDK 8, and OpenJDK 8.
+
+--- begin of LICENSE ---
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+--- end of LICENSE ---
+
+-------------------------------------------------------------------------------
+
+%% This notice is provided with respect to JOpt-Simple v3.0,  which may be 
+included with JRE 8, JDK 8, and OpenJDK 8.
 
 --- begin of LICENSE ---
 
@@ -921,8 +1140,39 @@
 
 --------------------------------------------------------------------------------
 
+%% This notice is provided with respect to JSON, which may be included 
+with JRE 8 & JDK 8.
+
+--- begin of LICENSE ---
+
+Copyright (c) 2002 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+--- end of LICENSE ---
+
+-------------------------------------------------------------------------------
+
 %% This notice is provided with respect to Kerberos functionality, which 
-which is included with JRE 7, JDK 7, and OpenJDK 7.
+which may be included with JRE 8, JDK 8, and OpenJDK 8.
 
 --- begin of LICENSE ---
 
@@ -934,7 +1184,7 @@
 -------------------------------------------------------------------------------
 
 %% This notice is provided with respect to Kerberos functionality from 
-FundsXpress, INC., which is included with JRE 7, JDK 7, and OpenJDK 7.
+FundsXpress, INC., which may be included with JRE 8, JDK 8, and OpenJDK 8.
 
 --- begin of LICENSE ---
 
@@ -967,8 +1217,8 @@
 
 -------------------------------------------------------------------------------
 
-%% This notice is provided with respect to Kronos OpenGL headers, which is 
-included with JDK 7 and OpenJDK 7 source distributions.
+%% This notice is provided with respect to Kronos OpenGL headers, which may be 
+included with JDK 8 and OpenJDK 8 source distributions.
 
 --- begin of LICENSE ---
 
@@ -1000,8 +1250,8 @@
 
 -------------------------------------------------------------------------------
 
-%% This notice is provided with respect to libpng 1.2.18, which is 
-included with JRE 7, JDK 7, and OpenJDK 7.
+%% This notice is provided with respect to libpng 1.5.4, which may be 
+included with JRE 8, JDK 8, and OpenJDK 8.
 
 --- begin of LICENSE ---
 
@@ -1014,8 +1264,10 @@
 If you modify libpng you may insert additional notices immediately following
 this sentence.
 
-libpng versions 1.2.6, August 15, 2004, through 1.2.18, May 15, 2007, are
-Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson, and are
+This code is released under the libpng license.
+
+libpng versions 1.2.6, August 15, 2004, through 1.5.4, July 7, 2011, are
+Copyright (c) 2004, 2006-2011 Glenn Randers-Pehrson, and are
 distributed according to the same disclaimer and license as libpng-1.2.5
 with the following individual added to the list of Contributing Authors
 
@@ -1112,14 +1364,14 @@
 
 Glenn Randers-Pehrson
 glennrp at users.sourceforge.net
-May 15, 2007
+July 7, 2011
 
 --- end of LICENSE ---
 
 -------------------------------------------------------------------------------
 
-%% This notice is provided with respect to libungif 4.1.3, which is 
-included with JRE 7, JDK 7, and OpenJDK 7.
+%% This notice is provided with respect to libungif 4.1.3, which may be 
+included with JRE 8, JDK 8, and OpenJDK 8.
 
 --- begin of LICENSE ---
 
@@ -1147,8 +1399,8 @@
 
 -------------------------------------------------------------------------------
 
-%% This notice is provided with respect to Little CMS 2.0, which is 
-included with OpenJDK 7.
+%% This notice is provided with respect to Little CMS 2.4, which may be 
+included with JRE 8, JDK 8, and OpenJDK 8.
 
 --- begin of LICENSE ---
 
@@ -1183,7 +1435,7 @@
 -------------------------------------------------------------------------------
 
 %% This notice is provided with respect to Mesa 3D Graphics Library v4.1,
-which is included with JRE 7, JDK 7, and OpenJDK 7 source distributions.
+which may be included with JRE 8, JDK 8, and OpenJDK 8 source distributions.
 
 --- begin of LICENSE ---
 
@@ -1213,8 +1465,402 @@
 
 -------------------------------------------------------------------------------
 
+%% This notice is provided with respect to Mozilla Network Security
+Services (NSS), which is supplied with the JDK test suite in the OpenJDK
+source code repository. It is licensed under Mozilla Public License (MPL),
+version 2.0.
+
+The NSS libraries are supplied in executable form, built from unmodified
+NSS source code labeled with the "NSS_3.13.1_RTM" release tag.
+
+The NSS source code is available in the OpenJDK source code repository at:
+    jdk/test/sun/security/pkcs11/nss/src
+
+The NSS libraries are available in the OpenJDK source code repository at:
+    jdk/test/sun/security/pkcs11/nss/lib
+
+--- begin of LICENSE ---
+
+Mozilla Public License Version 2.0
+==================================
+
+1. Definitions
+--------------
+
+1.1. "Contributor"
+    means each individual or legal entity that creates, contributes to
+    the creation of, or owns Covered Software.
+
+1.2. "Contributor Version"
+    means the combination of the Contributions of others (if any) used
+    by a Contributor and that particular Contributor's Contribution.
+
+1.3. "Contribution"
+    means Covered Software of a particular Contributor.
+
+1.4. "Covered Software"
+    means Source Code Form to which the initial Contributor has attached
+    the notice in Exhibit A, the Executable Form of such Source Code
+    Form, and Modifications of such Source Code Form, in each case
+    including portions thereof.
+
+1.5. "Incompatible With Secondary Licenses"
+    means
+
+    (a) that the initial Contributor has attached the notice described
+        in Exhibit B to the Covered Software; or
+
+    (b) that the Covered Software was made available under the terms of
+        version 1.1 or earlier of the License, but not also under the
+        terms of a Secondary License.
+
+1.6. "Executable Form"
+    means any form of the work other than Source Code Form.
+
+1.7. "Larger Work"
+    means a work that combines Covered Software with other material, in 
+    a separate file or files, that is not Covered Software.
+
+1.8. "License"
+    means this document.
+
+1.9. "Licensable"
+    means having the right to grant, to the maximum extent possible,
+    whether at the time of the initial grant or subsequently, any and
+    all of the rights conveyed by this License.
+
+1.10. "Modifications"
+    means any of the following:
+
+    (a) any file in Source Code Form that results from an addition to,
+        deletion from, or modification of the contents of Covered
+        Software; or
+
+    (b) any new file in Source Code Form that contains any Covered
+        Software.
+
+1.11. "Patent Claims" of a Contributor
+    means any patent claim(s), including without limitation, method,
+    process, and apparatus claims, in any patent Licensable by such
+    Contributor that would be infringed, but for the grant of the
+    License, by the making, using, selling, offering for sale, having
+    made, import, or transfer of either its Contributions or its
+    Contributor Version.
+
+1.12. "Secondary License"
+    means either the GNU General Public License, Version 2.0, the GNU
+    Lesser General Public License, Version 2.1, the GNU Affero General
+    Public License, Version 3.0, or any later versions of those
+    licenses.
+
+1.13. "Source Code Form"
+    means the form of the work preferred for making modifications.
+
+1.14. "You" (or "Your")
+    means an individual or a legal entity exercising rights under this
+    License. For legal entities, "You" includes any entity that
+    controls, is controlled by, or is under common control with You. For
+    purposes of this definition, "control" means (a) the power, direct
+    or indirect, to cause the direction or management of such entity,
+    whether by contract or otherwise, or (b) ownership of more than
+    fifty percent (50%) of the outstanding shares or beneficial
+    ownership of such entity.
+
+2. License Grants and Conditions
+--------------------------------
+
+2.1. Grants
+
+Each Contributor hereby grants You a world-wide, royalty-free,
+non-exclusive license:
+
+(a) under intellectual property rights (other than patent or trademark)
+    Licensable by such Contributor to use, reproduce, make available,
+    modify, display, perform, distribute, and otherwise exploit its
+    Contributions, either on an unmodified basis, with Modifications, or
+    as part of a Larger Work; and
+
+(b) under Patent Claims of such Contributor to make, use, sell, offer
+    for sale, have made, import, and otherwise transfer either its
+    Contributions or its Contributor Version.
+
+2.2. Effective Date
+
+The licenses granted in Section 2.1 with respect to any Contribution
+become effective for each Contribution on the date the Contributor first
+distributes such Contribution.
+
+2.3. Limitations on Grant Scope
+
+The licenses granted in this Section 2 are the only rights granted under
+this License. No additional rights or licenses will be implied from the
+distribution or licensing of Covered Software under this License.
+Notwithstanding Section 2.1(b) above, no patent license is granted by a
+Contributor:
+
+(a) for any code that a Contributor has removed from Covered Software;
+    or
+
+(b) for infringements caused by: (i) Your and any other third party's
+    modifications of Covered Software, or (ii) the combination of its
+    Contributions with other software (except as part of its Contributor
+    Version); or
+
+(c) under Patent Claims infringed by Covered Software in the absence of
+    its Contributions.
+
+This License does not grant any rights in the trademarks, service marks,
+or logos of any Contributor (except as may be necessary to comply with
+the notice requirements in Section 3.4).
+
+2.4. Subsequent Licenses
+
+No Contributor makes additional grants as a result of Your choice to
+distribute the Covered Software under a subsequent version of this
+License (see Section 10.2) or under the terms of a Secondary License (if
+permitted under the terms of Section 3.3).
+
+2.5. Representation
+
+Each Contributor represents that the Contributor believes its
+Contributions are its original creation(s) or it has sufficient rights
+to grant the rights to its Contributions conveyed by this License.
+
+2.6. Fair Use
+
+This License is not intended to limit any rights You have under
+applicable copyright doctrines of fair use, fair dealing, or other
+equivalents.
+
+2.7. Conditions
+
+Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
+in Section 2.1.
+
+3. Responsibilities
+-------------------
+
+3.1. Distribution of Source Form
+
+All distribution of Covered Software in Source Code Form, including any
+Modifications that You create or to which You contribute, must be under
+the terms of this License. You must inform recipients that the Source
+Code Form of the Covered Software is governed by the terms of this
+License, and how they can obtain a copy of this License. You may not
+attempt to alter or restrict the recipients' rights in the Source Code
+Form.
+
+3.2. Distribution of Executable Form
+
+If You distribute Covered Software in Executable Form then:
+
+(a) such Covered Software must also be made available in Source Code
+    Form, as described in Section 3.1, and You must inform recipients of
+    the Executable Form how they can obtain a copy of such Source Code
+    Form by reasonable means in a timely manner, at a charge no more
+    than the cost of distribution to the recipient; and
+
+(b) You may distribute such Executable Form under the terms of this
+    License, or sublicense it under different terms, provided that the
+    license for the Executable Form does not attempt to limit or alter
+    the recipients' rights in the Source Code Form under this License.
+
+3.3. Distribution of a Larger Work
+
+You may create and distribute a Larger Work under terms of Your choice,
+provided that You also comply with the requirements of this License for
+the Covered Software. If the Larger Work is a combination of Covered
+Software with a work governed by one or more Secondary Licenses, and the
+Covered Software is not Incompatible With Secondary Licenses, this
+License permits You to additionally distribute such Covered Software
+under the terms of such Secondary License(s), so that the recipient of
+the Larger Work may, at their option, further distribute the Covered
+Software under the terms of either this License or such Secondary
+License(s).
+
+3.4. Notices
+
+You may not remove or alter the substance of any license notices
+(including copyright notices, patent notices, disclaimers of warranty,
+or limitations of liability) contained within the Source Code Form of
+the Covered Software, except that You may alter any license notices to
+the extent required to remedy known factual inaccuracies.
+
+3.5. Application of Additional Terms
+
+You may choose to offer, and to charge a fee for, warranty, support,
+indemnity or liability obligations to one or more recipients of Covered
+Software. However, You may do so only on Your own behalf, and not on
+behalf of any Contributor. You must make it absolutely clear that any
+such warranty, support, indemnity, or liability obligation is offered by
+You alone, and You hereby agree to indemnify every Contributor for any
+liability incurred by such Contributor as a result of warranty, support,
+indemnity or liability terms You offer. You may include additional
+disclaimers of warranty and limitations of liability specific to any
+jurisdiction.
+
+4. Inability to Comply Due to Statute or Regulation
+---------------------------------------------------
+
+If it is impossible for You to comply with any of the terms of this
+License with respect to some or all of the Covered Software due to
+statute, judicial order, or regulation then You must: (a) comply with
+the terms of this License to the maximum extent possible; and (b)
+describe the limitations and the code they affect. Such description must
+be placed in a text file included with all distributions of the Covered
+Software under this License. Except to the extent prohibited by statute
+or regulation, such description must be sufficiently detailed for a
+recipient of ordinary skill to be able to understand it.
+
+5. Termination
+--------------
+
+5.1. The rights granted under this License will terminate automatically
+if You fail to comply with any of its terms. However, if You become
+compliant, then the rights granted under this License from a particular
+Contributor are reinstated (a) provisionally, unless and until such
+Contributor explicitly and finally terminates Your grants, and (b) on an
+ongoing basis, if such Contributor fails to notify You of the
+non-compliance by some reasonable means prior to 60 days after You have
+come back into compliance. Moreover, Your grants from a particular
+Contributor are reinstated on an ongoing basis if such Contributor
+notifies You of the non-compliance by some reasonable means, this is the
+first time You have received notice of non-compliance with this License
+from such Contributor, and You become compliant prior to 30 days after
+Your receipt of the notice.
+
+5.2. If You initiate litigation against any entity by asserting a patent
+infringement claim (excluding declaratory judgment actions,
+counter-claims, and cross-claims) alleging that a Contributor Version
+directly or indirectly infringes any patent, then the rights granted to
+You by any and all Contributors for the Covered Software under Section
+2.1 of this License shall terminate.
+
+5.3. In the event of termination under Sections 5.1 or 5.2 above, all
+end user license agreements (excluding distributors and resellers) which
+have been validly granted by You or Your distributors under this License
+prior to termination shall survive termination.
+
+************************************************************************
+*                                                                      *
+*  6. Disclaimer of Warranty                                           *
+*  -------------------------                                           *
+*                                                                      *
+*  Covered Software is provided under this License on an "as is"       *
+*  basis, without warranty of any kind, either expressed, implied, or  *
+*  statutory, including, without limitation, warranties that the       *
+*  Covered Software is free of defects, merchantable, fit for a        *
+*  particular purpose or non-infringing. The entire risk as to the     *
+*  quality and performance of the Covered Software is with You.        *
+*  Should any Covered Software prove defective in any respect, You     *
+*  (not any Contributor) assume the cost of any necessary servicing,   *
+*  repair, or correction. This disclaimer of warranty constitutes an   *
+*  essential part of this License. No use of any Covered Software is   *
+*  authorized under this License except under this disclaimer.         *
+*                                                                      *
+************************************************************************
+
+************************************************************************
+*                                                                      *
+*  7. Limitation of Liability                                          *
+*  --------------------------                                          *
+*                                                                      *
+*  Under no circumstances and under no legal theory, whether tort      *
+*  (including negligence), contract, or otherwise, shall any           *
+*  Contributor, or anyone who distributes Covered Software as          *
+*  permitted above, be liable to You for any direct, indirect,         *
+*  special, incidental, or consequential damages of any character      *
+*  including, without limitation, damages for lost profits, loss of    *
+*  goodwill, work stoppage, computer failure or malfunction, or any    *
+*  and all other commercial damages or losses, even if such party      *
+*  shall have been informed of the possibility of such damages. This   *
+*  limitation of liability shall not apply to liability for death or   *
+*  personal injury resulting from such party's negligence to the       *
+*  extent applicable law prohibits such limitation. Some               *
+*  jurisdictions do not allow the exclusion or limitation of           *
+*  incidental or consequential damages, so this exclusion and          *
+*  limitation may not apply to You.                                    *
+*                                                                      *
+************************************************************************
+
+8. Litigation
+-------------
+
+Any litigation relating to this License may be brought only in the
+courts of a jurisdiction where the defendant maintains its principal
+place of business and such litigation shall be governed by laws of that
+jurisdiction, without reference to its conflict-of-law provisions.
+Nothing in this Section shall prevent a party's ability to bring
+cross-claims or counter-claims.
+
+9. Miscellaneous
+----------------
+
+This License represents the complete agreement concerning the subject
+matter hereof. If any provision of this License is held to be
+unenforceable, such provision shall be reformed only to the extent
+necessary to make it enforceable. Any law or regulation which provides
+that the language of a contract shall be construed against the drafter
+shall not be used to construe this License against a Contributor.
+
+10. Versions of the License
+---------------------------
+
+10.1. New Versions
+
+Mozilla Foundation is the license steward. Except as provided in Section
+10.3, no one other than the license steward has the right to modify or
+publish new versions of this License. Each version will be given a
+distinguishing version number.
+
+10.2. Effect of New Versions
+
+You may distribute the Covered Software under the terms of the version
+of the License under which You originally received the Covered Software,
+or under the terms of any subsequent version published by the license
+steward.
+
+10.3. Modified Versions
+
+If you create software not governed by this License, and you want to
+create a new license for such software, you may create and use a
+modified version of this License if you rename the license and remove
+any references to the name of the license steward (except to note that
+such modified license differs from this License).
+
+10.4. Distributing Source Code Form that is Incompatible With Secondary
+Licenses
+
+If You choose to distribute Source Code Form that is Incompatible With
+Secondary Licenses under the terms of this version of the License, the
+notice described in Exhibit B of this License must be attached.
+
+Exhibit A - Source Code Form License Notice
+-------------------------------------------
+
+  This Source Code Form is subject to the terms of the Mozilla Public
+  License, v. 2.0. If a copy of the MPL was not distributed with this
+  file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+If it is not possible or desirable to put the notice in a particular
+file, then You may include the notice in a location (such as a LICENSE
+file in a relevant directory) where a recipient would be likely to look
+for such a notice.
+
+You may add additional accurate notices of copyright ownership.
+
+Exhibit B - "Incompatible With Secondary Licenses" Notice
+---------------------------------------------------------
+
+  This Source Code Form is "Incompatible With Secondary Licenses", as
+  defined by the Mozilla Public License, v. 2.0.
+
+--- end of LICENSE ---
+
+-------------------------------------------------------------------------------
+
 %% This notice is provided with respect to PC/SC Lite for Suse Linux v.1.1.1,
-which is included with JRE 7, JDK 7, and OpenJDK 7 on Linux and Solaris.
+which may be included with JRE 8, JDK 8, and OpenJDK 8 on Linux and Solaris.
 
 --- begin of LICENSE ---
 
@@ -1257,8 +1903,30 @@
 
 -------------------------------------------------------------------------------
 
+%% This notice is provided with respect to PorterStemmer v4, which may be 
+included with JRE 8, JDK 8, and OpenJDK 8.
+
+--- begin of LICENSE ---
+
+See: http://tartarus.org/~martin/PorterStemmer
+
+The software is completely free for any purpose, unless notes at the head of
+the program text indicates otherwise (which is rare). In any case, the notes
+about licensing are never more restrictive than the BSD License.
+
+In every case where the software is not written by me (Martin Porter), this
+licensing arrangement has been endorsed by the contributor, and it is
+therefore unnecessary to ask the contributor again to confirm it.
+
+I have not asked any contributors (or their employers, if they have them) for
+proofs that they have the right to distribute their software in this way.
+
+--- end of LICENSE ---
+
+-------------------------------------------------------------------------------
+
 %% This notice is provided with respect to Relax NG Object/Parser v.20050510,
-which is included with JRE 7, JDK 7, and OpenJDK 7.
+which may be included with JRE 8, JDK 8, and OpenJDK 8.
 
 --- begin of LICENSE ---
 
@@ -1285,8 +1953,8 @@
 
 -------------------------------------------------------------------------------
 
-%% This notice is provided with respect to RelaxNGCC v1.12, which is 
-included with JRE 7, JDK 7, and OpenJDK 7.
+%% This notice is provided with respect to RelaxNGCC v1.12, which may be 
+included with JRE 8, JDK 8, and OpenJDK 8.
 
 --- begin of LICENSE ---
 
@@ -1335,487 +2003,8 @@
 
 -------------------------------------------------------------------------------
 
-%% This notice is provided with respect to Mozilla Rhino v1.7R3, which 
-is included with JRE 7, JDK 7, and OpenJDK 7
-
---- begin of LICENSE ---
-
-                          MOZILLA PUBLIC LICENSE
-                                Version 1.1
-
-                              ---------------
-
-1. Definitions.
-
-     1.0.1. "Commercial Use" means distribution or otherwise making the
-     Covered Code available to a third party.
-
-     1.1. "Contributor" means each entity that creates or contributes to
-     the creation of Modifications.
-
-     1.2. "Contributor Version" means the combination of the Original
-     Code, prior Modifications used by a Contributor, and the Modifications
-     made by that particular Contributor.
-
-     1.3. "Covered Code" means the Original Code or Modifications or the
-     combination of the Original Code and Modifications, in each case
-     including portions thereof.
-
-     1.4. "Electronic Distribution Mechanism" means a mechanism generally
-     accepted in the software development community for the electronic
-     transfer of data.
-
-     1.5. "Executable" means Covered Code in any form other than Source
-     Code.
-
-     1.6. "Initial Developer" means the individual or entity identified
-     as the Initial Developer in the Source Code notice required by Exhibit
-     A.
-
-     1.7. "Larger Work" means a work which combines Covered Code or
-     portions thereof with code not governed by the terms of this License.
-
-     1.8. "License" means this document.
-
-     1.8.1. "Licensable" means having the right to grant, to the maximum
-     extent possible, whether at the time of the initial grant or
-     subsequently acquired, any and all of the rights conveyed herein.
-
-     1.9. "Modifications" means any addition to or deletion from the
-     substance or structure of either the Original Code or any previous
-     Modifications. When Covered Code is released as a series of files, a
-     Modification is:
-          A. Any addition to or deletion from the contents of a file
-          containing Original Code or previous Modifications.
-
-          B. Any new file that contains any part of the Original Code or
-          previous Modifications.
-
-     1.10. "Original Code" means Source Code of computer software code
-     which is described in the Source Code notice required by Exhibit A as
-     Original Code, and which, at the time of its release under this
-     License is not already Covered Code governed by this License.
-
-     1.10.1. "Patent Claims" means any patent claim(s), now owned or
-     hereafter acquired, including without limitation,  method, process,
-     and apparatus claims, in any patent Licensable by grantor.
-
-     1.11. "Source Code" means the preferred form of the Covered Code for
-     making modifications to it, including all modules it contains, plus
-     any associated interface definition files, scripts used to control
-     compilation and installation of an Executable, or source code
-     differential comparisons against either the Original Code or another
-     well known, available Covered Code of the Contributor's choice. The
-     Source Code can be in a compressed or archival form, provided the
-     appropriate decompression or de-archiving software is widely available
-     for no charge.
-
-     1.12. "You" (or "Your")  means an individual or a legal entity
-     exercising rights under, and complying with all of the terms of, this
-     License or a future version of this License issued under Section 6.1.
-     For legal entities, "You" includes any entity which controls, is
-     controlled by, or is under common control with You. For purposes of
-     this definition, "control" means (a) the power, direct or indirect,
-     to cause the direction or management of such entity, whether by
-     contract or otherwise, or (b) ownership of more than fifty percent
-     (50%) of the outstanding shares or beneficial ownership of such
-     entity.
-
-2. Source Code License.
-
-     2.1. The Initial Developer Grant.
-     The Initial Developer hereby grants You a world-wide, royalty-free,
-     non-exclusive license, subject to third party intellectual property
-     claims:
-          (a)  under intellectual property rights (other than patent or
-          trademark) Licensable by Initial Developer to use, reproduce,
-          modify, display, perform, sublicense and distribute the Original
-          Code (or portions thereof) with or without Modifications, and/or
-          as part of a Larger Work; and
-
-          (b) under Patents Claims infringed by the making, using or
-          selling of Original Code, to make, have made, use, practice,
-          sell, and offer for sale, and/or otherwise dispose of the
-          Original Code (or portions thereof).
-
-          (c) the licenses granted in this Section 2.1(a) and (b) are
-          effective on the date Initial Developer first distributes
-          Original Code under the terms of this License.
-
-          (d) Notwithstanding Section 2.1(b) above, no patent license is
-          granted: 1) for code that You delete from the Original Code; 2)
-          separate from the Original Code;  or 3) for infringements caused
-          by: i) the modification of the Original Code or ii) the
-          combination of the Original Code with other software or devices.
-
-     2.2. Contributor Grant.
-     Subject to third party intellectual property claims, each Contributor
-     hereby grants You a world-wide, royalty-free, non-exclusive license
-
-          (a)  under intellectual property rights (other than patent or
-          trademark) Licensable by Contributor, to use, reproduce, modify,
-          display, perform, sublicense and distribute the Modifications
-          created by such Contributor (or portions thereof) either on an
-          unmodified basis, with other Modifications, as Covered Code
-          and/or as part of a Larger Work; and
-
-          (b) under Patent Claims infringed by the making, using, or
-          selling of  Modifications made by that Contributor either alone
-          and/or in combination with its Contributor Version (or portions
-          of such combination), to make, use, sell, offer for sale, have
-          made, and/or otherwise dispose of: 1) Modifications made by that
-          Contributor (or portions thereof); and 2) the combination of
-          Modifications made by that Contributor with its Contributor
-          Version (or portions of such combination).
-
-          (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
-          effective on the date Contributor first makes Commercial Use of
-          the Covered Code.
-
-          (d)    Notwithstanding Section 2.2(b) above, no patent license is
-          granted: 1) for any code that Contributor has deleted from the
-          Contributor Version; 2)  separate from the Contributor Version;
-          3)  for infringements caused by: i) third party modifications of
-          Contributor Version or ii)  the combination of Modifications made
-          by that Contributor with other software  (except as part of the
-          Contributor Version) or other devices; or 4) under Patent Claims
-          infringed by Covered Code in the absence of Modifications made by
-          that Contributor.
-
-3. Distribution Obligations.
-
-     3.1. Application of License.
-     The Modifications which You create or to which You contribute are
-     governed by the terms of this License, including without limitation
-     Section 2.2. The Source Code version of Covered Code may be
-     distributed only under the terms of this License or a future version
-     of this License released under Section 6.1, and You must include a
-     copy of this License with every copy of the Source Code You
-     distribute. You may not offer or impose any terms on any Source Code
-     version that alters or restricts the applicable version of this
-     License or the recipients' rights hereunder. However, You may include
-     an additional document offering the additional rights described in
-     Section 3.5.
-
-     3.2. Availability of Source Code.
-     Any Modification which You create or to which You contribute must be
-     made available in Source Code form under the terms of this License
-     either on the same media as an Executable version or via an accepted
-     Electronic Distribution Mechanism to anyone to whom you made an
-     Executable version available; and if made available via Electronic
-     Distribution Mechanism, must remain available for at least twelve (12)
-     months after the date it initially became available, or at least six
-     (6) months after a subsequent version of that particular Modification
-     has been made available to such recipients. You are responsible for
-     ensuring that the Source Code version remains available even if the
-     Electronic Distribution Mechanism is maintained by a third party.
-
-     3.3. Description of Modifications.
-     You must cause all Covered Code to which You contribute to contain a
-     file documenting the changes You made to create that Covered Code and
-     the date of any change. You must include a prominent statement that
-     the Modification is derived, directly or indirectly, from Original
-     Code provided by the Initial Developer and including the name of the
-     Initial Developer in (a) the Source Code, and (b) in any notice in an
-     Executable version or related documentation in which You describe the
-     origin or ownership of the Covered Code.
-
-     3.4. Intellectual Property Matters
-          (a) Third Party Claims.
-          If Contributor has knowledge that a license under a third party's
-          intellectual property rights is required to exercise the rights
-          granted by such Contributor under Sections 2.1 or 2.2,
-          Contributor must include a text file with the Source Code
-          distribution titled "LEGAL" which describes the claim and the
-          party making the claim in sufficient detail that a recipient will
-          know whom to contact. If Contributor obtains such knowledge after
-          the Modification is made available as described in Section 3.2,
-          Contributor shall promptly modify the LEGAL file in all copies
-          Contributor makes available thereafter and shall take other steps
-          (such as notifying appropriate mailing lists or newsgroups)
-          reasonably calculated to inform those who received the Covered
-          Code that new knowledge has been obtained.
-
-          (b) Contributor APIs.
-          If Contributor's Modifications include an application programming
-          interface and Contributor has knowledge of patent licenses which
-          are reasonably necessary to implement that API, Contributor must
-          also include this information in the LEGAL file.
-
-               (c)    Representations.
-          Contributor represents that, except as disclosed pursuant to
-          Section 3.4(a) above, Contributor believes that Contributor's
-          Modifications are Contributor's original creation(s) and/or
-          Contributor has sufficient rights to grant the rights conveyed by
-          this License.
-
-     3.5. Required Notices.
-     You must duplicate the notice in Exhibit A in each file of the Source
-     Code.  If it is not possible to put such notice in a particular Source
-     Code file due to its structure, then You must include such notice in a
-     location (such as a relevant directory) where a user would be likely
-     to look for such a notice.  If You created one or more Modification(s)
-     You may add your name as a Contributor to the notice described in
-     Exhibit A.  You must also duplicate this License in any documentation
-     for the Source Code where You describe recipients' rights or ownership
-     rights relating to Covered Code.  You may choose to offer, and to
-     charge a fee for, warranty, support, indemnity or liability
-     obligations to one or more recipients of Covered Code. However, You
-     may do so only on Your own behalf, and not on behalf of the Initial
-     Developer or any Contributor. You must make it absolutely clear than
-     any such warranty, support, indemnity or liability obligation is
-     offered by You alone, and You hereby agree to indemnify the Initial
-     Developer and every Contributor for any liability incurred by the
-     Initial Developer or such Contributor as a result of warranty,
-     support, indemnity or liability terms You offer.
-
-     3.6. Distribution of Executable Versions.
-     You may distribute Covered Code in Executable form only if the
-     requirements of Section 3.1-3.5 have been met for that Covered Code,
-     and if You include a notice stating that the Source Code version of
-     the Covered Code is available under the terms of this License,
-     including a description of how and where You have fulfilled the
-     obligations of Section 3.2. The notice must be conspicuously included
-     in any notice in an Executable version, related documentation or
-     collateral in which You describe recipients' rights relating to the
-     Covered Code. You may distribute the Executable version of Covered
-     Code or ownership rights under a license of Your choice, which may
-     contain terms different from this License, provided that You are in
-     compliance with the terms of this License and that the license for the
-     Executable version does not attempt to limit or alter the recipient's
-     rights in the Source Code version from the rights set forth in this
-     License. If You distribute the Executable version under a different
-     license You must make it absolutely clear that any terms which differ
-     from this License are offered by You alone, not by the Initial
-     Developer or any Contributor. You hereby agree to indemnify the
-     Initial Developer and every Contributor for any liability incurred by
-     the Initial Developer or such Contributor as a result of any such
-     terms You offer.
-
-     3.7. Larger Works.
-     You may create a Larger Work by combining Covered Code with other code
-     not governed by the terms of this License and distribute the Larger
-     Work as a single product. In such a case, You must make sure the
-     requirements of this License are fulfilled for the Covered Code.
-
-4. Inability to Comply Due to Statute or Regulation.
-
-     If it is impossible for You to comply with any of the terms of this
-     License with respect to some or all of the Covered Code due to
-     statute, judicial order, or regulation then You must: (a) comply with
-     the terms of this License to the maximum extent possible; and (b)
-     describe the limitations and the code they affect. Such description
-     must be included in the LEGAL file described in Section 3.4 and must
-     be included with all distributions of the Source Code. Except to the
-     extent prohibited by statute or regulation, such description must be
-     sufficiently detailed for a recipient of ordinary skill to be able to
-     understand it.
-
-5. Application of this License.
-
-     This License applies to code to which the Initial Developer has
-     attached the notice in Exhibit A and to related Covered Code.
-
-6. Versions of the License.
-
-     6.1. New Versions.
-     Netscape Communications Corporation ("Netscape") may publish revised
-     and/or new versions of the License from time to time. Each version
-     will be given a distinguishing version number.
-
-     6.2. Effect of New Versions.
-     Once Covered Code has been published under a particular version of the
-     License, You may always continue to use it under the terms of that
-     version. You may also choose to use such Covered Code under the terms
-     of any subsequent version of the License published by Netscape. No one
-     other than Netscape has the right to modify the terms applicable to
-     Covered Code created under this License.
-
-     6.3. Derivative Works.
-     If You create or use a modified version of this License (which you may
-     only do in order to apply it to code which is not already Covered Code
-     governed by this License), You must (a) rename Your license so that
-     the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
-     "MPL", "NPL" or any confusingly similar phrase do not appear in your
-     license (except to note that your license differs from this License)
-     and (b) otherwise make it clear that Your version of the license
-     contains terms which differ from the Mozilla Public License and
-     Netscape Public License. (Filling in the name of the Initial
-     Developer, Original Code or Contributor in the notice described in
-     Exhibit A shall not of themselves be deemed to be modifications of
-     this License.)
-
-7. DISCLAIMER OF WARRANTY.
-
-     COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
-     WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
-     WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
-     DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
-     THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
-     IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
-     YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
-     COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
-     OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
-     ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-8. TERMINATION.
-
-     8.1.  This License and the rights granted hereunder will terminate
-     automatically if You fail to comply with terms herein and fail to cure
-     such breach within 30 days of becoming aware of the breach. All
-     sublicenses to the Covered Code which are properly granted shall
-     survive any termination of this License. Provisions which, by their
-     nature, must remain in effect beyond the termination of this License
-     shall survive.
-
-     8.2.  If You initiate litigation by asserting a patent infringement
-     claim (excluding declatory judgment actions) against Initial Developer
-     or a Contributor (the Initial Developer or Contributor against whom
-     You file such action is referred to as "Participant")  alleging that:
-
-     (a)  such Participant's Contributor Version directly or indirectly
-     infringes any patent, then any and all rights granted by such
-     Participant to You under Sections 2.1 and/or 2.2 of this License
-     shall, upon 60 days notice from Participant terminate prospectively,
-     unless if within 60 days after receipt of notice You either: (i)
-     agree in writing to pay Participant a mutually agreeable reasonable
-     royalty for Your past and future use of Modifications made by such
-     Participant, or (ii) withdraw Your litigation claim with respect to
-     the Contributor Version against such Participant.  If within 60 days
-     of notice, a reasonable royalty and payment arrangement are not
-     mutually agreed upon in writing by the parties or the litigation claim
-     is not withdrawn, the rights granted by Participant to You under
-     Sections 2.1 and/or 2.2 automatically terminate at the expiration of
-     the 60 day notice period specified above.
-
-     (b)  any software, hardware, or device, other than such Participant's
-     Contributor Version, directly or indirectly infringes any patent, then
-     any rights granted to You by such Participant under Sections 2.1(b)
-     and 2.2(b) are revoked effective as of the date You first made, used,
-     sold, distributed, or had made, Modifications made by that
-     Participant.
-
-     8.3.  If You assert a patent infringement claim against Participant
-     alleging that such Participant's Contributor Version directly or
-     indirectly infringes any patent where such claim is resolved (such as
-     by license or settlement) prior to the initiation of patent
-     infringement litigation, then the reasonable value of the licenses
-     granted by such Participant under Sections 2.1 or 2.2 shall be taken
-     into account in determining the amount or value of any payment or
-     license.
-
-     8.4.  In the event of termination under Sections 8.1 or 8.2 above,
-     all end user license agreements (excluding distributors and resellers)
-     which have been validly granted by You or any distributor hereunder
-     prior to termination shall survive termination.
-
-9. LIMITATION OF LIABILITY.
-
-     UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
-     (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
-     DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
-     OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
-     ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
-     CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
-     WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
-     COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
-     INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
-     LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
-     RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
-     PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
-     EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
-     THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
-
-10. U.S. GOVERNMENT END USERS.
-
-     The Covered Code is a "commercial item," as that term is defined in
-     48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
-     software" and "commercial computer software documentation," as such
-     terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
-     C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
-     all U.S. Government End Users acquire Covered Code with only those
-     rights set forth herein.
-
-11. MISCELLANEOUS.
-
-     This License represents the complete agreement concerning subject
-     matter hereof. If any provision of this License is held to be
-     unenforceable, such provision shall be reformed only to the extent
-     necessary to make it enforceable. This License shall be governed by
-     California law provisions (except to the extent applicable law, if
-     any, provides otherwise), excluding its conflict-of-law provisions.
-     With respect to disputes in which at least one party is a citizen of,
-     or an entity chartered or registered to do business in the United
-     States of America, any litigation relating to this License shall be
-     subject to the jurisdiction of the Federal Courts of the Northern
-     District of California, with venue lying in Santa Clara County,
-     California, with the losing party responsible for costs, including
-     without limitation, court costs and reasonable attorneys' fees and
-     expenses. The application of the United Nations Convention on
-     Contracts for the International Sale of Goods is expressly excluded.
-     Any law or regulation which provides that the language of a contract
-     shall be construed against the drafter shall not apply to this
-     License.
-
-12. RESPONSIBILITY FOR CLAIMS.
-
-     As between Initial Developer and the Contributors, each party is
-     responsible for claims and damages arising, directly or indirectly,
-     out of its utilization of rights under this License and You agree to
-     work with Initial Developer and Contributors to distribute such
-     responsibility on an equitable basis. Nothing herein is intended or
-     shall be deemed to constitute any admission of liability.
-
-13. MULTIPLE-LICENSED CODE.
-
-     Initial Developer may designate portions of the Covered Code as
-     "Multiple-Licensed".  "Multiple-Licensed" means that the Initial
-     Developer permits you to utilize portions of the Covered Code under
-     Your choice of the NPL or the alternative licenses, if any, specified
-     by the Initial Developer in the file described in Exhibit A.
-
-EXHIBIT A - Mozilla Public License.
-
-     ``The contents of this file are subject to the Mozilla Public License
-     Version 1.1 (the "License"); you may not use this file except in
-     compliance with the License. You may obtain a copy of the License at
-     http://www.mozilla.org/MPL/
-
-     Software distributed under the License is distributed on an "AS IS"
-     basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-     License for the specific language governing rights and limitations
-     under the License.
-
-     The Original Code is ______________________________________.
-
-     The Initial Developer of the Original Code is ________________________.
-     Portions created by ______________________ are Copyright (C) ______
-     _______________________. All Rights Reserved.
-
-     Contributor(s): ______________________________________.
-
-     Alternatively, the contents of this file may be used under the terms
-     of the _____ license (the  "[___] License"), in which case the
-     provisions of [______] License are applicable instead of those
-     above.  If you wish to allow use of your version of this file only
-     under the terms of the [____] License and not to allow others to use
-     your version of this file under the MPL, indicate your decision by
-     deleting  the provisions above and replace  them with the notice and
-     other provisions required by the [___] License.  If you do not delete
-     the provisions above, a recipient may use your version of this file
-     under either the MPL or the [___] License."
-
-     [NOTE: The text of this Exhibit A may differ slightly from the text of
-     the notices in the Source Code files of the Original Code. You should
-     use the text of this Exhibit A rather than the text found in the
-     Original Code Source Code for Your Modifications.]
-
---- end of LICENSE ---
-
--------------------------------------------------------------------------------
-
-%% This notice is provided with respect to SAX 2.0.1, which is included 
-with JRE 7, JDK 7, and OpenJDK 7.
+%% This notice is provided with respect to SAX 2.0.1, which may be included 
+with JRE 8, JDK 8, and OpenJDK 8.
 
 --- begin of LICENSE ---
 
@@ -1876,8 +2065,8 @@
 
 -------------------------------------------------------------------------------
 
-%% This notice is provided with respect to SoftFloat version 2b, which is 
-included with JRE 7, JDK 7, and OpenJDK 7 on Linux/ARM.
+%% This notice is provided with respect to SoftFloat version 2b, which may be 
+included with JRE 8, JDK 8, and OpenJDK 8 on Linux/ARM.
 
 --- begin of LICENSE ---
 
@@ -1909,12 +2098,41 @@
 
 -------------------------------------------------------------------------------
 
+%% This notice is provided with respect to Sparkle 1.5,
+which may be included with JRE 8 on Mac OS X.
+
+--- begin of LICENSE ---
+
+Copyright (c) 2012 Sparkle.org and Andy Matuschak
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+--- end of LICENSE ---
+
+-------------------------------------------------------------------------------
+
 %% Portions licensed from Taligent, Inc.
 
 -------------------------------------------------------------------------------
 
-%% This notice is provided with respect to Thai Dictionary, which is 
-included with JRE 7, JDK 7, and OpenJDK 7.
+%% This notice is provided with respect to Thai Dictionary, which may be 
+included with JRE 8, JDK 8, and OpenJDK 8.
 
 --- begin of LICENSE ---
 
@@ -1947,8 +2165,8 @@
 
 -------------------------------------------------------------------------------
 
-%% This notice is provided with respect to Unicode 6.0.0, CLDR v1.4.1, & CLDR
-v1.9, which is included with JRE 7, JDK 7, and OpenJDK 7.
+%% This notice is provided with respect to Unicode 6.2.0 & CLDR 21.0.1
+which may be included with JRE 8, JDK 8, and OpenJDK 8.
 
 --- begin of LICENSE ---
 
@@ -1959,7 +2177,7 @@
 Trademark Usage Policy.
 
 A. Unicode Copyright.
-   1. Copyright © 1991-2011 Unicode, Inc. All rights reserved.
+   1. Copyright © 1991-2013 Unicode, Inc. All rights reserved.
 
    2. Certain documents and files on this website contain a legend indicating
       that "Modification is permitted." Any person is hereby authorized,
@@ -2094,7 +2312,7 @@
 
 COPYRIGHT AND PERMISSION NOTICE
 
-Copyright © 1991-2011 Unicode, Inc. All rights reserved. Distributed under the
+Copyright © 1991-2012 Unicode, Inc. All rights reserved. Distributed under the
 Terms of Use in http://www.unicode.org/copyright.html.
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -2134,8 +2352,8 @@
 
 -------------------------------------------------------------------------------
 
-%% This notice is provided with respect to UPX v3.01, which is included 
-with JRE 7 on Windows.
+%% This notice is provided with respect to UPX v3.01, which may be included 
+with JRE 8 on Windows.
 
 --- begin of LICENSE ---
 
@@ -2274,7 +2492,7 @@
 -------------------------------------------------------------------------------
 
 %% This notice is provided with respect to Xfree86-VidMode Extension 1.0,
-which is included with JRE 7, JDK 7, and OpenJDK 7 on Linux and Solaris.
+which may be included with JRE 8, JDK 8, and OpenJDK 8 on Linux and Solaris.
 
 --- begin of LICENSE ---
 
@@ -2326,8 +2544,8 @@
 
 -------------------------------------------------------------------------------
 
-%% This notice is provided with respect to X Window System 6.8.2, which is 
-included with JRE 7, JDK 7, and OpenJDK 7 on Linux and Solaris.
+%% This notice is provided with respect to X Window System 6.8.2, which may be 
+included with JRE 8, JDK 8, and OpenJDK 8 on Linux and Solaris.
 
 --- begin of LICENSE ---
 
@@ -3131,12 +3349,12 @@
 
 -------------------------------------------------------------------------------
 
-%% This notice is provided with respect to zlib v1.2.3, which is included 
-with JRE 7, JDK 7, and OpenJDK 7
+%% This notice is provided with respect to zlib v1.2.5, which may be included 
+with JRE 8, JDK 8, and OpenJDK 8.
 
 --- begin of LICENSE ---
 
-  version 1.2.3, July 18th, 2005
+  version 1.2.5, July 18th, 2005
 
   Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler
 
@@ -3163,16 +3381,18 @@
 
 -------------------------------------------------------------------------------
 
-%% This notice is provided with respect to the following which is 
-included with JRE 7, JDK 7, and OpenJDK 7, except where noted:
-
-  Apache Derby 10.8.1.2        [included with JDK 7 only]
+%% This notice is provided with respect to the following which may be 
+included with JRE 8, JDK 8, and OpenJDK 8, except where noted:
+
+  Apache Commons Math 2.2
+  Apache Derby 10.10.1.2        [included with JDK 8]
   Apache Jakarta BCEL 5.2 
   Apache Jakarta Regexp 1.4 
-  Apache Santuario XMLSec-Java 1.4.2
+  Apache Santuario XML Security for Java 1.5.4
   Apache Xalan-Java 2.7.1 
-  Apache Xerces2 Java 2.10.0 
+  Apache Xerces Java 2.10.0 
   Apache XML Resolver 1.1 
+  Dynalink 0.5
 
 
 --- begin of LICENSE ---
--- a/langtools/src/share/classes/com/sun/javadoc/package-info.java	Fri Feb 21 11:40:51 2014 -0800
+++ b/langtools/src/share/classes/com/sun/javadoc/package-info.java	Mon Feb 24 13:06:07 2014 -0800
@@ -91,32 +91,32 @@
 <pre>
 import com.sun.javadoc.*;
 
-public class ListParams extends <font color=red title="Doclet API">Doclet</font> {
+public class ListParams extends <font style="color:red;">Doclet</font> {
 
-    public static boolean start(<font color=red title="Doclet API">RootDoc</font> root) {
-        <font color=red title="Doclet API">ClassDoc</font>[] classes = root.<font color=red title="Doclet API">classes</font>();
-        for (int i = 0; i < classes.length; ++i) {
-            <font color=red title="Doclet API">ClassDoc</font> cd = classes[i];
-            printMembers(cd.<font color=red title="Doclet API">constructors</font>());
-            printMembers(cd.<font color=red title="Doclet API">methods</font>());
+    public static boolean start(<font style="color:red;">RootDoc</font> root) {
+        <font style="color:red;">ClassDoc</font>[] classes = root.<font style="color:red;">classes</font>();
+        for (int i = 0; i &lt; classes.length; ++i) {
+            <font style="color:red;">ClassDoc</font> cd = classes[i];
+            printMembers(cd.<font style="color:red;">constructors</font>());
+            printMembers(cd.<font style="color:red;">methods</font>());
         }
         return true;
     }
 
-    static void printMembers(<font color=red title="Doclet API">ExecutableMemberDoc</font>[] mems) {
-        for (int i = 0; i < mems.length; ++i) {
-            <font color=red title="Doclet API">ParamTag</font>[] params = mems[i].<font color=red title="Doclet API">paramTags</font>();
-            System.out.println(mems[i].<font color=red title="Doclet API">qualifiedName</font>());
-            for (int j = 0; j < params.length; ++j) {
-                System.out.println("   " + params[j].<font color=red title="Doclet API">parameterName</font>()
-                    + " - " + params[j].<font color=red title="Doclet API">parameterComment</font>());
+    static void printMembers(<font style="color:red;">ExecutableMemberDoc</font>[] mems) {
+        for (int i = 0; i &lt; mems.length; ++i) {
+            <font style="color:red;">ParamTag</font>[] params = mems[i].<font style="color:red;">paramTags</font>();
+            System.out.println(mems[i].<font style="color:red;">qualifiedName</font>());
+            for (int j = 0; j &lt; params.length; ++j) {
+                System.out.println("   " + params[j].<font style="color:red;">parameterName</font>()
+                    + " - " + params[j].<font style="color:red;">parameterComment</font>());
             }
         }
     }
 }
 </pre>
 Interfaces and methods from the Javadoc API are marked in
-<font color=red title="Doclet API">red</font>.
+<font style="color:red;">red</font>.
 {@link com.sun.javadoc.Doclet Doclet} is an abstract class that specifies
 the invocation interface for doclets,
 {@link com.sun.javadoc.Doclet Doclet} holds class or interface information,
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Fri Feb 21 11:40:51 2014 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Mon Feb 24 13:06:07 2014 -0800
@@ -1713,9 +1713,13 @@
                     //might be missing '>' character because the href has an inline tag.
                     break;
                 }
-                if (textBuff.substring(begin, end).contains("\"")){
-                    begin = textBuff.indexOf("\"", begin) + 1;
-                    end = textBuff.indexOf("\"", begin +1);
+
+                String quote = textBuff.substring(begin, end);
+                quote = quote.contains("\"") ? "\"" :
+                        quote.contains("\'") ? "\'" : null;
+                if (quote != null) {
+                    begin = textBuff.indexOf(quote, begin) + 1;
+                    end = textBuff.indexOf(quote, begin +1);
                     if (begin == 0 || end == -1){
                         //Link is missing a quote.
                         break;
--- a/langtools/src/share/classes/com/sun/tools/javac/api/JavacTrees.java	Fri Feb 21 11:40:51 2014 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javac/api/JavacTrees.java	Mon Feb 24 13:06:07 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -269,20 +269,7 @@
     }
 
     public JCTree getTree(Element element) {
-        Symbol symbol = (Symbol) element;
-        TypeSymbol enclosing = symbol.enclClass();
-        Env<AttrContext> env = enter.getEnv(enclosing);
-        if (env == null)
-            return null;
-        JCClassDecl classNode = env.enclClass;
-        if (classNode != null) {
-            if (TreeInfo.symbolFor(classNode) == element)
-                return classNode;
-            for (JCTree node : classNode.getMembers())
-                if (TreeInfo.symbolFor(node) == element)
-                    return node;
-        }
-        return null;
+        return getTree(element, null);
     }
 
     public JCTree getTree(Element e, AnnotationMirror a) {
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Source.java	Fri Feb 21 11:40:51 2014 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Source.java	Mon Feb 24 13:06:07 2014 -0800
@@ -207,9 +207,6 @@
     public boolean allowDefaultMethods() {
         return compareTo(JDK1_8) >= 0;
     }
-    public boolean allowDefaultMethodsResolution() {
-        return compareTo(JDK1_7) >= 0;
-    }
     public boolean allowStaticInterfaceMethods() {
         return compareTo(JDK1_8) >= 0;
     }
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java	Fri Feb 21 11:40:51 2014 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java	Mon Feb 24 13:06:07 2014 -0800
@@ -1705,7 +1705,12 @@
 
         // Warn if a deprecated method overridden by a non-deprecated one.
         if (!isDeprecatedOverrideIgnorable(other, origin)) {
-            checkDeprecated(TreeInfo.diagnosticPositionFor(m, tree), m, other);
+            Lint prevLint = setLint(lint.augment(m));
+            try {
+                checkDeprecated(TreeInfo.diagnosticPositionFor(m, tree), m, other);
+            } finally {
+                setLint(prevLint);
+            }
         }
     }
     // where
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java	Fri Feb 21 11:40:51 2014 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java	Mon Feb 24 13:06:07 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -583,11 +583,17 @@
                     }
                 }
             }
+
+            @Override
+            boolean accepts(UndetVar uv, InferenceContext inferenceContext) {
+                return !uv.isCaptured() && uv.getBounds(InferenceBound.EQ).nonEmpty();
+            }
         },
         /**
          * Check consistency of equality constraints.
          */
         EQ_CHECK() {
+            @Override
             public void apply(UndetVar uv, InferenceContext inferenceContext, Warner warn) {
                 Infer infer = inferenceContext.infer();
                 for (Type e : uv.getBounds(InferenceBound.EQ)) {
@@ -604,6 +610,11 @@
                     }
                 }
             }
+
+            @Override
+            boolean accepts(UndetVar uv, InferenceContext inferenceContext) {
+                return !uv.isCaptured() && uv.getBounds(InferenceBound.EQ).nonEmpty();
+            }
         },
         /**
          * Given a bound set containing {@code alpha <: T} and {@code alpha :> S}
@@ -618,6 +629,13 @@
                     }
                 }
             }
+
+            @Override
+            boolean accepts(UndetVar uv, InferenceContext inferenceContext) {
+                return !uv.isCaptured() &&
+                        uv.getBounds(InferenceBound.UPPER).nonEmpty() &&
+                        uv.getBounds(InferenceBound.LOWER).nonEmpty();
+            }
         },
         /**
          * Given a bound set containing {@code alpha <: T} and {@code alpha == S}
@@ -632,6 +650,13 @@
                     }
                 }
             }
+
+            @Override
+            boolean accepts(UndetVar uv, InferenceContext inferenceContext) {
+                return !uv.isCaptured() &&
+                        uv.getBounds(InferenceBound.EQ).nonEmpty() &&
+                        uv.getBounds(InferenceBound.UPPER).nonEmpty();
+            }
         },
         /**
          * Given a bound set containing {@code alpha :> S} and {@code alpha == T}
@@ -646,6 +671,13 @@
                     }
                 }
             }
+
+            @Override
+            boolean accepts(UndetVar uv, InferenceContext inferenceContext) {
+                return !uv.isCaptured() &&
+                        uv.getBounds(InferenceBound.EQ).nonEmpty() &&
+                        uv.getBounds(InferenceBound.LOWER).nonEmpty();
+            }
         },
         /**
          * Given a bound set containing {@code alpha == S} and {@code alpha == T}
@@ -662,6 +694,12 @@
                     }
                 }
             }
+
+            @Override
+            boolean accepts(UndetVar uv, InferenceContext inferenceContext) {
+                return !uv.isCaptured() &&
+                        uv.getBounds(InferenceBound.EQ).nonEmpty();
+            }
         },
         /**
          * Given a bound set containing {@code alpha <: beta} propagate lower bounds
@@ -688,6 +726,12 @@
                     }
                 }
             }
+
+            @Override
+            boolean accepts(UndetVar uv, InferenceContext inferenceContext) {
+                return !uv.isCaptured() &&
+                        uv.getBounds(InferenceBound.UPPER).nonEmpty();
+            }
         },
         /**
          * Given a bound set containing {@code alpha :> beta} propagate lower bounds
@@ -714,6 +758,12 @@
                     }
                 }
             }
+
+            @Override
+            boolean accepts(UndetVar uv, InferenceContext inferenceContext) {
+                return !uv.isCaptured() &&
+                        uv.getBounds(InferenceBound.LOWER).nonEmpty();
+            }
         },
         /**
          * Given a bound set containing {@code alpha == beta} propagate lower/upper
@@ -748,6 +798,12 @@
                     }
                 }
             }
+
+            @Override
+            boolean accepts(UndetVar uv, InferenceContext inferenceContext) {
+                return !uv.isCaptured() &&
+                        uv.getBounds(InferenceBound.EQ).nonEmpty();
+            }
         };
 
         abstract void apply(UndetVar uv, InferenceContext inferenceContext, Warner warn);
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java	Fri Feb 21 11:40:51 2014 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java	Mon Feb 24 13:06:07 2014 -0800
@@ -91,10 +91,9 @@
     TreeInfo treeinfo;
     Types types;
     JCDiagnostic.Factory diags;
-    public final boolean boxingEnabled; // = source.allowBoxing();
-    public final boolean varargsEnabled; // = source.allowVarargs();
+    public final boolean boxingEnabled;
+    public final boolean varargsEnabled;
     public final boolean allowMethodHandles;
-    public final boolean allowDefaultMethodsResolution;
     public final boolean allowStructuralMostSpecific;
     private final boolean debugResolve;
     private final boolean compactMethodDiags;
@@ -136,7 +135,6 @@
         verboseResolutionMode = VerboseResolutionMode.getVerboseResolutionMode(options);
         Target target = Target.instance(context);
         allowMethodHandles = target.hasMethodHandles();
-        allowDefaultMethodsResolution = source.allowDefaultMethodsResolution();
         allowStructuralMostSpecific = source.allowStructuralMostSpecific();
         polymorphicSignatureScope = new Scope(syms.noSymbol);
 
@@ -1680,7 +1678,6 @@
                 bestSoFar : methodNotFound;
 
         for (InterfaceLookupPhase iphase2 : InterfaceLookupPhase.values()) {
-            if (iphase2 == InterfaceLookupPhase.DEFAULT_OK && !allowDefaultMethodsResolution) break;
             //keep searching for abstract methods
             for (Type itype : itypes[iphase2.ordinal()]) {
                 if (!itype.isInterface()) continue; //skip j.l.Object (included by Types.closure())
@@ -1713,10 +1710,8 @@
                 //from superinterfaces)
                 if ((s.flags() & (ABSTRACT | INTERFACE | ENUM)) != 0) {
                     return this;
-                } else if (rs.allowDefaultMethodsResolution) {
+                } else {
                     return DEFAULT_OK;
-                } else {
-                    return null;
                 }
             }
         },
@@ -3340,9 +3335,9 @@
             if ((env1.enclClass.sym.flags() & STATIC) != 0) staticOnly = true;
             env1 = env1.outer;
         }
-        if (allowDefaultMethodsResolution && c.isInterface() &&
-                name == names._super && !isStatic(env) &&
-                types.isDirectSuperInterface(c, env.enclClass.sym)) {
+        if (c.isInterface() &&
+            name == names._super && !isStatic(env) &&
+            types.isDirectSuperInterface(c, env.enclClass.sym)) {
             //this might be a default super call if one of the superinterfaces is 'c'
             for (Type t : pruneInterfaces(env.enclClass.type)) {
                 if (t.tsym == c) {
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Todo.java	Fri Feb 21 11:40:51 2014 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Todo.java	Mon Feb 24 13:06:07 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 package com.sun.tools.javac.comp;
 
 import java.util.AbstractQueue;
-import com.sun.tools.javac.util.Context;
+import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.LinkedList;
@@ -34,6 +34,8 @@
 import java.util.Queue;
 import javax.tools.JavaFileObject;
 
+import com.sun.tools.javac.util.Context;
+
 /** A queue of all as yet unattributed classes.
  *
  *  <p><b>This is NOT part of any supported API.
@@ -82,6 +84,22 @@
         }
     }
 
+    /**
+     * Removes all unattributed classes except those belonging to the given
+     * collection of files.
+     *
+     * @param sourceFiles The source files of the classes to keep.
+     */
+    public void retainFiles(Collection<? extends JavaFileObject> sourceFiles) {
+        for (Iterator<Env<AttrContext>> it = contents.iterator(); it.hasNext(); ) {
+            Env<AttrContext> env = it.next();
+            if (!sourceFiles.contains(env.toplevel.sourcefile)) {
+                if (contentsByFile != null) removeByFile(env);
+                it.remove();
+            }
+        }
+    }
+
     public Env<AttrContext> poll() {
         if (size() == 0)
             return null;
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/JNIWriter.java	Fri Feb 21 11:40:51 2014 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/JNIWriter.java	Mon Feb 24 13:06:07 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,30 +26,10 @@
 package com.sun.tools.javac.jvm;
 
 import java.io.IOException;
-import java.io.Writer;
+import java.io.PrintWriter;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
-import java.util.Stack;
-import java.util.StringTokenizer;
-
-import javax.lang.model.element.Element;
-import javax.lang.model.element.ExecutableElement;
-import javax.lang.model.element.Modifier;
-import javax.lang.model.element.Name;
-import javax.lang.model.element.TypeElement;
-import javax.lang.model.element.VariableElement;
-import javax.lang.model.type.ArrayType;
-import javax.lang.model.type.DeclaredType;
-import javax.lang.model.type.NoType;
-import javax.lang.model.type.PrimitiveType;
-import javax.lang.model.type.TypeKind;
-import javax.lang.model.type.TypeMirror;
-import javax.lang.model.type.TypeVariable;
-import javax.lang.model.type.TypeVisitor;
-import javax.lang.model.util.ElementFilter;
-import javax.lang.model.util.Elements;
-import javax.lang.model.util.SimpleTypeVisitor8;
-import javax.lang.model.util.Types;
 
 import javax.tools.FileObject;
 import javax.tools.JavaFileManager;
@@ -57,18 +37,22 @@
 
 import com.sun.tools.javac.code.Attribute;
 import com.sun.tools.javac.code.Flags;
-import com.sun.tools.javac.code.Kinds;
 import com.sun.tools.javac.code.Scope;
+import com.sun.tools.javac.code.Symbol;
 import com.sun.tools.javac.code.Symbol.ClassSymbol;
+import com.sun.tools.javac.code.Symbol.VarSymbol;
 import com.sun.tools.javac.code.Symtab;
+import com.sun.tools.javac.code.Type;
+import com.sun.tools.javac.code.Types;
 import com.sun.tools.javac.model.JavacElements;
-import com.sun.tools.javac.model.JavacTypes;
 import com.sun.tools.javac.util.Assert;
 import com.sun.tools.javac.util.Context;
 import com.sun.tools.javac.util.Log;
 import com.sun.tools.javac.util.Options;
+import com.sun.tools.javac.util.Pair;
 
 import static com.sun.tools.javac.main.Option.*;
+import static com.sun.tools.javac.code.Kinds.*;
 
 /** This class provides operations to write native header files for classes.
  *
@@ -83,8 +67,8 @@
     /** Access to files. */
     private final JavaFileManager fileManager;
 
-    JavacElements elements;
-    JavacTypes types;
+    Types      types;
+    Symtab     syms;
 
     /** The log to use for verbose output.
      */
@@ -98,15 +82,9 @@
      */
     private boolean checkAll;
 
-    private Mangle mangler;
-
     private Context context;
 
-    private Symtab syms;
-
-    private String lineSep;
-
-    private final boolean isWindows =
+    private static final boolean isWindows =
         System.getProperty("os.name").startsWith("Windows");
 
     /** Get the ClassWriter instance for this context. */
@@ -129,44 +107,58 @@
         checkAll = options.isSet("javah:full");
 
         this.context = context; // for lazyInit()
-        syms = Symtab.instance(context);
-
-        lineSep = System.getProperty("line.separator");
     }
 
     private void lazyInit() {
-        if (mangler == null) {
-            elements = JavacElements.instance(context);
-            types = JavacTypes.instance(context);
-            mangler = new Mangle(elements, types);
-        }
+        if (types == null)
+            types = Types.instance(context);
+        if (syms == null)
+            syms = Symtab.instance(context);
+
+    }
+
+    static boolean isSynthetic(Symbol s) {
+        return hasFlag(s, Flags.SYNTHETIC);
+    }
+    static boolean isStatic(Symbol s) {
+        return hasFlag(s, Flags.STATIC);
+    }
+    static boolean isFinal(Symbol s) {
+        return hasFlag(s, Flags.FINAL);
+    }
+    static boolean isNative(Symbol s) {
+        return hasFlag(s, Flags.NATIVE);
+    }
+    static private boolean hasFlag(Symbol m, int flag) {
+        return (m.flags() & flag) != 0;
     }
 
     public boolean needsHeader(ClassSymbol c) {
-        if (c.isLocal() || (c.flags() & Flags.SYNTHETIC) != 0)
+        lazyInit();
+        if (c.isLocal() || isSynthetic(c))
             return false;
-
-        if (checkAll)
-            return needsHeader(c.outermostClass(), true);
-        else
-            return needsHeader(c, false);
+        return (checkAll)
+                ? needsHeader(c.outermostClass(), true)
+                : needsHeader(c, false);
     }
 
     private boolean needsHeader(ClassSymbol c, boolean checkNestedClasses) {
-        if (c.isLocal() || (c.flags() & Flags.SYNTHETIC) != 0)
+        if (c.isLocal() || isSynthetic(c))
             return false;
 
         for (Scope.Entry i = c.members_field.elems; i != null; i = i.sibling) {
-            if (i.sym.kind == Kinds.MTH && (i.sym.flags() & Flags.NATIVE) != 0)
+            Symbol sym = i.sym;
+            if (sym.kind == MTH && isNative(sym))
                 return true;
-            for (Attribute.Compound a: i.sym.getDeclarationAttributes()) {
+            for (Attribute.Compound a: sym.getDeclarationAttributes()) {
                 if (a.type.tsym == syms.nativeHeaderType.tsym)
                     return true;
             }
         }
         if (checkNestedClasses) {
             for (Scope.Entry i = c.members_field.elems; i != null; i = i.sibling) {
-                if ((i.sym.kind == Kinds.TYP) && needsHeader(((ClassSymbol) i.sym), true))
+                Symbol sym = i.sym;
+                if ((sym.kind == TYP) && needsHeader(((ClassSymbol) sym), true))
                     return true;
             }
         }
@@ -176,14 +168,12 @@
     /** Emit a class file for a given class.
      *  @param c      The class from which a class file is generated.
      */
-    public FileObject write(ClassSymbol c)
-        throws IOException
-    {
+    public FileObject write(ClassSymbol c) throws IOException {
         String className = c.flatName().toString();
         FileObject outFile
             = fileManager.getFileForOutput(StandardLocation.NATIVE_HEADER_OUTPUT,
                 "", className.replaceAll("[.$]", "_") + ".h", null);
-        Writer out = outFile.openWriter();
+        PrintWriter out = new PrintWriter(outFile.openWriter());
         try {
             write(out, c);
             if (verbose)
@@ -201,201 +191,134 @@
         return outFile; // may be null if write failed
     }
 
-    public void write(Writer out, ClassSymbol sym)
-            throws IOException {
+    public void write(PrintWriter out, ClassSymbol sym) throws IOException {
         lazyInit();
         try {
-            String cname = mangler.mangle(sym.fullname, Mangle.Type.CLASS);
-            println(out, fileTop());
-            println(out, includes());
-            println(out, guardBegin(cname));
-            println(out, cppGuardBegin());
+            String cname = encode(sym.fullname, EncoderType.CLASS);
+            fileTop(out);
+            includes(out);
+            guardBegin(out, cname);
+            cppGuardBegin(out);
 
             writeStatics(out, sym);
             writeMethods(out, sym, cname);
 
-            println(out, cppGuardEnd());
-            println(out, guardEnd(cname));
+            cppGuardEnd(out);
+            guardEnd(out);
         } catch (TypeSignature.SignatureException e) {
             throw new IOException(e);
         }
     }
-
-    protected void writeStatics(Writer out, ClassSymbol sym) throws IOException {
-        List<VariableElement> classfields = getAllFields(sym);
-
-        for (VariableElement v: classfields) {
-            if (!v.getModifiers().contains(Modifier.STATIC))
-                continue;
-            String s = null;
-            s = defineForStatic(sym, v);
-            if (s != null) {
-                println(out, s);
+    protected void writeStatics(PrintWriter out, ClassSymbol sym) throws IOException {
+        List<ClassSymbol> clist = new ArrayList<>();
+        for (ClassSymbol cd = sym; cd != null;
+                cd = (ClassSymbol) cd.getSuperclass().tsym) {
+            clist.add(cd);
+        }
+        /*
+         * list needs to be super-class, base-class1, base-class2 and so on,
+         * so we reverse class hierarchy
+         */
+        Collections.reverse(clist);
+        for (ClassSymbol cd : clist) {
+            for (Symbol i : cd.getEnclosedElements()) {
+                // consider only final, static and fields with ConstantExpressions
+                if (isFinal(i) && i.isStatic() && i.kind == VAR) {
+                    VarSymbol v = (VarSymbol) i;
+                    if (v.getConstantValue() != null) {
+                        Pair<ClassSymbol, VarSymbol> p = new Pair<>(sym, v);
+                        printStaticDefines(out, p);
+                    }
+                }
             }
         }
     }
-
-    /**
-     * Including super class fields.
-     */
-    List<VariableElement> getAllFields(TypeElement subclazz) {
-        List<VariableElement> fields = new ArrayList<>();
-        TypeElement cd = null;
-        Stack<TypeElement> s = new Stack<>();
-
-        cd = subclazz;
-        while (true) {
-            s.push(cd);
-            TypeElement c = (TypeElement) (types.asElement(cd.getSuperclass()));
-            if (c == null)
+    static void printStaticDefines(PrintWriter out, Pair<ClassSymbol, VarSymbol> p) {
+        ClassSymbol cls = p.fst;
+        VarSymbol f = p.snd;
+        Object value = f.getConstantValue();
+        String valueStr = null;
+        switch (f.asType().getKind()) {
+            case BOOLEAN:
+                valueStr = (((Boolean) value) ? "1L" : "0L");
+                break;
+            case BYTE: case SHORT: case INT:
+                valueStr = value.toString() + "L";
+                break;
+            case LONG:
+                // Visual C++ supports the i64 suffix, not LL.
+                valueStr = value.toString() + ((isWindows) ? "i64" : "LL");
+                break;
+            case CHAR:
+                Character ch = (Character) value;
+                valueStr = String.valueOf(((int) ch) & 0xffff) + "L";
                 break;
-            cd = c;
+            case FLOAT:
+                // bug compatible
+                float fv = ((Float) value).floatValue();
+                valueStr = (Float.isInfinite(fv))
+                        ? ((fv < 0) ? "-" : "") + "Inff"
+                        : value.toString() + "f";
+                break;
+            case DOUBLE:
+                // bug compatible
+                double d = ((Double) value).doubleValue();
+                valueStr = (Double.isInfinite(d))
+                        ? ((d < 0) ? "-" : "") + "InfD"
+                        : value.toString();
+                break;
+            default:
+                valueStr = null;
         }
-
-        while (!s.empty()) {
-            cd = s.pop();
-            fields.addAll(ElementFilter.fieldsIn(cd.getEnclosedElements()));
+        if (valueStr != null) {
+            out.print("#undef ");
+            String cname = encode(cls.getQualifiedName(), EncoderType.CLASS);
+            String fname = encode(f.getSimpleName(), EncoderType.FIELDSTUB);
+            out.println(cname + "_" + fname);
+            out.print("#define " + cname + "_");
+            out.println(fname + " " + valueStr);
         }
-
-        return fields;
     }
-
-    protected String defineForStatic(TypeElement c, VariableElement f) {
-        CharSequence cnamedoc = c.getQualifiedName();
-        CharSequence fnamedoc = f.getSimpleName();
-
-        String cname = mangler.mangle(cnamedoc, Mangle.Type.CLASS);
-        String fname = mangler.mangle(fnamedoc, Mangle.Type.FIELDSTUB);
-
-        Assert.check(f.getModifiers().contains(Modifier.STATIC));
-
-        if (f.getModifiers().contains(Modifier.FINAL)) {
-            Object value = null;
-
-            value = f.getConstantValue();
-
-            if (value != null) { /* so it is a ConstantExpression */
-                String constString = null;
-                if ((value instanceof Integer)
-                    || (value instanceof Byte)
-                    || (value instanceof Short)) {
-                    /* covers byte, short, int */
-                    constString = value.toString() + "L";
-                } else if (value instanceof Boolean) {
-                    constString = ((Boolean) value) ? "1L" : "0L";
-                } else if (value instanceof Character) {
-                    Character ch = (Character) value;
-                    constString = String.valueOf(((int) ch) & 0xffff) + "L";
-                } else if (value instanceof Long) {
-                    // Visual C++ supports the i64 suffix, not LL.
-                    if (isWindows)
-                        constString = value.toString() + "i64";
-                    else
-                        constString = value.toString() + "LL";
-                } else if (value instanceof Float) {
-                    /* bug for bug */
-                    float fv = ((Float)value).floatValue();
-                    if (Float.isInfinite(fv))
-                        constString = ((fv < 0) ? "-" : "") + "Inff";
-                    else
-                        constString = value.toString() + "f";
-                } else if (value instanceof Double) {
-                    /* bug for bug */
-                    double d = ((Double)value).doubleValue();
-                    if (Double.isInfinite(d))
-                        constString = ((d < 0) ? "-" : "") + "InfD";
-                    else
-                        constString = value.toString();
+    protected void writeMethods(PrintWriter out, ClassSymbol sym, String cname)
+            throws IOException, TypeSignature.SignatureException {
+        List<Symbol> classmethods = sym.getEnclosedElements();
+        for (Symbol md : classmethods) {
+            if (isNative(md)) {
+                TypeSignature newtypesig = new TypeSignature(types);
+                CharSequence methodName = md.getSimpleName();
+                boolean isOverloaded = false;
+                for (Symbol md2 : classmethods) {
+                    if ((md2 != md)
+                            && (methodName.equals(md2.getSimpleName()))
+                            && isNative(md2)) {
+                        isOverloaded = true;
+                    }
                 }
-
-                if (constString != null) {
-                    StringBuilder s = new StringBuilder("#undef ");
-                    s.append(cname); s.append("_"); s.append(fname); s.append(lineSep);
-                    s.append("#define "); s.append(cname); s.append("_");
-                    s.append(fname); s.append(" "); s.append(constString);
-                    return s.toString();
+                out.println("/*");
+                out.println(" * Class:     " + cname);
+                out.println(" * Method:    " + encode(methodName, EncoderType.FIELDSTUB));
+                out.println(" * Signature: " + newtypesig.getSignature(md.type));
+                out.println(" */");
+                out.println("JNIEXPORT " + jniType(types.erasure(md.type.getReturnType()))
+                        + " JNICALL " + encodeMethod(md, sym, isOverloaded));
+                out.print("  (JNIEnv *, ");
+                out.print((md.isStatic())
+                        ? "jclass"
+                        : "jobject");
+                for (Type arg : types.erasure(md.type.getParameterTypes())) {
+                    out.print(", ");
+                    out.print(jniType(arg));
                 }
-
-            }
-        }
-
-        return null;
-    }
-
-
-    protected void writeMethods(Writer out, ClassSymbol sym, String cname)
-            throws IOException, TypeSignature.SignatureException {
-        List<ExecutableElement> classmethods = ElementFilter.methodsIn(sym.getEnclosedElements());
-        for (ExecutableElement md: classmethods) {
-            if(md.getModifiers().contains(Modifier.NATIVE)){
-                TypeMirror mtr = types.erasure(md.getReturnType());
-                String sig = signature(md);
-                TypeSignature newtypesig = new TypeSignature(elements);
-                CharSequence methodName = md.getSimpleName();
-                boolean longName = false;
-                for (ExecutableElement md2: classmethods) {
-                    if ((md2 != md)
-                        && (methodName.equals(md2.getSimpleName()))
-                        && (md2.getModifiers().contains(Modifier.NATIVE)))
-                        longName = true;
-
-                }
-                println(out, "/*");
-                println(out, " * Class:     " + cname);
-                println(out, " * Method:    " +
-                           mangler.mangle(methodName, Mangle.Type.FIELDSTUB));
-                println(out, " * Signature: " + newtypesig.getTypeSignature(sig, mtr));
-                println(out, " */");
-                println(out, "JNIEXPORT " + jniType(mtr) +
-                           " JNICALL " +
-                           mangler.mangleMethod(md, sym,
-                                               (longName) ?
-                                               Mangle.Type.METHOD_JNI_LONG :
-                                               Mangle.Type.METHOD_JNI_SHORT));
-                print(out, "  (JNIEnv *, ");
-                List<? extends VariableElement> paramargs = md.getParameters();
-                List<TypeMirror> args = new ArrayList<>();
-                for (VariableElement p: paramargs) {
-                    args.add(types.erasure(p.asType()));
-                }
-                if (md.getModifiers().contains(Modifier.STATIC))
-                    print(out, "jclass");
-                else
-                    print(out, "jobject");
-
-                for (TypeMirror arg: args) {
-                    print(out, ", ");
-                    print(out, jniType(arg));
-                }
-                println(out, ");"
-                        + lineSep);
+                out.println(");");
+                out.println();
             }
         }
     }
-
-    // c.f. MethodDoc.signature
-    String signature(ExecutableElement e) {
-        StringBuilder sb = new StringBuilder("(");
-        String sep = "";
-        for (VariableElement p: e.getParameters()) {
-            sb.append(sep);
-            sb.append(types.erasure(p.asType()).toString());
-            sep = ",";
-        }
-        sb.append(")");
-        return sb.toString();
-    }
-
-    protected final String jniType(TypeMirror t) {
-        TypeElement throwable = elements.getTypeElement("java.lang.Throwable");
-        TypeElement jClass = elements.getTypeElement("java.lang.Class");
-        TypeElement jString = elements.getTypeElement("java.lang.String");
-        Element tclassDoc = types.asElement(t);
-
-
+    @SuppressWarnings("fallthrough")
+    protected final String jniType(Type t) {
         switch (t.getKind()) {
             case ARRAY: {
-                TypeMirror ct = ((ArrayType) t).getComponentType();
+                Type ct = ((Type.ArrayType)t).getComponentType();
                 switch (ct.getKind()) {
                     case BOOLEAN:  return "jbooleanArray";
                     case BYTE:     return "jbyteArray";
@@ -420,16 +343,16 @@
             case LONG:     return "jlong";
             case FLOAT:    return "jfloat";
             case DOUBLE:   return "jdouble";
-
             case DECLARED: {
-                if (tclassDoc.equals(jString))
+                if (t.tsym.type == syms.stringType) {
                     return "jstring";
-                else if (types.isAssignable(t, throwable.asType()))
+                } else if (types.isAssignable(t, syms.throwableType)) {
                     return "jthrowable";
-                else if (types.isAssignable(t, jClass.asType()))
+                } else if (types.isAssignable(t, syms.classType)) {
                     return "jclass";
-                else
+                } else {
                     return "jobject";
+                }
             }
         }
 
@@ -437,193 +360,145 @@
         return null; /* dead code. */
     }
 
-    protected String fileTop() {
-        return "/* DO NOT EDIT THIS FILE - it is machine generated */";
+    protected void  fileTop(PrintWriter out) {
+        out.println("/* DO NOT EDIT THIS FILE - it is machine generated */");
     }
 
-    protected String includes() {
-        return "#include <jni.h>";
+    protected void includes(PrintWriter out) {
+        out.println("#include <jni.h>");
     }
 
     /*
      * Deal with the C pre-processor.
      */
-    protected String cppGuardBegin() {
-        return "#ifdef __cplusplus" + lineSep
-                + "extern \"C\" {" + lineSep
-                + "#endif";
+    protected void cppGuardBegin(PrintWriter out) {
+        out.println("#ifdef __cplusplus");
+        out.println("extern \"C\" {");
+        out.println("#endif");
     }
 
-    protected String cppGuardEnd() {
-        return "#ifdef __cplusplus" + lineSep
-                + "}" + lineSep
-                + "#endif";
+    protected void cppGuardEnd(PrintWriter out) {
+        out.println("#ifdef __cplusplus");
+        out.println("}");
+        out.println("#endif");
+    }
+
+    protected void guardBegin(PrintWriter out, String cname) {
+        out.println("/* Header for class " + cname + " */");
+        out.println();
+        out.println("#ifndef _Included_" + cname);
+        out.println("#define _Included_" + cname);
     }
 
-    protected String guardBegin(String cname) {
-        return "/* Header for class " + cname + " */" + lineSep
-                + lineSep
-                + "#ifndef _Included_" + cname + lineSep
-                + "#define _Included_" + cname;
+    protected void guardEnd(PrintWriter out) {
+        out.println("#endif");
     }
 
-    protected String guardEnd(String cname) {
-        return "#endif";
-    }
-
-    protected void print(Writer out, String text) throws IOException {
-        out.write(text);
-    }
-
-    protected void println(Writer out, String text) throws IOException {
-        out.write(text);
-        out.write(lineSep);
+    String encodeMethod(Symbol msym, ClassSymbol clazz,
+            boolean isOverloaded) throws TypeSignature.SignatureException {
+        StringBuilder result = new StringBuilder(100);
+        result.append("Java_");
+        /* JNI */
+        result.append(encode(clazz.flatname.toString(), EncoderType.JNI));
+        result.append('_');
+        result.append(encode(msym.getSimpleName(), EncoderType.JNI));
+        if (isOverloaded) {
+            TypeSignature typeSig = new TypeSignature(types);
+            StringBuilder sig = typeSig.getParameterSignature(msym.type);
+            result.append("__").append(encode(sig, EncoderType.JNI));
+        }
+        return result.toString();
     }
 
-
-    private static class Mangle {
-
-        public static class Type {
-            public static final int CLASS            = 1;
-            public static final int FIELDSTUB        = 2;
-            public static final int FIELD            = 3;
-            public static final int JNI              = 4;
-            public static final int SIGNATURE        = 5;
-            public static final int METHOD_JDK_1     = 6;
-            public static final int METHOD_JNI_SHORT = 7;
-            public static final int METHOD_JNI_LONG  = 8;
-        }
-
-        private Elements elems;
-        private Types types;
-
-        Mangle(Elements elems, Types types) {
-            this.elems = elems;
-            this.types = types;
-        }
-
-        public final String mangle(CharSequence name, int mtype) {
-            StringBuilder result = new StringBuilder(100);
-            int length = name.length();
-
-            for (int i = 0; i < length; i++) {
-                char ch = name.charAt(i);
-                if (isalnum(ch)) {
-                    result.append(ch);
-                } else if ((ch == '.') &&
-                           mtype == Mangle.Type.CLASS) {
-                    result.append('_');
-                } else if (( ch == '$') &&
-                           mtype == Mangle.Type.CLASS) {
-                    result.append('_');
-                    result.append('_');
-                } else if (ch == '_' && mtype == Mangle.Type.FIELDSTUB) {
-                    result.append('_');
-                } else if (ch == '_' && mtype == Mangle.Type.CLASS) {
-                    result.append('_');
-                } else if (mtype == Mangle.Type.JNI) {
-                    String esc = null;
-                    if (ch == '_')
-                        esc = "_1";
-                    else if (ch == '.')
-                        esc = "_";
-                    else if (ch == ';')
-                        esc = "_2";
-                    else if (ch == '[')
-                        esc = "_3";
-                    if (esc != null) {
-                        result.append(esc);
-                    } else {
-                        result.append(mangleChar(ch));
-                    }
-                } else if (mtype == Mangle.Type.SIGNATURE) {
-                    if (isprint(ch)) {
-                        result.append(ch);
-                    } else {
-                        result.append(mangleChar(ch));
-                    }
-                } else {
-                    result.append(mangleChar(ch));
-                }
-            }
-
-            return result.toString();
-        }
+    static enum EncoderType {
+        CLASS,
+        FIELDSTUB,
+        FIELD,
+        JNI,
+        SIGNATURE
+    }
+    @SuppressWarnings("fallthrough")
+    static String encode(CharSequence name, EncoderType mtype) {
+        StringBuilder result = new StringBuilder(100);
+        int length = name.length();
 
-        public String mangleMethod(ExecutableElement method, TypeElement clazz,
-                                          int mtype) throws TypeSignature.SignatureException {
-            StringBuilder result = new StringBuilder(100);
-            result.append("Java_");
-
-            if (mtype == Mangle.Type.METHOD_JDK_1) {
-                result.append(mangle(clazz.getQualifiedName(), Mangle.Type.CLASS));
-                result.append('_');
-                result.append(mangle(method.getSimpleName(),
-                                     Mangle.Type.FIELD));
-                result.append("_stub");
-                return result.toString();
+        for (int i = 0; i < length; i++) {
+            char ch = name.charAt(i);
+            if (isalnum(ch)) {
+                result.append(ch);
+                continue;
             }
-
-            /* JNI */
-            result.append(mangle(getInnerQualifiedName(clazz), Mangle.Type.JNI));
-            result.append('_');
-            result.append(mangle(method.getSimpleName(),
-                                 Mangle.Type.JNI));
-            if (mtype == Mangle.Type.METHOD_JNI_LONG) {
-                result.append("__");
-                String typesig = signature(method);
-                TypeSignature newTypeSig = new TypeSignature(elems);
-                String sig = newTypeSig.getTypeSignature(typesig,  method.getReturnType());
-                sig = sig.substring(1);
-                sig = sig.substring(0, sig.lastIndexOf(')'));
-                sig = sig.replace('/', '.');
-                result.append(mangle(sig, Mangle.Type.JNI));
+            switch (mtype) {
+                case CLASS:
+                    switch (ch) {
+                        case '.':
+                        case '_':
+                            result.append("_");
+                            break;
+                        case '$':
+                            result.append("__");
+                            break;
+                        default:
+                            result.append(encodeChar(ch));
+                    }
+                    break;
+                case JNI:
+                    switch (ch) {
+                        case '/':
+                        case '.':
+                            result.append("_");
+                            break;
+                        case '_':
+                            result.append("_1");
+                            break;
+                        case ';':
+                            result.append("_2");
+                            break;
+                        case '[':
+                            result.append("_3");
+                            break;
+                        default:
+                            result.append(encodeChar(ch));
+                    }
+                    break;
+                case SIGNATURE:
+                    result.append(isprint(ch) ? ch : encodeChar(ch));
+                    break;
+                case FIELDSTUB:
+                    result.append(ch == '_' ? ch : encodeChar(ch));
+                    break;
+                default:
+                    result.append(encodeChar(ch));
             }
-
-            return result.toString();
         }
-        //where
-            private String getInnerQualifiedName(TypeElement clazz) {
-                return elems.getBinaryName(clazz).toString();
-            }
+        return result.toString();
+    }
 
-        public final String mangleChar(char ch) {
-            String s = Integer.toHexString(ch);
-            int nzeros = 5 - s.length();
-            char[] result = new char[6];
-            result[0] = '_';
-            for (int i = 1; i <= nzeros; i++)
-                result[i] = '0';
-            for (int i = nzeros+1, j = 0; i < 6; i++, j++)
-                result[i] = s.charAt(j);
-            return new String(result);
+    static String encodeChar(char ch) {
+        String s = Integer.toHexString(ch);
+        int nzeros = 5 - s.length();
+        char[] result = new char[6];
+        result[0] = '_';
+        for (int i = 1; i <= nzeros; i++) {
+            result[i] = '0';
         }
+        for (int i = nzeros + 1, j = 0; i < 6; i++, j++) {
+            result[i] = s.charAt(j);
+        }
+        return new String(result);
+    }
 
-        // Warning: duplicated in Gen
-        private String signature(ExecutableElement e) {
-            StringBuilder sb = new StringBuilder();
-            String sep = "(";
-            for (VariableElement p: e.getParameters()) {
-                sb.append(sep);
-                sb.append(types.erasure(p.asType()).toString());
-                sep = ",";
-            }
-            sb.append(")");
-            return sb.toString();
-        }
+    /* Warning: Intentional ASCII operation. */
+    private static boolean isalnum(char ch) {
+        return ch <= 0x7f && /* quick test */
+                ((ch >= 'A' && ch <= 'Z')  ||
+                 (ch >= 'a' && ch <= 'z')  ||
+                 (ch >= '0' && ch <= '9'));
+    }
 
-        /* Warning: Intentional ASCII operation. */
-        private static boolean isalnum(char ch) {
-            return ch <= 0x7f && /* quick test */
-                ((ch >= 'A' && ch <= 'Z') ||
-                 (ch >= 'a' && ch <= 'z') ||
-                 (ch >= '0' && ch <= '9'));
-        }
-
-        /* Warning: Intentional ASCII operation. */
-        private static boolean isprint(char ch) {
-            return ch >= 32 && ch <= 126;
-        }
+    /* Warning: Intentional ASCII operation. */
+    private static boolean isprint(char ch) {
+        return ch >= 32 && ch <= 126;
     }
 
     private static class TypeSignature {
@@ -634,10 +509,10 @@
             }
         }
 
-        Elements elems;
+        JavacElements elems;
+        Types    types;
 
         /* Signature Characters */
-
         private static final String SIG_VOID                   = "V";
         private static final String SIG_BOOLEAN                = "Z";
         private static final String SIG_BYTE                   = "B";
@@ -650,209 +525,162 @@
         private static final String SIG_ARRAY                  = "[";
         private static final String SIG_CLASS                  = "L";
 
-
-
-        public TypeSignature(Elements elems){
-            this.elems = elems;
-        }
-
-        /*
-         * Returns the type signature of a field according to JVM specs
-         */
-        public String getTypeSignature(String javasignature) throws SignatureException {
-            return getParamJVMSignature(javasignature);
+        public TypeSignature(Types types) {
+            this.types = types;
         }
 
-        /*
-         * Returns the type signature of a method according to JVM specs
-         */
-        public String getTypeSignature(String javasignature, TypeMirror returnType)
+        StringBuilder getParameterSignature(Type mType)
                 throws SignatureException {
-            String signature = null; //Java type signature.
-            String typeSignature = null; //Internal type signature.
-            List<String> params = new ArrayList<>(); //List of parameters.
-            String paramsig = null; //Java parameter signature.
-            String paramJVMSig = null; //Internal parameter signature.
-            String returnSig = null; //Java return type signature.
-            String returnJVMType = null; //Internal return type signature.
-            int dimensions = 0; //Array dimension.
-
-            int startIndex = -1;
-            int endIndex = -1;
-            StringTokenizer st = null;
-            int i = 0;
-
-            // Gets the actual java signature without parentheses.
-            if (javasignature != null) {
-                startIndex = javasignature.indexOf("(");
-                endIndex = javasignature.indexOf(")");
+            StringBuilder result = new StringBuilder();
+            for (Type pType : mType.getParameterTypes()) {
+                result.append(getJvmSignature(pType));
             }
-
-            if (((startIndex != -1) && (endIndex != -1))
-                &&(startIndex+1 < javasignature.length())
-                &&(endIndex < javasignature.length())) {
-                signature = javasignature.substring(startIndex+1, endIndex);
-            }
+            return result;
+        }
 
-            // Separates parameters.
-            if (signature != null) {
-                if (signature.contains(",")) {
-                    st = new StringTokenizer(signature, ",");
-                    if (st != null) {
-                        while (st.hasMoreTokens()) {
-                            params.add(st.nextToken());
-                        }
-                    }
-                } else {
-                    params.add(signature);
-                }
-            }
-
-            /* JVM type signature. */
-            typeSignature = "(";
+        StringBuilder getReturnSignature(Type mType)
+                throws SignatureException {
+            return getJvmSignature(mType.getReturnType());
+        }
 
-            // Gets indivisual internal parameter signature.
-            while (params.isEmpty() != true) {
-                paramsig = params.remove(i).trim();
-                paramJVMSig  = getParamJVMSignature(paramsig);
-                if (paramJVMSig != null) {
-                    typeSignature += paramJVMSig;
-                }
-            }
-
-            typeSignature += ")";
-
-            // Get internal return type signature.
-
-            returnJVMType = "";
-            if (returnType != null) {
-                dimensions = dimensions(returnType);
-            }
-
-            //Gets array dimension of return type.
-            while (dimensions-- > 0) {
-                returnJVMType += "[";
-            }
-            if (returnType != null) {
-                returnSig = qualifiedTypeName(returnType);
-                returnJVMType += getComponentType(returnSig);
-            } else {
-                System.out.println("Invalid return type.");
-            }
-
-            typeSignature += returnJVMType;
-
-            return typeSignature;
+        StringBuilder getSignature(Type mType) throws SignatureException {
+            StringBuilder sb = new StringBuilder();
+            sb.append("(").append(getParameterSignature(mType)).append(")");
+            sb.append(getReturnSignature(mType));
+            return sb;
         }
 
         /*
-         * Returns internal signature of a parameter.
+         * Returns jvm internal signature.
          */
-        private String getParamJVMSignature(String paramsig) throws SignatureException {
-            String paramJVMSig = "";
-            String componentType ="";
+        static class JvmTypeVisitor extends JNIWriter.SimpleTypeVisitor<Type, StringBuilder> {
 
-            if(paramsig != null){
+            @Override
+            public Type visitClassType(Type.ClassType t, StringBuilder s) {
+                setDeclaredType(t, s);
+                return null;
+            }
+
+            @Override
+            public Type visitArrayType(Type.ArrayType t, StringBuilder s) {
+                s.append("[");
+                return t.getComponentType().accept(this, s);
+            }
 
-                if(paramsig.contains("[]")) {
-                    // Gets array dimension.
-                    int endindex = paramsig.indexOf("[]");
-                    componentType = paramsig.substring(0, endindex);
-                    String dimensionString =  paramsig.substring(endindex);
-                    if(dimensionString != null){
-                        while(dimensionString.contains("[]")){
-                            paramJVMSig += "[";
-                            int beginindex = dimensionString.indexOf("]") + 1;
-                            if(beginindex < dimensionString.length()){
-                                dimensionString = dimensionString.substring(beginindex);
-                            }else
-                                dimensionString = "";
-                        }
-                    }
-                } else componentType = paramsig;
-
-                paramJVMSig += getComponentType(componentType);
+            @Override
+            public Type visitType(Type t, StringBuilder s) {
+                if (t.isPrimitiveOrVoid()) {
+                    s.append(getJvmPrimitiveSignature(t));
+                    return null;
+                }
+                return t.accept(this, s);
+            }
+            private void setDeclaredType(Type t, StringBuilder s) {
+                    String classname = t.tsym.getQualifiedName().toString();
+                    classname = classname.replace('.', '/');
+                    s.append("L").append(classname).append(";");
             }
-            return paramJVMSig;
+            private String getJvmPrimitiveSignature(Type t) {
+                switch (t.getKind()) {
+                    case VOID:      return SIG_VOID;
+                    case BOOLEAN:   return SIG_BOOLEAN;
+                    case BYTE:      return SIG_BYTE;
+                    case CHAR:      return SIG_CHAR;
+                    case SHORT:     return SIG_SHORT;
+                    case INT:       return SIG_INT;
+                    case LONG:      return SIG_LONG;
+                    case FLOAT:     return SIG_FLOAT;
+                    case DOUBLE:    return SIG_DOUBLE;
+                    default:
+                        Assert.error("unknown type: should not happen");
+                }
+                return null;
+            }
         }
 
-        /*
-         * Returns internal signature of a component.
-         */
-        private String getComponentType(String componentType) throws SignatureException {
-
-            String JVMSig = "";
-
-            if(componentType != null){
-                switch (componentType) {
-                    case "void":    JVMSig += SIG_VOID;    break;
-                    case "boolean": JVMSig += SIG_BOOLEAN; break;
-                    case "byte":    JVMSig += SIG_BYTE;    break;
-                    case "char":    JVMSig += SIG_CHAR;    break;
-                    case "short":   JVMSig += SIG_SHORT;   break;
-                    case "int":     JVMSig += SIG_INT;     break;
-                    case "long":    JVMSig += SIG_LONG;    break;
-                    case "float":   JVMSig += SIG_FLOAT;   break;
-                    case "double":  JVMSig += SIG_DOUBLE;  break;
-                    default:
-                        if (!componentType.equals("")) {
-                            TypeElement classNameDoc = elems.getTypeElement(componentType);
-
-                            if (classNameDoc == null) {
-                                throw new SignatureException(componentType);
-                            }
-                            else {
-                                String classname = classNameDoc.getQualifiedName().toString();
-                                String newclassname = classname.replace('.', '/');
-                                JVMSig += "L";
-                                JVMSig += newclassname;
-                                JVMSig += ";";
-                            }
-                        }
-                        break;
-                }
-            }
-            return JVMSig;
-        }
-
-        int dimensions(TypeMirror t) {
-            if (t.getKind() != TypeKind.ARRAY)
-                return 0;
-            return 1 + dimensions(((ArrayType) t).getComponentType());
-        }
-
-
-        String qualifiedTypeName(TypeMirror type) {
-            TypeVisitor<Name, Void> v = new SimpleTypeVisitor8<Name, Void>() {
-                @Override
-                public Name visitArray(ArrayType t, Void p) {
-                    return t.getComponentType().accept(this, p);
-                }
-
-                @Override
-                public Name visitDeclared(DeclaredType t, Void p) {
-                    return ((TypeElement) t.asElement()).getQualifiedName();
-                }
-
-                @Override
-                public Name visitPrimitive(PrimitiveType t, Void p) {
-                    return elems.getName(t.toString());
-                }
-
-                @Override
-                public Name visitNoType(NoType t, Void p) {
-                    if (t.getKind() == TypeKind.VOID)
-                        return elems.getName("void");
-                    return defaultAction(t, p);
-                }
-
-                @Override
-                public Name visitTypeVariable(TypeVariable t, Void p) {
-                    return t.getUpperBound().accept(this, p);
-                }
-            };
-            return v.visit(type).toString();
+        StringBuilder getJvmSignature(Type type) {
+            Type t = types.erasure(type);
+            StringBuilder sig = new StringBuilder();
+            JvmTypeVisitor jv = new JvmTypeVisitor();
+            jv.visitType(t, sig);
+            return sig;
         }
     }
 
+    static class SimpleTypeVisitor<R, P> implements Type.Visitor<R, P> {
+
+        protected final R DEFAULT_VALUE;
+
+        protected SimpleTypeVisitor() {
+            DEFAULT_VALUE = null;
+        }
+
+        protected SimpleTypeVisitor(R defaultValue) {
+            DEFAULT_VALUE = defaultValue;
+        }
+
+        protected R defaultAction(Type t, P p) {
+            return DEFAULT_VALUE;
+        }
+
+        @Override
+        public R visitClassType(Type.ClassType t, P p) {
+            return defaultAction(t, p);
+        }
+
+        @Override
+        public R visitWildcardType(Type.WildcardType t, P p) {
+            return defaultAction(t, p);
+        }
+
+        @Override
+        public R visitArrayType(Type.ArrayType t, P p) {
+            return defaultAction(t, p);
+        }
+
+        @Override
+        public R visitMethodType(Type.MethodType t, P p) {
+            return defaultAction(t, p);
+        }
+
+        @Override
+        public R visitPackageType(Type.PackageType t, P p) {
+            return defaultAction(t, p);
+        }
+
+        @Override
+        public R visitTypeVar(Type.TypeVar t, P p) {
+            return defaultAction(t, p);
+        }
+
+        @Override
+        public R visitCapturedType(Type.CapturedType t, P p) {
+            return defaultAction(t, p);
+        }
+
+        @Override
+        public R visitForAll(Type.ForAll t, P p) {
+            return defaultAction(t, p);
+        }
+
+        @Override
+        public R visitUndetVar(Type.UndetVar t, P p) {
+            return defaultAction(t, p);
+        }
+
+        @Override
+        public R visitErrorType(Type.ErrorType t, P p) {
+            return defaultAction(t, p);
+        }
+
+        @Override
+        public R visitAnnotatedType(Type.AnnotatedType t, P p) {
+            return defaultAction(t, p);
+        }
+
+        @Override
+        public R visitType(Type t, P p) {
+            return defaultAction(t, p);
+        }
+    }
 }
--- a/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Fri Feb 21 11:40:51 2014 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Mon Feb 24 13:06:07 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -856,6 +856,12 @@
                     enterTrees(stopIfError(CompileState.PARSE, parseFiles(sourceFileObjects))),
                     classnames);
 
+            // If it's safe to do so, skip attr / flow / gen for implicit classes
+            if (taskListener.isEmpty() &&
+                    implicitSourcePolicy == ImplicitSourcePolicy.NONE) {
+                delegateCompiler.todo.retainFiles(delegateCompiler.inputFiles);
+            }
+
             delegateCompiler.compile2();
             delegateCompiler.close();
             elapsed_msec = delegateCompiler.elapsed_msec;
--- a/langtools/src/share/classes/com/sun/tools/javac/main/Option.java	Fri Feb 21 11:40:51 2014 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javac/main/Option.java	Mon Feb 24 13:06:07 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -38,6 +38,7 @@
 
 import com.sun.tools.doclint.DocLint;
 import com.sun.tools.javac.code.Lint;
+import com.sun.tools.javac.code.Lint.LintCategory;
 import com.sun.tools.javac.code.Source;
 import com.sun.tools.javac.code.Type;
 import com.sun.tools.javac.jvm.Profile;
@@ -80,8 +81,34 @@
 
     XLINT("-Xlint", "opt.Xlint", EXTENDED, BASIC),
 
-    XLINT_CUSTOM("-Xlint:", "opt.Xlint.suboptlist",
-            EXTENDED,   BASIC, ANYOF, getXLintChoices()),
+    XLINT_CUSTOM("-Xlint:", EXTENDED, BASIC, ANYOF, getXLintChoices()) {
+        private static final String LINT_KEY_FORMAT = "         %-19s %s";
+        void help(Log log, OptionKind kind) {
+            if (this.kind != kind)
+                return;
+
+            log.printRawLines(WriterKind.NOTICE,
+                              String.format(HELP_LINE_FORMAT,
+                                            log.localize(PrefixKind.JAVAC, "opt.Xlint.subopts"),
+                                            log.localize(PrefixKind.JAVAC, "opt.Xlint.suboptlist")));
+            log.printRawLines(WriterKind.NOTICE,
+                              String.format(LINT_KEY_FORMAT,
+                                            "all",
+                                            log.localize(PrefixKind.JAVAC, "opt.Xlint.all")));
+            for (LintCategory lc : LintCategory.values()) {
+                if (lc.hidden) continue;
+                log.printRawLines(WriterKind.NOTICE,
+                                  String.format(LINT_KEY_FORMAT,
+                                                lc.option,
+                                                log.localize(PrefixKind.JAVAC,
+                                                             "opt.Xlint.desc." + lc.option)));
+            }
+            log.printRawLines(WriterKind.NOTICE,
+                              String.format(LINT_KEY_FORMAT,
+                                            "none",
+                                            log.localize(PrefixKind.JAVAC, "opt.Xlint.none")));
+        }
+    },
 
     XDOCLINT("-Xdoclint", "opt.Xdoclint", EXTENDED, BASIC),
 
@@ -550,10 +577,9 @@
         this(text, argsNameKey, descrKey, kind, group, null, null, doHasSuffix);
     }
 
-    Option(String text, String descrKey,
-            OptionKind kind, OptionGroup group,
+    Option(String text, OptionKind kind, OptionGroup group,
             ChoiceKind choiceKind, Map<String,Boolean> choices) {
-        this(text, null, descrKey, kind, group, choiceKind, choices, false);
+        this(text, null, null, kind, group, choiceKind, choices, false);
     }
 
     Option(String text, String descrKey,
@@ -650,12 +676,14 @@
             return process(helper, option, option);
     }
 
+    private static final String HELP_LINE_FORMAT = "  %-26s %s";
+
     void help(Log log, OptionKind kind) {
         if (this.kind != kind)
             return;
 
         log.printRawLines(WriterKind.NOTICE,
-                String.format("  %-26s %s",
+                String.format(HELP_LINE_FORMAT,
                     helpSynopsis(log),
                     log.localize(PrefixKind.JAVAC, descrKey)));
 
--- a/langtools/src/share/classes/com/sun/tools/javac/model/JavacElements.java	Fri Feb 21 11:40:51 2014 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javac/model/JavacElements.java	Mon Feb 24 13:06:07 2014 -0800
@@ -193,13 +193,17 @@
             public void visitVarDef(JCVariableDecl tree) {
                 result = tree.mods.annotations;
             }
+            @Override
+            public void visitTypeParameter(JCTypeParameter tree) {
+                result = tree.annotations;
+            }
         }
         Vis vis = new Vis();
         tree.accept(vis);
         if (vis.result == null)
             return null;
 
-        List<Attribute.Compound> annos = sym.getRawAttributes();
+        List<Attribute.Compound> annos = sym.getAnnotationMirrors();
         return matchAnnoToTree(cast(Attribute.Compound.class, findme),
                                annos,
                                vis.result);
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/JavadocTokenizer.java	Fri Feb 21 11:40:51 2014 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/JavadocTokenizer.java	Mon Feb 24 13:06:07 2014 -0800
@@ -107,6 +107,10 @@
           */
          int pp = 0;
 
+         /** The buffer index of the last double backslash sequence
+          */
+         private int doubleBackslashBp = -1;
+
          DocReader(ScannerFactory fac, char[] input, int inputLength, int startPos) {
              super(fac, input, inputLength);
              this.startPos = startPos;
@@ -149,8 +153,8 @@
              scanChar();
              if (ch == '\\') {
                  if (peekChar() == '\\' && !isUnicode()) {
-                     putChar(ch, false);
                      bp++; col++;
+                     doubleBackslashBp = bp;
                  } else {
                      convertUnicode();
                  }
@@ -204,6 +208,13 @@
              }
              super.putChar(ch, scan);
          }
+
+         /** Whether the ch represents a sequence of two backslashes. */
+         boolean isDoubleBackslash() {
+             return doubleBackslashBp == bp;
+         }
+
+
      }
 
      protected static class JavadocComment extends JavaTokenizer.BasicComment<DocReader> {
@@ -375,6 +386,13 @@
                              // the buffer.
                              comment_reader.putChar('*', false);
                              break;
+                         case '\\':
+                             comment_reader.putChar('\\', false);
+                             // If a double backslash was found, write two
+                             if (comment_reader.isDoubleBackslash()) {
+                                 comment_reader.putChar('\\', false);
+                             }
+                             comment_reader.scanCommentChar();
                          case ' ':
                          case '\t':
                              comment_reader.putChar(comment_reader.ch, false);
--- a/langtools/src/share/classes/com/sun/tools/javac/resources/javac.properties	Fri Feb 21 11:40:51 2014 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javac/resources/javac.properties	Mon Feb 24 13:06:07 2014 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -142,8 +142,80 @@
     <filename>
 javac.opt.Xlint=\
     Enable recommended warnings
-javac.opt.Xlint.suboptlist=\
-    Enable or disable specific warnings
+javac.opt.Xlint.all=\
+    Enable all warnings
+javac.opt.Xlint.none=\
+    Disable all warnings
+#L10N: do not localize: -Xlint
+javac.opt.Xlint.subopts=\
+    -Xlint:key,...
+javac.opt.Xlint.suboptlist=\n\
+\        Warnings to enable or disable, separated by comma.\n\
+\        Precede a key by '-' to disable the specified warning.\n\
+\        Supported keys are:
+javac.opt.Xlint.desc.auxiliaryclass=\
+    Warn about an auxiliary class that is hidden in a source file, and is used from other files.
+
+javac.opt.Xlint.desc.cast=\
+    Warn about use of unnecessary casts.
+
+javac.opt.Xlint.desc.classfile=\
+    Warn about issues related to classfile contents.
+
+javac.opt.Xlint.desc.deprecation=\
+    Warn about use of deprecated items.
+
+javac.opt.Xlint.desc.dep-ann=\
+    Warn about items marked as deprecated in JavaDoc but not using the @Deprecated annotation.
+
+javac.opt.Xlint.desc.divzero=\
+    Warn about division by constant integer 0.
+
+javac.opt.Xlint.desc.empty=\
+    Warn about empty statement after if.
+
+javac.opt.Xlint.desc.fallthrough=\
+    Warn about falling through from one case of a switch statement to the next.
+
+javac.opt.Xlint.desc.finally=\
+    Warn about finally clauses that do not terminate normally.
+
+javac.opt.Xlint.desc.options=\
+    Warn about issues relating to use of command line options.
+
+javac.opt.Xlint.desc.overloads=\
+    Warn about issues regarding method overloads.
+
+javac.opt.Xlint.desc.overrides=\
+    Warn about issues regarding method overrides.
+
+javac.opt.Xlint.desc.path=\
+    Warn about invalid path elements on the command line.
+
+javac.opt.Xlint.desc.processing=\
+    Warn about issues regarding annotation processing.
+
+javac.opt.Xlint.desc.rawtypes=\
+    Warn about use of raw types.
+
+javac.opt.Xlint.desc.serial=\
+    Warn about Serializable classes that do not provide a serial version ID.
+
+javac.opt.Xlint.desc.static=\
+    Warn about accessing a static member using an instance.
+
+javac.opt.Xlint.desc.sunapi=\
+    Warn about proprietary API that may be removed in a future release.
+
+javac.opt.Xlint.desc.try=\
+    Warn about issues relating to use of try blocks (i.e. try-with-resources).
+
+javac.opt.Xlint.desc.unchecked=\
+    Warn about unchecked operations.
+
+javac.opt.Xlint.desc.varargs=\
+    Warn about potentially unsafe vararg methods
+
 javac.opt.Xdoclint=\
     Enable recommended checks for problems in javadoc comments
 # L10N: do not localize: all none
--- a/langtools/src/share/classes/com/sun/tools/javadoc/JavadocTool.java	Fri Feb 21 11:40:51 2014 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/JavadocTool.java	Mon Feb 24 13:06:07 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,7 @@
 import java.util.Collection;
 import java.util.EnumSet;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 import javax.tools.JavaFileManager.Location;
@@ -238,10 +239,13 @@
             files = lb.toList();
         }
 
+        Set<JavaFileObject> ufiles = new HashSet<>();
         for (JavaFileObject fo : files) {
-            // messager.notice("main.Loading_source_file", fn);
-            trees.append(parse(fo));
-            hasFiles = true;
+            if (ufiles.add(fo)) { // ignore duplicates
+                // messager.notice("main.Loading_source_file", fn);
+                trees.append(parse(fo));
+                hasFiles = true;
+            }
         }
 
         if (!hasFiles) {
--- a/langtools/src/share/classes/com/sun/tools/javap/AttributeWriter.java	Fri Feb 21 11:40:51 2014 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javap/AttributeWriter.java	Mon Feb 24 13:06:07 2014 -0800
@@ -531,7 +531,6 @@
         for (StackMapTable_attribute.stack_map_frame entry : attr.entries) {
             w.write(entry);
         }
-        println();
         indent(-1);
         return null;
     }
@@ -543,7 +542,6 @@
         for (StackMapTable_attribute.stack_map_frame entry : attr.entries) {
             w.write(entry);
         }
-        println();
         indent(-1);
         return null;
     }
@@ -555,14 +553,12 @@
         }
 
         public Void visit_same_frame(StackMapTable_attribute.same_frame frame, Void p) {
-            printHeader(frame);
-            println(" /* same */");
+            printHeader(frame, "/* same */");
             return null;
         }
 
         public Void visit_same_locals_1_stack_item_frame(StackMapTable_attribute.same_locals_1_stack_item_frame frame, Void p) {
-            printHeader(frame);
-            println(" /* same_locals_1_stack_item */");
+            printHeader(frame, "/* same_locals_1_stack_item */");
             indent(+1);
             printMap("stack", frame.stack);
             indent(-1);
@@ -570,8 +566,7 @@
         }
 
         public Void visit_same_locals_1_stack_item_frame_extended(StackMapTable_attribute.same_locals_1_stack_item_frame_extended frame, Void p) {
-            printHeader(frame);
-            println(" /* same_locals_1_stack_item_frame_extended */");
+            printHeader(frame, "/* same_locals_1_stack_item_frame_extended */");
             indent(+1);
             println("offset_delta = " + frame.offset_delta);
             printMap("stack", frame.stack);
@@ -580,8 +575,7 @@
         }
 
         public Void visit_chop_frame(StackMapTable_attribute.chop_frame frame, Void p) {
-            printHeader(frame);
-            println(" /* chop */");
+            printHeader(frame, "/* chop */");
             indent(+1);
             println("offset_delta = " + frame.offset_delta);
             indent(-1);
@@ -589,8 +583,7 @@
         }
 
         public Void visit_same_frame_extended(StackMapTable_attribute.same_frame_extended frame, Void p) {
-            printHeader(frame);
-            println(" /* same_frame_extended */");
+            printHeader(frame, "/* same_frame_extended */");
             indent(+1);
             println("offset_delta = " + frame.offset_delta);
             indent(-1);
@@ -598,21 +591,20 @@
         }
 
         public Void visit_append_frame(StackMapTable_attribute.append_frame frame, Void p) {
-            printHeader(frame);
-            println(" /* append */");
+            printHeader(frame, "/* append */");
             indent(+1);
             println("offset_delta = " + frame.offset_delta);
             printMap("locals", frame.locals);
+            indent(-1);
             return null;
         }
 
         public Void visit_full_frame(StackMapTable_attribute.full_frame frame, Void p) {
-            printHeader(frame);
             if (frame instanceof StackMap_attribute.stack_map_frame) {
+                printHeader(frame, "offset = " + frame.offset_delta);
                 indent(+1);
-                println(" offset = " + frame.offset_delta);
             } else {
-                println(" /* full_frame */");
+                printHeader(frame, "/* full_frame */");
                 indent(+1);
                 println("offset_delta = " + frame.offset_delta);
             }
@@ -622,8 +614,9 @@
             return null;
         }
 
-        void printHeader(StackMapTable_attribute.stack_map_frame frame) {
-            print("   frame_type = " + frame.frame_type);
+        void printHeader(StackMapTable_attribute.stack_map_frame frame, String extra) {
+            print("frame_type = " + frame.frame_type + " ");
+            println(extra);
         }
 
         void printMap(String name, StackMapTable_attribute.verification_type_info[] map) {
--- a/langtools/src/share/classes/com/sun/tools/javap/BasicWriter.java	Fri Feb 21 11:40:51 2014 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javap/BasicWriter.java	Mon Feb 24 13:06:07 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -151,12 +151,22 @@
             for (int i = 0; i < s.length(); i++) {
                 char c = s.charAt(i);
                 switch (c) {
+                    case ' ':
+                        pendingSpaces++;
+                        break;
+
                     case '\n':
                         println();
                         break;
+
                     default:
                         if (buffer.length() == 0)
                             indent();
+                        if (pendingSpaces > 0) {
+                            for (int sp = 0; sp < pendingSpaces; sp++)
+                                buffer.append(' ');
+                            pendingSpaces = 0;
+                        }
                         buffer.append(c);
                 }
             }
@@ -164,6 +174,8 @@
         }
 
         protected void println() {
+            // ignore/discard pending spaces
+            pendingSpaces = 0;
             out.println(buffer);
             buffer.setLength(0);
         }
@@ -173,26 +185,21 @@
         }
 
         protected void tab() {
-            if (buffer.length() == 0)
-                indent();
-            space(indentCount * indentWidth + tabColumn - buffer.length());
+            int col = indentCount * indentWidth + tabColumn;
+            pendingSpaces += (col <= buffer.length() ? 1 : col - buffer.length());
         }
 
         private void indent() {
-            space(indentCount * indentWidth);
+            pendingSpaces += (indentCount * indentWidth);
         }
 
-        private void space(int n) {
-            for (int i = 0; i < n; i++)
-                buffer.append(' ');
-        }
-
-        private PrintWriter out;
-        private StringBuilder buffer;
+        private final PrintWriter out;
+        private final StringBuilder buffer;
         private int indentCount;
-        private int indentWidth;
-        private int tabColumn;
+        private final int indentWidth;
+        private final int tabColumn;
         private boolean pendingNewline;
+        private int pendingSpaces;
     }
 }
 
--- a/langtools/src/share/classes/com/sun/tools/javap/ConstantWriter.java	Fri Feb 21 11:40:51 2014 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javap/ConstantWriter.java	Mon Feb 24 13:06:07 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -64,7 +64,7 @@
             public Integer visitClass(CONSTANT_Class_info info, Void p) {
                 print("#" + info.name_index);
                 tab();
-                println("//  " + stringValue(info));
+                println("// " + stringValue(info));
                 return 1;
             }
 
@@ -76,7 +76,7 @@
             public Integer visitFieldref(CONSTANT_Fieldref_info info, Void p) {
                 print("#" + info.class_index + ".#" + info.name_and_type_index);
                 tab();
-                println("//  " + stringValue(info));
+                println("// " + stringValue(info));
                 return 1;
             }
 
@@ -93,14 +93,14 @@
             public Integer visitInterfaceMethodref(CONSTANT_InterfaceMethodref_info info, Void p) {
                 print("#" + info.class_index + ".#" + info.name_and_type_index);
                 tab();
-                println("//  " + stringValue(info));
+                println("// " + stringValue(info));
                 return 1;
             }
 
             public Integer visitInvokeDynamic(CONSTANT_InvokeDynamic_info info, Void p) {
                 print("#" + info.bootstrap_method_attr_index + ":#" + info.name_and_type_index);
                 tab();
-                println("//  " + stringValue(info));
+                println("// " + stringValue(info));
                 return 1;
             }
 
@@ -112,21 +112,21 @@
             public Integer visitNameAndType(CONSTANT_NameAndType_info info, Void p) {
                 print("#" + info.name_index + ":#" + info.type_index);
                 tab();
-                println("//  " + stringValue(info));
+                println("// " + stringValue(info));
                 return 1;
             }
 
             public Integer visitMethodref(CONSTANT_Methodref_info info, Void p) {
                 print("#" + info.class_index + ".#" + info.name_and_type_index);
                 tab();
-                println("//  " + stringValue(info));
+                println("// " + stringValue(info));
                 return 1;
             }
 
             public Integer visitMethodHandle(CONSTANT_MethodHandle_info info, Void p) {
                 print("#" + info.reference_kind.tag + ":#" + info.reference_index);
                 tab();
-                println("//  " + stringValue(info));
+                println("// " + stringValue(info));
                 return 1;
             }
 
@@ -140,7 +140,7 @@
             public Integer visitString(CONSTANT_String_info info, Void p) {
                 print("#" + info.string_index);
                 tab();
-                println("//  " + stringValue(info));
+                println("// " + stringValue(info));
                 return 1;
             }
 
--- a/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java	Fri Feb 21 11:40:51 2014 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java	Mon Feb 24 13:06:07 2014 -0800
@@ -273,7 +273,9 @@
             void process(JavapTask task, String opt, String arg) throws BadArgs {
                 int sep = opt.indexOf(":");
                 try {
-                    task.options.indentWidth = Integer.valueOf(opt.substring(sep + 1));
+                    int i = Integer.valueOf(opt.substring(sep + 1));
+                    if (i > 0) // silently ignore invalid values
+                        task.options.indentWidth = i;
                 } catch (NumberFormatException e) {
                 }
             }
@@ -289,7 +291,9 @@
             void process(JavapTask task, String opt, String arg) throws BadArgs {
                 int sep = opt.indexOf(":");
                 try {
-                    task.options.tabColumn = Integer.valueOf(opt.substring(sep + 1));
+                    int i = Integer.valueOf(opt.substring(sep + 1));
+                    if (i > 0) // silently ignore invalid values
+                        task.options.tabColumn = i;
                 } catch (NumberFormatException e) {
                 }
             }
@@ -525,8 +529,12 @@
             }
         }
 
-        if (fileManager.handleOption(name, rest))
-            return;
+        try {
+            if (fileManager.handleOption(name, rest))
+                return;
+        } catch (IllegalArgumentException e) {
+            throw new BadArgs("err.invalid.use.of.option", name).showUsage(true);
+        }
 
         throw new BadArgs("err.unknown.option", name).showUsage(true);
     }
--- a/langtools/src/share/classes/com/sun/tools/javap/Options.java	Fri Feb 21 11:40:51 2014 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javap/Options.java	Mon Feb 24 13:06:07 2014 -0800
@@ -86,6 +86,6 @@
     public boolean showConstants;
     public boolean sysInfo;
     public boolean showInnerClasses;
-    public int indentWidth = 2;   // #spaces per indentWidth level
-    public int tabColumn = 40;    // column number for comments
+    public int indentWidth = 2;   // #spaces per indentWidth level; must be > 0
+    public int tabColumn = 40;    // column number for comments; must be > 0
 }
--- a/langtools/src/share/classes/com/sun/tools/javap/resources/javap.properties	Fri Feb 21 11:40:51 2014 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javap/resources/javap.properties	Mon Feb 24 13:06:07 2014 -0800
@@ -13,6 +13,7 @@
 err.missing.arg=no value given for {0}
 err.no.classes.specified=no classes specified
 err.not.standard.file.manager=can only specify class files when using a standard file manager
+err.invalid.use.of.option=invalid use of option: {0}
 err.unknown.option=unknown option: {0}
 err.no.SourceFile.attribute=no SourceFile attribute
 err.source.file.not.found=source file not found
@@ -77,7 +78,7 @@
 \  -bootclasspath <path>    Override location of bootstrap class files
 
 main.opt.constants=\
-\  -constants               Show static final constants
+\  -constants               Show final constants
 
 
 main.opt.sysinfo=\
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testSingleQuotedLink/TestSingleQuotedLink.java	Mon Feb 24 13:06:07 2014 -0800
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 6457406
+ * @summary Verify that a link in single quotes copied to the class-use page as is.
+ * @author Yuri Nesterenko
+ * @library ../lib/
+ * @build JavadocTester TestSingleQuotedLink
+ * @run main TestSingleQuotedLink
+ */
+public class TestSingleQuotedLink extends JavadocTester {
+
+    private static final String BUG_ID = "6457406";
+    // We are testing the redirection algorithm with a known scenario when a writer is not forced to ignore it: "-use".
+    private static final String[][] TEST = {
+        {BUG_ID + FS + "pkg1" + FS + "class-use" + FS + "C1.html",
+            "<a href=\'http://download.oracle.com/javase/8/docs/technotes/guides/indexC2.html\'>"
+        }
+    };
+    private static final String[][] NEGATED_TEST = {
+        {BUG_ID + FS + "pkg1" + FS + "class-use" + FS + "C1.html",
+            "pkg1/\'http://download.oracle.com/javase/8/docs/technotes/guides/indexC2.html\'>"
+        }
+    };
+    private static final String[] ARGS =
+            new String[]{
+        "-d", BUG_ID, "-sourcepath", SRC_DIR, "-use", "pkg1"
+    };
+
+    /**
+     * The entry point of the test.
+     * @param args the array of command line arguments.
+     */
+    public static void main(String[] args) {
+        TestSingleQuotedLink tester = new TestSingleQuotedLink();
+        run(tester, ARGS, TEST, NEGATED_TEST);
+        tester.printSummary();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getBugId() {
+        return BUG_ID;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getBugName() {
+        return getClass().getName();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testSingleQuotedLink/pkg1/C1.java	Mon Feb 24 13:06:07 2014 -0800
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg1;
+
+/**
+ * Class 1. This is a test.
+ */
+public class C1 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testSingleQuotedLink/pkg1/C2.java	Mon Feb 24 13:06:07 2014 -0800
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg1;
+
+/**
+ * Class 2 refers to <a href='http://download.oracle.com/javase/8/docs/technotes/guides/indexC2.html'>Here</a>.
+ * This is a single quoted link.
+ */
+public class C2 extends C1 {}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testSingleQuotedLink/pkg1/package.html	Mon Feb 24 13:06:07 2014 -0800
@@ -0,0 +1,14 @@
+<html>
+<head>
+<title>javax.management package</title>
+</head>
+<body bgcolor="white">
+    This is a test.
+    <p id="spec">
+        <a href='http://download.oracle.com/javase/8/docs/technotes/guides/indexdocument.html'>
+            Another Test document 2.</a> Single quotes also but as of now, package-summary writer excluded from redirection algorithm.
+
+        @since 1.5
+
+</body>
+</html>
--- a/langtools/test/tools/javac/T8029240/DefaultMethodsNotVisibileForSource7Test.java	Fri Feb 21 11:40:51 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,164 +0,0 @@
-/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 8029240
- * @summary Default methods not always visible under -source 7
- * @library /tools/javac/lib
- * @build ToolBox
- * @run main DefaultMethodsNotVisibileForSource7Test
- */
-
-import java.nio.file.Files;
-import java.nio.file.Paths;
-
-public class DefaultMethodsNotVisibileForSource7Test {
-    // common definitions
-
-    // this one should be compiled with source 8, the rest with source 7
-    static final String ISrc =
-        "interface I {\n" +
-        "    default void m() {}\n" +
-        "}";
-
-    static final String JSrc =
-        "interface J extends I {}";
-
-    static final String ASrc =
-        "abstract class A implements I {}";
-
-    static final String BSrc =
-        "class B implements I {}";
-
-    // test legacy implementations
-    static final String C1Src =
-        "class C1 implements I {\n" +
-        "    @Override public void m() {}\n" +
-        "}";
-
-    static final String C2Src =
-        "class C2 implements J {\n" +
-        "    @Override public void m() {}\n" +
-        "}";
-
-    static final String C3Src =
-        "class C3 extends A {\n" +
-        "    @Override public void m() {}\n" +
-        "}";
-
-    static final String C4Src =
-        "class C4 extends B {\n" +
-        "    @Override public void m() {}\n" +
-        "}";
-
-    //test legacy invocations
-    static final String LegacyInvocationSrc =
-        "class LegacyInvocation {\n" +
-        "    public static void test(I i, J j, A a, B b) {\n" +
-        "        i.m();\n" +
-        "        j.m();\n" +
-        "        a.m();\n" +
-        "        b.m();\n" +
-        "    }\n" +
-        "}";
-
-    //test case super invocations
-    static final String SubASrc =
-        "class SubA extends A {\n" +
-        "    public void test() {\n" +
-        "        super.m();\n" +
-        "    }\n" +
-        "}";
-
-    static final String SubBSrc =
-        "class SubB extends B {\n" +
-        "    public void test() {\n" +
-        "        super.m();\n" +
-        "    }\n" +
-        "}";
-
-    public static void main(String[] args) throws Exception {
-        new DefaultMethodsNotVisibileForSource7Test().run();
-    }
-
-    void run() throws Exception {
-        testsPreparation();
-        testLegacyImplementations();
-        testLegacyInvocations();
-        testSuperInvocations();
-    }
-
-    void testsPreparation() throws Exception {
-        Files.createDirectory(Paths.get("out"));
-
-        /* as an extra check let's make sure that interface 'I' can't be compiled
-         * with source 7
-         */
-        ToolBox.JavaToolArgs javacArgs =
-                new ToolBox.JavaToolArgs(ToolBox.Expect.FAIL)
-                .setOptions("-d", "out", "-source", "7")
-                .setSources(ISrc);
-        ToolBox.javac(javacArgs);
-
-        //but it should compile with source >= 8
-        javacArgs =
-                new ToolBox.JavaToolArgs()
-                .setOptions("-d", "out")
-                .setSources(ISrc);
-        ToolBox.javac(javacArgs);
-
-        javacArgs =
-                new ToolBox.JavaToolArgs()
-                .setOptions("-cp", "out", "-d", "out", "-source", "7")
-                .setSources(JSrc, ASrc, BSrc);
-        ToolBox.javac(javacArgs);
-    }
-
-    void testLegacyImplementations() throws Exception {
-        //compile C1-4
-        ToolBox.JavaToolArgs javacArgs =
-                new ToolBox.JavaToolArgs()
-                .setOptions("-cp", "out", "-d", "out", "-source", "7")
-                .setSources(C1Src, C2Src, C3Src, C4Src);
-        ToolBox.javac(javacArgs);
-    }
-
-    void testLegacyInvocations() throws Exception {
-        //compile LegacyInvocation
-        ToolBox.JavaToolArgs javacArgs =
-                new ToolBox.JavaToolArgs()
-                .setOptions("-cp", "out", "-d", "out", "-source", "7")
-                .setSources(LegacyInvocationSrc);
-        ToolBox.javac(javacArgs);
-    }
-
-    void testSuperInvocations() throws Exception {
-        //compile SubA, SubB
-        ToolBox.JavaToolArgs javacArgs =
-                new ToolBox.JavaToolArgs()
-                .setOptions("-cp", "out", "-d", "out", "-source", "7")
-                .setSources(SubASrc, SubBSrc);
-        ToolBox.javac(javacArgs);
-    }
-}
--- a/langtools/test/tools/javac/api/TestTrees.java	Fri Feb 21 11:40:51 2014 -0800
+++ b/langtools/test/tools/javac/api/TestTrees.java	Mon Feb 24 13:06:07 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 6346249 6392177
+ * @bug 6346249 6392177 6411385
  * @summary new Trees API
  */
 
@@ -51,6 +51,9 @@
     @Anno
     int annoField;
 
+    @Anno
+    public TestTrees() {
+    }
 
     static final String testSrcDir = System.getProperty("test.src");
     static final String testClassDir = System.getProperty("test.classes");
@@ -75,7 +78,7 @@
         Iterable<? extends JavaFileObject> files =
             fm.getJavaFileObjectsFromFiles(Arrays.asList(new File(testSrcDir, self + ".java")));
 
-        Iterable<String> opts = Arrays.asList("-d", ".");
+        Iterable<String> opts = Arrays.asList("-d", ".", "-XDcompilePolicy=simple");
 
         System.err.println("simple compilation, no processing");
         JavacTask task = tool.getTask(out, fm, dl, opts, null, files);
@@ -83,7 +86,8 @@
         if (!task.call())
             throw new AssertionError("compilation failed");
 
-        opts =  Arrays.asList("-d", ".", "-processorpath", testClassDir, "-processor", self);
+        opts =  Arrays.asList("-d", ".", "-processorpath", testClassDir, "-processor", self,
+            "-XDcompilePolicy=simple");
 
         System.err.println();
         System.err.println("compilation with processing");
@@ -138,7 +142,7 @@
         System.err.println("testAnnotation: " + e + " " + a);
         Tree tree = trees.getTree(e, a);
 
-        if (tree.getKind() != Tree.Kind.ANNOTATION)
+        if (tree.getKind() != Tree.Kind.ANNOTATION && tree.getKind() != Tree.Kind.TYPE_ANNOTATION)
             error("bad result from getTree");
 
         TreePath path = trees.getPath(e, a);
@@ -146,6 +150,36 @@
             error("bad result from getPath");
     }
 
+    void testAllDeclarations(Trees trees, CompilationUnitTree cut) {
+        new TreePathScanner<Void, Void>() {
+            @Override public Void scan(Tree tree, Void p) {
+                if (tree == null) return null;
+                switch (tree.getKind()) {
+                    case METHOD: case CLASS: case VARIABLE: case TYPE_PARAMETER:
+                        TreePath path = new TreePath(getCurrentPath(), tree);
+                        Element el = trees.getElement(path);
+                        if (el == null) {
+                            error("null element");
+                        } else {
+                            TreePath inferred = trees.getPath(el);
+                            if (inferred == null) {
+                                error("null path");
+                            } else {
+                                if (inferred.getLeaf() != path.getLeaf())
+                                    error("bad result from getPath");
+                            }
+                            if (trees.getTree(el) != path.getLeaf())
+                                error("bad result from getTree");
+                            for (AnnotationMirror m: el.getAnnotationMirrors()) {
+                                testAnnotation(trees, el, m);
+                            }
+                        }
+                }
+                return super.scan(tree, p);
+            }
+        }.scan(cut, null);
+    }
+
     void error(String msg) {
         if (messager != null)
             // annotation processing will happen in a separate instance/classloader
@@ -202,6 +236,7 @@
             switch (e.getKind()) {
             case ANALYZE:
                 testElement(Trees.instance(task), e.getTypeElement());
+                testAllDeclarations(Trees.instance(task), e.getCompilationUnit());
                 break;
             }
         }
@@ -209,8 +244,19 @@
         private final JavacTask task;
     }
 
+    public static class TestTypeParams<@Anno T extends CharSequence> {
+        public <@Anno T extends Object> TestTypeParams(T param) { }
+        public <@Anno T extends Number> void m(T param) {
+            int local;
+            try {
+                new String();
+            } catch (Exception exc) { }
+        }
+    }
 }
 
 @Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.TYPE, ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.TYPE_PARAMETER,
+         ElementType.FIELD, ElementType.LOCAL_VARIABLE})
 @interface Anno {
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/defaultMethodsVisibility/DefaultMethodsNotVisibleForSourceLessThan8Test.java	Mon Feb 24 13:06:07 2014 -0800
@@ -0,0 +1,180 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8029240 8030855
+ * @summary Default methods not always visible under -source 7
+ * Default methods should be visible under source previous to 8
+ * @library /tools/javac/lib
+ * @build ToolBox
+ * @run main DefaultMethodsNotVisibleForSourceLessThan8Test
+ */
+
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+public class DefaultMethodsNotVisibleForSourceLessThan8Test {
+    // common definitions
+
+    // this one should be compiled with source 8, the rest with source < 8
+    static final String ISrc =
+        "interface I {\n" +
+        "    default void m() {}\n" +
+        "}";
+
+    static final String JSrc =
+        "interface J extends I {}";
+
+    static final String ASrc =
+        "abstract class A implements I {}";
+
+    static final String BSrc =
+        "class B implements I {}";
+
+    // test legacy implementations
+    static final String C1Src =
+        "class C1 implements I {\n" +
+        "    public void m() {}\n" +
+        "}";
+
+    static final String C2Src =
+        "class C2 implements J {\n" +
+        "    public void m() {}\n" +
+        "}";
+
+    static final String C3Src =
+        "class C3 extends A {\n" +
+        "    public void m() {}\n" +
+        "}";
+
+    static final String C4Src =
+        "class C4 extends B {\n" +
+        "    public void m() {}\n" +
+        "}";
+
+    //test legacy invocations
+    static final String LegacyInvocationSrc =
+        "class LegacyInvocation {\n" +
+        "    public static void test(I i, J j, A a, B b) {\n" +
+        "        i.m();\n" +
+        "        j.m();\n" +
+        "        a.m();\n" +
+        "        b.m();\n" +
+        "    }\n" +
+        "}";
+
+    //test case super invocations
+    static final String SubASrc =
+        "class SubA extends A {\n" +
+        "    public void test() {\n" +
+        "        super.m();\n" +
+        "    }\n" +
+        "}";
+
+    static final String SubBSrc =
+        "class SubB extends B {\n" +
+        "    public void test() {\n" +
+        "        super.m();\n" +
+        "    }\n" +
+        "}";
+
+    public static void main(String[] args) throws Exception {
+        String[] sources = new String[] {
+            "1.2",
+            "1.3",
+            "1.4",
+            "1.5",
+            "1.6",
+            "1.7",
+        };
+        for (String source : sources) {
+            new DefaultMethodsNotVisibleForSourceLessThan8Test().run(source);
+        }
+    }
+
+    String outDir;
+    String source;
+
+    void run(String source) throws Exception {
+        this.source = source;
+        outDir = "out" + source.replace('.', '_');
+        testsPreparation();
+        testLegacyImplementations();
+        testLegacyInvocations();
+        testSuperInvocations();
+    }
+
+    void testsPreparation() throws Exception {
+        Files.createDirectory(Paths.get(outDir));
+
+        /* as an extra check let's make sure that interface 'I' can't be compiled
+         * with source < 8
+         */
+        ToolBox.JavaToolArgs javacArgs =
+                new ToolBox.JavaToolArgs(ToolBox.Expect.FAIL)
+                .setOptions("-d", outDir, "-source", source)
+                .setSources(ISrc);
+        ToolBox.javac(javacArgs);
+
+        //but it should compile with source >= 8
+        javacArgs =
+                new ToolBox.JavaToolArgs()
+                .setOptions("-d", outDir)
+                .setSources(ISrc);
+        ToolBox.javac(javacArgs);
+
+        javacArgs =
+                new ToolBox.JavaToolArgs()
+                .setOptions("-cp", outDir, "-d", outDir, "-source", source)
+                .setSources(JSrc, ASrc, BSrc);
+        ToolBox.javac(javacArgs);
+    }
+
+    void testLegacyImplementations() throws Exception {
+        //compile C1-4
+        ToolBox.JavaToolArgs javacArgs =
+                new ToolBox.JavaToolArgs()
+                .setOptions("-cp", outDir, "-d", outDir, "-source", source)
+                .setSources(C1Src, C2Src, C3Src, C4Src);
+        ToolBox.javac(javacArgs);
+    }
+
+    void testLegacyInvocations() throws Exception {
+        //compile LegacyInvocation
+        ToolBox.JavaToolArgs javacArgs =
+                new ToolBox.JavaToolArgs()
+                .setOptions("-cp", outDir, "-d", outDir, "-source", source)
+                .setSources(LegacyInvocationSrc);
+        ToolBox.javac(javacArgs);
+    }
+
+    void testSuperInvocations() throws Exception {
+        //compile SubA, SubB
+        ToolBox.JavaToolArgs javacArgs =
+                new ToolBox.JavaToolArgs()
+                .setOptions("-cp", outDir, "-d", outDir, "-source", source)
+                .setSources(SubASrc, SubBSrc);
+        ToolBox.javac(javacArgs);
+    }
+}
--- a/langtools/test/tools/javac/diags/CheckResourceKeys.java	Fri Feb 21 11:40:51 2014 -0800
+++ b/langtools/test/tools/javac/diags/CheckResourceKeys.java	Mon Feb 24 13:06:07 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,7 @@
 import java.util.*;
 import javax.tools.*;
 import com.sun.tools.classfile.*;
+import com.sun.tools.javac.code.Lint.LintCategory;
 
 /**
  * Compare string constants in javac classes against keys in javac resource bundles.
@@ -156,6 +157,20 @@
             if (needToInvestigate.contains(rk))
                 continue;
 
+            //check lint description keys:
+            if (s.startsWith("opt.Xlint.desc.")) {
+                String option = s.substring(15);
+                boolean found = false;
+
+                for (LintCategory lc : LintCategory.values()) {
+                    if (option.equals(lc.option))
+                        found = true;
+                }
+
+                if (found)
+                    continue;
+            }
+
             error("Resource key not found in code: " + rk);
         }
     }
@@ -274,6 +289,7 @@
             // prefix/embedded strings
             "compiler.",
             "compiler.misc.",
+            "opt.Xlint.desc.",
             "count.",
             "illegal.",
             "javac.",
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/implicitCompile/Implicit.java	Mon Feb 24 13:06:07 2014 -0800
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+class Implicit {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/implicitCompile/SkipAttrFlowGenForImplicits.java	Mon Feb 24 13:06:07 2014 -0800
@@ -0,0 +1,9 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8030714
+ * @summary make sure attribute and flow is skipped for implicit classes
+ * @compile/ref=SkipAttrFlowGenForImplicits.out -XDverboseCompilePolicy -implicit:none SkipAttrFlowGenForImplicits.java
+ */
+class Explicit {
+    Implicit implicit;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/implicitCompile/SkipAttrFlowGenForImplicits.out	Mon Feb 24 13:06:07 2014 -0800
@@ -0,0 +1,4 @@
+[attribute Explicit]
+[flow Explicit]
+[desugar Explicit]
+[generate code Explicit]
--- a/langtools/test/tools/javac/nativeHeaders/javahComparison/CompareTest.java	Fri Feb 21 11:40:51 2014 -0800
+++ b/langtools/test/tools/javac/nativeHeaders/javahComparison/CompareTest.java	Mon Feb 24 13:06:07 2014 -0800
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 7150368 8003412 8000407
+ * @bug 7150368 8003412 8000407 8031545
  * @summary javac should include basic ability to generate native headers
  */
 
--- a/langtools/test/tools/javac/nativeHeaders/javahComparison/TestClass1.java	Fri Feb 21 11:40:51 2014 -0800
+++ b/langtools/test/tools/javac/nativeHeaders/javahComparison/TestClass1.java	Mon Feb 24 13:06:07 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -129,50 +129,52 @@
     native List<String>[] gaamn();
 
     // overloaded Java methods
-    byte bm1() { return 0; }
-    short sm1() { return 0; }
-    int im1() { return 0; }
-    long lm1() { return 0; }
-    float fm1() { return 0; }
-    double dm1() { return 0; }
-    Object om1() { return null; }
-    String tm1() { return ""; }
-    List<String> gm1() { return null; }
-    void vm1() { }
+    byte bmo() { return 0; }
+    short smo() { return 0; }
+    int imo() { return 0; }
+    long lmo() { return 0; }
+    float fmo() { return 0; }
+    double dmo() { return 0; }
+    Object omo() { return null; }
+    String tmo() { return ""; }
+    List<String> gmo() { return null; }
+    void vmo() { }
 
-    byte bm2(int i) { return 0; }
-    short sm2(int i) { return 0; }
-    int im2(int i) { return 0; }
-    long lm2(int i) { return 0; }
-    float fm2(int i) { return 0; }
-    double dm2(int i) { return 0; }
-    Object om2(int i) { return null; }
-    String tm2(int i) { return ""; }
-    List<String> gm2(int i) { return null; }
-    void vm2(int i) { }
+    byte bmo(int i) { return 0; }
+    short smo(int i) { return 0; }
+    int imo(int i) { return 0; }
+    long lmo(int i) { return 0; }
+    float fmo(int i) { return 0; }
+    double dmo(int i) { return 0; }
+    Object omo(int i) { return null; }
+    String tmo(int i) { return ""; }
+    List<String> gmo(int i) { return null; }
+    void vmo(int i) { }
 
     // overloaded native methods
-    native byte bmn1();
-    native short smn1();
-    native int imn1();
-    native long lmn1();
-    native float fmn1();
-    native double dmn1();
-    native Object omn1();
-    native String tmn1();
-    native List<String> gmn1();
-    native void vmn1();
+    native byte bmno();
+    native short smno();
+    native int imno();
+    native long lmno();
+    native float fmno();
+    native double dmno();
+    native Object omno();
+    native String tmno();
+    native List<String> gmno();
+    native void vmno();
+    native Inner1 icmno();
 
-    native byte bmn2(int i);
-    native short smn2(int i);
-    native int imn2(int i);
-    native long lmn2(int i);
-    native float fmn2(int i);
-    native double dmn2(int i);
-    native Object omn2(int i);
-    native String tmn2(int i);
-    native List<String> gmn2(int i);
-    native void vmn2(int i);
+    native byte bmno(int i);
+    native short smno(int i);
+    native int imno(int i);
+    native long lmno(int i);
+    native float fmno(int i);
+    native double dmno(int i);
+    native Object omno(int i);
+    native String tmno(int i);
+    native List<String> gmno(int i);
+    native void vmno(int i);
+    native Inner1 icmno(Inner1 in1);
 
     // arg types for Java methods
     void mb(byte b) { }
@@ -266,50 +268,50 @@
         native void vmn();
 
         // overloaded Java methods
-        byte bm1() { return 0; }
-        short sm1() { return 0; }
-        int im1() { return 0; }
-        long lm1() { return 0; }
-        float fm1() { return 0; }
-        double dm1() { return 0; }
-        Object om1() { return null; }
-        String tm1() { return ""; }
-        List<String> gm1() { return null; }
-        void vm1() { }
+        byte bmo() { return 0; }
+        short smo() { return 0; }
+        int imo() { return 0; }
+        long lmo() { return 0; }
+        float fmo() { return 0; }
+        double dmo() { return 0; }
+        Object omo() { return null; }
+        String tmo() { return ""; }
+        List<String> gmo() { return null; }
+        void vmo() { }
 
-        byte bm2(int i) { return 0; }
-        short sm2(int i) { return 0; }
-        int im2(int i) { return 0; }
-        long lm2(int i) { return 0; }
-        float fm2(int i) { return 0; }
-        double dm2(int i) { return 0; }
-        Object om2(int i) { return null; }
-        String tm2(int i) { return ""; }
-        List<String> gm2(int i) { return null; }
-        void vm2(int i) { }
+        byte bmo(int i) { return 0; }
+        short smo(int i) { return 0; }
+        int imo(int i) { return 0; }
+        long lmo(int i) { return 0; }
+        float fmo(int i) { return 0; }
+        double dmo(int i) { return 0; }
+        Object omo(int i) { return null; }
+        String tmo(int i) { return ""; }
+        List<String> gmo(int i) { return null; }
+        void vmo(int i) { }
 
         // overloaded native methods
-        native byte bmn1();
-        native short smn1();
-        native int imn1();
-        native long lmn1();
-        native float fmn1();
-        native double dmn1();
-        native Object omn1();
-        native String tmn1();
-        native List<String> gmn1();
-        native void vmn1();
+        native byte bmno();
+        native short smno();
+        native int imno();
+        native long lmno();
+        native float fmno();
+        native double dmno();
+        native Object omno();
+        native String tmno();
+        native List<String> gmno();
+        native void vmno();
 
-        native byte bmn2(int i);
-        native short smn2(int i);
-        native int imn2(int i);
-        native long lmn2(int i);
-        native float fmn2(int i);
-        native double dmn2(int i);
-        native Object omn2(int i);
-        native String tmn2(int i);
-        native List<String> gmn2(int i);
-        native void vmn2(int i);
+        native byte bmno(int i);
+        native short smno(int i);
+        native int imno(int i);
+        native long lmno(int i);
+        native float fmno(int i);
+        native double dmno(int i);
+        native Object omno(int i);
+        native String tmno(int i);
+        native List<String> gmno(int i);
+        native void vmno(int i);
 
         // arg types for Java methods
         void mb(byte b) { }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/parser/T4910483.java	Mon Feb 24 13:06:07 2014 -0800
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug     4910483
+ * @summary javac shouldn't throw NPE while compiling invalid RuntimeInvisibleParameterAnnotations
+ * @run main T4910483
+ */
+
+import java.io.File;
+
+import com.sun.tools.javac.main.JavaCompiler;
+import com.sun.tools.javac.file.JavacFileManager;
+import com.sun.tools.javac.tree.JCTree;
+import com.sun.tools.javac.util.Context;
+
+import javax.tools.JavaFileObject;
+
+/**Test comment abc*\\def*/
+public class T4910483 {
+    public static void main(String... args) {
+        JavaCompiler compiler = JavaCompiler.instance(new Context());
+        compiler.keepComments = true;
+
+        String testSrc = System.getProperty("test.src");
+        JavacFileManager fm = new JavacFileManager(new Context(), false, null);
+        JavaFileObject f = fm.getFileForInput(testSrc + File.separatorChar + "T4910483.java");
+
+        JCTree.JCCompilationUnit cu = compiler.parse(f);
+        JCTree classDef = cu.getTypeDecls().head;
+        String commentText = cu.docComments.getCommentText(classDef);
+
+        String expected = "Test comment abc*\\\\def"; // 4 '\' escapes to 2 in a string literal
+        if (!expected.equals(commentText)) {
+            throw new AssertionError("Incorrect comment text: [" + commentText + "], expected [" + expected + "]");
+        }
+    }
+}
--- a/langtools/test/tools/javac/profiles/ProfileOptionTest.java	Fri Feb 21 11:40:51 2014 -0800
+++ b/langtools/test/tools/javac/profiles/ProfileOptionTest.java	Mon Feb 24 13:06:07 2014 -0800
@@ -184,8 +184,7 @@
                 com.sun.security.auth.PolicyFile.class); // specifically included in 3
 
         init(Profile.DEFAULT,
-                java.beans.BeanInfo.class,
-                javax.management.remote.rmi._RMIServer_Stub.class); // specifically excluded in 3
+                java.beans.BeanInfo.class);
     }
 
     void init(Profile p, Class<?>... classes) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/warnings/VerifyLintDescriptions.java	Mon Feb 24 13:06:07 2014 -0800
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8033961
+ * @summary Verify that all LintCategories have their descriptions filled.
+ */
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+import com.sun.tools.javac.code.Lint.LintCategory;
+import com.sun.tools.javac.util.Log.PrefixKind;
+
+public class VerifyLintDescriptions {
+    public static void main(String... args) {
+        ResourceBundle b = ResourceBundle.getBundle("com.sun.tools.javac.resources.javac",
+                                                    Locale.US);
+
+        List<String> missing = new ArrayList<>();
+
+        for (LintCategory lc : LintCategory.values()) {
+            try {
+                b.getString(PrefixKind.JAVAC.key("opt.Xlint.desc." + lc.option));
+            } catch (MissingResourceException ex) {
+                missing.add(lc.option);
+            }
+        }
+
+        if (!missing.isEmpty()) {
+            throw new UnsupportedOperationException("Lints that are missing description: " + missing);
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/warnings/suppress/Overridden.java	Mon Feb 24 13:06:07 2014 -0800
@@ -0,0 +1,16 @@
+/**
+ * @test /nodynamiccopyright/
+ * @bug 8033421
+ * @summary Check that \\@SuppressWarnings works properly when overriding deprecated method.
+ * @build VerifySuppressWarnings
+ * @compile/ref=Overridden.out -XDrawDiagnostics -Xlint:deprecation Overridden.java
+ * @run main VerifySuppressWarnings Overridden.java
+ */
+
+public class Overridden implements Interface {
+    public void test() { }
+}
+
+interface Interface {
+    @Deprecated void test();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/warnings/suppress/Overridden.out	Mon Feb 24 13:06:07 2014 -0800
@@ -0,0 +1,2 @@
+Overridden.java:11:17: compiler.warn.has.been.deprecated: test(), Interface
+1 warning
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/warnings/suppress/OverriddenSuppressed.java	Mon Feb 24 13:06:07 2014 -0800
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8033421
+ * @summary Check that \\@SuppressWarnings works properly when overriding deprecated method.
+ * @compile -Werror -Xlint:deprecation OverriddenSuppressed.java
+ */
+
+public class OverriddenSuppressed implements Interface {
+    @SuppressWarnings("deprecation")
+    public void test() { }
+}
+
+interface Interface {
+    @Deprecated void test();
+}
--- a/langtools/test/tools/javadoc/parser/7091528/T7091528.java	Fri Feb 21 11:40:51 2014 -0800
+++ b/langtools/test/tools/javadoc/parser/7091528/T7091528.java	Mon Feb 24 13:06:07 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,8 +23,8 @@
 
 /**
  * @test
- * @bug     7091528
- * @summary javadoc attempts to parse .class files
+ * @bug     7091528 8029145
+ * @summary ensures javadoc parses unique source files and ignores all class files
  * @compile p/C1.java p/q/C2.java
  * @run main T7091528
  */
@@ -37,17 +37,22 @@
     public static void main(String... args) {
         new T7091528().run();
     }
-
     void run() {
         File testSrc = new File(System.getProperty("test.src"));
         File testClasses = new File(System.getProperty("test.classes"));
-        String[] args = {
-            "-d", ".",
+        // 7091528, tests if class files are being ignored
+        runTest("-d", ".",
             "-sourcepath", testClasses + File.pathSeparator + testSrc,
             "-subpackages",
-            "p"
-        };
+            "p");
+        // 8029145, tests if unique source files are parsed
+        runTest("-d", ".",
+            "-sourcepath", testSrc.getAbsolutePath(),
+            "-subpackages",
+            "p:p.q");
 
+    }
+    void runTest(String... args) {
         StringWriter sw = new StringWriter();
         PrintWriter pw = new PrintWriter(sw);
         String doclet = com.sun.tools.doclets.standard.Standard.class.getName();
--- a/langtools/test/tools/javap/MethodParameters.java	Fri Feb 21 11:40:51 2014 -0800
+++ b/langtools/test/tools/javap/MethodParameters.java	Mon Feb 24 13:06:07 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -44,24 +44,24 @@
     static final String Init0_expected =
         ("  Foo();\n" +
          "    descriptor: ()V\n" +
-         "    flags: \n" +
+         "    flags:\n" +
          "    Code:\n" +
          "      stack=1, locals=1, args_size=1\n" +
-         "         0: aload_0       \n" +
+         "         0: aload_0\n" +
          "         1: invokespecial #1                  // Method java/lang/Object.\"<init>\":()V\n" +
-         "         4: return        \n" +
+         "         4: return\n" +
          "      LineNumberTable:\n" +
          "        line 2: 0").replaceAll(" +", " ");
 
     static final String Init1_expected =
         ("  Foo(int);\n" +
          "    descriptor: (I)V\n" +
-         "    flags: \n" +
+         "    flags:\n" +
          "    Code:\n" +
          "      stack=1, locals=2, args_size=2\n" +
-         "         0: aload_0       \n" +
+         "         0: aload_0\n" +
          "         1: invokespecial #1                  // Method java/lang/Object.\"<init>\":()V\n" +
-         "         4: return        \n" +
+         "         4: return\n" +
          "      LineNumberTable:\n" +
          "        line 3: 0\n" +
          "    MethodParameters:\n" +
@@ -71,25 +71,25 @@
     static final String foo0_expected =
         ("  void foo0();\n" +
          "    descriptor: ()V\n" +
-         "    flags: \n" +
+         "    flags:\n" +
          "    Code:\n" +
          "      stack=0, locals=1, args_size=1\n" +
-         "         0: return        \n" +
+         "         0: return\n" +
          "      LineNumberTable:\n" +
          "        line 4: 0").replaceAll(" +", " ");
 
     static final String foo2_expected =
         ("  void foo2(int, int);\n" +
          "    descriptor: (II)V\n" +
-         "    flags: \n" +
+         "    flags:\n" +
          "    Code:\n" +
          "      stack=0, locals=3, args_size=3\n" +
-         "         0: return        \n" +
+         "         0: return\n" +
          "      LineNumberTable:\n" +
          "        line 5: 0\n" +
          "    MethodParameters:\n" +
          "      Name                                Flags\n" +
-         "      j                              \n" +
+         "      j\n" +
          "      k").replaceAll(" +", " ");
 
     static final File classesdir = new File("methodparameters");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javap/StackMapTableTest.java	Mon Feb 24 13:06:07 2014 -0800
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8033930 8033913
+ * @summary bad formatting of StackMapTable entries
+ */
+
+import java.io.*;
+import java.util.*;
+
+public class StackMapTableTest {
+    public static void main(String... args) throws Exception {
+        new StackMapTableTest().run();
+    }
+
+    void run() throws Exception {
+        String testClasses = System.getProperty("test.classes");
+        String out = javap("-v", "-classpath", testClasses, A.class.getName());
+
+        String nl = System.getProperty("line.separator");
+        out = out.replaceAll(nl, "\n");
+
+        if (out.contains("\n\n\n"))
+            error("double blank line found");
+
+        String expect =
+            "      StackMapTable: number_of_entries = 2\n" +
+            "        frame_type = 252 /* append */\n" +
+            "          offset_delta = 2\n" +
+            "          locals = [ int ]\n" +
+            "        frame_type = 250 /* chop */\n" +
+            "          offset_delta = 18\n";
+        if (!out.contains(expect))
+            error("expected text not found");
+
+        if (errors > 0)
+            throw new Exception(errors + " errors found");
+    }
+
+    String javap(String... args) throws Exception {
+        StringWriter sw = new StringWriter();
+        PrintWriter out = new PrintWriter(sw);
+        int rc = com.sun.tools.javap.Main.run(args, out);
+        out.close();
+        System.out.println(sw.toString());
+        if (rc < 0)
+            throw new Exception("javap exited, rc=" + rc);
+        return sw.toString();
+    }
+
+    void error(String msg) {
+        System.out.println("Error: " + msg);
+        errors++;
+    }
+
+    int errors;
+
+    /** Simple test class to run through javap. */
+    public class A {
+        public void a() {
+            for (int i = 0; i < 10; i++) {
+                System.out.println(i);
+            }
+        }
+        public void b() {
+        }
+        public void c() {
+        }
+    }
+}
--- a/langtools/test/tools/javap/T6868539.java	Fri Feb 21 11:40:51 2014 -0800
+++ b/langtools/test/tools/javap/T6868539.java	Mon Feb 24 13:06:07 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 6868539 6868548
+ * @bug 6868539 6868548 8035364
  * @summary javap should use current names for constant pool entries,
  *              remove spurious ';' from constant pool entries
  */
@@ -41,17 +41,17 @@
     void run() {
         String output = javap("T6868539");
         verify(output, "Utf8 +java/lang/String");                                   // 1: Utf8
-                                                                                        // 2: currently unused
+                                                                                    // 2: currently unused
         verify(output, "Integer +123456");                                          // 3: Integer
         verify(output, "Float +123456.0f");                                         // 4: Float
         verify(output, "Long +123456l");                                            // 5: Long
         verify(output, "Double +123456.0d");                                        // 6: Double
-        verify(output, "Class +#[0-9]+ +// + T6868539");                            // 7: Class
-        verify(output, "String +#[0-9]+ +// + not found");                          // 8: String
+        verify(output, "Class +#[0-9]+ +// +T6868539");                             // 7: Class
+        verify(output, "String +#[0-9]+ +// +not found");                           // 8: String
         verify(output, "Fieldref +#[0-9]+\\.#[0-9]+ +// +T6868539.errors:I");       // 9: Fieldref
         verify(output, "Methodref +#[0-9]+\\.#[0-9]+ +// +T6868539.run:\\(\\)V");   // 10: Methodref
         verify(output, "InterfaceMethodref +#[0-9]+\\.#[0-9]+ +// +java/lang/Runnable\\.run:\\(\\)V");
-                                                                                        // 11: InterfaceMethodref
+                                                                                    // 11: InterfaceMethodref
         verify(output, "NameAndType +#[0-9]+:#[0-9]+ +// +run:\\(\\)V");            // 12: NameAndType
         if (errors > 0)
             throw new Error(errors + " found.");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javap/T8033711.java	Mon Feb 24 13:06:07 2014 -0800
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8033711
+ * @summary An exception is thrown if using the "-classpath" option with no arguments
+ */
+
+
+import java.io.*;
+
+public class T8033711 {
+    public static void main(String[] args) throws Exception {
+        new T8033711().run();
+    }
+
+    public void run() throws Exception {
+        String out = javap("-classpath");
+        if (out.contains("IllegalArgumentException"))
+            throw new Exception("exception found in javap output");
+        if (!out.contains("Error: invalid use of option"))
+            throw new Exception("expected error message not found in javap output");
+    }
+
+    String javap(String... args) {
+        StringWriter sw = new StringWriter();
+        PrintWriter out = new PrintWriter(sw);
+        int rc = com.sun.tools.javap.Main.run(args, out);
+        out.close();
+        System.out.println(sw.toString());
+        System.out.println("javap exited, rc=" + rc);
+        return sw.toString();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javap/WhitespaceTest.java	Mon Feb 24 13:06:07 2014 -0800
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8033581 8033798 8033726
+ * @summary Check whitespace in generated output
+ */
+
+import java.io.*;
+import java.util.*;
+
+public class WhitespaceTest {
+    public static void main(String... args) throws Exception {
+        new WhitespaceTest().run();
+    }
+
+    void run() throws Exception {
+        test("-v", "java.lang.String");
+        test("-XDtab:1", "-v", "java.lang.String");
+
+        String testClasses = System.getProperty("test.classes");
+        for (int i = 10; i < 40; i++)
+            test("-XDtab:" + i, "-v", "-classpath", testClasses, "WhitespaceTest$HelloWorld");
+
+        if (errors > 0)
+            throw new Exception(errors + " errors found");
+    }
+
+    void test(String... args) throws Exception {
+        // need to avoid "//" appearing as a constant in the constant pool
+        String slash = "/";
+        String doubleSlash = slash + slash;
+        System.out.println("test: " + Arrays.asList(args));
+        String out = javap(args);
+        for (String line: out.split("[\r\n]+")) {
+            if (line.endsWith(" "))
+                error("line has trailing whitespace: " + line);
+            int comment = line.indexOf(doubleSlash);
+            if (comment > 0 && line.charAt(comment - 1) != ' ')
+                error("no space before comment: " + line);
+            if (line.matches(" +}"))
+                error("bad indentation: " + line);
+        }
+    }
+
+    String javap(String... args) throws Exception {
+        StringWriter sw = new StringWriter();
+        PrintWriter out = new PrintWriter(sw);
+        int rc = com.sun.tools.javap.Main.run(args, out);
+        out.close();
+        System.out.println(sw.toString());
+        if (rc < 0)
+            throw new Exception("javap exited, rc=" + rc);
+        return sw.toString();
+    }
+
+    void error(String msg) {
+        System.out.println("Error: " + msg);
+        errors++;
+    }
+
+    int errors;
+
+    // small class to test repeatedly with different tab values
+    static class HelloWorld {
+        public static void main(String... args) {
+            System.out.println("Hello World!");
+        }
+    }
+}
+
+