# HG changeset patch # User lana # Date 1364877735 25200 # Node ID cfb65ca92082b2412aed66c8422c2466bde544ef # Parent 35cef52b0023dd0c98b3289b230a23b0b09ecf5a# Parent 28e466e9cd34b350f49c432ed7c1ab42659a43bf Merge diff -r 35cef52b0023 -r cfb65ca92082 make/build.xml --- a/make/build.xml Thu Mar 28 10:55:14 2013 -0700 +++ b/make/build.xml Mon Apr 01 21:42:15 2013 -0700 @@ -1,6 +1,6 @@ @@ -678,7 +703,7 @@ jarclasspath="sjavac.jar"/> - + diff -r 35cef52b0023 -r cfb65ca92082 make/netbeans/langtools/nbproject/project.xml --- a/make/netbeans/langtools/nbproject/project.xml Thu Mar 28 10:55:14 2013 -0700 +++ b/make/netbeans/langtools/nbproject/project.xml Mon Apr 01 21:42:15 2013 -0700 @@ -29,15 +29,13 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --> - - - -]> org.netbeans.modules.ant.freeform + langtools + + langtools @@ -49,11 +47,6 @@ ${root} - - java - ${root}/src/share/classes - - tests ${root}/test @@ -63,9 +56,169 @@ build ${root}/make + + + java + ${root}/src/share/classes + + + ${root}/build/classes + - &standard-ide-actions; + + + + build + + + clean + + + clean + build + + + compile-single + ${root}/src/share/classes + + includes + ${root}/src/share/classes + \.java$ + relative-path + + , + + + + + run + + + run-single + + run.classname + ${root}/src/share/classes + \.java$ + java-name + + + + + + + + jtreg + + jtreg.tests + ${root}/test + \.(java|sh)$ + relative-path + + , + + + + + jtreg + + + debug + + + debug-single + + debug.classname + ${root}/src/share/classes + \.java$ + java-name + + + + + + + + debug-jtreg + + jtreg.tests + ${root}/test + \.(java|sh)$ + relative-path + + + + + + + debug-fix + ${root}/src/share/classes + + class + ${root}/src/share/classes + \.java$ + relative-path-noext + + + + + + + javadoc + + + select-tool + + + test-select-tool-1 + + + test-select-tool-2 + folder @@ -86,13 +239,68 @@ ${root}/make + + + ${root}/src/share/classes + README - &standard-context-menu-items; + + + + + + + + + + + + + @@ -101,7 +309,7 @@ ${root}/src/share/classes ${root}/build/classes - 1.5 + 1.5 diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/source/util/DocTreeScanner.java --- a/src/share/classes/com/sun/source/util/DocTreeScanner.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/source/util/DocTreeScanner.java Mon Apr 01 21:42:15 2013 -0700 @@ -53,7 +53,7 @@ * *

Here is an example to count the number of erroneous nodes in a tree: *

- *   class CountErrors extends DocTreeScanner {
+ *   class CountErrors extends DocTreeScanner<Integer,Void> {
  *      {@literal @}Override
  *      public Integer visitErroneous(ErroneousTree node, Void p) {
  *          return 1;
diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/source/util/JavacTask.java
--- a/src/share/classes/com/sun/source/util/JavacTask.java	Thu Mar 28 10:55:14 2013 -0700
+++ b/src/share/classes/com/sun/source/util/JavacTask.java	Mon Apr 01 21:42:15 2013 -0700
@@ -56,7 +56,7 @@
      * If the compiler is being invoked using a
      * {@link javax.tools.JavaCompiler.CompilationTask CompilationTask},
      * then that task will be returned.
-     * @param processingEnvironment
+     * @param processingEnvironment the processing environment
      * @return the {@code JavacTask} for a {@code ProcessingEnvironment}
      * @since 1.8
      */
diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/source/util/Plugin.java
--- a/src/share/classes/com/sun/source/util/Plugin.java	Thu Mar 28 10:55:14 2013 -0700
+++ b/src/share/classes/com/sun/source/util/Plugin.java	Mon Apr 01 21:42:15 2013 -0700
@@ -38,7 +38,7 @@
  *
  * 

Plug-ins are located via a {@link ServiceLoader}, * using the same class path as annotation processors (i.e. - * {@link StandardLocation#PROCESSOR_PATH PROCESSOR_PATH} or + * {@link StandardLocation#ANNOTATION_PROCESSOR_PATH ANNOTATION_PROCESSOR_PATH} or * {@code -processorpath}). * *

It is expected that a typical plug-in will simply register a diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/classfile/Code_attribute.java --- a/src/share/classes/com/sun/tools/classfile/Code_attribute.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/classfile/Code_attribute.java Mon Apr 01 21:42:15 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 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 @@ -38,7 +38,7 @@ * deletion without notice. */ public class Code_attribute extends Attribute { - public class InvalidIndex extends AttributeException { + public static class InvalidIndex extends AttributeException { private static final long serialVersionUID = -8904527774589382802L; InvalidIndex(int index) { this.index = index; @@ -143,7 +143,7 @@ public final Exception_data[] exception_table; public final Attributes attributes; - public class Exception_data { + public static class Exception_data { Exception_data(ClassReader cr) throws IOException { start_pc = cr.readUnsignedShort(); end_pc = cr.readUnsignedShort(); diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/classfile/Descriptor.java --- a/src/share/classes/com/sun/tools/classfile/Descriptor.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/classfile/Descriptor.java Mon Apr 01 21:42:15 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 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 @@ -37,7 +37,7 @@ * deletion without notice. */ public class Descriptor { - public class InvalidDescriptor extends DescriptorException { + public static class InvalidDescriptor extends DescriptorException { private static final long serialVersionUID = 1L; InvalidDescriptor(String desc) { this.desc = desc; diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/doclets/formats/html/FrameOutputWriter.java --- a/src/share/classes/com/sun/tools/doclets/formats/html/FrameOutputWriter.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/FrameOutputWriter.java Mon Apr 01 21:42:15 2013 -0700 @@ -135,13 +135,7 @@ protected Content getFrameDetails() { HtmlTree frameset = HtmlTree.FRAMESET("20%,80%", null, "Documentation frame", "top.loadFrames()"); - if (configuration.showProfiles) { - HtmlTree leftFrameset = HtmlTree.FRAMESET(null, "30%,70%", "Left frames", - "top.loadFrames()"); - addAllProfilesFrameTag(leftFrameset); - addAllClassesFrameTag(leftFrameset); - frameset.addContent(leftFrameset); - } else if (noOfPackages <= 1) { + if (noOfPackages <= 1) { addAllClassesFrameTag(frameset); } else if (noOfPackages > 1) { HtmlTree leftFrameset = HtmlTree.FRAMESET(null, "30%,70%", "Left frames", @@ -156,17 +150,6 @@ } /** - * Add the FRAME tag for the frame that lists all profiles. - * - * @param contentTree the content tree to which the information will be added - */ - private void addAllProfilesFrameTag(Content contentTree) { - HtmlTree frame = HtmlTree.FRAME(DocPaths.PROFILE_OVERVIEW_FRAME.getPath(), - "profileListFrame", configuration.getText("doclet.All_Profiles")); - contentTree.addContent(frame); - } - - /** * Add the FRAME tag for the frame that lists all packages. * * @param contentTree the content tree to which the information will be added diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexFrameWriter.java --- a/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexFrameWriter.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexFrameWriter.java Mon Apr 01 21:42:15 2013 -0700 @@ -162,7 +162,7 @@ */ protected void addAllProfilesLink(Content div) { Content linkContent = getHyperLink(DocPaths.PROFILE_OVERVIEW_FRAME, - allprofilesLabel, "", "profileListFrame"); + allprofilesLabel, "", "packageListFrame"); Content span = HtmlTree.SPAN(linkContent); div.addContent(span); } diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/doclets/formats/html/ProfileIndexFrameWriter.java --- a/src/share/classes/com/sun/tools/doclets/formats/html/ProfileIndexFrameWriter.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/ProfileIndexFrameWriter.java Mon Apr 01 21:42:15 2013 -0700 @@ -107,7 +107,7 @@ String profileName = (Profile.lookup(profile)).name; profileLabel = new StringContent(profileName); profileLinkContent = getHyperLink(DocPaths.profileFrame(profileName), profileLabel, "", - "profileListFrame"); + "packageListFrame"); Content li = HtmlTree.LI(profileLinkContent); return li; } @@ -154,7 +154,7 @@ */ protected void addAllPackagesLink(Content div) { Content linkContent = getHyperLink(DocPaths.OVERVIEW_FRAME, - allpackagesLabel, "", "profileListFrame"); + allpackagesLabel, "", "packageListFrame"); Content span = HtmlTree.SPAN(linkContent); div.addContent(span); } diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageIndexFrameWriter.java --- a/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageIndexFrameWriter.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageIndexFrameWriter.java Mon Apr 01 21:42:15 2013 -0700 @@ -172,7 +172,7 @@ */ protected void addAllPackagesLink(Content div) { Content linkContent = getHyperLink(DocPaths.OVERVIEW_FRAME, - allpackagesLabel, "", "profileListFrame"); + allpackagesLabel, "", "packageListFrame"); Content span = HtmlTree.SPAN(linkContent); div.addContent(span); } @@ -185,7 +185,7 @@ */ protected void addAllProfilesLink(Content div) { Content linkContent = getHyperLink(DocPaths.PROFILE_OVERVIEW_FRAME, - allprofilesLabel, "", "profileListFrame"); + allprofilesLabel, "", "packageListFrame"); Content span = HtmlTree.SPAN(linkContent); div.addContent(span); } diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/doclets/formats/html/resources/standard_ja.properties --- a/src/share/classes/com/sun/tools/doclets/formats/html/resources/standard_ja.properties Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/resources/standard_ja.properties Mon Apr 01 21:42:15 2013 -0700 @@ -32,7 +32,7 @@ doclet.navAnnotationTypeRequiredMember=\u5FC5\u9808 doclet.navAnnotationTypeMember=\u8981\u7D20 doclet.navField=\u30D5\u30A3\u30FC\u30EB\u30C9 -doclet.navEnum=\u5217\u6319\u5B9A\u6570 +doclet.navEnum=\u5217\u6319\u578B\u5B9A\u6570 doclet.navConstructor=\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF doclet.navMethod=\u30E1\u30BD\u30C3\u30C9 doclet.Index=\u7D22\u5F15 @@ -41,59 +41,47 @@ doclet.Help=\u30D8\u30EB\u30D7 doclet.Skip_navigation_links=\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u30FB\u30EA\u30F3\u30AF\u3092\u30B9\u30AD\u30C3\u30D7 doclet.New_Page=NewPage -doclet.None=\u306A\u3057 -doclet.Factory_Method_Detail=static\u30D5\u30A1\u30AF\u30C8\u30EA\u30FB\u30E1\u30BD\u30C3\u30C9\u306E\u8A73\u7D30 doclet.navDeprecated=\u975E\u63A8\u5968 -doclet.Deprecated_List=\u975E\u63A8\u5968API\u306E\u30EA\u30B9\u30C8 -doclet.Window_Deprecated_List=\u975E\u63A8\u5968API\u306E\u30EA\u30B9\u30C8 -doclet.Note_0_is_deprecated=\u6CE8\u610F: {0}\u306F\u63A8\u5968\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002 +doclet.Window_Deprecated_List=\u975E\u63A8\u5968\u306E\u30EA\u30B9\u30C8 doclet.Overrides=\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9: doclet.in_class=\u30AF\u30E9\u30B9\u5185 -doclet.0_Fields_and_Methods="{0}"\u30D5\u30A3\u30FC\u30EB\u30C9\u3068\u30E1\u30BD\u30C3\u30C9 -doclet.Index_of_Fields_and_Methods=\u30D5\u30A3\u30FC\u30EB\u30C9\u3068\u30E1\u30BD\u30C3\u30C9\u306E\u7D22\u5F15 doclet.Static_variable_in={0}\u306Estatic\u5909\u6570 doclet.Variable_in={0}\u306E\u5909\u6570 doclet.Constructor_for={0}\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF doclet.Static_method_in={0}\u306Estatic\u30E1\u30BD\u30C3\u30C9 doclet.Method_in={0}\u306E\u30E1\u30BD\u30C3\u30C9 -doclet.throws=\u30B9\u30ED\u30FC doclet.package=\u30D1\u30C3\u30B1\u30FC\u30B8 doclet.MalformedURL=\u4E0D\u6B63\u306AURL: {0} doclet.File_error=\u30D5\u30A1\u30A4\u30EB\u8AAD\u8FBC\u307F\u30A8\u30E9\u30FC: {0} doclet.URL_error=URL\u53D6\u51FA\u3057\u30A8\u30E9\u30FC: {0} -doclet.No_Package_Comment_File=\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u306EPackage.Comment\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 -doclet.No_Source_For_Class=\u30AF\u30E9\u30B9{0}\u306E\u30BD\u30FC\u30B9\u60C5\u5831\u304C\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002 doclet.see.class_or_package_not_found=\u30BF\u30B0{0}: \u53C2\u7167\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {1} doclet.see.class_or_package_not_accessible=\u30BF\u30B0{0}: \u53C2\u7167\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093: {1} -doclet.see.malformed_tag={0}\u30BF\u30B0: \u4E0D\u6B63\u306A{1}\u30BF\u30B0 -doclet.Inherited_API_Summary=\u7D99\u627F\u3055\u308C\u305FAPI\u306E\u6982\u8981 -doclet.Deprecated_API=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044API -doclet.Deprecated_Classes=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u30AF\u30E9\u30B9 -doclet.Deprecated_Enums=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u5217\u6319\u578B -doclet.Deprecated_Interfaces=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9 -doclet.Deprecated_Exceptions=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u4F8B\u5916 -doclet.Deprecated_Annotation_Types=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u6CE8\u91C8\u578B -doclet.Deprecated_Errors=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u30A8\u30E9\u30FC -doclet.Deprecated_Fields=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u30D5\u30A3\u30FC\u30EB\u30C9 -doclet.Deprecated_Constructors=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF -doclet.Deprecated_Methods=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u30E1\u30BD\u30C3\u30C9 -doclet.Deprecated_Enum_Constants=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u5217\u6319\u578B\u5B9A\u6570 -doclet.Deprecated_Annotation_Type_Members=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u6CE8\u91C8\u578B\u306E\u8981\u7D20 -doclet.deprecated_classes=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u30AF\u30E9\u30B9 -doclet.deprecated_enums=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u5217\u6319\u578B -doclet.deprecated_interfaces=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9 -doclet.deprecated_exceptions=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u4F8B\u5916 -doclet.deprecated_annotation_types=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u6CE8\u91C8\u578B -doclet.deprecated_errors=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u30A8\u30E9\u30FC -doclet.deprecated_fields=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u30D5\u30A3\u30FC\u30EB\u30C9 -doclet.deprecated_constructors=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF -doclet.deprecated_methods=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u30E1\u30BD\u30C3\u30C9 -doclet.deprecated_enum_constants=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u5217\u6319\u578B\u5B9A\u6570 -doclet.deprecated_annotation_type_members=\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u6CE8\u91C8\u578B\u306E\u8981\u7D20 -doclet.Frame_Output=\u30D5\u30EC\u30FC\u30E0\u51FA\u529B -doclet.Docs_generated_by_Javadoc=\u3053\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306Fjavadoc\u3067\u751F\u6210\u3055\u308C\u3066\u3044\u307E\u3059\u3002 +doclet.Deprecated_API=\u975E\u63A8\u5968\u306EAPI +doclet.Deprecated_Packages=\u975E\u63A8\u5968\u306E\u30D1\u30C3\u30B1\u30FC\u30B8 +doclet.Deprecated_Classes=\u975E\u63A8\u5968\u306E\u30AF\u30E9\u30B9 +doclet.Deprecated_Enums=\u975E\u63A8\u5968\u306E\u5217\u6319\u578B +doclet.Deprecated_Interfaces=\u975E\u63A8\u5968\u306E\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9 +doclet.Deprecated_Exceptions=\u975E\u63A8\u5968\u306E\u4F8B\u5916 +doclet.Deprecated_Annotation_Types=\u975E\u63A8\u5968\u306E\u6CE8\u91C8\u578B +doclet.Deprecated_Errors=\u975E\u63A8\u5968\u306E\u30A8\u30E9\u30FC +doclet.Deprecated_Fields=\u975E\u63A8\u5968\u306E\u30D5\u30A3\u30FC\u30EB\u30C9 +doclet.Deprecated_Constructors=\u975E\u63A8\u5968\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF +doclet.Deprecated_Methods=\u975E\u63A8\u5968\u306E\u30E1\u30BD\u30C3\u30C9 +doclet.Deprecated_Enum_Constants=\u975E\u63A8\u5968\u306E\u5217\u6319\u578B\u5B9A\u6570 +doclet.Deprecated_Annotation_Type_Members=\u975E\u63A8\u5968\u306E\u6CE8\u91C8\u578B\u306E\u8981\u7D20 +doclet.deprecated_packages=\u975E\u63A8\u5968\u306E\u30D1\u30C3\u30B1\u30FC\u30B8 +doclet.deprecated_classes=\u975E\u63A8\u5968\u306E\u30AF\u30E9\u30B9 +doclet.deprecated_enums=\u975E\u63A8\u5968\u306E\u5217\u6319\u578B +doclet.deprecated_interfaces=\u975E\u63A8\u5968\u306E\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9 +doclet.deprecated_exceptions=\u975E\u63A8\u5968\u306E\u4F8B\u5916 +doclet.deprecated_annotation_types=\u975E\u63A8\u5968\u306E\u6CE8\u91C8\u578B +doclet.deprecated_errors=\u975E\u63A8\u5968\u306E\u30A8\u30E9\u30FC +doclet.deprecated_fields=\u975E\u63A8\u5968\u306E\u30D5\u30A3\u30FC\u30EB\u30C9 +doclet.deprecated_constructors=\u975E\u63A8\u5968\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF +doclet.deprecated_methods=\u975E\u63A8\u5968\u306E\u30E1\u30BD\u30C3\u30C9 +doclet.deprecated_enum_constants=\u975E\u63A8\u5968\u306E\u5217\u6319\u578B\u5B9A\u6570 +doclet.deprecated_annotation_type_members=\u975E\u63A8\u5968\u306E\u6CE8\u91C8\u578B\u306E\u8981\u7D20 doclet.Generated_Docs_Untitled=\u751F\u6210\u3055\u308C\u305F\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8(\u30BF\u30A4\u30C8\u30EB\u306A\u3057) -doclet.Blank=\u30D6\u30E9\u30F3\u30AF doclet.Other_Packages=\u305D\u306E\u4ED6\u306E\u30D1\u30C3\u30B1\u30FC\u30B8 doclet.Package_Description=\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u306E\u8AAC\u660E doclet.Description=\u8AAC\u660E @@ -102,33 +90,25 @@ doclet.Subclasses=\u76F4\u7CFB\u306E\u65E2\u77E5\u306E\u30B5\u30D6\u30AF\u30E9\u30B9: doclet.Subinterfaces=\u65E2\u77E5\u306E\u30B5\u30D6\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u30EA\u30B9\u30C8: doclet.Implementing_Classes=\u65E2\u77E5\u306E\u5B9F\u88C5\u30AF\u30E9\u30B9\u306E\u30EA\u30B9\u30C8: +doclet.Functional_Interface=\u6A5F\u80FD\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9 +doclet.Functional_Interface_Message=\u3053\u308C\u306F\u6A5F\u80FD\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306A\u306E\u3067\u3001\u30E9\u30E0\u30C0\u5F0F\u307E\u305F\u306F\u30E1\u30BD\u30C3\u30C9\u53C2\u7167\u306E\u5272\u5F53\u3066\u30BF\u30FC\u30B2\u30C3\u30C8\u3068\u3057\u3066\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002 doclet.also=\u540C\u69D8\u306B -doclet.Option=\u30AA\u30D7\u30B7\u30E7\u30F3 -doclet.Or=\u307E\u305F\u306F doclet.Frames=\u30D5\u30EC\u30FC\u30E0 doclet.No_Frames=\u30D5\u30EC\u30FC\u30E0\u306A\u3057 doclet.Package_Hierarchies=\u30D1\u30C3\u30B1\u30FC\u30B8\u968E\u5C64: doclet.Hierarchy_For_Package=\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u306E\u968E\u5C64 -doclet.Source_Code=\u30BD\u30FC\u30B9\u30FB\u30B3\u30FC\u30C9: doclet.Hierarchy_For_All_Packages=\u3059\u3079\u3066\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u968E\u5C64 -doclet.Cannot_handle_no_packages=\u30D1\u30C3\u30B1\u30FC\u30B8\u3092\u51E6\u7406\u3067\u304D\u307E\u305B\u3093\u3002 doclet.Frame_Alert=\u30D5\u30EC\u30FC\u30E0\u95A2\u9023\u306E\u30A2\u30E9\u30FC\u30C8 -doclet.Overview-Member-Frame=\u6982\u8981\u30E1\u30F3\u30D0\u30FC\u30FB\u30D5\u30EC\u30FC\u30E0 doclet.Frame_Warning_Message=\u3053\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306F\u30D5\u30EC\u30FC\u30E0\u6A5F\u80FD\u3092\u4F7F\u7528\u3057\u3066\u8868\u793A\u3059\u308B\u3088\u3046\u306B\u4F5C\u6210\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u30D5\u30EC\u30FC\u30E0\u3092\u8868\u793A\u3067\u304D\u306A\u3044Web\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u306E\u5834\u5408\u306B\u3053\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002{0}\u306B\u30EA\u30F3\u30AF\u3057\u307E\u3059\u3002 doclet.No_Script_Message=\u30D6\u30E9\u30A6\u30B6\u306EJavaScript\u304C\u7121\u52B9\u306B\u306A\u3063\u3066\u3044\u307E\u3059\u3002 doclet.Non_Frame_Version=\u30D5\u30EC\u30FC\u30E0\u306B\u5BFE\u5FDC\u3057\u3066\u3044\u306A\u3044\u30D0\u30FC\u30B8\u30E7\u30F3 -doclet.Frame_Version=\u30D5\u30EC\u30FC\u30E0\u3042\u308A\u306E\u30D0\u30FC\u30B8\u30E7\u30F3 -doclet.Following_From_Class=\u30AF\u30E9\u30B9{0}\u304B\u3089\u30B3\u30D4\u30FC\u3055\u308C\u305F\u30BF\u30B0: -doclet.Following_From_Interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9{0}\u304B\u3089\u30B3\u30D4\u30FC\u3055\u308C\u305F\u30BF\u30B0: doclet.Description_From_Interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304B\u3089\u30B3\u30D4\u30FC\u3055\u308C\u305F\u8AAC\u660E: doclet.Description_From_Class=\u30AF\u30E9\u30B9\u304B\u3089\u30B3\u30D4\u30FC\u3055\u308C\u305F\u8AAC\u660E: -doclet.Standard_doclet_invoked=\u6A19\u6E96\u306Edoclet\u304C\u8D77\u52D5\u3055\u308C\u307E\u3057\u305F... -doclet.No_Non_Deprecated_Classes_To_Document=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5316\u3059\u308B\u975E\u63A8\u5968\u4EE5\u5916\u306E\u30AF\u30E9\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002 +doclet.No_Non_Deprecated_Classes_To_Document=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5316\u3059\u308B\u975E\u63A8\u5968\u3067\u306A\u3044\u30AF\u30E9\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002 doclet.Interfaces_Italic=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9(\u30A4\u30BF\u30EA\u30C3\u30AF) doclet.Enclosing_Class=\u542B\u307E\u308C\u3066\u3044\u308B\u30AF\u30E9\u30B9: doclet.Enclosing_Interface=\u542B\u307E\u308C\u3066\u3044\u308B\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9: doclet.Window_Source_title=\u30BD\u30FC\u30B9\u30FB\u30B3\u30FC\u30C9 -doclet.Help_title=API\u30D8\u30EB\u30D7 doclet.Window_Help_title=API\u30D8\u30EB\u30D7 doclet.Help_line_1=API\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u69CB\u6210 doclet.Help_line_2=\u3053\u306EAPI(Application Programming Interface)\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306B\u306F\u3001\u6B21\u306B\u8AAC\u660E\u3059\u308B\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u30FB\u30D0\u30FC\u306B\u3042\u308B\u9805\u76EE\u306B\u5BFE\u5FDC\u3059\u308B\u30DA\u30FC\u30B8\u304C\u542B\u307E\u308C\u307E\u3059\u3002 @@ -149,7 +129,7 @@ doclet.Help_line_17_with_tree_link=\u3059\u3079\u3066\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u306B\u306F{0}\u30DA\u30FC\u30B8\u304C\u3042\u308A\u3001\u3055\u3089\u306B\u5404\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u968E\u5C64\u304C\u3042\u308A\u307E\u3059\u3002\u5404\u968E\u5C64\u30DA\u30FC\u30B8\u306F\u3001\u30AF\u30E9\u30B9\u306E\u30EA\u30B9\u30C8\u3068\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u30EA\u30B9\u30C8\u3092\u542B\u307F\u307E\u3059\u3002\u30AF\u30E9\u30B9\u306F java.lang.Object \u3092\u958B\u59CB\u70B9\u3068\u3059\u308B\u7D99\u627F\u69CB\u9020\u3067\u7DE8\u6210\u3055\u308C\u307E\u3059\u3002\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306F\u3001java.lang.Object \u304B\u3089\u306F\u7D99\u627F\u3057\u307E\u305B\u3093\u3002 doclet.Help_line_18=\u6982\u8981\u30DA\u30FC\u30B8\u3092\u8868\u793A\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u300C\u968E\u5C64\u30C4\u30EA\u30FC\u300D\u3092\u30AF\u30EA\u30C3\u30AF\u3059\u308B\u3068\u3001\u5168\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u968E\u5C64\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002 doclet.Help_line_19=\u7279\u5B9A\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u3001\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3092\u8868\u793A\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u300C\u968E\u5C64\u30C4\u30EA\u30FC\u300D\u3092\u30AF\u30EA\u30C3\u30AF\u3059\u308B\u3068\u3001\u8A72\u5F53\u3059\u308B\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u307F\u306E\u968E\u5C64\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002 -doclet.Help_line_20_with_deprecated_api_link={0}\u30DA\u30FC\u30B8\u306F\u3001\u63A8\u5968\u3055\u308C\u3066\u3044\u306A\u3044\u3059\u3079\u3066\u306EAPI\u306E\u30EA\u30B9\u30C8\u3092\u8868\u793A\u3057\u307E\u3059\u3002\u975E\u63A8\u5968API\u3068\u306F\u3001\u6A5F\u80FD\u6539\u826F\u306A\u3069\u306E\u7406\u7531\u304B\u3089\u4F7F\u7528\u3092\u304A\u85A6\u3081\u3067\u304D\u306A\u304F\u306A\u3063\u305FAPI\u306E\u3053\u3068\u3067\u3001\u901A\u5E38\u306F\u305D\u308C\u306B\u4EE3\u308F\u308BAPI\u304C\u63D0\u4F9B\u3055\u308C\u307E\u3059\u3002\u975E\u63A8\u5968API\u306F\u4ECA\u5F8C\u306E\u5B9F\u88C5\u3067\u524A\u9664\u3055\u308C\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002 +doclet.Help_line_20_with_deprecated_api_link={0}\u30DA\u30FC\u30B8\u306F\u3001\u975E\u63A8\u5968\u306EAPI\u3092\u3059\u3079\u3066\u30EA\u30B9\u30C8\u3057\u307E\u3059\u3002\u975E\u63A8\u5968\u306EAPI\u3068\u306F\u3001\u6A5F\u80FD\u6539\u826F\u306A\u3069\u306E\u7406\u7531\u304B\u3089\u4F7F\u7528\u3092\u304A\u85A6\u3081\u3067\u304D\u306A\u304F\u306A\u3063\u305FAPI\u306E\u3053\u3068\u3067\u3001\u901A\u5E38\u306F\u305D\u308C\u306B\u4EE3\u308F\u308BAPI\u304C\u63D0\u4F9B\u3055\u308C\u307E\u3059\u3002\u975E\u63A8\u5968\u306EAPI\u306F\u4ECA\u5F8C\u306E\u5B9F\u88C5\u3067\u524A\u9664\u3055\u308C\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002 doclet.Help_line_21=\u7D22\u5F15 doclet.Help_line_22={0}\u306B\u306F\u3001\u3059\u3079\u3066\u306E\u30AF\u30E9\u30B9\u3001\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3001\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u3001\u30E1\u30BD\u30C3\u30C9\u304A\u3088\u3073\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u30A2\u30EB\u30D5\u30A1\u30D9\u30C3\u30C8\u9806\u306E\u30EA\u30B9\u30C8\u304C\u542B\u307E\u308C\u307E\u3059\u3002 doclet.Help_line_23=\u524D/\u6B21 @@ -158,7 +138,7 @@ doclet.Help_line_26=\u3053\u308C\u3089\u306E\u30EA\u30F3\u30AF\u306FHTML\u30D5\u30EC\u30FC\u30E0\u306E\u8868\u793A\u3068\u975E\u8868\u793A\u3092\u5207\u308A\u66FF\u3048\u307E\u3059\u3002\u3059\u3079\u3066\u306E\u30DA\u30FC\u30B8\u306F\u30D5\u30EC\u30FC\u30E0\u3042\u308A\u3067\u3082\u3001\u30D5\u30EC\u30FC\u30E0\u306A\u3057\u3067\u3082\u8868\u793A\u3067\u304D\u307E\u3059\u3002 doclet.Help_line_27={0}\u30EA\u30F3\u30AF\u306B\u306F\u3001\u3059\u3079\u3066\u306E\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9(\u975Estatic\u306E\u30CD\u30B9\u30C8\u3055\u308C\u305F\u578B\u3092\u9664\u304F)\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002 doclet.Help_line_28=\u76F4\u5217\u5316\u53EF\u80FD\u307E\u305F\u306F\u5916\u90E8\u5316\u53EF\u80FD\u306A\u5404\u30AF\u30E9\u30B9\u306F\u3001\u76F4\u5217\u5316\u30D5\u30A3\u30FC\u30EB\u30C9\u3068\u30E1\u30BD\u30C3\u30C9\u306E\u8AAC\u660E\u3092\u542B\u307F\u307E\u3059\u3002\u3053\u306E\u60C5\u5831\u306F\u3001API\u3092\u4F7F\u7528\u3059\u308B\u958B\u767A\u8005\u3067\u306F\u306A\u304F\u3001\u518D\u5B9F\u88C5\u3092\u884C\u3046\u62C5\u5F53\u8005\u306B\u5F79\u7ACB\u3061\u307E\u3059\u3002\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u30FB\u30D0\u30FC\u306B\u30EA\u30F3\u30AF\u304C\u306A\u3044\u5834\u5408\u3001\u76F4\u5217\u5316\u3055\u308C\u305F\u30AF\u30E9\u30B9\u306B\u79FB\u52D5\u3057\u3066\u3001\u30AF\u30E9\u30B9\u8A18\u8FF0\u306E\u300C\u95A2\u9023\u9805\u76EE\u300D\u30BB\u30AF\u30B7\u30E7\u30F3\u306B\u3042\u308B\u300C\u76F4\u5217\u5316\u3055\u308C\u305F\u5F62\u5F0F\u300D\u3092\u30AF\u30EA\u30C3\u30AF\u3059\u308B\u3053\u3068\u306B\u3088\u308A\u3001\u3053\u306E\u60C5\u5831\u3092\u8868\u793A\u3067\u304D\u307E\u3059\u3002 -doclet.Help_line_29=\u300C\u5B9A\u6570\u30D5\u30A3\u30FC\u30EB\u30C9\u5024\u300D \u30DA\u30FC\u30B8\u306B\u306F\u3001static final\u30D5\u30A3\u30FC\u30EB\u30C9\u3068\u305D\u306E\u5024\u306E\u30EA\u30B9\u30C8\u304C\u3042\u308A\u307E\u3059\u3002 +doclet.Help_line_29={0}\u30DA\u30FC\u30B8\u306B\u306F\u3001static final\u30D5\u30A3\u30FC\u30EB\u30C9\u3068\u305D\u306E\u5024\u306E\u30EA\u30B9\u30C8\u304C\u3042\u308A\u307E\u3059\u3002 doclet.Help_line_30=\u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30D5\u30A1\u30A4\u30EB\u306F\u3001\u6A19\u6E96doclet\u3092\u4F7F\u7528\u3057\u3066\u751F\u6210\u3055\u308C\u305FAPI\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306B\u9069\u7528\u3055\u308C\u307E\u3059\u3002 doclet.Help_enum_line_1=\u5404\u5217\u6319\u578B\u306B\u306F\u3001\u305D\u308C\u81EA\u8EAB\u306E\u500B\u5225\u306E\u30DA\u30FC\u30B8\u3068\u6B21\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u304C\u3042\u308A\u307E\u3059: doclet.Help_enum_line_2=\u5217\u6319\u578B\u306E\u5BA3\u8A00 @@ -166,19 +146,6 @@ doclet.Help_annotation_type_line_1=\u5404\u6CE8\u91C8\u578B\u306B\u306F\u3001\u305D\u308C\u81EA\u8EAB\u306E\u500B\u5225\u306E\u30DA\u30FC\u30B8\u3068\u6B21\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u304C\u3042\u308A\u307E\u3059: doclet.Help_annotation_type_line_2=\u6CE8\u91C8\u578B\u306E\u5BA3\u8A00 doclet.Help_annotation_type_line_3=\u6CE8\u91C8\u578B\u306E\u8AAC\u660E -doclet.Style_line_1=javadoc\u30B9\u30BF\u30A4\u30EB\u30FB\u30B7\u30FC\u30C8 -doclet.Style_line_2=\u8272\u3084\u30D5\u30A9\u30F3\u30C8\u306A\u3069\u306E\u30B9\u30BF\u30A4\u30EB\u5C5E\u6027\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u5024\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B\u306B\u306F\u3001\u3053\u3053\u3067\u5B9A\u7FA9\u3057\u307E\u3059 -doclet.Style_line_3=\u30DA\u30FC\u30B8\u306E\u30D0\u30C3\u30AF\u30B0\u30E9\u30A6\u30F3\u30C9\u306E\u8272 -doclet.Style_Headings=\u898B\u51FA\u3057 -doclet.Style_line_4=\u8868\u306E\u8272 -doclet.Style_line_5=\u6FC3\u3044\u85E4\u8272 -doclet.Style_line_6=\u8584\u3044\u85E4\u8272 -doclet.Style_line_7=\u767D -doclet.Style_line_8=\u5DE6\u5074\u306E\u30D5\u30EC\u30FC\u30E0\u306E\u30EA\u30B9\u30C8\u306B\u4F7F\u7528\u3059\u308B\u30D5\u30A9\u30F3\u30C8 -doclet.Style_line_9=\u30D5\u30EC\u30FC\u30E0\u306B\u304A\u3051\u308B\u3001\u3088\u308A\u5C0F\u3055\u3044sans-serif\u30D5\u30A9\u30F3\u30C8\u306E\u4F8B -doclet.Style_line_10=\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u30FB\u30D0\u30FC\u306E\u30D5\u30A9\u30F3\u30C8\u3068\u8272 -doclet.Style_line_11=\u6FC3\u3044\u9752 -doclet.Style_line_12=\u8868\u306E\u30AD\u30E3\u30D7\u30B7\u30E7\u30F3\u30FB\u30B9\u30BF\u30A4\u30EB doclet.ClassUse_Packages.that.use.0={0}\u3092\u4F7F\u7528\u3057\u3066\u3044\u308B\u30D1\u30C3\u30B1\u30FC\u30B8 doclet.ClassUse_Uses.of.0.in.1={1}\u3067\u306E{0}\u306E\u4F7F\u7528 doclet.ClassUse_Classes.in.0.used.by.1={1}\u306B\u3088\u308A\u4F7F\u7528\u3055\u308C\u308B{0}\u306E\u30AF\u30E9\u30B9 @@ -208,13 +175,11 @@ doclet.Window_ClassUse_Header={0} {1}\u306E\u4F7F\u7528 doclet.ClassUse_Title={0}
{1}\u306E\u4F7F\u7528 doclet.navClassUse=\u4F7F\u7528 -doclet.link_option_twice=\u5916\u90E8URL\u30EA\u30F3\u30AF\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3(link\u307E\u305F\u306Flinkoffline)\u304C2\u56DE\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059\u3002 doclet.Error_in_packagelist=-group\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u4F7F\u7528\u65B9\u6CD5\u306E\u30A8\u30E9\u30FC: {0} {1} doclet.Groupname_already_used=-group\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u304A\u3044\u3066\u3001\u3059\u3067\u306B\u30B0\u30EB\u30FC\u30D7\u540D\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059: {0} doclet.Same_package_name_used=\u30D1\u30C3\u30B1\u30FC\u30B8\u540D\u5F62\u5F0F\u304C2\u56DE\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059: {0} -doclet.Serialization.Excluded_Class=\u5E38\u99D0\u30D5\u30A3\u30FC\u30EB\u30C9{1}\u306F\u3001\u9664\u5916\u3055\u308C\u305F\u30AF\u30E9\u30B9{0}\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002 -doclet.Serialization.Nonexcluded_Class=\u5E38\u99D0\u30D5\u30A3\u30FC\u30EB\u30C9{1}\u306F\u3001\u975E\u8868\u793A\u306E\u3001\u542B\u307E\u308C\u306A\u3044\u30AF\u30E9\u30B9{0}\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002 -doclet.usage=\u6A19\u6E96\u306Edoclet\u306B\u3088\u308A\u63D0\u4F9B\u3055\u308C\u308B\u3082\u306E:\n-d \u51FA\u529B\u30D5\u30A1\u30A4\u30EB\u306E\u8EE2\u9001\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\n-use \u30AF\u30E9\u30B9\u3068\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u4F7F\u7528\u30DA\u30FC\u30B8\u3092\u4F5C\u6210\u3059\u308B\n-version @version\u30D1\u30E9\u30B0\u30E9\u30D5\u3092\u542B\u3081\u308B\n-author @author\u30D1\u30E9\u30B0\u30E9\u30D5\u3092\u542B\u3081\u308B\n-docfilessubdirs doc-file\u30B5\u30D6\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u518D\u5E30\u7684\u306B\u30B3\u30D4\u30FC\u3059\u308B\n-splitindex 1\u5B57\u3054\u3068\u306B1\u30D5\u30A1\u30A4\u30EB\u306B\u7D22\u5F15\u3092\u5206\u5272\u3059\u308B\n-windowtitle \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u7528\u306E\u30D6\u30E9\u30A6\u30B6\u30FB\u30A6\u30A3\u30F3\u30C9\u30A6\u30FB\u30BF\u30A4\u30C8\u30EB\n-doctitle \u6982\u8981\u30DA\u30FC\u30B8\u306B\u30BF\u30A4\u30C8\u30EB\u3092\u542B\u3081\u308B\n-header \u5404\u30DA\u30FC\u30B8\u306B\u30D8\u30C3\u30C0\u30FC\u3092\u542B\u3081\u308B\n-footer \u5404\u30DA\u30FC\u30B8\u306B\u30D5\u30C3\u30BF\u30FC\u3092\u542B\u3081\u308B\n-top \u5404\u30DA\u30FC\u30B8\u306B\u4E0A\u90E8\u30C6\u30AD\u30B9\u30C8\u3092\u542B\u3081\u308B\n-bottom \u5404\u30DA\u30FC\u30B8\u306B\u4E0B\u90E8\u30C6\u30AD\u30B9\u30C8\u3092\u542B\u3081\u308B\n-link \u306Bjavadoc\u51FA\u529B\u3078\u306E\u30EA\u30F3\u30AF\u3092\u4F5C\u6210\u3059\u308B\n-linkoffline \u306B\u3042\u308B\u30D1\u30C3\u30B1\u30FC\u30B8\u30FB\u30EA\u30B9\u30C8\u3092\u4F7F\u7528\u3057\u3066\u306Edocs\u306B\u30EA\u30F3\u30AF\u3059\u308B\n-excludedocfilessubdir :.. \u6307\u5B9A\u3055\u308C\u305F\u540D\u524D\u306Edoc-files\u30B5\u30D6\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u3059\u3079\u3066\u9664\u5916\u3059\u308B\n-group :.. \u6307\u5B9A\u3059\u308B\u30D1\u30C3\u30B1\u30FC\u30B8\u3092\u6982\u8981\u30DA\u30FC\u30B8\u306B\u304A\u3044\u3066\u30B0\u30EB\u30FC\u30D7\u5316\u3059\u308B\n-nocomment \u8A18\u8FF0\u304A\u3088\u3073\u30BF\u30B0\u3092\u6291\u5236\u3057\u3066\u5BA3\u8A00\u306E\u307F\u3092\u751F\u6210\u3059\u308B\n-nodeprecated @deprecated\u60C5\u5831\u3092\u9664\u5916\u3059\u308B\n-noqualifier ::... \u51FA\u529B\u304B\u3089\u4FEE\u98FE\u5B50\u306E\u30EA\u30B9\u30C8\u3092\u9664\u5916\u3059\u308B\n-nosince @since\u60C5\u5831\u3092\u9664\u5916\u3059\u308B\n-notimestamp \u975E\u8868\u793A\u306E\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u3092\u9664\u5916\u3059\u308B\n-nodeprecatedlist \u975E\u63A8\u5968\u306E\u30EA\u30B9\u30C8\u3092\u751F\u6210\u3057\u306A\u3044\n-notree \u30AF\u30E9\u30B9\u968E\u5C64\u3092\u751F\u6210\u3057\u306A\u3044\n-noindex \u7D22\u5F15\u3092\u751F\u6210\u3057\u306A\u3044\n-nohelp \u30D8\u30EB\u30D7\u30FB\u30EA\u30F3\u30AF\u3092\u751F\u6210\u3057\u306A\u3044\n-nonavbar \u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u30FB\u30D0\u30FC\u3092\u751F\u6210\u3057\u306A\u3044\n-serialwarn @serial\u30BF\u30B0\u306B\u95A2\u3059\u308B\u8B66\u544A\u3092\u751F\u6210\u3059\u308B\n-tag ::

\u5358\u4E00\u306E\u5F15\u6570\u3092\u6301\u3064\u30AB\u30B9\u30BF\u30E0\u30FB\u30BF\u30B0\u3092\u6307\u5B9A\u3059\u308B\n-taglet \u30BF\u30B0\u30EC\u30C3\u30C8\u306E\u5B8C\u5168\u4FEE\u98FE\u540D\u3092\u767B\u9332\u3059\u308B\n-tagletpath \u30BF\u30B0\u30EC\u30C3\u30C8\u306E\u30D1\u30B9\n-charset \u751F\u6210\u3055\u308C\u308B\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30AF\u30ED\u30B9\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0\u3067\u306E\u6587\u5B57\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\n-helpfile \u30D8\u30EB\u30D7\u30FB\u30EA\u30F3\u30AF\u306E\u30EA\u30F3\u30AF\u5148\u30D5\u30A1\u30A4\u30EB\u3092\u542B\u3081\u308B\n-linksource HTML\u5F62\u5F0F\u3067\u30BD\u30FC\u30B9\u3092\u751F\u6210\u3059\u308B\n-sourcetab \u30BD\u30FC\u30B9\u5185\u306E\u30BF\u30D6\u306E\u7A7A\u767D\u6587\u5B57\u306E\u6570\u3092\u6307\u5B9A\u3059\u308B\n-keywords HTML\u306Emeta\u30BF\u30B0\u306B\u3001\u30D1\u30C3\u30B1\u30FC\u30B8\u3001\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30E1\u30F3\u30D0\u30FC\u306E\u60C5\u5831\u3092\u542B\u3081\u308B\n-stylesheetfile \u751F\u6210\u3055\u308C\u305F\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30B9\u30BF\u30A4\u30EB\u5909\u66F4\u7528\u30D5\u30A1\u30A4\u30EB\n-docencoding \u51FA\u529B\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u540D +doclet.exception_encountered={1}\u306E\u51E6\u7406\u4E2D\u306B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\n{0} +doclet.usage=\u6A19\u6E96\u306Edoclet\u306B\u3088\u308A\u63D0\u4F9B\u3055\u308C\u308B\u3082\u306E:\n-d \u51FA\u529B\u30D5\u30A1\u30A4\u30EB\u306E\u8EE2\u9001\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\n-use \u30AF\u30E9\u30B9\u3068\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u4F7F\u7528\u30DA\u30FC\u30B8\u3092\u4F5C\u6210\u3059\u308B\n-version @version\u30D1\u30E9\u30B0\u30E9\u30D5\u3092\u542B\u3081\u308B\n-author @author\u30D1\u30E9\u30B0\u30E9\u30D5\u3092\u542B\u3081\u308B\n-docfilessubdirs doc-file\u30B5\u30D6\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u518D\u5E30\u7684\u306B\u30B3\u30D4\u30FC\u3059\u308B\n-splitindex 1\u5B57\u3054\u3068\u306B1\u30D5\u30A1\u30A4\u30EB\u306B\u7D22\u5F15\u3092\u5206\u5272\u3059\u308B\n-windowtitle \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u7528\u306E\u30D6\u30E9\u30A6\u30B6\u30FB\u30A6\u30A3\u30F3\u30C9\u30A6\u30FB\u30BF\u30A4\u30C8\u30EB\n-doctitle \u6982\u8981\u30DA\u30FC\u30B8\u306B\u30BF\u30A4\u30C8\u30EB\u3092\u542B\u3081\u308B\n-header \u5404\u30DA\u30FC\u30B8\u306B\u30D8\u30C3\u30C0\u30FC\u3092\u542B\u3081\u308B\n-footer \u5404\u30DA\u30FC\u30B8\u306B\u30D5\u30C3\u30BF\u30FC\u3092\u542B\u3081\u308B\n-top \u5404\u30DA\u30FC\u30B8\u306B\u4E0A\u90E8\u30C6\u30AD\u30B9\u30C8\u3092\u542B\u3081\u308B\n-bottom \u5404\u30DA\u30FC\u30B8\u306B\u4E0B\u90E8\u30C6\u30AD\u30B9\u30C8\u3092\u542B\u3081\u308B\n-link \u306Bjavadoc\u51FA\u529B\u3078\u306E\u30EA\u30F3\u30AF\u3092\u4F5C\u6210\u3059\u308B\n-linkoffline \u306B\u3042\u308B\u30D1\u30C3\u30B1\u30FC\u30B8\u30FB\u30EA\u30B9\u30C8\u3092\u4F7F\u7528\u3057\u3066\u306Edocs\u306B\u30EA\u30F3\u30AF\u3059\u308B\n-excludedocfilessubdir :.. \u6307\u5B9A\u3055\u308C\u305F\u540D\u524D\u306Edoc-files\u30B5\u30D6\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u3059\u3079\u3066\u9664\u5916\u3059\u308B\n-group :.. \u6307\u5B9A\u3059\u308B\u30D1\u30C3\u30B1\u30FC\u30B8\u3092\u6982\u8981\u30DA\u30FC\u30B8\u306B\u304A\u3044\u3066\u30B0\u30EB\u30FC\u30D7\u5316\u3059\u308B\n-nocomment \u8A18\u8FF0\u304A\u3088\u3073\u30BF\u30B0\u3092\u6291\u5236\u3057\u3066\u5BA3\u8A00\u306E\u307F\u3092\u751F\u6210\u3059\u308B\n-nodeprecated @deprecated\u60C5\u5831\u3092\u9664\u5916\u3059\u308B\n-noqualifier ::... \u51FA\u529B\u304B\u3089\u4FEE\u98FE\u5B50\u306E\u30EA\u30B9\u30C8\u3092\u9664\u5916\u3059\u308B\n-nosince @since\u60C5\u5831\u3092\u9664\u5916\u3059\u308B\n-notimestamp \u975E\u8868\u793A\u306E\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u3092\u9664\u5916\u3059\u308B\n-nodeprecatedlist \u975E\u63A8\u5968\u306E\u30EA\u30B9\u30C8\u3092\u751F\u6210\u3057\u306A\u3044\n-notree \u30AF\u30E9\u30B9\u968E\u5C64\u3092\u751F\u6210\u3057\u306A\u3044\n-noindex \u7D22\u5F15\u3092\u751F\u6210\u3057\u306A\u3044\n-nohelp \u30D8\u30EB\u30D7\u30FB\u30EA\u30F3\u30AF\u3092\u751F\u6210\u3057\u306A\u3044\n-nonavbar \u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u30FB\u30D0\u30FC\u3092\u751F\u6210\u3057\u306A\u3044\n-serialwarn @serial\u30BF\u30B0\u306B\u95A2\u3059\u308B\u8B66\u544A\u3092\u751F\u6210\u3059\u308B\n-tag ::
\u5358\u4E00\u306E\u5F15\u6570\u3092\u6301\u3064\u30AB\u30B9\u30BF\u30E0\u30FB\u30BF\u30B0\u3092\u6307\u5B9A\u3059\u308B\n-taglet \u30BF\u30B0\u30EC\u30C3\u30C8\u306E\u5B8C\u5168\u4FEE\u98FE\u540D\u3092\u767B\u9332\u3059\u308B\n-tagletpath \u30BF\u30B0\u30EC\u30C3\u30C8\u306E\u30D1\u30B9\n-Xdocrootparent \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30B3\u30E1\u30F3\u30C8\u5185\u306E@docRoot(\u3053\u306E\u5F8C\u306B\u306F/..\u304C\u7D9A\u304F)\u306E\u3059\u3079\u3066\u306E\u51FA\u73FE\u7B87\u6240\u3092\u3067\u7F6E\u63DB\u3059\u308B\n-charset \u751F\u6210\u3055\u308C\u308B\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30AF\u30ED\u30B9\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0\u3067\u306E\u6587\u5B57\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\n-helpfile \u30D8\u30EB\u30D7\u30FB\u30EA\u30F3\u30AF\u306E\u30EA\u30F3\u30AF\u5148\u30D5\u30A1\u30A4\u30EB\u3092\u542B\u3081\u308B\n-linksource HTML\u5F62\u5F0F\u3067\u30BD\u30FC\u30B9\u3092\u751F\u6210\u3059\u308B\n-sourcetab \u30BD\u30FC\u30B9\u5185\u306E\u30BF\u30D6\u306E\u7A7A\u767D\u6587\u5B57\u306E\u6570\u3092\u6307\u5B9A\u3059\u308B\n-keywords HTML\u306Emeta\u30BF\u30B0\u306B\u3001\u30D1\u30C3\u30B1\u30FC\u30B8\u3001\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30E1\u30F3\u30D0\u30FC\u306E\u60C5\u5831\u3092\u542B\u3081\u308B\n-stylesheetfile \u751F\u6210\u3055\u308C\u305F\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30B9\u30BF\u30A4\u30EB\u5909\u66F4\u7528\u30D5\u30A1\u30A4\u30EB\n-docencoding \u51FA\u529B\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u540D diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/doclets/formats/html/resources/standard_zh_CN.properties --- a/src/share/classes/com/sun/tools/doclets/formats/html/resources/standard_zh_CN.properties Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/resources/standard_zh_CN.properties Mon Apr 01 21:42:15 2013 -0700 @@ -41,33 +41,23 @@ doclet.Help=\u5E2E\u52A9 doclet.Skip_navigation_links=\u8DF3\u8FC7\u5BFC\u822A\u94FE\u63A5 doclet.New_Page=NewPage -doclet.None=\u65E0 -doclet.Factory_Method_Detail=\u9759\u6001\u5DE5\u5382\u65B9\u6CD5\u8BE6\u7EC6\u8D44\u6599 doclet.navDeprecated=\u5DF2\u8FC7\u65F6 -doclet.Deprecated_List=\u5DF2\u8FC7\u65F6\u7684\u5217\u8868 doclet.Window_Deprecated_List=\u5DF2\u8FC7\u65F6\u7684\u5217\u8868 -doclet.Note_0_is_deprecated=\u6CE8: {0}\u5DF2\u8FC7\u65F6\u3002 doclet.Overrides=\u8986\u76D6: doclet.in_class=\u5728\u7C7B\u4E2D -doclet.0_Fields_and_Methods="{0}" \u5B57\u6BB5\u548C\u65B9\u6CD5 -doclet.Index_of_Fields_and_Methods=\u5B57\u6BB5\u548C\u65B9\u6CD5\u7684\u7D22\u5F15 doclet.Static_variable_in={0}\u4E2D\u7684\u9759\u6001\u53D8\u91CF doclet.Variable_in={0}\u4E2D\u7684\u53D8\u91CF doclet.Constructor_for={0}\u7684\u6784\u9020\u5668 doclet.Static_method_in={0}\u4E2D\u7684\u9759\u6001\u65B9\u6CD5 doclet.Method_in={0}\u4E2D\u7684\u65B9\u6CD5 -doclet.throws=\u629B\u51FA doclet.package=\u7A0B\u5E8F\u5305 doclet.MalformedURL=\u683C\u5F0F\u9519\u8BEF\u7684 URL: {0} doclet.File_error=\u8BFB\u53D6\u6587\u4EF6\u65F6\u51FA\u9519: {0} doclet.URL_error=\u83B7\u53D6 URL \u65F6\u51FA\u9519: {0} -doclet.No_Package_Comment_File=\u5BF9\u4E8E\u7A0B\u5E8F\u5305{0}, \u627E\u4E0D\u5230 Package.Comment \u6587\u4EF6 -doclet.No_Source_For_Class=\u7C7B{0}\u7684\u6E90\u4FE1\u606F\u4E0D\u53EF\u7528\u3002 doclet.see.class_or_package_not_found=\u6807\u8BB0{0}: \u627E\u4E0D\u5230\u5F15\u7528: {1} doclet.see.class_or_package_not_accessible=\u6807\u8BB0{0}: \u65E0\u6CD5\u8BBF\u95EE\u5F15\u7528: {1} -doclet.see.malformed_tag=\u6807\u8BB0{0}: \u683C\u5F0F\u9519\u8BEF: {1} -doclet.Inherited_API_Summary=\u7EE7\u627F\u7684 API \u6982\u8981 doclet.Deprecated_API=\u5DF2\u8FC7\u65F6\u7684 API +doclet.Deprecated_Packages=\u5DF2\u8FC7\u65F6\u7A0B\u5E8F\u5305 doclet.Deprecated_Classes=\u5DF2\u8FC7\u65F6\u7684\u7C7B doclet.Deprecated_Enums=\u5DF2\u8FC7\u65F6\u7684\u679A\u4E3E doclet.Deprecated_Interfaces=\u5DF2\u8FC7\u65F6\u7684\u63A5\u53E3 @@ -79,6 +69,7 @@ doclet.Deprecated_Methods=\u5DF2\u8FC7\u65F6\u7684\u65B9\u6CD5 doclet.Deprecated_Enum_Constants=\u5DF2\u8FC7\u65F6\u7684\u679A\u4E3E\u5E38\u91CF doclet.Deprecated_Annotation_Type_Members=\u5DF2\u8FC7\u65F6\u7684\u6CE8\u91CA\u7C7B\u578B\u5143\u7D20 +doclet.deprecated_packages=\u5DF2\u8FC7\u65F6\u7A0B\u5E8F\u5305 doclet.deprecated_classes=\u5DF2\u8FC7\u65F6\u7684\u7C7B doclet.deprecated_enums=\u5DF2\u8FC7\u65F6\u7684\u679A\u4E3E doclet.deprecated_interfaces=\u5DF2\u8FC7\u65F6\u7684\u63A5\u53E3 @@ -90,10 +81,7 @@ doclet.deprecated_methods=\u5DF2\u8FC7\u65F6\u7684\u65B9\u6CD5 doclet.deprecated_enum_constants=\u5DF2\u8FC7\u65F6\u7684\u679A\u4E3E\u5E38\u91CF doclet.deprecated_annotation_type_members=\u5DF2\u8FC7\u65F6\u7684\u6CE8\u91CA\u7C7B\u578B\u5143\u7D20 -doclet.Frame_Output=\u6846\u67B6\u8F93\u51FA -doclet.Docs_generated_by_Javadoc=\u7531 Javadoc \u751F\u6210\u7684\u6587\u6863\u3002 doclet.Generated_Docs_Untitled=\u751F\u6210\u7684\u6587\u6863 (\u65E0\u6807\u9898) -doclet.Blank=\u7A7A\u767D doclet.Other_Packages=\u5176\u4ED6\u7A0B\u5E8F\u5305 doclet.Package_Description=\u7A0B\u5E8F\u5305{0}\u7684\u8BF4\u660E doclet.Description=\u8BF4\u660E @@ -102,33 +90,25 @@ doclet.Subclasses=\u76F4\u63A5\u5DF2\u77E5\u5B50\u7C7B: doclet.Subinterfaces=\u6240\u6709\u5DF2\u77E5\u5B50\u63A5\u53E3: doclet.Implementing_Classes=\u6240\u6709\u5DF2\u77E5\u5B9E\u73B0\u7C7B: +doclet.Functional_Interface=\u51FD\u6570\u63A5\u53E3: +doclet.Functional_Interface_Message=\u8FD9\u662F\u4E00\u4E2A\u51FD\u6570\u63A5\u53E3, \u56E0\u6B64\u53EF\u7528\u4F5C lambda \u8868\u8FBE\u5F0F\u6216\u65B9\u6CD5\u5F15\u7528\u7684\u8D4B\u503C\u76EE\u6807\u3002 doclet.also=\u5E76 -doclet.Option=\u9009\u9879 -doclet.Or=\u6216 doclet.Frames=\u6846\u67B6 doclet.No_Frames=\u65E0\u6846\u67B6 doclet.Package_Hierarchies=\u7A0B\u5E8F\u5305\u5206\u5C42\u7ED3\u6784: doclet.Hierarchy_For_Package=\u7A0B\u5E8F\u5305{0}\u7684\u5206\u5C42\u7ED3\u6784 -doclet.Source_Code=\u6E90\u4EE3\u7801: doclet.Hierarchy_For_All_Packages=\u6240\u6709\u7A0B\u5E8F\u5305\u7684\u5206\u5C42\u7ED3\u6784 -doclet.Cannot_handle_no_packages=\u65E0\u6CD5\u5904\u7406\u6CA1\u6709\u7A0B\u5E8F\u5305\u7684\u60C5\u51B5\u3002 doclet.Frame_Alert=\u6846\u67B6\u9884\u8B66 -doclet.Overview-Member-Frame=\u6210\u5458\u6846\u67B6\u6982\u89C8 doclet.Frame_Warning_Message=\u8BF7\u4F7F\u7528\u6846\u67B6\u529F\u80FD\u67E5\u770B\u6B64\u6587\u6863\u3002\u5982\u679C\u770B\u5230\u6B64\u6D88\u606F, \u5219\u8868\u660E\u60A8\u4F7F\u7528\u7684\u662F\u4E0D\u652F\u6301\u6846\u67B6\u7684 Web \u5BA2\u6237\u673A\u3002\u94FE\u63A5\u5230{0}\u3002 doclet.No_Script_Message=\u60A8\u7684\u6D4F\u89C8\u5668\u5DF2\u7981\u7528 JavaScript\u3002 doclet.Non_Frame_Version=\u975E\u6846\u67B6\u7248\u672C -doclet.Frame_Version=\u6846\u67B6\u7248\u672C -doclet.Following_From_Class=\u4EE5\u4E0B\u5185\u5BB9\u662F\u4ECE\u7C7B{0}\u590D\u5236\u7684 -doclet.Following_From_Interface=\u4EE5\u4E0B\u5185\u5BB9\u662F\u4ECE\u63A5\u53E3{0}\u590D\u5236\u7684 doclet.Description_From_Interface=\u4ECE\u63A5\u53E3\u590D\u5236\u7684\u8BF4\u660E: doclet.Description_From_Class=\u4ECE\u7C7B\u590D\u5236\u7684\u8BF4\u660E: -doclet.Standard_doclet_invoked=\u5DF2\u8C03\u7528\u7684\u6807\u51C6 doclet... doclet.No_Non_Deprecated_Classes_To_Document=\u627E\u4E0D\u5230\u53EF\u4EE5\u6587\u6863\u5316\u7684\u672A\u8FC7\u65F6\u7684\u7C7B\u3002 doclet.Interfaces_Italic=\u63A5\u53E3 (\u659C\u4F53) doclet.Enclosing_Class=\u5C01\u95ED\u7C7B: doclet.Enclosing_Interface=\u5C01\u95ED\u63A5\u53E3: doclet.Window_Source_title=\u6E90\u4EE3\u7801 -doclet.Help_title=API \u5E2E\u52A9 doclet.Window_Help_title=API \u5E2E\u52A9 doclet.Help_line_1=\u6B64 API \u6587\u6863\u7684\u7EC4\u7EC7\u65B9\u5F0F doclet.Help_line_2=\u6B64 API (\u5E94\u7528\u7A0B\u5E8F\u7F16\u7A0B\u63A5\u53E3) \u6587\u6863\u5305\u542B\u5BF9\u5E94\u4E8E\u5BFC\u822A\u680F\u4E2D\u7684\u9879\u76EE\u7684\u9875\u9762, \u5982\u4E0B\u6240\u8FF0\u3002 @@ -158,7 +138,7 @@ doclet.Help_line_26=\u8FD9\u4E9B\u94FE\u63A5\u7528\u4E8E\u663E\u793A\u548C\u9690\u85CF HTML \u6846\u67B6\u3002\u6240\u6709\u9875\u9762\u5747\u5177\u6709\u6709\u6846\u67B6\u548C\u65E0\u6846\u67B6\u4E24\u79CD\u663E\u793A\u65B9\u5F0F\u3002 doclet.Help_line_27={0}\u94FE\u63A5\u663E\u793A\u6240\u6709\u7C7B\u548C\u63A5\u53E3 (\u9664\u4E86\u975E\u9759\u6001\u5D4C\u5957\u7C7B\u578B)\u3002 doclet.Help_line_28=\u6BCF\u4E2A\u53EF\u5E8F\u5217\u5316\u6216\u53EF\u5916\u90E8\u5316\u7684\u7C7B\u90FD\u6709\u5176\u5E8F\u5217\u5316\u5B57\u6BB5\u548C\u65B9\u6CD5\u7684\u8BF4\u660E\u3002\u6B64\u4FE1\u606F\u5BF9\u91CD\u65B0\u5B9E\u73B0\u8005\u6709\u7528, \u800C\u5BF9\u4F7F\u7528 API \u7684\u5F00\u53D1\u8005\u5219\u6CA1\u6709\u4EC0\u4E48\u7528\u5904\u3002\u5C3D\u7BA1\u5BFC\u822A\u680F\u4E2D\u6CA1\u6709\u94FE\u63A5, \u4F46\u60A8\u53EF\u4EE5\u901A\u8FC7\u4E0B\u5217\u65B9\u5F0F\u83B7\u53D6\u6B64\u4FE1\u606F: \u8F6C\u81F3\u4EFB\u4F55\u5E8F\u5217\u5316\u7C7B, \u7136\u540E\u5355\u51FB\u7C7B\u8BF4\u660E\u7684 "\u53E6\u8BF7\u53C2\u9605" \u90E8\u5206\u4E2D\u7684 "\u5E8F\u5217\u5316\u8868\u683C"\u3002 -doclet.Help_line_29=\u5E38\u91CF\u5B57\u6BB5\u503C\u9875\u9762\u5217\u51FA\u4E86\u9759\u6001\u6700\u7EC8\u5B57\u6BB5\u53CA\u5176\u503C\u3002 +doclet.Help_line_29={0}\u9875\u9762\u5217\u51FA\u4E86\u9759\u6001\u6700\u7EC8\u5B57\u6BB5\u53CA\u5176\u503C\u3002 doclet.Help_line_30=\u6B64\u5E2E\u52A9\u6587\u4EF6\u9002\u7528\u4E8E\u4F7F\u7528\u6807\u51C6 doclet \u751F\u6210\u7684 API \u6587\u6863\u3002 doclet.Help_enum_line_1=\u6BCF\u4E2A\u679A\u4E3E\u90FD\u6709\u5404\u81EA\u7684\u9875\u9762, \u5176\u4E2D\u5305\u542B\u4EE5\u4E0B\u90E8\u5206: doclet.Help_enum_line_2=\u679A\u4E3E\u58F0\u660E @@ -166,19 +146,6 @@ doclet.Help_annotation_type_line_1=\u6BCF\u4E2A\u6CE8\u91CA\u7C7B\u578B\u90FD\u6709\u5404\u81EA\u7684\u9875\u9762, \u5176\u4E2D\u5305\u542B\u4EE5\u4E0B\u90E8\u5206: doclet.Help_annotation_type_line_2=\u6CE8\u91CA\u7C7B\u578B\u58F0\u660E doclet.Help_annotation_type_line_3=\u6CE8\u91CA\u7C7B\u578B\u8BF4\u660E -doclet.Style_line_1=Javadoc \u6837\u5F0F\u8868 -doclet.Style_line_2=\u5728\u6B64\u5904\u5B9A\u4E49\u989C\u8272, \u5B57\u4F53\u548C\u5176\u4ED6\u6837\u5F0F\u5C5E\u6027\u4EE5\u8986\u76D6\u9ED8\u8BA4\u503C -doclet.Style_line_3=\u9875\u9762\u80CC\u666F\u989C\u8272 -doclet.Style_Headings=\u6807\u9898 -doclet.Style_line_4=\u8868\u683C\u989C\u8272 -doclet.Style_line_5=\u6DF1\u7D2B\u8272 -doclet.Style_line_6=\u6DE1\u7D2B\u8272 -doclet.Style_line_7=\u767D\u8272 -doclet.Style_line_8=\u5DE6\u4FA7\u7684\u6846\u67B6\u5217\u8868\u4E2D\u4F7F\u7528\u7684\u5B57\u4F53 -doclet.Style_line_9=\u6846\u67B6\u4E2D\u5C0F\u53F7 sans-serif \u5B57\u4F53\u7684\u793A\u4F8B -doclet.Style_line_10=\u5BFC\u822A\u680F\u5B57\u4F53\u548C\u989C\u8272 -doclet.Style_line_11=\u6DF1\u84DD\u8272 -doclet.Style_line_12=\u8868\u6807\u9898\u6837\u5F0F doclet.ClassUse_Packages.that.use.0=\u4F7F\u7528{0}\u7684\u7A0B\u5E8F\u5305 doclet.ClassUse_Uses.of.0.in.1={1}\u4E2D{0}\u7684\u4F7F\u7528 doclet.ClassUse_Classes.in.0.used.by.1={1}\u4F7F\u7528\u7684{0}\u4E2D\u7684\u7C7B @@ -208,13 +175,11 @@ doclet.Window_ClassUse_Header={0} {1}\u7684\u4F7F\u7528 doclet.ClassUse_Title={0} {1}
\u7684\u4F7F\u7528 doclet.navClassUse=\u4F7F\u7528 -doclet.link_option_twice=\u5916\u90E8 URL \u94FE\u63A5\u9009\u9879 (link \u6216 linkoffline) \u4F7F\u7528\u4E86\u4E24\u6B21\u3002 doclet.Error_in_packagelist=\u4F7F\u7528 -group \u9009\u9879\u65F6\u51FA\u9519: {0} {1} doclet.Groupname_already_used=\u5728 -group \u9009\u9879\u4E2D, groupname \u5DF2\u4F7F\u7528: {0} doclet.Same_package_name_used=\u7A0B\u5E8F\u5305\u540D\u79F0\u5F62\u5F0F\u4F7F\u7528\u4E86\u4E24\u6B21: {0} -doclet.Serialization.Excluded_Class=\u975E\u77AC\u6001\u5B57\u6BB5{1}\u4F7F\u7528\u4E86\u6392\u9664\u7684\u7C7B{0}\u3002 -doclet.Serialization.Nonexcluded_Class=\u975E\u77AC\u6001\u5B57\u6BB5{1}\u4F7F\u7528\u4E86\u9690\u85CF\u7684, \u672A\u5305\u542B\u7684\u7C7B{0}\u3002 -doclet.usage=\u901A\u8FC7\u6807\u51C6 doclet \u63D0\u4F9B:\n-d \u8F93\u51FA\u6587\u4EF6\u7684\u76EE\u6807\u76EE\u5F55\n-use \u521B\u5EFA\u7C7B\u548C\u7A0B\u5E8F\u5305\u7528\u6CD5\u9875\u9762\n-version \u5305\u542B @version \u6BB5\n-author \u5305\u542B @author \u6BB5\n-docfilessubdirs \u9012\u5F52\u590D\u5236\u6587\u6863\u6587\u4EF6\u5B50\u76EE\u5F55\n-splitindex \u5C06\u7D22\u5F15\u5206\u4E3A\u6BCF\u4E2A\u5B57\u6BCD\u5BF9\u5E94\u4E00\u4E2A\u6587\u4EF6\n-windowtitle \u6587\u6863\u7684\u6D4F\u89C8\u5668\u7A97\u53E3\u6807\u9898\n-doctitle \u5305\u542B\u6982\u89C8\u9875\u9762\u7684\u6807\u9898\n-header \u5305\u542B\u6BCF\u4E2A\u9875\u9762\u7684\u9875\u7709\u6587\u672C\n-footer \u5305\u542B\u6BCF\u4E2A\u9875\u9762\u7684\u9875\u811A\u6587\u672C\n-top \u5305\u542B\u6BCF\u4E2A\u9875\u9762\u7684\u9876\u90E8\u6587\u672C\n-bottom \u5305\u542B\u6BCF\u4E2A\u9875\u9762\u7684\u5E95\u90E8\u6587\u672C\n-link \u521B\u5EFA\u6307\u5411\u4F4D\u4E8E \u7684 javadoc \u8F93\u51FA\u7684\u94FE\u63A5\n-linkoffline \u5229\u7528\u4F4D\u4E8E \u7684\u7A0B\u5E8F\u5305\u5217\u8868\u94FE\u63A5\u81F3\u4F4D\u4E8E \u7684\u6587\u6863\n-excludedocfilessubdir :..\u6392\u9664\u5177\u6709\u7ED9\u5B9A\u540D\u79F0\u7684\u6240\u6709\u6587\u6863\u6587\u4EF6\u5B50\u76EE\u5F55\u3002\n-group :..\u5728\u6982\u89C8\u9875\u9762\u4E2D, \u5C06\u6307\u5B9A\u7684\u7A0B\u5E8F\u5305\u5206\u7EC4\n-nocomment \u4E0D\u751F\u6210\u8BF4\u660E\u548C\u6807\u8BB0, \u53EA\u751F\u6210\u58F0\u660E\u3002\n-nodeprecated \u4E0D\u5305\u542B @deprecated \u4FE1\u606F\n-noqualifier ::...\u8F93\u51FA\u4E2D\u4E0D\u5305\u62EC\u6307\u5B9A\u9650\u5B9A\u7B26\u7684\u5217\u8868\u3002\n-nosince \u4E0D\u5305\u542B @since \u4FE1\u606F\n-notimestamp \u4E0D\u5305\u542B\u9690\u85CF\u65F6\u95F4\u6233\n-nodeprecatedlist \u4E0D\u751F\u6210\u5DF2\u8FC7\u65F6\u7684\u5217\u8868\n-notree \u4E0D\u751F\u6210\u7C7B\u5206\u5C42\u7ED3\u6784\n-noindex \u4E0D\u751F\u6210\u7D22\u5F15\n-nohelp \u4E0D\u751F\u6210\u5E2E\u52A9\u94FE\u63A5\n-nonavbar \u4E0D\u751F\u6210\u5BFC\u822A\u680F\n-serialwarn \u751F\u6210\u6709\u5173 @serial \u6807\u8BB0\u7684\u8B66\u544A\n-tag ::
\u6307\u5B9A\u5355\u4E2A\u53C2\u6570\u5B9A\u5236\u6807\u8BB0\n-taglet \u8981\u6CE8\u518C\u7684 Taglet \u7684\u5168\u9650\u5B9A\u540D\u79F0\n-tagletpath Taglet \u7684\u8DEF\u5F84\n-charset \u7528\u4E8E\u8DE8\u5E73\u53F0\u67E5\u770B\u751F\u6210\u7684\u6587\u6863\u7684\u5B57\u7B26\u96C6\u3002\n-helpfile \u5305\u542B\u5E2E\u52A9\u94FE\u63A5\u6240\u94FE\u63A5\u5230\u7684\u6587\u4EF6\n-linksource \u4EE5 HTML \u683C\u5F0F\u751F\u6210\u6E90\u6587\u4EF6\n-sourcetab \u6307\u5B9A\u6E90\u4E2D\u6BCF\u4E2A\u5236\u8868\u7B26\u5360\u636E\u7684\u7A7A\u683C\u6570\n-keywords \u4F7F\u7A0B\u5E8F\u5305, \u7C7B\u548C\u6210\u5458\u4FE1\u606F\u9644\u5E26 HTML \u5143\u6807\u8BB0\n-stylesheetfile \u7528\u4E8E\u66F4\u6539\u751F\u6210\u6587\u6863\u7684\u6837\u5F0F\u7684\u6587\u4EF6\n-docencoding \u8F93\u51FA\u7F16\u7801\u540D\u79F0 +doclet.exception_encountered=\u5904\u7406{1}\u65F6\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF\n{0} +doclet.usage=\u901A\u8FC7\u6807\u51C6 doclet \u63D0\u4F9B:\n-d \u8F93\u51FA\u6587\u4EF6\u7684\u76EE\u6807\u76EE\u5F55\n-use \u521B\u5EFA\u7C7B\u548C\u7A0B\u5E8F\u5305\u7528\u6CD5\u9875\u9762\n-version \u5305\u542B @version \u6BB5\n-author \u5305\u542B @author \u6BB5\n-docfilessubdirs \u9012\u5F52\u590D\u5236\u6587\u6863\u6587\u4EF6\u5B50\u76EE\u5F55\n-splitindex \u5C06\u7D22\u5F15\u5206\u4E3A\u6BCF\u4E2A\u5B57\u6BCD\u5BF9\u5E94\u4E00\u4E2A\u6587\u4EF6\n-windowtitle \u6587\u6863\u7684\u6D4F\u89C8\u5668\u7A97\u53E3\u6807\u9898\n-doctitle \u5305\u542B\u6982\u89C8\u9875\u9762\u7684\u6807\u9898\n-header \u5305\u542B\u6BCF\u4E2A\u9875\u9762\u7684\u9875\u7709\u6587\u672C\n-footer \u5305\u542B\u6BCF\u4E2A\u9875\u9762\u7684\u9875\u811A\u6587\u672C\n-top \u5305\u542B\u6BCF\u4E2A\u9875\u9762\u7684\u9876\u90E8\u6587\u672C\n-bottom \u5305\u542B\u6BCF\u4E2A\u9875\u9762\u7684\u5E95\u90E8\u6587\u672C\n-link \u521B\u5EFA\u6307\u5411\u4F4D\u4E8E \u7684 javadoc \u8F93\u51FA\u7684\u94FE\u63A5\n-linkoffline \u5229\u7528\u4F4D\u4E8E \u7684\u7A0B\u5E8F\u5305\u5217\u8868\u94FE\u63A5\u81F3\u4F4D\u4E8E \u7684\u6587\u6863\n-excludedocfilessubdir :.. \u6392\u9664\u5177\u6709\u7ED9\u5B9A\u540D\u79F0\u7684\u6240\u6709\u6587\u6863\u6587\u4EF6\u5B50\u76EE\u5F55\u3002\n-group :.. \u5728\u6982\u89C8\u9875\u9762\u4E2D, \u5C06\u6307\u5B9A\u7684\u7A0B\u5E8F\u5305\u5206\u7EC4\n-nocomment \u4E0D\u751F\u6210\u8BF4\u660E\u548C\u6807\u8BB0, \u53EA\u751F\u6210\u58F0\u660E\u3002\n-nodeprecated \u4E0D\u5305\u542B @deprecated \u4FE1\u606F\n-noqualifier ::... \u8F93\u51FA\u4E2D\u4E0D\u5305\u62EC\u9650\u5B9A\u7B26\u7684\u5217\u8868\u3002\n-nosince \u4E0D\u5305\u542B @since \u4FE1\u606F\n-notimestamp \u4E0D\u5305\u542B\u9690\u85CF\u65F6\u95F4\u6233\n-nodeprecatedlist \u4E0D\u751F\u6210\u5DF2\u8FC7\u65F6\u7684\u5217\u8868\n-notree \u4E0D\u751F\u6210\u7C7B\u5206\u5C42\u7ED3\u6784\n-noindex \u4E0D\u751F\u6210\u7D22\u5F15\n-nohelp \u4E0D\u751F\u6210\u5E2E\u52A9\u94FE\u63A5\n-nonavbar \u4E0D\u751F\u6210\u5BFC\u822A\u680F\n-serialwarn \u751F\u6210\u6709\u5173 @serial \u6807\u8BB0\u7684\u8B66\u544A\n-tag ::
\u6307\u5B9A\u5355\u4E2A\u53C2\u6570\u5B9A\u5236\u6807\u8BB0\n-taglet \u8981\u6CE8\u518C\u7684 Taglet \u7684\u5168\u9650\u5B9A\u540D\u79F0\n-tagletpath Taglet \u7684\u8DEF\u5F84\n-Xdocrootparent \u5C06\u6587\u6863\u6CE8\u91CA\u4E2D\u51FA\u73B0\u7684\u6240\u6709\u540E\u8DDF /.. \u7684 @docRoot \u66FF\u6362\u4E3A \n-charset \u7528\u4E8E\u8DE8\u5E73\u53F0\u67E5\u770B\u751F\u6210\u7684\u6587\u6863\u7684\u5B57\u7B26\u96C6\u3002\n-helpfile \u5305\u542B\u5E2E\u52A9\u94FE\u63A5\u6240\u94FE\u63A5\u5230\u7684\u6587\u4EF6\n-linksource \u4EE5 HTML \u683C\u5F0F\u751F\u6210\u6E90\u6587\u4EF6\n-sourcetab \u6307\u5B9A\u6E90\u4E2D\u6BCF\u4E2A\u5236\u8868\u7B26\u5360\u636E\u7684\u7A7A\u683C\u6570\n-keywords \u4F7F\u7A0B\u5E8F\u5305, \u7C7B\u548C\u6210\u5458\u4FE1\u606F\u9644\u5E26 HTML \u5143\u6807\u8BB0\n-stylesheetfile \u7528\u4E8E\u66F4\u6539\u751F\u6210\u6587\u6863\u7684\u6837\u5F0F\u7684\u6587\u4EF6\n-docencoding \u8F93\u51FA\u7F16\u7801\u540D\u79F0 diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java Mon Apr 01 21:42:15 2013 -0700 @@ -56,7 +56,7 @@ /** * Exception used to report a problem during setOptions. */ - public class Fault extends Exception { + public static class Fault extends Exception { private static final long serialVersionUID = 0; Fault(String msg) { diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeBuilder.java --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeBuilder.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeBuilder.java Mon Apr 01 21:42:15 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 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 @@ -116,9 +116,9 @@ * @param contentTree the content tree to which the documentation will be added */ public void buildAnnotationTypeDoc(XMLNode node, Content contentTree) throws Exception { - contentTree = writer.getHeader(configuration.getText("doclet.AnnotationType") + + contentTree = writer.getHeader(configuration.getText("doclet.AnnotationType") + " " + annotationTypeDoc.name()); - Content annotationContentTree = writer.getAnnotationContentHeader(); + Content annotationContentTree = writer.getAnnotationContentHeader(); buildChildren(node, annotationContentTree); contentTree.addContent(annotationContentTree); writer.addFooter(contentTree); diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets_ja.properties --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets_ja.properties Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets_ja.properties Mon Apr 01 21:42:15 2013 -0700 @@ -11,6 +11,8 @@ doclet.Class_0_extends_implements_serializable=Class {0} extends {1} implements Serializable doclet.Option_conflict=\u30AA\u30D7\u30B7\u30E7\u30F3{0}\u304C{1}\u3068\u77DB\u76FE\u3057\u307E\u3059 doclet.Option_reuse=\u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u518D\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059: {0} +doclet.Option_doclint_no_qualifiers=\u30A2\u30AF\u30BB\u30B9\u4FEE\u98FE\u5B50\u306F-Xdoclint\u306E\u5F15\u6570\u306B\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093 +doclet.Option_doclint_invalid_arg=-Xdoclint\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5F15\u6570\u304C\u7121\u52B9\u3067\u3059 doclet.exception_encountered= {0}\u3092\u691C\u51FA\n\t\u30D5\u30A1\u30A4\u30EB\u306E\u4F5C\u6210\u4E2D: {1} doclet.perform_copy_exception_encountered= \u30B3\u30D4\u30FC\u5B9F\u884C\u4E2D\u306B{0}\u3092\n\u691C\u51FA\u3057\u307E\u3057\u305F\u3002 doclet.File_not_found=\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0} @@ -19,10 +21,8 @@ doclet.Copying_File_0_To_File_1=\u30D5\u30A1\u30A4\u30EB{0}\u3092\u30D5\u30A1\u30A4\u30EB{1}\u306B\u30B3\u30D4\u30FC\u4E2D... doclet.No_Public_Classes_To_Document=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5316\u3059\u308Bpublic\u307E\u305F\u306Fprotected\u30AF\u30E9\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002 doclet.Unable_to_create_directory_0=\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA{0}\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093 -doclet.destination_directory_not_found_0=\u8EE2\u9001\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA{0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 doclet.destination_directory_not_directory_0=\u8EE2\u9001\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA{0}\u306F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u306F\u3042\u308A\u307E\u305B\u3093 doclet.destination_directory_not_writable_0=\u8EE2\u9001\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA{0}\u306F\u66F8\u8FBC\u307F\u53EF\u80FD\u3067\u306F\u3042\u308A\u307E\u305B\u3093 -doclet.Error_creating_tmp_file=\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3092\u4F7F\u7528\u3057\u3066\u4E00\u6642\u30D5\u30A1\u30A4\u30EB\u3092\u4F5C\u6210\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002 doclet.Encoding_not_supported=\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0{0}\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093 doclet.Building_Tree=\u5168\u30D1\u30C3\u30B1\u30FC\u30B8\u3068\u30AF\u30E9\u30B9\u306E\u968E\u5C64\u30C4\u30EA\u30FC\u3092\u4F5C\u6210\u3057\u3066\u3044\u307E\u3059... doclet.Building_Index=\u5168\u30D1\u30C3\u30B1\u30FC\u30B8\u3068\u30AF\u30E9\u30B9\u306E\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u3092\u4F5C\u6210\u3057\u3066\u3044\u307E\u3059... @@ -72,7 +72,6 @@ doclet.Enum_Constant_Summary=\u5217\u6319\u578B\u5B9A\u6570\u306E\u6982\u8981 doclet.Constructor_Summary=\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u306E\u6982\u8981 doclet.Method_Summary=\u30E1\u30BD\u30C3\u30C9\u306E\u6982\u8981 -doclet.Factory_Method_Summary=static\u30D5\u30A1\u30AF\u30C8\u30EA\u30FB\u30E1\u30BD\u30C3\u30C9\u306E\u6982\u8981 doclet.Interfaces=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9 doclet.Enums=\u5217\u6319\u578B doclet.AnnotationTypes=\u6CE8\u91C8\u578B @@ -86,15 +85,14 @@ doclet.All_Implemented_Interfaces=\u3059\u3079\u3066\u306E\u5B9F\u88C5\u3055\u308C\u305F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9: doclet.All_classes_and_interfaces=\u3059\u3079\u3066\u306E\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9(\u975Estatic\u306E\u30CD\u30B9\u30C8\u3055\u308C\u305F\u578B\u3092\u9664\u304F) doclet.Package_class_and_interface_descriptions=\u30D1\u30C3\u30B1\u30FC\u30B8\u3001\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u8AAC\u660E -doclet.Members=\u30E1\u30F3\u30D0\u30FC doclet.Interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9 doclet.Class=\u30AF\u30E9\u30B9 doclet.AnnotationType=\u6CE8\u91C8\u578B doclet.annotationtype=\u6CE8\u91C8\u578B doclet.annotationtypes=\u6CE8\u91C8\u578B doclet.Enum=\u5217\u6319\u578B -doclet.enum=\u5217\u6319 -doclet.enums=\u5217\u6319 +doclet.enum=\u5217\u6319\u578B +doclet.enums=\u5217\u6319\u578B doclet.interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9 doclet.interfaces=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9 doclet.class=\u30AF\u30E9\u30B9 @@ -105,26 +103,20 @@ doclet.Exception=\u4F8B\u5916 doclet.exception=\u4F8B\u5916 doclet.exceptions=\u4F8B\u5916 -doclet.extended_by=\u4E0A\u4F4D\u3092\u62E1\u5F35 -doclet.extends=extends doclet.Package_private=(package private) -doclet.implements=implementsdoclet.Same_package_name_used=\u30D1\u30C3\u30B1\u30FC\u30B8\u540D\u5F62\u5F0F\u304C2\u56DE\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059: {0} doclet.Nested_Classes_Interfaces_Inherited_From_Class=\u30AF\u30E9\u30B9\u304B\u3089\u7D99\u627F\u3055\u308C\u305F\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30AF\u30E9\u30B9/\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9 doclet.Nested_Classes_Interface_Inherited_From_Interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304B\u3089\u7D99\u627F\u3055\u308C\u305F\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30AF\u30E9\u30B9/\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9 doclet.Methods_Inherited_From_Class=\u30AF\u30E9\u30B9\u304B\u3089\u7D99\u627F\u3055\u308C\u305F\u30E1\u30BD\u30C3\u30C9 doclet.Methods_Inherited_From_Interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304B\u3089\u7D99\u627F\u3055\u308C\u305F\u30E1\u30BD\u30C3\u30C9 doclet.Fields_Inherited_From_Class=\u30AF\u30E9\u30B9\u304B\u3089\u7D99\u627F\u3055\u308C\u305F\u30D5\u30A3\u30FC\u30EB\u30C9 doclet.Fields_Inherited_From_Interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304B\u3089\u7D99\u627F\u3055\u308C\u305F\u30D5\u30A3\u30FC\u30EB\u30C9 -doclet.Serializable=\u76F4\u5217\u5316\u53EF\u80FD -doclet.Externalizable=\u5916\u90E8\u5316\u53EF\u80FD doclet.Annotation_Type_Member_Detail=\u8981\u7D20\u306E\u8A73\u7D30 doclet.Enum_Constant_Detail=\u5217\u6319\u578B\u5B9A\u6570\u306E\u8A73\u7D30 doclet.Constants_Summary=\u5B9A\u6570\u30D5\u30A3\u30FC\u30EB\u30C9\u5024 doclet.Field_Detail=\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u8A73\u7D30 doclet.Method_Detail=\u30E1\u30BD\u30C3\u30C9\u306E\u8A73\u7D30 doclet.Constructor_Detail=\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u306E\u8A73\u7D30 -doclet.Deprecated=\u63A8\u5968\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002 -doclet.Deprecated_class=\u3053\u306E\u30AF\u30E9\u30B9\u306F\u63A8\u5968\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002 +doclet.Deprecated=\u975E\u63A8\u5968\u3067\u3059\u3002 doclet.Groupname_already_used=-group\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u304A\u3044\u3066\u3001\u3059\u3067\u306B\u30B0\u30EB\u30FC\u30D7\u540D\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059: {0} doclet.value_tag_invalid_reference={0}(@value\u30BF\u30B0\u306B\u3088\u308A\u53C2\u7167\u3055\u308C\u3066\u3044\u308B)\u306F\u4E0D\u660E\u306A\u53C2\u7167\u3067\u3059\u3002 doclet.value_tag_invalid_constant=@value\u30BF\u30B0({0}\u3092\u53C2\u7167\u3057\u3066\u3044\u308B)\u306F\u5B9A\u6570\u5185\u3067\u306E\u307F\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002 @@ -144,7 +136,7 @@ doclet.annotation_type_required_members=\u5FC5\u9808\u8981\u7D20 doclet.Annotation_Type_Required_Members=\u5FC5\u9808\u8981\u7D20 doclet.enum_constants=\u5217\u6319\u578B\u5B9A\u6570 -doclet.Enum_Constants=\u5217\u6319\u5B9A\u6570 +doclet.Enum_Constants=\u5217\u6319\u578B\u5B9A\u6570 doclet.nested_classes=\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30AF\u30E9\u30B9 doclet.Nested_Classes=\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30AF\u30E9\u30B9 doclet.subclasses=\u30B5\u30D6\u30AF\u30E9\u30B9 @@ -167,4 +159,4 @@ #Documentation for Enums doclet.enum_values_doc=\n\u3053\u306E\u5217\u6319\u578B\u306E\u5B9A\u6570\u3092\u542B\u3080\u914D\u5217\u3092\u5BA3\u8A00\u3055\u308C\u3066\u3044\u308B\u9806\u5E8F\u3067\u8FD4\u3057\u307E\u3059\u3002\n\u3053\u306E\u30E1\u30BD\u30C3\u30C9\u306F\u6B21\u306E\u3088\u3046\u306B\u3057\u3066\u5B9A\u6570\u3092\u53CD\u5FA9\u3059\u308B\u305F\u3081\u306B\n\u4F7F\u7528\u3067\u304D\u307E\u3059:\n
\nfor({0} c: {0}.values())\n  System.out.println(c);\n
\n@return\u3053\u306E\u5217\u6319\u578B\u306E\u5B9A\u6570\u3092\u5BA3\u8A00\u3055\u308C\u3066\u3044\u308B\u9806\u5E8F\u3067\n\u542B\u3080\u914D\u5217 -doclet.enum_valueof_doc=\n\u6307\u5B9A\u3057\u305F\u540D\u524D\u3092\u6301\u3064\u3053\u306E\u578B\u306E\u5217\u6319\u578B\u5B9A\u6570\u3092\u8FD4\u3057\u307E\u3059\u3002\n\u6587\u5B57\u5217\u306F\u3001\u3053\u306E\u578B\u306E\u5217\u6319\u578B\u5B9A\u6570\u3092\u5BA3\u8A00\u3059\u308B\u306E\u306B\u4F7F\u7528\u3057\u305F\u8B58\u5225\u5B50\u3068\u53B3\u5BC6\u306B\n\u4E00\u81F4\u3057\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n(\u4F59\u5206\u306A\u7A7A\u767D\u6587\u5B57\u3092\u542B\u3081\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002)\n\n@param name\u8FD4\u3055\u308C\u308B\u5217\u6319\u578B\u5B9A\u6570\u306E\u540D\u524D\n@return\u6307\u5B9A\u3055\u308C\u305F\u540D\u524D\u3092\u6301\u3064\u5217\u6319\u578B\u5B9A\u6570\n@throws IllegalArgumentException\u6307\u5B9A\u3055\u308C\u305F\u540D\u524D\u3092\u6301\u3064\u5B9A\u6570\u3092\n\u3053\u306E\u5217\u6319\u578B\u304C\u6301\u3063\u3066\u3044\u306A\u3044\u5834\u5408\n@throws NullPointerException\u5F15\u6570\u304Cnull\u306E\u5834\u5408 +doclet.enum_valueof_doc=\n\u6307\u5B9A\u3057\u305F\u540D\u524D\u3092\u6301\u3064\u3053\u306E\u578B\u306E\u5217\u6319\u578B\u5B9A\u6570\u3092\u8FD4\u3057\u307E\u3059\u3002\n\u6587\u5B57\u5217\u306F\u3001\u3053\u306E\u578B\u306E\u5217\u6319\u578B\u5B9A\u6570\u3092\u5BA3\u8A00\u3059\u308B\u306E\u306B\u4F7F\u7528\u3057\u305F\u8B58\u5225\u5B50\u3068\u6B63\u78BA\u306B\n\u4E00\u81F4\u3057\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n(\u4F59\u5206\u306A\u7A7A\u767D\u6587\u5B57\u3092\u542B\u3081\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002)\n\n@param name\u8FD4\u3055\u308C\u308B\u5217\u6319\u578B\u5B9A\u6570\u306E\u540D\u524D\n@return\u6307\u5B9A\u3055\u308C\u305F\u540D\u524D\u3092\u6301\u3064\u5217\u6319\u578B\u5B9A\u6570\n@throws IllegalArgumentException\u6307\u5B9A\u3055\u308C\u305F\u540D\u524D\u3092\u6301\u3064\u5B9A\u6570\u3092\n\u3053\u306E\u5217\u6319\u578B\u304C\u6301\u3063\u3066\u3044\u306A\u3044\u5834\u5408\n@throws NullPointerException\u5F15\u6570\u304Cnull\u306E\u5834\u5408 diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets_zh_CN.properties --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets_zh_CN.properties Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets_zh_CN.properties Mon Apr 01 21:42:15 2013 -0700 @@ -11,6 +11,8 @@ doclet.Class_0_extends_implements_serializable=\u7C7B{0}\u6269\u5C55{1}\u5B9E\u73B0\u53EF\u5E8F\u5217\u5316 doclet.Option_conflict=\u9009\u9879{0}\u4E0E{1}\u51B2\u7A81 doclet.Option_reuse=\u91CD\u590D\u4F7F\u7528\u7684\u9009\u9879: {0} +doclet.Option_doclint_no_qualifiers=-Xdoclint \u53C2\u6570\u4E0D\u5141\u8BB8\u4F7F\u7528\u8BBF\u95EE\u9650\u5B9A\u7B26 +doclet.Option_doclint_invalid_arg=-Xdoclint \u9009\u9879\u7684\u53C2\u6570\u65E0\u6548 doclet.exception_encountered= \u5C1D\u8BD5\u521B\u5EFA\u6587\u4EF6{1}\u65F6 \n\t\u9047\u5230{0} doclet.perform_copy_exception_encountered= \u6267\u884C\u590D\u5236\u65F6 \n\u9047\u5230{0}\u3002 doclet.File_not_found=\u627E\u4E0D\u5230\u6587\u4EF6: {0} @@ -19,10 +21,8 @@ doclet.Copying_File_0_To_File_1=\u6B63\u5728\u5C06\u6587\u4EF6{0}\u590D\u5236\u5230\u6587\u4EF6{1}... doclet.No_Public_Classes_To_Document=\u627E\u4E0D\u5230\u53EF\u4EE5\u6587\u6863\u5316\u7684\u516C\u5171\u6216\u53D7\u4FDD\u62A4\u7684\u7C7B\u3002 doclet.Unable_to_create_directory_0=\u65E0\u6CD5\u521B\u5EFA\u76EE\u5F55 {0} -doclet.destination_directory_not_found_0=\u627E\u4E0D\u5230\u76EE\u6807\u76EE\u5F55 {0} doclet.destination_directory_not_directory_0=\u76EE\u6807\u76EE\u5F55\u4E0D\u662F\u76EE\u5F55 {0} doclet.destination_directory_not_writable_0=\u76EE\u6807\u76EE\u5F55\u4E0D\u53EF\u5199\u5165 {0} -doclet.Error_creating_tmp_file=\u4F7F\u7528\u9ED8\u8BA4\u5E73\u53F0\u7F16\u7801\u521B\u5EFA\u4E34\u65F6\u6587\u4EF6\u65F6\u51FA\u9519\u3002 doclet.Encoding_not_supported=\u4E0D\u652F\u6301\u7F16\u7801: {0} doclet.Building_Tree=\u6B63\u5728\u6784\u5EFA\u6240\u6709\u7A0B\u5E8F\u5305\u548C\u7C7B\u7684\u6811... doclet.Building_Index=\u6B63\u5728\u6784\u5EFA\u6240\u6709\u7A0B\u5E8F\u5305\u548C\u7C7B\u7684\u7D22\u5F15... @@ -72,7 +72,6 @@ doclet.Enum_Constant_Summary=\u679A\u4E3E\u5E38\u91CF\u6982\u8981 doclet.Constructor_Summary=\u6784\u9020\u5668\u6982\u8981 doclet.Method_Summary=\u65B9\u6CD5\u6982\u8981 -doclet.Factory_Method_Summary=\u9759\u6001\u5DE5\u5382\u65B9\u6CD5\u6982\u8981 doclet.Interfaces=\u63A5\u53E3 doclet.Enums=\u679A\u4E3E doclet.AnnotationTypes=\u6CE8\u91CA\u7C7B\u578B @@ -86,7 +85,6 @@ doclet.All_Implemented_Interfaces=\u6240\u6709\u5DF2\u5B9E\u73B0\u7684\u63A5\u53E3: doclet.All_classes_and_interfaces=\u6240\u6709\u7C7B\u548C\u63A5\u53E3 (\u9664\u4E86\u975E\u9759\u6001\u5D4C\u5957\u7C7B\u578B) doclet.Package_class_and_interface_descriptions=\u7A0B\u5E8F\u5305, \u7C7B\u548C\u63A5\u53E3\u8BF4\u660E -doclet.Members=\u6210\u5458 doclet.Interface=\u63A5\u53E3 doclet.Class=\u7C7B doclet.AnnotationType=\u6CE8\u91CA\u7C7B\u578B @@ -105,18 +103,13 @@ doclet.Exception=\u5F02\u5E38\u9519\u8BEF doclet.exception=\u5F02\u5E38\u9519\u8BEF doclet.exceptions=\u5F02\u5E38\u9519\u8BEF -doclet.extended_by=\u6269\u5C55\u8005 -doclet.extends=\u6269\u5C55 doclet.Package_private=(\u4E13\u7528\u7A0B\u5E8F\u5305) -doclet.implements=implementsdoclet.Same_package_name_used=\u7A0B\u5E8F\u5305\u540D\u79F0\u5F62\u5F0F\u4F7F\u7528\u4E86\u4E24\u6B21: {0} doclet.Nested_Classes_Interfaces_Inherited_From_Class=\u4ECE\u7C7B\u7EE7\u627F\u7684\u5D4C\u5957\u7C7B/\u63A5\u53E3 doclet.Nested_Classes_Interface_Inherited_From_Interface=\u4ECE\u63A5\u53E3\u7EE7\u627F\u7684\u5D4C\u5957\u7C7B/\u63A5\u53E3 doclet.Methods_Inherited_From_Class=\u4ECE\u7C7B\u7EE7\u627F\u7684\u65B9\u6CD5 doclet.Methods_Inherited_From_Interface=\u4ECE\u63A5\u53E3\u7EE7\u627F\u7684\u65B9\u6CD5 doclet.Fields_Inherited_From_Class=\u4ECE\u7C7B\u7EE7\u627F\u7684\u5B57\u6BB5 doclet.Fields_Inherited_From_Interface=\u4ECE\u63A5\u53E3\u7EE7\u627F\u7684\u5B57\u6BB5 -doclet.Serializable=\u53EF\u5E8F\u5217\u5316 -doclet.Externalizable=\u53EF\u5916\u90E8\u5316 doclet.Annotation_Type_Member_Detail=\u5143\u7D20\u8BE6\u7EC6\u8D44\u6599 doclet.Enum_Constant_Detail=\u679A\u4E3E\u5E38\u91CF\u8BE6\u7EC6\u8D44\u6599 doclet.Constants_Summary=\u5E38\u91CF\u5B57\u6BB5\u503C @@ -124,7 +117,6 @@ doclet.Method_Detail=\u65B9\u6CD5\u8BE6\u7EC6\u8D44\u6599 doclet.Constructor_Detail=\u6784\u9020\u5668\u8BE6\u7EC6\u8D44\u6599 doclet.Deprecated=\u5DF2\u8FC7\u65F6\u3002 -doclet.Deprecated_class=\u8BE5\u7C7B\u5DF2\u8FC7\u65F6\u3002 doclet.Groupname_already_used=\u5728 -group \u9009\u9879\u4E2D, groupname \u5DF2\u4F7F\u7528: {0} doclet.value_tag_invalid_reference={0} (\u7531 @value \u6807\u8BB0\u5F15\u7528) \u4E3A\u672A\u77E5\u5F15\u7528\u3002 doclet.value_tag_invalid_constant=@value \u6807\u8BB0 (\u5F15\u7528{0}) \u53EA\u80FD\u5728\u5E38\u91CF\u4E2D\u4F7F\u7528\u3002 @@ -167,4 +159,4 @@ #Documentation for Enums doclet.enum_values_doc=\n\u6309\u7167\u58F0\u660E\u8BE5\u679A\u4E3E\u7C7B\u578B\u7684\u5E38\u91CF\u7684\u987A\u5E8F, \u8FD4\u56DE\n\u5305\u542B\u8FD9\u4E9B\u5E38\u91CF\u7684\u6570\u7EC4\u3002\u8BE5\u65B9\u6CD5\u53EF\u7528\u4E8E\u8FED\u4EE3\n\u5E38\u91CF, \u5982\u4E0B\u6240\u793A:\n
\nfor ({0} c : {0}.values())\n    System.out.println(c);\n
\n@\u6309\u7167\u58F0\u660E\u8BE5\u679A\u4E3E\u7C7B\u578B\u7684\u5E38\u91CF\u7684\u987A\u5E8F, \u8FD4\u56DE\n\u5305\u542B\u8FD9\u4E9B\u5E38\u91CF\u7684\u6570\u7EC4 -doclet.enum_valueof_doc=\n\u8FD4\u56DE\u5E26\u6709\u6307\u5B9A\u540D\u79F0\u7684\u8BE5\u7C7B\u578B\u7684\u679A\u4E3E\u5E38\u91CF\u3002\n\u5B57\u7B26\u4E32\u5FC5\u987B\u4E0E\u7528\u4E8E\u58F0\u660E\u8BE5\u7C7B\u578B\u7684\u679A\u4E3E\u5E38\u91CF\u7684\n\u6807\u8BC6\u7B26\u5B8C\u5168\u5339\u914D\u3002(\u4E0D\u5141\u8BB8\u6709\u591A\u4F59\n\u7684\u7A7A\u683C\u5B57\u7B26\u3002)\n\n@param name \u8981\u8FD4\u56DE\u7684\u679A\u4E3E\u5E38\u91CF\u7684\u540D\u79F0\u3002\n@return \u8FD4\u56DE\u5E26\u6709\u6307\u5B9A\u540D\u79F0\u7684\u679A\u4E3E\u5E38\u91CF\n@throws \u5982\u679C\u8BE5\u679A\u4E3E\u7C7B\u578B\u6CA1\u6709\u5E26\u6709\u6307\u5B9A\u540D\u79F0\u7684\u5E38\u91CF, \n\u5219\u629B\u51FA IllegalArgumentException\n@throws \u5982\u679C\u53C2\u6570\u4E3A\u7A7A\u503C, \u5219\u629B\u51FA NullPointerException +doclet.enum_valueof_doc=\n\u8FD4\u56DE\u5E26\u6709\u6307\u5B9A\u540D\u79F0\u7684\u8BE5\u7C7B\u578B\u7684\u679A\u4E3E\u5E38\u91CF\u3002\n\u5B57\u7B26\u4E32\u5FC5\u987B\u4E0E\u7528\u4E8E\u58F0\u660E\u8BE5\u7C7B\u578B\u7684\u679A\u4E3E\u5E38\u91CF\u7684\n\u6807\u8BC6\u7B26\u5B8C\u5168\u5339\u914D\u3002(\u4E0D\u5141\u8BB8\u6709\u591A\u4F59\n\u7684\u7A7A\u683C\u5B57\u7B26\u3002)\n\n@param name \u8981\u8FD4\u56DE\u7684\u679A\u4E3E\u5E38\u91CF\u7684\u540D\u79F0\u3002\n@\u8FD4\u56DE\u5E26\u6709\u6307\u5B9A\u540D\u79F0\u7684\u679A\u4E3E\u5E38\u91CF\n@\u5982\u679C\u8BE5\u679A\u4E3E\u7C7B\u578B\u6CA1\u6709\u5E26\u6709\u6307\u5B9A\u540D\u79F0\u7684\u5E38\u91CF, \n\u5219\u629B\u51FA IllegalArgumentException\n@\u5982\u679C\u53C2\u6570\u4E3A\u7A7A\u503C, \u5219\u629B\u51FA NullPointerException diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/doclint/Checker.java --- a/src/share/classes/com/sun/tools/doclint/Checker.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/doclint/Checker.java Mon Apr 01 21:42:15 2013 -0700 @@ -25,20 +25,18 @@ package com.sun.tools.doclint; -import com.sun.source.doctree.LiteralTree; -import java.util.regex.Matcher; -import com.sun.source.doctree.LinkTree; +import java.io.IOException; +import java.io.StringWriter; import java.net.URI; -import java.util.regex.Pattern; -import java.io.IOException; -import com.sun.tools.javac.tree.DocPretty; -import java.io.StringWriter; +import java.net.URISyntaxException; import java.util.Deque; import java.util.EnumSet; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Set; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import javax.lang.model.element.Element; import javax.lang.model.element.ElementKind; @@ -52,12 +50,15 @@ import com.sun.source.doctree.AttributeTree; import com.sun.source.doctree.AuthorTree; import com.sun.source.doctree.DocCommentTree; +import com.sun.source.doctree.DocRootTree; import com.sun.source.doctree.DocTree; import com.sun.source.doctree.EndElementTree; import com.sun.source.doctree.EntityTree; import com.sun.source.doctree.ErroneousTree; import com.sun.source.doctree.IdentifierTree; import com.sun.source.doctree.InheritDocTree; +import com.sun.source.doctree.LinkTree; +import com.sun.source.doctree.LiteralTree; import com.sun.source.doctree.ParamTree; import com.sun.source.doctree.ReferenceTree; import com.sun.source.doctree.ReturnTree; @@ -67,11 +68,12 @@ import com.sun.source.doctree.StartElementTree; import com.sun.source.doctree.TextTree; import com.sun.source.doctree.ThrowsTree; +import com.sun.source.doctree.ValueTree; import com.sun.source.doctree.VersionTree; import com.sun.source.util.DocTreeScanner; import com.sun.source.util.TreePath; import com.sun.tools.doclint.HtmlTag.AttrKind; -import java.net.URISyntaxException; +import com.sun.tools.javac.tree.DocPretty; import static com.sun.tools.doclint.Messages.Group.*; @@ -95,6 +97,7 @@ public enum Flag { TABLE_HAS_CAPTION, HAS_ELEMENT, + HAS_INLINE_TAG, HAS_TEXT, REPORTED_BAD_INLINE } @@ -418,7 +421,8 @@ } if (t.flags.contains(HtmlTag.Flag.EXPECT_CONTENT) && !top.flags.contains(Flag.HAS_TEXT) - && !top.flags.contains(Flag.HAS_ELEMENT)) { + && !top.flags.contains(Flag.HAS_ELEMENT) + && !top.flags.contains(Flag.HAS_INLINE_TAG)) { env.messages.warning(HTML, tree, "dc.tag.empty", treeName); } tagStack.pop(); @@ -571,7 +575,14 @@ } @Override + public Void visitDocRoot(DocRootTree tree, Void ignore) { + markEnclosingTag(Flag.HAS_INLINE_TAG); + return super.visitDocRoot(tree, ignore); + } + + @Override public Void visitInheritDoc(InheritDocTree tree, Void ignore) { + markEnclosingTag(Flag.HAS_INLINE_TAG); // TODO: verify on overridden method foundInheritDoc = true; return super.visitInheritDoc(tree, ignore); @@ -579,6 +590,7 @@ @Override public Void visitLink(LinkTree tree, Void ignore) { + markEnclosingTag(Flag.HAS_INLINE_TAG); // simulate inline context on tag stack HtmlTag t = (tree.getKind() == DocTree.Kind.LINK) ? HtmlTag.CODE : HtmlTag.SPAN; @@ -592,6 +604,7 @@ @Override public Void visitLiteral(LiteralTree tree, Void ignore) { + markEnclosingTag(Flag.HAS_INLINE_TAG); if (tree.getKind() == DocTree.Kind.CODE) { for (TagStackItem tsi: tagStack) { if (tsi.tag == HtmlTag.CODE) { @@ -746,6 +759,12 @@ } @Override + public Void visitValue(ValueTree tree, Void ignore) { + markEnclosingTag(Flag.HAS_INLINE_TAG); + return super.visitValue(tree, ignore); + } + + @Override public Void visitVersion(VersionTree tree, Void ignore) { warnIfEmpty(tree, tree.getBody()); return super.visitVersion(tree, ignore); diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javac/Server.java --- a/src/share/classes/com/sun/tools/javac/Server.java Thu Mar 28 10:55:14 2013 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,197 +0,0 @@ -/* - * Copyright (c) 2005, 2012, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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 com.sun.tools.javac; - -import java.io.*; -import java.net.*; -import java.util.*; -import java.util.concurrent.*; -import java.util.logging.Logger; -import javax.tools.*; - -/** - * Java Compiler Server. Can be used to speed up a set of (small) - * compilation tasks by caching jar files between compilations. - * - *

This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own - * risk. This code and its internal interfaces are subject to change - * or deletion without notice.

- * - * @author Peter von der Ahé - * @since 1.6 - */ -@jdk.Supported(false) -class Server implements Runnable { - private final BufferedReader in; - private final OutputStream out; - private final boolean isSocket; - private static final JavaCompiler tool = ToolProvider.getSystemJavaCompiler(); - private static final Logger logger = Logger.getLogger("com.sun.tools.javac"); - static class CwdFileManager extends ForwardingJavaFileManager { - String cwd; - CwdFileManager(JavaFileManager fileManager) { - super(fileManager); - } - String getAbsoluteName(String name) { - if (new File(name).isAbsolute()) { - return name; - } else { - return new File(cwd,name).getPath(); - } - } -// public JavaFileObject getFileForInput(String name) -// throws IOException -// { -// return super.getFileForInput(getAbsoluteName(name)); -// } - } - // static CwdFileManager fm = new CwdFileManager(tool.getStandardFileManager()); - static final StandardJavaFileManager fm = tool.getStandardFileManager(null, null, null); - static { - // Use the same file manager for all compilations. This will - // cache jar files in the standard file manager. Use - // tool.getStandardFileManager().close() to release. - // FIXME tool.setFileManager(fm); - logger.setLevel(java.util.logging.Level.SEVERE); - } - private Server(BufferedReader in, OutputStream out, boolean isSocket) { - this.in = in; - this.out = out; - this.isSocket = isSocket; - } - private Server(BufferedReader in, OutputStream out) { - this(in, out, false); - } - private Server(Socket socket) throws IOException, UnsupportedEncodingException { - this(new BufferedReader(new InputStreamReader(socket.getInputStream(), "utf-8")), - socket.getOutputStream(), - true); - } - public void run() { - List args = new ArrayList(); - int res = -1; - try { - String line = null; - try { - line = in.readLine(); - } catch (IOException e) { - System.err.println(e.getLocalizedMessage()); - System.exit(0); - line = null; - } - // fm.cwd=null; - String cwd = null; - while (line != null) { - if (line.startsWith("PWD:")) { - cwd = line.substring(4); - } else if (line.equals("END")) { - break; - } else if (!"-XDstdout".equals(line)) { - args.add(line); - } - try { - line = in.readLine(); - } catch (IOException e) { - System.err.println(e.getLocalizedMessage()); - System.exit(0); - line = null; - } - } - Iterable path = cwd == null ? null : Arrays.asList(new File(cwd)); - // try { in.close(); } catch (IOException e) {} - long msec = System.currentTimeMillis(); - try { - synchronized (tool) { - for (StandardLocation location : StandardLocation.values()) - fm.setLocation(location, path); - res = compile(out, fm, args); - // FIXME res = tool.run((InputStream)null, null, out, args.toArray(new String[args.size()])); - } - } catch (Throwable ex) { - logger.log(java.util.logging.Level.SEVERE, args.toString(), ex); - PrintWriter p = new PrintWriter(out, true); - ex.printStackTrace(p); - p.flush(); - } - if (res >= 3) { - logger.severe(String.format("problem: %s", args)); - } else { - logger.info(String.format("success: %s", args)); - } - // res = compile(args.toArray(new String[args.size()]), out); - msec -= System.currentTimeMillis(); - logger.info(String.format("Real time: %sms", -msec)); - } finally { - if (!isSocket) { - try { in.close(); } catch (IOException e) {} - } - try { - out.write(String.format("EXIT: %s%n", res).getBytes()); - } catch (IOException ex) { - logger.log(java.util.logging.Level.SEVERE, args.toString(), ex); - } - try { - out.flush(); - out.close(); - } catch (IOException ex) { - logger.log(java.util.logging.Level.SEVERE, args.toString(), ex); - } - logger.info(String.format("EXIT: %s", res)); - } - } - public static void main(String... args) throws FileNotFoundException { - if (args.length == 2) { - for (;;) { - throw new UnsupportedOperationException("TODO"); -// BufferedReader in = new BufferedReader(new FileReader(args[0])); -// PrintWriter out = new PrintWriter(args[1]); -// new Server(in, out).run(); -// System.out.flush(); -// System.err.flush(); - } - } else { - ExecutorService pool = Executors.newCachedThreadPool(); - try - { - ServerSocket socket = new ServerSocket(0xcafe, -1, null); - for (;;) { - pool.execute(new Server(socket.accept())); - } - } - catch (IOException e) { - System.err.format("Error: %s%n", e.getLocalizedMessage()); - pool.shutdown(); - } - } - } - - private int compile(OutputStream out, StandardJavaFileManager fm, List args) { - // FIXME parse args and use getTask - // System.err.println("Running " + args); - return tool.run(null, null, out, args.toArray(new String[args.size()])); - } -} diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javac/code/Printer.java --- a/src/share/classes/com/sun/tools/javac/code/Printer.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/javac/code/Printer.java Mon Apr 01 21:42:15 2013 -0700 @@ -311,9 +311,9 @@ } if (args.head.unannotatedType().getKind() == TypeKind.ARRAY) { buf.append(visit(((ArrayType) args.head.unannotatedType()).elemtype, locale)); - if (args.head.getAnnotations().nonEmpty()) { + if (args.head.getAnnotationMirrors().nonEmpty()) { buf.append(' '); - buf.append(args.head.getAnnotations()); + buf.append(args.head.getAnnotationMirrors()); buf.append(' '); } buf.append("..."); diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javac/code/Symbol.java --- a/src/share/classes/com/sun/tools/javac/code/Symbol.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/javac/code/Symbol.java Mon Apr 01 21:42:15 2013 -0700 @@ -483,12 +483,12 @@ */ @Deprecated public A getAnnotation(Class annoType) { - return JavacElements.getAnnotation(this, annoType); + return JavacAnnoConstructs.getAnnotation(this, annoType); } // This method is part of the javax.lang.model API, do not use this in javac code. public A[] getAnnotationsByType(Class annoType) { - return JavacElements.getAnnotations(this, annoType); + return JavacAnnoConstructs.getAnnotations(this, annoType); } // TODO: getEnclosedElements should return a javac List, fix in FilteredMemberList @@ -935,11 +935,12 @@ } /** - * @deprecated this method should never be used by javac internally. + * Since this method works in terms of the runtime representation + * of annotations, it should never be used by javac internally. */ - @Override @Deprecated + @Override public A getAnnotation(Class annoType) { - return JavacElements.getAnnotation(this, annoType); + return JavacAnnoConstructs.getAnnotation(this, annoType); } public R accept(ElementVisitor v, P p) { @@ -1444,6 +1445,10 @@ return v.visitMethodSymbol(this, p); } + public Type getReceiverType() { + return asType().getReceiverType(); + } + public Type getReturnType() { return asType().getReturnType(); } diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javac/code/Type.java --- a/src/share/classes/com/sun/tools/javac/code/Type.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/javac/code/Type.java Mon Apr 01 21:42:15 2013 -0700 @@ -25,6 +25,9 @@ package com.sun.tools.javac.code; +import com.sun.tools.javac.model.JavacAnnoConstructs; +import com.sun.tools.javac.model.JavacTypes; +import java.lang.annotation.Annotation; import java.util.Collections; import java.util.EnumMap; import java.util.EnumSet; @@ -246,6 +249,10 @@ return this; } + public boolean isAnnotated() { + return false; + } + /** * If this is an annotated type, return the underlying type. * Otherwise, return the type itself. @@ -254,6 +261,23 @@ return this; } + @Override + public List getAnnotationMirrors() { + return List.nil(); + } + + @Override + public A getAnnotation(Class annotationType) { + return null; + } + + @Override + public A[] getAnnotationsByType(Class annotationType) { + @SuppressWarnings("unchecked") + A[] tmp = (A[]) java.lang.reflect.Array.newInstance(annotationType, 0); + return tmp; + } + /** Return the base types of a list of types. */ public static List baseTypes(List ts) { @@ -350,8 +374,8 @@ } if (args.head.unannotatedType().tag == ARRAY) { buf.append(((ArrayType)args.head.unannotatedType()).elemtype); - if (args.head.getAnnotations().nonEmpty()) { - buf.append(args.head.getAnnotations()); + if (args.head.getAnnotationMirrors().nonEmpty()) { + buf.append(args.head.getAnnotationMirrors()); } buf.append("..."); } else { @@ -362,7 +386,6 @@ /** Access methods. */ - public List getAnnotations() { return List.nil(); } public List getTypeArguments() { return List.nil(); } public Type getEnclosingType() { return null; } public List getParameterTypes() { return List.nil(); } @@ -1539,7 +1562,12 @@ } public static class AnnotatedType extends Type - implements javax.lang.model.type.AnnotatedType { + implements + javax.lang.model.type.ArrayType, + javax.lang.model.type.DeclaredType, + javax.lang.model.type.PrimitiveType, + javax.lang.model.type.TypeVariable, + javax.lang.model.type.WildcardType { /** The type annotations on this type. */ public List typeAnnotations; @@ -1552,7 +1580,7 @@ super(underlyingType.tag, underlyingType.tsym); this.typeAnnotations = List.nil(); this.underlyingType = underlyingType; - Assert.check(underlyingType.getKind() != TypeKind.ANNOTATED, + Assert.check(!underlyingType.isAnnotated(), "Can't annotate already annotated type: " + underlyingType); } @@ -1561,24 +1589,34 @@ super(underlyingType.tag, underlyingType.tsym); this.typeAnnotations = typeAnnotations; this.underlyingType = underlyingType; - Assert.check(underlyingType.getKind() != TypeKind.ANNOTATED, + Assert.check(!underlyingType.isAnnotated(), "Can't annotate already annotated type: " + underlyingType + "; adding: " + typeAnnotations); } @Override - public TypeKind getKind() { - return TypeKind.ANNOTATED; + public boolean isAnnotated() { + return true; } @Override - public List getAnnotations() { + public List getAnnotationMirrors() { return typeAnnotations; } @Override - public TypeMirror getUnderlyingType() { - return underlyingType; + public A getAnnotation(Class annotationType) { + return JavacAnnoConstructs.getAnnotation(this, annotationType); + } + + @Override + public A[] getAnnotationsByType(Class annotationType) { + return JavacAnnoConstructs.getAnnotationsByType(this, annotationType); + } + + @Override + public TypeKind getKind() { + return underlyingType.getKind(); } @Override @@ -1593,7 +1631,7 @@ @Override public R accept(TypeVisitor v, P p) { - return v.visitAnnotated(this, p); + return underlyingType.accept(v, p); } @Override diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javac/code/TypeAnnotations.java --- a/src/share/classes/com/sun/tools/javac/code/TypeAnnotations.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/javac/code/TypeAnnotations.java Mon Apr 01 21:42:15 2013 -0700 @@ -233,7 +233,7 @@ Type.ArrayType arType; { Type touse = type; - if (type.getKind() == TypeKind.ANNOTATED) { + if (type.isAnnotated()) { Type.AnnotatedType atype = (Type.AnnotatedType)type; toreturn = new Type.AnnotatedType(atype.underlyingType); ((Type.AnnotatedType)toreturn).typeAnnotations = atype.typeAnnotations; @@ -252,7 +252,7 @@ ListBuffer depth = ListBuffer.lb(); depth = depth.append(TypePathEntry.ARRAY); while (arType.elemtype.hasTag(TypeTag.ARRAY)) { - if (arType.elemtype.getKind() == TypeKind.ANNOTATED) { + if (arType.elemtype.isAnnotated()) { Type.AnnotatedType aelemtype = (Type.AnnotatedType) arType.elemtype; Type.AnnotatedType newAT = new Type.AnnotatedType(aelemtype.underlyingType); tomodify.elemtype = newAT; diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javac/code/Types.java --- a/src/share/classes/com/sun/tools/javac/code/Types.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/javac/code/Types.java Mon Apr 01 21:42:15 2013 -0700 @@ -1178,6 +1178,17 @@ protected boolean containsTypes(List ts1, List ts2) { return isSameTypes(ts1, ts2, true); } + + @Override + public Boolean visitWildcardType(WildcardType t, Type s) { + if (!s.hasTag(WILDCARD)) { + return false; + } else { + WildcardType t2 = (WildcardType)s; + return t.kind == t2.kind && + isSameType(t.type, t2.type, true); + } + } }; // @@ -1418,23 +1429,10 @@ } } - if (t.isCompound()) { - Warner oldWarner = warnStack.head; - warnStack.head = noWarnings; - if (!visit(supertype(t), s)) - return false; - for (Type intf : interfaces(t)) { - if (!visit(intf, s)) - return false; - } - if (warnStack.head.hasLint(LintCategory.UNCHECKED)) - oldWarner.warn(LintCategory.UNCHECKED); - return true; - } - - if (s.isCompound()) { - // call recursively to reuse the above code - return visitClassType((ClassType)s, t); + if (t.isCompound() || s.isCompound()) { + return !t.isCompound() ? + visitIntersectionType((IntersectionClassType)s, t, true) : + visitIntersectionType((IntersectionClassType)t, s, false); } if (s.tag == CLASS || s.tag == ARRAY) { @@ -1512,6 +1510,18 @@ return false; } + boolean visitIntersectionType(IntersectionClassType ict, Type s, boolean reverse) { + Warner warn = noWarnings; + for (Type c : ict.getComponents()) { + warn.clear(); + if (reverse ? !isCastable(s, c, warn) : !isCastable(c, s, warn)) + return false; + } + if (warn.hasLint(LintCategory.UNCHECKED)) + warnStack.head.warn(LintCategory.UNCHECKED); + return true; + } + @Override public Boolean visitArrayType(ArrayType t, Type s) { switch (s.tag) { @@ -2091,7 +2101,7 @@ @Override public Type visitAnnotatedType(AnnotatedType t, Boolean recurse) { Type erased = erasure(t.underlyingType, recurse); - if (erased.getKind() == TypeKind.ANNOTATED) { + if (erased.isAnnotated()) { // This can only happen when the underlying type is a // type variable and the upper bound of it is annotated. // The annotation on the type variable overrides the one @@ -3889,11 +3899,18 @@ } private boolean giveWarning(Type from, Type to) { - Type subFrom = asSub(from, to.tsym); - return to.isParameterized() && - (!(isUnbounded(to) || - isSubtype(from, to) || - ((subFrom != null) && containsType(to.allparams(), subFrom.allparams())))); + List bounds = to.isCompound() ? + ((IntersectionClassType)to).getComponents() : List.of(to); + for (Type b : bounds) { + Type subFrom = asSub(from, b.tsym); + if (b.isParameterized() && + (!(isUnbounded(b) || + isSubtype(from, b) || + ((subFrom != null) && containsType(b.allparams(), subFrom.allparams()))))) { + return true; + } + } + return false; } private List superClosure(Type t, Type s) { diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javac/comp/Attr.java --- a/src/share/classes/com/sun/tools/javac/comp/Attr.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/javac/comp/Attr.java Mon Apr 01 21:42:15 2013 -0700 @@ -3362,7 +3362,7 @@ Type normOuter = site; if (normOuter.hasTag(CLASS)) { normOuter = types.asEnclosingSuper(site, ownOuter.tsym); - if (site.getKind() == TypeKind.ANNOTATED) { + if (site.isAnnotated()) { // Propagate any type annotations. // TODO: should asEnclosingSuper do this? // Note that the type annotations in site will be updated @@ -4009,8 +4009,7 @@ // Enums may not be extended by source-level classes if (st.tsym != null && ((st.tsym.flags_field & Flags.ENUM) != 0) && - ((c.flags_field & (Flags.ENUM | Flags.COMPOUND)) == 0) && - !target.compilerBootstrap(c)) { + ((c.flags_field & (Flags.ENUM | Flags.COMPOUND)) == 0)) { log.error(env.tree.pos(), "enum.types.not.extensible"); } attribClassBody(env, c); @@ -4279,7 +4278,7 @@ validateAnnotatedType(errtree, type); if (type.tsym != null && type.tsym.isStatic() && - type.getAnnotations().nonEmpty()) { + type.getAnnotationMirrors().nonEmpty()) { // Enclosing static classes cannot have type annotations. log.error(errtree.pos(), "cant.annotate.static.class"); } diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javac/comp/Check.java --- a/src/share/classes/com/sun/tools/javac/comp/Check.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/javac/comp/Check.java Mon Apr 01 21:42:15 2013 -0700 @@ -2779,25 +2779,17 @@ } private void validateTarget(Symbol container, Symbol contained, DiagnosticPosition pos) { - Attribute.Array containedTarget = getAttributeTargetAttribute(contained); - - // If contained has no Target, we are done - if (containedTarget == null) { - return; - } - - // If contained has Target m1, container must have a Target - // annotation, m2, and m2 must be a subset of m1. (This is - // trivially true if contained has no target as per above). - - // contained has target, but container has not, error + // The set of targets the container is applicable to must be a subset + // (with respect to annotation target semantics) of the set of targets + // the contained is applicable to. The target sets may be implicit or + // explicit. + + Set containerTargets; Attribute.Array containerTarget = getAttributeTargetAttribute(container); if (containerTarget == null) { - log.error(pos, "invalid.repeatable.annotation.incompatible.target", container, contained); - return; - } - - Set containerTargets = new HashSet(); + containerTargets = getDefaultTargetSet(); + } else { + containerTargets = new HashSet(); for (Attribute app : containerTarget.values) { if (!(app instanceof Attribute.Enum)) { continue; // recovery @@ -2805,8 +2797,14 @@ Attribute.Enum e = (Attribute.Enum)app; containerTargets.add(e.value.name); } - - Set containedTargets = new HashSet(); + } + + Set containedTargets; + Attribute.Array containedTarget = getAttributeTargetAttribute(contained); + if (containedTarget == null) { + containedTargets = getDefaultTargetSet(); + } else { + containedTargets = new HashSet(); for (Attribute app : containedTarget.values) { if (!(app instanceof Attribute.Enum)) { continue; // recovery @@ -2814,20 +2812,42 @@ Attribute.Enum e = (Attribute.Enum)app; containedTargets.add(e.value.name); } - - if (!isTargetSubset(containedTargets, containerTargets)) { + } + + if (!isTargetSubsetOf(containerTargets, containedTargets)) { log.error(pos, "invalid.repeatable.annotation.incompatible.target", container, contained); } } - /** Checks that t is a subset of s, with respect to ElementType + /* get a set of names for the default target */ + private Set getDefaultTargetSet() { + if (defaultTargets == null) { + Set targets = new HashSet(); + targets.add(names.ANNOTATION_TYPE); + targets.add(names.CONSTRUCTOR); + targets.add(names.FIELD); + targets.add(names.LOCAL_VARIABLE); + targets.add(names.METHOD); + targets.add(names.PACKAGE); + targets.add(names.PARAMETER); + targets.add(names.TYPE); + + defaultTargets = java.util.Collections.unmodifiableSet(targets); + } + + return defaultTargets; + } + private Set defaultTargets; + + + /** Checks that s is a subset of t, with respect to ElementType * semantics, specifically {ANNOTATION_TYPE} is a subset of {TYPE} */ - private boolean isTargetSubset(Set s, Set t) { - // Check that all elements in t are present in s - for (Name n2 : t) { + private boolean isTargetSubsetOf(Set s, Set t) { + // Check that all elements in s are present in t + for (Name n2 : s) { boolean currentElementOk = false; - for (Name n1 : s) { + for (Name n1 : t) { if (n1 == n2) { currentElementOk = true; break; diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javac/comp/DeferredAttr.java --- a/src/share/classes/com/sun/tools/javac/comp/DeferredAttr.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/javac/comp/DeferredAttr.java Mon Apr 01 21:42:15 2013 -0700 @@ -229,9 +229,9 @@ public Type complete(DeferredType dt, ResultInfo resultInfo, DeferredAttrContext deferredAttrContext) { switch (deferredAttrContext.mode) { case SPECULATIVE: - Assert.check(dt.mode == null || - (dt.mode == AttrMode.SPECULATIVE && - dt.speculativeType(deferredAttrContext.msym, deferredAttrContext.phase).hasTag(NONE))); + //Note: if a symbol is imported twice we might do two identical + //speculative rounds... + Assert.check(dt.mode == null || dt.mode == AttrMode.SPECULATIVE); JCTree speculativeTree = attribSpeculative(dt.tree, dt.env, resultInfo); dt.speculativeCache.put(deferredAttrContext.msym, speculativeTree, deferredAttrContext.phase); return speculativeTree.type; diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javac/comp/Infer.java --- a/src/share/classes/com/sun/tools/javac/comp/Infer.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/javac/comp/Infer.java Mon Apr 01 21:42:15 2013 -0700 @@ -585,11 +585,7 @@ Infer infer = inferenceContext.infer(); for (Type b1 : uv.getBounds(InferenceBound.UPPER)) { for (Type b2 : uv.getBounds(InferenceBound.LOWER)) { - if (!inferenceContext.inferenceVars().contains(b1) && - !inferenceContext.inferenceVars().contains(b2) && - infer.types.asSuper(b2, b1.tsym) != null) { - infer.types.isSubtypeUnchecked(inferenceContext.asFree(b2), inferenceContext.asFree(b1)); - } + infer.types.isSubtypeUnchecked(inferenceContext.asFree(b2), inferenceContext.asFree(b1)); } } } @@ -603,11 +599,7 @@ Infer infer = inferenceContext.infer(); for (Type b1 : uv.getBounds(InferenceBound.UPPER)) { for (Type b2 : uv.getBounds(InferenceBound.EQ)) { - if (!inferenceContext.inferenceVars().contains(b1) && - !inferenceContext.inferenceVars().contains(b2) && - infer.types.asSuper(b2, b1.tsym) != null) { - infer.types.isSubtypeUnchecked(inferenceContext.asFree(b2), inferenceContext.asFree(b1)); - } + infer.types.isSubtypeUnchecked(inferenceContext.asFree(b2), inferenceContext.asFree(b1)); } } } @@ -621,10 +613,22 @@ Infer infer = inferenceContext.infer(); for (Type b1 : uv.getBounds(InferenceBound.EQ)) { for (Type b2 : uv.getBounds(InferenceBound.LOWER)) { - if (!inferenceContext.inferenceVars().contains(b1) && - !inferenceContext.inferenceVars().contains(b2) && - infer.types.asSuper(b2, b1.tsym) != null) { - infer.types.isSubtypeUnchecked(inferenceContext.asFree(b2), inferenceContext.asFree(b1)); + infer.types.isSubtypeUnchecked(inferenceContext.asFree(b2), inferenceContext.asFree(b1)); + } + } + } + }, + /** + * Given a bound set containing {@code alpha == S} and {@code alpha == T} + * perform {@code S == T} (which could lead to new bounds). + */ + CROSS_EQ_EQ() { + public void apply(UndetVar uv, InferenceContext inferenceContext, Warner warn) { + Infer infer = inferenceContext.infer(); + for (Type b1 : uv.getBounds(InferenceBound.EQ)) { + for (Type b2 : uv.getBounds(InferenceBound.EQ)) { + if (b1 != b2) { + infer.types.isSameType(inferenceContext.asFree(b2), inferenceContext.asFree(b1)); } } } diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java --- a/src/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java Mon Apr 01 21:42:15 2013 -0700 @@ -1019,14 +1019,14 @@ } else if (refSym.enclClass().isInterface()) { return ClassFile.REF_invokeInterface; } else { - return ClassFile.REF_invokeVirtual; + return (refSym.flags() & PRIVATE) != 0 ? + ClassFile.REF_invokeSpecial : + ClassFile.REF_invokeVirtual; } } } - // - - // \ + // /** * This visitor collects information about translation of a lambda expression. * More specifically, it keeps track of the enclosing contexts and captured locals @@ -1293,9 +1293,16 @@ return names.lambda.append(names.fromString("" + lambdaCount++)); } + /** + * For a serializable lambda, generate a name which maximizes name + * stability across deserialization. + * @param owner + * @return Name to use for the synthetic lambda method name + */ private Name serializedLambdaName(Symbol owner) { StringBuilder buf = new StringBuilder(); buf.append(names.lambda); + // Append the name of the method enclosing the lambda. String methodName = owner.name.toString(); if (methodName.equals("")) methodName = "static"; @@ -1303,9 +1310,18 @@ methodName = "new"; buf.append(methodName); buf.append('$'); - int methTypeHash = methodSig(owner.type).hashCode(); - buf.append(Integer.toHexString(methTypeHash)); + // Append a hash of the enclosing method signature to differentiate + // overloaded enclosing methods. For lambdas enclosed in lambdas, + // the generated lambda method will not have type yet, but the + // enclosing method's name will have been generated with this same + // method, so it will be unique and never be overloaded. + if (owner.type != null) { + int methTypeHash = methodSig(owner.type).hashCode(); + buf.append(Integer.toHexString(methTypeHash)); + } buf.append('$'); + // The above appended name components may not be unique, append a + // count based on the above name components. String temp = buf.toString(); Integer count = serializableLambdaCounts.get(temp); if (count == null) { @@ -1619,16 +1635,16 @@ * Translate a symbol of a given kind into something suitable for the * synthetic lambda body */ - Symbol translate(String name, final Symbol sym, LambdaSymbolKind skind) { + Symbol translate(Name name, final Symbol sym, LambdaSymbolKind skind) { switch (skind) { case CAPTURED_THIS: return sym; // self represented case TYPE_VAR: // Just erase the type var - return new VarSymbol(sym.flags(), names.fromString(name), + return new VarSymbol(sym.flags(), name, types.erasure(sym.type), sym.owner); case CAPTURED_VAR: - return new VarSymbol(SYNTHETIC | FINAL, names.fromString(name), types.erasure(sym.type), translatedSym) { + return new VarSymbol(SYNTHETIC | FINAL, name, types.erasure(sym.type), translatedSym) { @Override public Symbol baseSymbol() { //keep mapping with original captured symbol @@ -1642,27 +1658,27 @@ void addSymbol(Symbol sym, LambdaSymbolKind skind) { Map transMap = null; - String preferredName; + Name preferredName; switch (skind) { case CAPTURED_THIS: transMap = capturedThis; - preferredName = "encl$" + capturedThis.size(); + preferredName = names.fromString("encl$" + capturedThis.size()); break; case CAPTURED_VAR: transMap = capturedLocals; - preferredName = "cap$" + capturedLocals.size(); + preferredName = names.fromString("cap$" + capturedLocals.size()); break; case LOCAL_VAR: transMap = lambdaLocals; - preferredName = sym.name.toString(); + preferredName = sym.name; break; case PARAM: transMap = lambdaParams; - preferredName = sym.name.toString(); + preferredName = sym.name; break; case TYPE_VAR: transMap = typeVars; - preferredName = sym.name.toString(); + preferredName = sym.name; break; default: throw new AssertionError(); } diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javac/comp/Lower.java --- a/src/share/classes/com/sun/tools/javac/comp/Lower.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/javac/comp/Lower.java Mon Apr 01 21:42:15 2013 -0700 @@ -2604,11 +2604,6 @@ enumDefs.appendList(otherDefs.toList()); tree.defs = enumDefs.toList(); - - // Add the necessary members for the EnumCompatibleMode - if (target.compilerBootstrap(tree.sym)) { - addEnumCompatibleMembers(tree); - } } // where private MethodSymbol systemArraycopyMethod; @@ -2657,30 +2652,6 @@ olderasure.getReturnType(), olderasure.getThrownTypes(), syms.methodClass); - - if (target.compilerBootstrap(m.owner)) { - // Initialize synthetic name field - Symbol nameVarSym = lookupSynthetic(names.fromString("$name"), - tree.sym.owner.members()); - JCIdent nameIdent = make.Ident(nameParam.sym); - JCIdent id1 = make.Ident(nameVarSym); - JCAssign newAssign = make.Assign(id1, nameIdent); - newAssign.type = id1.type; - JCExpressionStatement nameAssign = make.Exec(newAssign); - nameAssign.type = id1.type; - tree.body.stats = tree.body.stats.prepend(nameAssign); - - // Initialize synthetic ordinal field - Symbol ordinalVarSym = lookupSynthetic(names.fromString("$ordinal"), - tree.sym.owner.members()); - JCIdent ordIdent = make.Ident(ordParam.sym); - id1 = make.Ident(ordinalVarSym); - newAssign = make.Assign(id1, ordIdent); - newAssign.type = id1.type; - JCExpressionStatement ordinalAssign = make.Exec(newAssign); - ordinalAssign.type = id1.type; - tree.body.stats = tree.body.stats.prepend(ordinalAssign); - } } JCMethodDecl prevMethodDef = currentMethodDef; @@ -3434,14 +3405,16 @@ tree.expr = make.TypeCast(types.erasure(iterableType), tree.expr); Symbol iterator = lookupMethod(tree.expr.pos(), names.iterator, - types.erasure(syms.iterableType), + eType, List.nil()); VarSymbol itvar = new VarSymbol(0, names.fromString("i" + target.syntheticNameChar()), types.erasure(iterator.type.getReturnType()), currentMethodSym); - JCStatement init = make. - VarDef(itvar, - make.App(make.Select(tree.expr, iterator))); + + JCStatement init = make. + VarDef(itvar, make.App(make.Select(tree.expr, iterator) + .setType(types.erasure(iterator.type)))); + Symbol hasNext = lookupMethod(tree.expr.pos(), names.hasNext, itvar.type, @@ -3886,168 +3859,4 @@ } return translated.toList(); } - - ////////////////////////////////////////////////////////////// - // The following contributed by Borland for bootstrapping purposes - ////////////////////////////////////////////////////////////// - private void addEnumCompatibleMembers(JCClassDecl cdef) { - make_at(null); - - // Add the special enum fields - VarSymbol ordinalFieldSym = addEnumOrdinalField(cdef); - VarSymbol nameFieldSym = addEnumNameField(cdef); - - // Add the accessor methods for name and ordinal - MethodSymbol ordinalMethodSym = addEnumFieldOrdinalMethod(cdef, ordinalFieldSym); - MethodSymbol nameMethodSym = addEnumFieldNameMethod(cdef, nameFieldSym); - - // Add the toString method - addEnumToString(cdef, nameFieldSym); - - // Add the compareTo method - addEnumCompareTo(cdef, ordinalFieldSym); - } - - private VarSymbol addEnumOrdinalField(JCClassDecl cdef) { - VarSymbol ordinal = new VarSymbol(PRIVATE|FINAL|SYNTHETIC, - names.fromString("$ordinal"), - syms.intType, - cdef.sym); - cdef.sym.members().enter(ordinal); - cdef.defs = cdef.defs.prepend(make.VarDef(ordinal, null)); - return ordinal; - } - - private VarSymbol addEnumNameField(JCClassDecl cdef) { - VarSymbol name = new VarSymbol(PRIVATE|FINAL|SYNTHETIC, - names.fromString("$name"), - syms.stringType, - cdef.sym); - cdef.sym.members().enter(name); - cdef.defs = cdef.defs.prepend(make.VarDef(name, null)); - return name; - } - - private MethodSymbol addEnumFieldOrdinalMethod(JCClassDecl cdef, VarSymbol ordinalSymbol) { - // Add the accessor methods for ordinal - Symbol ordinalSym = lookupMethod(cdef.pos(), - names.ordinal, - cdef.type, - List.nil()); - - Assert.check(ordinalSym instanceof MethodSymbol); - - JCStatement ret = make.Return(make.Ident(ordinalSymbol)); - cdef.defs = cdef.defs.append(make.MethodDef((MethodSymbol)ordinalSym, - make.Block(0L, List.of(ret)))); - - return (MethodSymbol)ordinalSym; - } - - private MethodSymbol addEnumFieldNameMethod(JCClassDecl cdef, VarSymbol nameSymbol) { - // Add the accessor methods for name - Symbol nameSym = lookupMethod(cdef.pos(), - names._name, - cdef.type, - List.nil()); - - Assert.check(nameSym instanceof MethodSymbol); - - JCStatement ret = make.Return(make.Ident(nameSymbol)); - - cdef.defs = cdef.defs.append(make.MethodDef((MethodSymbol)nameSym, - make.Block(0L, List.of(ret)))); - - return (MethodSymbol)nameSym; - } - - private MethodSymbol addEnumToString(JCClassDecl cdef, - VarSymbol nameSymbol) { - Symbol toStringSym = lookupMethod(cdef.pos(), - names.toString, - cdef.type, - List.nil()); - - JCTree toStringDecl = null; - if (toStringSym != null) - toStringDecl = TreeInfo.declarationFor(toStringSym, cdef); - - if (toStringDecl != null) - return (MethodSymbol)toStringSym; - - JCStatement ret = make.Return(make.Ident(nameSymbol)); - - JCTree resTypeTree = make.Type(syms.stringType); - - MethodType toStringType = new MethodType(List.nil(), - syms.stringType, - List.nil(), - cdef.sym); - toStringSym = new MethodSymbol(PUBLIC, - names.toString, - toStringType, - cdef.type.tsym); - toStringDecl = make.MethodDef((MethodSymbol)toStringSym, - make.Block(0L, List.of(ret))); - - cdef.defs = cdef.defs.prepend(toStringDecl); - cdef.sym.members().enter(toStringSym); - - return (MethodSymbol)toStringSym; - } - - private MethodSymbol addEnumCompareTo(JCClassDecl cdef, VarSymbol ordinalSymbol) { - Symbol compareToSym = lookupMethod(cdef.pos(), - names.compareTo, - cdef.type, - List.of(cdef.sym.type)); - - Assert.check(compareToSym instanceof MethodSymbol); - - JCMethodDecl compareToDecl = (JCMethodDecl) TreeInfo.declarationFor(compareToSym, cdef); - - ListBuffer blockStatements = new ListBuffer(); - - JCModifiers mod1 = make.Modifiers(0L); - Name oName = names.fromString("o"); - JCVariableDecl par1 = make.Param(oName, cdef.type, compareToSym); - - JCIdent paramId1 = make.Ident(names.java_lang_Object); - paramId1.type = cdef.type; - paramId1.sym = par1.sym; - - ((MethodSymbol)compareToSym).params = List.of(par1.sym); - - JCIdent par1UsageId = make.Ident(par1.sym); - JCIdent castTargetIdent = make.Ident(cdef.sym); - JCTypeCast cast = make.TypeCast(castTargetIdent, par1UsageId); - cast.setType(castTargetIdent.type); - - Name otherName = names.fromString("other"); - - VarSymbol otherVarSym = new VarSymbol(mod1.flags, - otherName, - cdef.type, - compareToSym); - JCVariableDecl otherVar = make.VarDef(otherVarSym, cast); - blockStatements.append(otherVar); - - JCIdent id1 = make.Ident(ordinalSymbol); - - JCIdent fLocUsageId = make.Ident(otherVarSym); - JCExpression sel = make.Select(fLocUsageId, ordinalSymbol); - JCBinary bin = makeBinary(MINUS, id1, sel); - JCReturn ret = make.Return(bin); - blockStatements.append(ret); - JCMethodDecl compareToMethod = make.MethodDef((MethodSymbol)compareToSym, - make.Block(0L, - blockStatements.toList())); - compareToMethod.params = List.of(par1); - cdef.defs = cdef.defs.append(compareToMethod); - - return (MethodSymbol)compareToSym; - } - ////////////////////////////////////////////////////////////// - // The above contributed by Borland for bootstrapping purposes - ////////////////////////////////////////////////////////////// } diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javac/comp/MemberEnter.java --- a/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java Mon Apr 01 21:42:15 2013 -0700 @@ -473,44 +473,6 @@ null, //make.Block(0, Tree.emptyList.prepend(make.Return(make.Ident(names._null)))), null); memberEnter(valueOf, env); - - // the remaining members are for bootstrapping only - if (!target.compilerBootstrap(tree.sym)) return; - - // public final int ordinal() { return ???; } - JCMethodDecl ordinal = make.at(tree.pos). - MethodDef(make.Modifiers(Flags.PUBLIC|Flags.FINAL), - names.ordinal, - make.Type(syms.intType), - List.nil(), - List.nil(), - List.nil(), - null, - null); - memberEnter(ordinal, env); - - // public final String name() { return ???; } - JCMethodDecl name = make. - MethodDef(make.Modifiers(Flags.PUBLIC|Flags.FINAL), - names._name, - make.Type(syms.stringType), - List.nil(), - List.nil(), - List.nil(), - null, - null); - memberEnter(name, env); - - // public int compareTo(E other) { return ???; } - MethodSymbol compareTo = new - MethodSymbol(Flags.PUBLIC, - names.compareTo, - new MethodType(List.of(tree.sym.type), - syms.intType, - List.nil(), - syms.methodClass), - tree.sym); - memberEnter(make.MethodDef(compareTo, null), env); } public void visitTopLevel(JCCompilationUnit tree) { @@ -936,7 +898,7 @@ Type supertype = (tree.extending != null) ? attr.attribBase(tree.extending, baseEnv, true, false, true) - : ((tree.mods.flags & Flags.ENUM) != 0 && !target.compilerBootstrap(c)) + : ((tree.mods.flags & Flags.ENUM) != 0) ? attr.attribBase(enumBase(tree.pos, c), baseEnv, true, false, false) : (c.fullname == names.java_lang_Object) @@ -949,16 +911,6 @@ ListBuffer all_interfaces = null; // lazy init Set interfaceSet = new HashSet(); List interfaceTrees = tree.implementing; - if ((tree.mods.flags & Flags.ENUM) != 0 && target.compilerBootstrap(c)) { - // add interface Comparable - interfaceTrees = - interfaceTrees.prepend(make.Type(new ClassType(syms.comparableType.getEnclosingType(), - List.of(c.type), - syms.comparableType.tsym))); - // add interface Serializable - interfaceTrees = - interfaceTrees.prepend(make.Type(syms.serializableType)); - } for (JCExpression iface : interfaceTrees) { Type i = attr.attribBase(iface, baseEnv, false, true, true); if (i.hasTag(CLASS)) { @@ -1401,8 +1353,7 @@ if (c.type != syms.objectType) stats = stats.prepend(SuperCall(make, typarams, params, based)); if ((c.flags() & ENUM) != 0 && - (types.supertype(c.type).tsym == syms.enumSym || - target.compilerBootstrap(c))) { + (types.supertype(c.type).tsym == syms.enumSym)) { // constructors of true enums are private flags = (flags & ~AccessFlags) | PRIVATE | GENERATEDCONSTR; } else diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javac/jvm/Target.java --- a/src/share/classes/com/sun/tools/javac/jvm/Target.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/javac/jvm/Target.java Mon Apr 01 21:42:15 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -48,17 +48,6 @@ /** J2SE1.4 = Merlin. */ JDK1_4("1.4", 48, 0), - /** Support for the JSR14 prototype compiler (targeting 1.4 VMs - * augmented with a few support classes). This is a transitional - * option that will not be supported in the product. */ - JSR14("jsr14", 48, 0), - - /** The following are undocumented transitional targets that we - * had used to test VM fixes in update releases. We do not - * promise to retain support for them. */ - JDK1_4_1("1.4.1", 48, 0), - JDK1_4_2("1.4.2", 48, 0), - /** Tiger. */ JDK1_5("1.5", 49, 0), @@ -175,23 +164,23 @@ return compareTo(JDK1_5) >= 0; } - /** Beginning in -target 1.4.2, we make synthetic variables + /** Beginning in -target 1.5, we make synthetic variables * package-private instead of private. This is to prevent the * necessity of access methods, which effectively relax the * protection of the field but bloat the class files and affect * execution. */ public boolean usePrivateSyntheticFields() { - return compareTo(JDK1_4_2) < 0; + return compareTo(JDK1_5) < 0; } /** Sometimes we need to create a field to cache a value like a - * class literal of the assertions flag. In -target 1.4.2 and + * class literal of the assertions flag. In -target 1.5 and * later we create a new synthetic class for this instead of * using the outermost class. See 4401576. */ public boolean useInnerCacheClass() { - return compareTo(JDK1_4_2) >= 0; + return compareTo(JDK1_5) >= 0; } /** Return true if cldc-style stack maps need to be generated. */ @@ -276,7 +265,7 @@ * See 4468823 */ public boolean classLiteralsNoInit() { - return compareTo(JDK1_4_2) >= 0; + return compareTo(JDK1_5) >= 0; } /** Although we may not have support for class literals, when we @@ -300,22 +289,10 @@ return compareTo(JDK1_5) >= 0; } - /** For bootstrapping javac only, we do without java.lang.Enum if - * necessary. - */ - public boolean compilerBootstrap(Symbol c) { - return - this == JSR14 && - (c.flags() & Flags.ENUM) != 0 && - c.flatName().toString().startsWith("com.sun.tools.") - // && !Target.class.getSuperclass().getName().equals("java.lang.Enum") - ; - } - /** In J2SE1.5.0, we introduced the "EnclosingMethod" attribute * for improved reflection support. */ public boolean hasEnclosingMethodAttribute() { - return compareTo(JDK1_5) >= 0 || this == JSR14; + return compareTo(JDK1_5) >= 0; } } diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java --- a/src/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java Mon Apr 01 21:42:15 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -273,7 +273,7 @@ /** * ExceptionProxy for MirroredTypeException. - * The toString, hashCode, and equals methods foward to the underlying + * The toString, hashCode, and equals methods forward to the underlying * type. */ private static final class MirroredTypeExceptionProxy extends ExceptionProxy { diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javac/model/JavacAnnoConstructs.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/share/classes/com/sun/tools/javac/model/JavacAnnoConstructs.java Mon Apr 01 21:42:15 2013 -0700 @@ -0,0 +1,412 @@ +/* + * Copyright (c) 2005, 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * 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 com.sun.tools.javac.model; + +import java.lang.annotation.Annotation; +import java.lang.annotation.Inherited; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +import com.sun.tools.javac.code.Attribute; +import com.sun.tools.javac.code.Kinds; +import com.sun.tools.javac.code.Symbol; +import com.sun.tools.javac.code.Symbol.ClassSymbol; +import com.sun.tools.javac.code.Type; +import com.sun.tools.javac.code.Type.AnnotatedType; +import com.sun.tools.javac.util.ListBuffer; +import static com.sun.tools.javac.code.TypeTag.CLASS; + +/** + * Utility methods for operating on annotated constructs. + * + *

This is NOT part of any supported API. + * If you write code that depends on this, you do so at your own + * risk. This code and its internal interfaces are subject to change + * or deletion without notice.

+ */ +public class JavacAnnoConstructs { + + // + + /** + * An internal-use utility that creates a runtime view of an + * annotation. This is the implementation of + * Element.getAnnotation(Class). + */ + public static
A getAnnotation(Symbol annotated, + Class annoType) { + if (!annoType.isAnnotation()) + throw new IllegalArgumentException("Not an annotation type: " + + annoType); + Attribute.Compound c; + if (annotated.kind == Kinds.TYP && annotated instanceof ClassSymbol) { + c = getAttributeOnClass((ClassSymbol)annotated, annoType); + } else { + c = getAttribute(annotated, annoType); + } + return c == null ? null : AnnotationProxyMaker.generateAnnotation(c, annoType); + } + + // Helper to getAnnotation[s] + private static Attribute.Compound getAttribute(Symbol annotated, + Class annoType) { + String name = annoType.getName(); + + for (Attribute.Compound anno : annotated.getRawAttributes()) { + if (name.equals(anno.type.tsym.flatName().toString())) + return anno; + } + + return null; + } + + // Helper to getAnnotation[s] + private static Attribute.Compound getAttributeOnClass(ClassSymbol annotated, + Class annoType) { + boolean inherited = annoType.isAnnotationPresent(Inherited.class); + Attribute.Compound result = null; + while (annotated.name != annotated.name.table.names.java_lang_Object) { + result = getAttribute(annotated, annoType); + if (result != null || !inherited) + break; + Type sup = annotated.getSuperclass(); + if (!sup.hasTag(CLASS) || sup.isErroneous()) + break; + annotated = (ClassSymbol) sup.tsym; + } + return result; + } + + /** + * An internal-use utility that creates a runtime view of + * annotations. This is the implementation of + * Element.getAnnotations(Class). + */ + public static A[] getAnnotations(Symbol annotated, + Class annoType) { + if (!annoType.isAnnotation()) + throw new IllegalArgumentException("Not an annotation type: " + + annoType); + // If annoType does not declare a container this is equivalent to wrapping + // getAnnotation(...) in an array. + Class containerType = getContainer(annoType); + if (containerType == null) { + A res = getAnnotation(annotated, annoType); + int size; + if (res == null) { + size = 0; + } else { + size = 1; + } + @SuppressWarnings("unchecked") // annoType is the Class for A + A[] arr = (A[])java.lang.reflect.Array.newInstance(annoType, size); + if (res != null) + arr[0] = res; + return arr; + } + + // So we have a containing type + String name = annoType.getName(); + String annoTypeName = annoType.getSimpleName(); + String containerTypeName = containerType.getSimpleName(); + int directIndex = -1, containerIndex = -1; + Attribute.Compound direct = null, container = null; + Attribute.Compound[] rawAttributes = annotated.getRawAttributes().toArray(new Attribute.Compound[0]); + + // Find directly present annotations + for (int i = 0; i < rawAttributes.length; i++) { + if (annoTypeName.equals(rawAttributes[i].type.tsym.flatName().toString())) { + directIndex = i; + direct = rawAttributes[i]; + } else if(containerTypeName != null && + containerTypeName.equals(rawAttributes[i].type.tsym.flatName().toString())) { + containerIndex = i; + container = rawAttributes[i]; + } + } + + // Deal with inherited annotations + if (annotated.kind == Kinds.TYP && + (annotated instanceof ClassSymbol)) { + ClassSymbol s = (ClassSymbol)annotated; + if (direct == null && container == null) { + direct = getAttributeOnClass(s, annoType); + container = getAttributeOnClass(s, containerType); + + // both are inherited and found, put container last + if (direct != null && container != null) { + directIndex = 0; + containerIndex = 1; + } else if (direct != null) { + directIndex = 0; + } else { + containerIndex = 0; + } + } else if (direct == null) { + direct = getAttributeOnClass(s, annoType); + if (direct != null) + directIndex = containerIndex + 1; + } else if (container == null) { + container = getAttributeOnClass(s, containerType); + if (container != null) + containerIndex = directIndex + 1; + } + } + + // Pack them in an array + Attribute[] contained0 = new Attribute[0]; + if (container != null) + contained0 = unpackAttributes(container); + ListBuffer compounds = ListBuffer.lb(); + for (Attribute a : contained0) + if (a instanceof Attribute.Compound) + compounds = compounds.append((Attribute.Compound)a); + Attribute.Compound[] contained = compounds.toArray(new Attribute.Compound[0]); + + int size = (direct == null ? 0 : 1) + contained.length; + @SuppressWarnings("unchecked") // annoType is the Class for A + A[] arr = (A[])java.lang.reflect.Array.newInstance(annoType, size); + + // if direct && container, which is first? + int insert = -1; + int length = arr.length; + if (directIndex >= 0 && containerIndex >= 0) { + if (directIndex < containerIndex) { + arr[0] = AnnotationProxyMaker.generateAnnotation(direct, annoType); + insert = 1; + } else { + arr[arr.length - 1] = AnnotationProxyMaker.generateAnnotation(direct, annoType); + insert = 0; + length--; + } + } else if (directIndex >= 0) { + arr[0] = AnnotationProxyMaker.generateAnnotation(direct, annoType); + return arr; + } else { + // Only container + insert = 0; + } + + for (int i = 0; i + insert < length; i++) + arr[insert + i] = AnnotationProxyMaker.generateAnnotation(contained[i], annoType); + + return arr; + } + + // + + // + + /** + * An internal-use utility that creates a runtime view of an + * annotation. This is the implementation of + * TypeMirror.getAnnotation(Class). + */ + public static A getAnnotation(AnnotatedType annotated, Class annoType) { + if (!annoType.isAnnotation()) + throw new IllegalArgumentException("Not an annotation type: " + + annoType); + Attribute.Compound c = getAttribute(annotated, annoType); + return c == null ? null : AnnotationProxyMaker.generateAnnotation(c, annoType); + } + + // Helper to getAnnotation[s] + private static Attribute.Compound getAttribute(Type annotated, + Class annoType) { + String name = annoType.getName(); + + for (Attribute.Compound anno : annotated.getAnnotationMirrors()) { + if (name.equals(anno.type.tsym.flatName().toString())) + return anno; + } + + return null; + } + + /** + * An internal-use utility that creates a runtime view of + * annotations. This is the implementation of + * TypeMirror.getAnnotationsByType(Class). + */ + public static A[] getAnnotationsByType(AnnotatedType annotated, Class annoType) { + if (!annoType.isAnnotation()) + throw new IllegalArgumentException("Not an annotation type: " + + annoType); + // If annoType does not declare a container this is equivalent to wrapping + // getAnnotation(...) in an array. + Class containerType = getContainer(annoType); + if (containerType == null) { + A res = getAnnotation(annotated, annoType); + int size; + if (res == null) { + size = 0; + } else { + size = 1; + } + @SuppressWarnings("unchecked") // annoType is the Class for A + A[] arr = (A[])java.lang.reflect.Array.newInstance(annoType, size); + if (res != null) + arr[0] = res; + return arr; + } + + // So we have a containing type + String name = annoType.getName(); + String annoTypeName = annoType.getSimpleName(); + String containerTypeName = containerType.getSimpleName(); + int directIndex = -1, containerIndex = -1; + Attribute.Compound direct = null, container = null; + Attribute.Compound[] rawAttributes = annotated.getAnnotationMirrors().toArray(new Attribute.Compound[0]); + + // Find directly present annotations + for (int i = 0; i < rawAttributes.length; i++) { + if (annoTypeName.equals(rawAttributes[i].type.tsym.flatName().toString())) { + directIndex = i; + direct = rawAttributes[i]; + } else if(containerTypeName != null && + containerTypeName.equals(rawAttributes[i].type.tsym.flatName().toString())) { + containerIndex = i; + container = rawAttributes[i]; + } + } + + // Pack them in an array + Attribute[] contained0 = new Attribute[0]; + if (container != null) + contained0 = unpackAttributes(container); + ListBuffer compounds = ListBuffer.lb(); + for (Attribute a : contained0) { + if (a instanceof Attribute.Compound) + compounds = compounds.append((Attribute.Compound)a); + } + Attribute.Compound[] contained = compounds.toArray(new Attribute.Compound[0]); + + int size = (direct == null ? 0 : 1) + contained.length; + @SuppressWarnings("unchecked") // annoType is the Class for A + A[] arr = (A[])java.lang.reflect.Array.newInstance(annoType, size); + + // if direct && container, which is first? + int insert = -1; + int length = arr.length; + if (directIndex >= 0 && containerIndex >= 0) { + if (directIndex < containerIndex) { + arr[0] = AnnotationProxyMaker.generateAnnotation(direct, annoType); + insert = 1; + } else { + arr[arr.length - 1] = AnnotationProxyMaker.generateAnnotation(direct, annoType); + insert = 0; + length--; + } + } else if (directIndex >= 0) { + arr[0] = AnnotationProxyMaker.generateAnnotation(direct, annoType); + return arr; + } else { + // Only container + insert = 0; + } + + for (int i = 0; i + insert < length; i++) + arr[insert + i] = AnnotationProxyMaker.generateAnnotation(contained[i], annoType); + + return arr; + } + + // + + // + + // Needed to unpack the runtime view of containing annotations + private static final Class REPEATABLE_CLASS = initRepeatable(); + private static final Method VALUE_ELEMENT_METHOD = initValueElementMethod(); + + private static Class initRepeatable() { + try { + // Repeatable will not be available when bootstrapping on + // JDK 7 so use a reflective lookup instead of a class + // literal for Repeatable.class. + return Class.forName("java.lang.annotation.Repeatable").asSubclass(Annotation.class); + } catch (ClassNotFoundException e) { + return null; + } catch (SecurityException e) { + return null; + } + } + + private static Method initValueElementMethod() { + if (REPEATABLE_CLASS == null) + return null; + + Method m = null; + try { + m = REPEATABLE_CLASS.getMethod("value"); + if (m != null) + m.setAccessible(true); + return m; + } catch (NoSuchMethodException e) { + return null; + } + } + + // Helper to getAnnotations + private static Class getContainer(Class annoType) { + // Since we can not refer to java.lang.annotation.Repeatable until we are + // bootstrapping with java 8 we need to get the Repeatable annotation using + // reflective invocations instead of just using its type and element method. + if (REPEATABLE_CLASS != null && + VALUE_ELEMENT_METHOD != null) { + // Get the Repeatable instance on the annotations declaration + Annotation repeatable = (Annotation)annoType.getAnnotation(REPEATABLE_CLASS); + if (repeatable != null) { + try { + // Get the value element, it should be a class + // indicating the containing annotation type + @SuppressWarnings("unchecked") + Class containerType = (Class)VALUE_ELEMENT_METHOD.invoke(repeatable); + if (containerType == null) + return null; + + return containerType; + } catch (ClassCastException e) { + return null; + } catch (IllegalAccessException e) { + return null; + } catch (InvocationTargetException e ) { + return null; + } + } + } + return null; + } + + // Helper to getAnnotations + private static Attribute[] unpackAttributes(Attribute.Compound container) { + // We now have an instance of the container, + // unpack it returning an instance of the + // contained type or null + return ((Attribute.Array)container.member(container.type.tsym.name.table.names.value)).values; + } + + // +} diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javac/model/JavacElements.java --- a/src/share/classes/com/sun/tools/javac/model/JavacElements.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/javac/model/JavacElements.java Mon Apr 01 21:42:15 2013 -0700 @@ -25,10 +25,6 @@ package com.sun.tools.javac.model; -import java.lang.annotation.Annotation; -import java.lang.annotation.Inherited; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; import java.util.Map; import javax.lang.model.SourceVersion; @@ -40,7 +36,6 @@ import com.sun.tools.javac.code.*; import com.sun.tools.javac.code.Symbol.*; -import com.sun.tools.javac.code.TypeTag; import com.sun.tools.javac.comp.AttrContext; import com.sun.tools.javac.comp.Enter; import com.sun.tools.javac.comp.Env; @@ -98,237 +93,6 @@ enter = Enter.instance(context); } - /** - * An internal-use utility that creates a runtime view of an - * annotation. This is the implementation of - * Element.getAnnotation(Class). - */ - public static A getAnnotation(Symbol annotated, - Class annoType) { - if (!annoType.isAnnotation()) - throw new IllegalArgumentException("Not an annotation type: " - + annoType); - Attribute.Compound c; - if (annotated.kind == Kinds.TYP && annotated instanceof ClassSymbol) { - c = getAttributeOnClass((ClassSymbol)annotated, annoType); - } else { - c = getAttribute(annotated, annoType); - } - return c == null ? null : AnnotationProxyMaker.generateAnnotation(c, annoType); - } - - // Helper to getAnnotation[s] - private static Attribute.Compound getAttribute(Symbol annotated, - Class annoType) { - String name = annoType.getName(); - - for (Attribute.Compound anno : annotated.getRawAttributes()) - if (name.equals(anno.type.tsym.flatName().toString())) - return anno; - - return null; - } - // Helper to getAnnotation[s] - private static Attribute.Compound getAttributeOnClass(ClassSymbol annotated, - Class annoType) { - boolean inherited = annoType.isAnnotationPresent(Inherited.class); - Attribute.Compound result = null; - while (annotated.name != annotated.name.table.names.java_lang_Object) { - result = getAttribute(annotated, annoType); - if (result != null || !inherited) - break; - Type sup = annotated.getSuperclass(); - if (!sup.hasTag(CLASS) || sup.isErroneous()) - break; - annotated = (ClassSymbol) sup.tsym; - } - return result; - } - - /** - * An internal-use utility that creates a runtime view of - * annotations. This is the implementation of - * Element.getAnnotations(Class). - */ - public static A[] getAnnotations(Symbol annotated, - Class annoType) { - if (!annoType.isAnnotation()) - throw new IllegalArgumentException("Not an annotation type: " - + annoType); - // If annoType does not declare a container this is equivalent to wrapping - // getAnnotation(...) in an array. - Class containerType = getContainer(annoType); - if (containerType == null) { - A res = getAnnotation(annotated, annoType); - int size; - if (res == null) { - size = 0; - } else { - size = 1; - } - @SuppressWarnings("unchecked") // annoType is the Class for A - A[] arr = (A[])java.lang.reflect.Array.newInstance(annoType, size); - if (res != null) - arr[0] = res; - return arr; - } - - // So we have a containing type - String name = annoType.getName(); - String annoTypeName = annoType.getSimpleName(); - String containerTypeName = containerType.getSimpleName(); - int directIndex = -1, containerIndex = -1; - Attribute.Compound direct = null, container = null; - Attribute.Compound[] rawAttributes = annotated.getRawAttributes().toArray(new Attribute.Compound[0]); - - // Find directly present annotations - for (int i = 0; i < rawAttributes.length; i++) { - if (annoTypeName.equals(rawAttributes[i].type.tsym.flatName().toString())) { - directIndex = i; - direct = rawAttributes[i]; - } else if(containerTypeName != null && - containerTypeName.equals(rawAttributes[i].type.tsym.flatName().toString())) { - containerIndex = i; - container = rawAttributes[i]; - } - } - // Deal with inherited annotations - if (annotated.kind == Kinds.TYP && - (annotated instanceof ClassSymbol)) { - ClassSymbol s = (ClassSymbol)annotated; - if (direct == null && container == null) { - direct = getAttributeOnClass(s, annoType); - container = getAttributeOnClass(s, containerType); - - // both are inherited and found, put container last - if (direct != null && container != null) { - directIndex = 0; - containerIndex = 1; - } else if (direct != null) { - directIndex = 0; - } else { - containerIndex = 0; - } - } else if (direct == null) { - direct = getAttributeOnClass(s, annoType); - if (direct != null) - directIndex = containerIndex + 1; - } else if (container == null) { - container = getAttributeOnClass(s, containerType); - if (container != null) - containerIndex = directIndex + 1; - } - } - - // Pack them in an array - Attribute[] contained0 = new Attribute[0]; - if (container != null) - contained0 = unpackAttributes(container); - ListBuffer compounds = ListBuffer.lb(); - for (Attribute a : contained0) - if (a instanceof Attribute.Compound) - compounds = compounds.append((Attribute.Compound)a); - Attribute.Compound[] contained = compounds.toArray(new Attribute.Compound[0]); - - int size = (direct == null ? 0 : 1) + contained.length; - @SuppressWarnings("unchecked") // annoType is the Class for A - A[] arr = (A[])java.lang.reflect.Array.newInstance(annoType, size); - - // if direct && container, which is first? - int insert = -1; - int length = arr.length; - if (directIndex >= 0 && containerIndex >= 0) { - if (directIndex < containerIndex) { - arr[0] = AnnotationProxyMaker.generateAnnotation(direct, annoType); - insert = 1; - } else { - arr[arr.length - 1] = AnnotationProxyMaker.generateAnnotation(direct, annoType); - insert = 0; - length--; - } - } else if (directIndex >= 0) { - arr[0] = AnnotationProxyMaker.generateAnnotation(direct, annoType); - return arr; - } else { - // Only container - insert = 0; - } - - for (int i = 0; i + insert < length; i++) - arr[insert + i] = AnnotationProxyMaker.generateAnnotation(contained[i], annoType); - - return arr; - } - - // Needed to unpack the runtime view of containing annotations - private static final Class REPEATABLE_CLASS = initRepeatable(); - private static final Method VALUE_ELEMENT_METHOD = initValueElementMethod(); - - private static Class initRepeatable() { - try { - // Repeatable will not be available when bootstrapping on - // JDK 7 so use a reflective lookup instead of a class - // literal for Repeatable.class. - return Class.forName("java.lang.annotation.Repeatable").asSubclass(Annotation.class); - } catch (ClassNotFoundException e) { - return null; - } catch (SecurityException e) { - return null; - } - } - private static Method initValueElementMethod() { - if (REPEATABLE_CLASS == null) - return null; - - Method m = null; - try { - m = REPEATABLE_CLASS.getMethod("value"); - if (m != null) - m.setAccessible(true); - return m; - } catch (NoSuchMethodException e) { - return null; - } - } - - // Helper to getAnnotations - private static Class getContainer(Class annoType) { - // Since we can not refer to java.lang.annotation.Repeatable until we are - // bootstrapping with java 8 we need to get the Repeatable annotation using - // reflective invocations instead of just using its type and element method. - if (REPEATABLE_CLASS != null && - VALUE_ELEMENT_METHOD != null) { - // Get the Repeatable instance on the annotations declaration - Annotation repeatable = (Annotation)annoType.getAnnotation(REPEATABLE_CLASS); - if (repeatable != null) { - try { - // Get the value element, it should be a class - // indicating the containing annotation type - @SuppressWarnings("unchecked") - Class containerType = (Class)VALUE_ELEMENT_METHOD.invoke(repeatable); - if (containerType == null) - return null; - - return containerType; - } catch (ClassCastException e) { - return null; - } catch (IllegalAccessException e) { - return null; - } catch (InvocationTargetException e ) { - return null; - } - } - } - return null; - } - // Helper to getAnnotations - private static Attribute[] unpackAttributes(Attribute.Compound container) { - // We now have an instance of the container, - // unpack it returning an instance of the - // contained type or null - return ((Attribute.Array)container.member(container.type.tsym.name.table.names.value)).values; - } - public PackageSymbol getPackageElement(CharSequence name) { String strName = name.toString(); if (strName.equals("")) diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javac/model/JavacTypes.java --- a/src/share/classes/com/sun/tools/javac/model/JavacTypes.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/javac/model/JavacTypes.java Mon Apr 01 21:42:15 2013 -0700 @@ -25,7 +25,6 @@ package com.sun.tools.javac.model; -import java.lang.annotation.Annotation; import java.util.Collections; import java.util.EnumSet; import java.util.LinkedHashSet; @@ -333,28 +332,4 @@ return results; } - - public List typeAnnotationsOf(TypeMirror type) { - // TODO: these methods can be removed. - return null; // ((Type)type).typeAnnotations; - } - - public A typeAnnotationOf(TypeMirror type, - Class annotationType) { - // TODO: these methods can be removed. - return null; // JavacElements.getAnnotation(((Type)type).typeAnnotations, annotationType); - } - - public TypeMirror receiverTypeOf(ExecutableType type) { - return ((Type)type).asMethodType().recvtype; - } - - /* - public A receiverTypeAnnotationOf( - ExecutableType type, Class annotationType) { - return JavacElements.getAnnotation( - ((Type)type).asMethodType().receiverTypeAnnotations, - annotationType); - }*/ - } diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javac/resources/compiler_ja.properties --- a/src/share/classes/com/sun/tools/javac/resources/compiler_ja.properties Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/javac/resources/compiler_ja.properties Mon Apr 01 21:42:15 2013 -0700 @@ -65,8 +65,11 @@ compiler.err.already.annotated={0} {1}\u306F\u6CE8\u91C8\u304C\u4ED8\u3044\u3066\u3044\u307E\u3059 -# 0: symbol, 1: symbol -compiler.err.already.defined={0}\u306F{1}\u3067\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059 +# 0: symbol kind, 1: symbol, 2: symbol kind, 3: symbol +compiler.err.already.defined={0} {1}\u306F\u3059\u3067\u306B{2} {3}\u3067\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059 + +# 0: symbol kind, 1: symbol, 2: symbol kind, 3: symbol kind, 4: symbol +compiler.err.already.defined.in.clinit={0} {1}\u306F\u3059\u3067\u306B{3} {4}\u306E{2}\u3067\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059 # 0: string compiler.err.already.defined.single.import={0}\u306F\u5358\u4E00\u306E\u578B\u30A4\u30F3\u30DD\u30FC\u30C8\u5BA3\u8A00\u3067\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059 @@ -109,28 +112,84 @@ # 0: type compiler.err.array.req.but.found=\u914D\u5217\u304C\u8981\u6C42\u3055\u308C\u307E\u3057\u305F\u304C\u3001{0}\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F -compiler.err.assignment.from.super-bound=\u30EF\u30A4\u30EB\u30C9\u30AB\u30FC\u30C9{0}\u304B\u3089\u4EE3\u5165\u3057\u3066\u3044\u307E\u3059 - -compiler.err.assignment.to.extends-bound=\u30EF\u30A4\u30EB\u30C9\u30AB\u30FC\u30C9{0}\u3078\u4EE3\u5165\u3057\u3066\u3044\u307E\u3059 - compiler.err.attribute.value.must.be.constant=\u5C5E\u6027\u306E\u5024\u306F\u5B9A\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +# 0: statement type +compiler.err.bad.initializer={0}\u306E\u4E0D\u6B63\u306A\u521D\u671F\u5316\u5B50 + compiler.err.break.outside.switch.loop=break\u304Cswitch\u6587\u307E\u305F\u306F\u30EB\u30FC\u30D7\u306E\u5916\u306B\u3042\u308A\u307E\u3059 # 0: name compiler.err.call.must.be.first.stmt.in.ctor={0}\u306E\u547C\u51FA\u3057\u306F\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u306E\u5148\u982D\u6587\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 -compiler.err.cant.apply.symbol={4} {5}\u306E{0} {1}\u306F\u6307\u5B9A\u3055\u308C\u305F\u578B\u306B\u9069\u7528\u3067\u304D\u307E\u305B\u3093\n\u671F\u5F85\u5024: {2}\n\u691C\u51FA\u5024: {3} - # 0: symbol kind, 1: name, 2: list of type or message segment, 3: list of type or message segment, 4: symbol kind, 5: type, 6: message segment -compiler.err.cant.apply.symbol.1={4} {5}\u306E{0} {1}\u306F\u6307\u5B9A\u3055\u308C\u305F\u578B\u306B\u9069\u7528\u3067\u304D\u307E\u305B\u3093\u3002\n\u671F\u5F85\u5024: {2}\n\u691C\u51FA\u5024: {3}\n\u7406\u7531: {6} +compiler.err.cant.apply.symbol={4} {5}\u306E{0} {1}\u306F\u6307\u5B9A\u3055\u308C\u305F\u578B\u306B\u9069\u7528\u3067\u304D\u307E\u305B\u3093\u3002\n\u671F\u5F85\u5024: {2}\n\u691C\u51FA\u5024: {3}\n\u7406\u7531: {6} # 0: symbol kind, 1: name, 2: list of type compiler.err.cant.apply.symbols={1}\u306B\u9069\u5207\u306A{0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093({2}) +# 0: symbol kind, 1: name, 2: list of type or message segment, 3: list of type or message segment, 4: symbol kind, 5: type, 6: message segment +compiler.misc.cant.apply.symbol={4} {5}\u306E{0} {1}\u306F\u6307\u5B9A\u3055\u308C\u305F\u578B\u306B\u9069\u7528\u3067\u304D\u307E\u305B\u3093\n\u671F\u5F85\u5024: {2}\n\u691C\u51FA\u5024: {3}\n\u7406\u7531: {6} + +# 0: symbol kind, 1: name, 2: list of type +compiler.misc.cant.apply.symbols={1}\u306B\u9069\u5207\u306A{0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093({2}) + +# 0: symbol kind, 1: symbol +compiler.misc.no.abstracts={0} {1}\u3067\u62BD\u8C61\u30E1\u30BD\u30C3\u30C9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 + +# 0: symbol kind, 1: symbol +compiler.misc.incompatible.abstracts={0} {1}\u3067\u8907\u6570\u306E\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u306A\u3044\u62BD\u8C61\u30E1\u30BD\u30C3\u30C9\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F + +compiler.err.bad.functional.intf.anno=\u4E88\u671F\u3057\u306A\u3044@FunctionalInterface\u6CE8\u91C8 + +# 0: message segment +compiler.err.bad.functional.intf.anno.1=\u4E88\u671F\u3057\u306A\u3044@FunctionalInterface\u6CE8\u91C8\n{0} + +# 0: symbol +compiler.misc.not.a.functional.intf={0}\u306F\u6A5F\u80FD\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093 + +# 0: symbol, 1: message segment +compiler.misc.not.a.functional.intf.1={0}\u306F\u6A5F\u80FD\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\n{1} + +# 0: symbol, 1: symbol kind, 2: symbol +compiler.misc.invalid.generic.lambda.target=\u30E9\u30E0\u30C0\u5F0F\u306E\u6A5F\u80FD\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u304C\u7121\u52B9\u3067\u3059\n{1} {2}\u306E\u30E1\u30BD\u30C3\u30C9{0}\u306F\u6C4E\u7528\u3067\u3059 + +# 0: symbol kind, 1: symbol +compiler.misc.incompatible.descs.in.functional.intf={0} {1}\u3067\u4E0D\u9069\u5408\u306A\u6A5F\u80FD\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F + +# 0: name, 1: list of type, 2: type, 3: list of type +compiler.misc.descriptor=\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF: {2} {0}({1}) + +# 0: name, 1: list of type, 2: type, 3: list of type +compiler.misc.descriptor.throws=\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF: {2} {0}({1})\u3067{3}\u304C\u30B9\u30ED\u30FC\u3055\u308C\u307E\u3059 + +# 0: type +compiler.misc.no.suitable.functional.intf.inst={0}\u306E\u6A5F\u80FD\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u3092\u63A8\u8AD6\u3067\u304D\u307E\u305B\u3093 + +# 0: type +compiler.misc.secondary.bound.must.be.marker.intf=\u30BB\u30AB\u30F3\u30C0\u30EA\u30FB\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0{0}\u306F\u30DE\u30FC\u30AB\u30FC\u30FB\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 + +# 0: symbol kind, 1: message segment +compiler.err.invalid.mref={0}\u53C2\u7167\u304C\u7121\u52B9\u3067\u3059\u3002{1} + +# 0: symbol kind, 1: message segment +compiler.misc.invalid.mref={0}\u53C2\u7167\u304C\u7121\u52B9\u3067\u3059\u3002{1} + +compiler.misc.static.mref.with.targs=static\u30E1\u30BD\u30C3\u30C9\u53C2\u7167\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u5316\u3055\u308C\u305F\u4FEE\u98FE\u5B50 + +compiler.misc.static.bound.mref=static\u306E\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u3055\u308C\u305F\u30E1\u30BD\u30C3\u30C9\u53C2\u7167 + # 0: symbol compiler.err.cant.assign.val.to.final.var=final\u5909\u6570{0}\u306B\u5024\u3092\u4EE3\u5165\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093 +# 0: symbol, 1: message segment +compiler.err.cant.ref.non.effectively.final.var={1}\u304B\u3089\u53C2\u7167\u3055\u308C\u308B\u30ED\u30FC\u30AB\u30EB\u5909\u6570\u306F\u3001final\u307E\u305F\u306F\u4E8B\u5B9F\u4E0A\u306Efinal\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 + + +compiler.misc.lambda=\u30E9\u30E0\u30C0\u5F0F + +compiler.misc.inner.cls=\u5185\u90E8\u30AF\u30E9\u30B9 + # 0: type compiler.err.cant.deref={0}\u306F\u9593\u63A5\u53C2\u7167\u3067\u304D\u307E\u305B\u3093 @@ -142,8 +201,6 @@ # 0: symbol compiler.err.cant.ref.before.ctor.called=\u30B9\u30FC\u30D1\u30FC\u30BF\u30A4\u30D7\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u306E\u547C\u51FA\u3057\u524D\u306F{0}\u3092\u53C2\u7167\u3067\u304D\u307E\u305B\u3093 -compiler.err.cant.ret.val.from.meth.decl.void=\u623B\u308A\u5024\u306E\u578B\u304Cvoid\u306E\u30E1\u30BD\u30C3\u30C9\u304B\u3089\u306F\u5024\u3092\u8FD4\u305B\u307E\u305B\u3093 - compiler.err.cant.select.static.class.from.param.type=\u30D1\u30E9\u30E1\u30FC\u30BF\u306B\u3055\u308C\u305F\u578B\u304B\u3089static\u30AF\u30E9\u30B9\u3092\u9078\u629E\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093 # 0: symbol, 1: string, 2: string @@ -154,6 +211,8 @@ # 0: symbol kind, 1: symbol compiler.err.clash.with.pkg.of.same.name={0} {1}\u306F\u540C\u540D\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u3068\u7AF6\u5408\u3057\u307E\u3059 +compiler.err.class.not.allowed=\u30AF\u30E9\u30B9\u3001\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u307E\u305F\u306F\u5217\u6319\u578B\u306E\u5BA3\u8A00\u3092\u3053\u3053\u3067\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093 + compiler.err.const.expr.req=\u5B9A\u6570\u5F0F\u304C\u5FC5\u8981\u3067\u3059 compiler.err.cont.outside.loop=continue\u304C\u30EB\u30FC\u30D7\u306E\u5916\u306B\u3042\u308A\u307E\u3059 @@ -169,10 +228,8 @@ # 0: type compiler.err.no.superclass={0}\u306B\u306F\u30B9\u30FC\u30D1\u30FC\u30AF\u30E9\u30B9\u304C\u3042\u308A\u307E\u305B\u3093 -compiler.err.wrong.target.for.polymorphic.signature.definition=MethodHandle API\u306E\u4F5C\u6210\u306B\u306F-target 7\u30E9\u30F3\u30BF\u30A4\u30E0\u4EE5\u4E0A\u304C\u5FC5\u8981\u3067\u3059\u3002\u73FE\u5728\u306F-target {0}\u3067\u3059 - # 0: symbol, 1: type, 2: symbol, 3: type, 4: unused -compiler.err.concrete.inheritance.conflict={1}\u306E\u30E1\u30BD\u30C3\u30C9{0}\u3068{3}\u306E{2}\u306F\u540C\u3058\u30B7\u30B0\u30CB\u30C1\u30E3\u304B\u3089\u7D99\u627F\u3055\u308C\u3066\u3044\u307E\u3059 +compiler.err.concrete.inheritance.conflict={1}\u306E\u30E1\u30BD\u30C3\u30C9{0}\u3068{3}\u306E{2}\u306F\u540C\u3058\u30B7\u30B0\u30CD\u30C1\u30E3\u304B\u3089\u7D99\u627F\u3055\u308C\u3066\u3044\u307E\u3059 compiler.err.default.allowed.in.intf.annotation.member=\u30C7\u30D5\u30A9\u30EB\u30C8\u5024\u306F@interface\u30E1\u30F3\u30D0\u30FC\u5185\u3067\u306E\u307F\u4F7F\u7528\u3067\u304D\u307E\u3059 @@ -181,9 +238,48 @@ compiler.err.duplicate.annotation=\u6CE8\u91C8\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059 +# 0: type +compiler.err.duplicate.annotation.invalid.repeated=\u6CE8\u91C8{0}\u3092\u7E70\u308A\u8FD4\u305B\u307E\u305B\u3093\n\u6709\u52B9\u306A\u5305\u542B\u3059\u308B\u6CE8\u91C8\u304C\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002 + # 0: name, 1: type compiler.err.duplicate.annotation.member.value={1}\u306E\u6CE8\u91C8\u30E1\u30F3\u30D0\u30FC\u306E\u5024{0}\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059 +# 0: type, 1: type +compiler.err.duplicate.annotation.missing.container=\u6CE8\u91C8\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059\u3002{0}\u306E\u5BA3\u8A00\u306B\u306F\u6709\u52B9\u306A{1}\u6CE8\u91C8\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093 + +# 0: type +compiler.err.invalid.repeatable.annotation=\u6CE8\u91C8\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059\u3002{0}\u306F\u7121\u52B9\u306A\u7E70\u8FD4\u3057\u53EF\u80FD\u6CE8\u91C8\u3067\u6CE8\u91C8\u4ED8\u3051\u3055\u308C\u3066\u3044\u307E\u3059 + +# 0: type +compiler.err.invalid.repeatable.annotation.no.value=\u6CE8\u91C8\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059\u3002{0}\u306F\u6709\u52B9\u306A\u7E70\u8FD4\u3057\u53EF\u80FD\u306A\u3082\u306E\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u5024\u8981\u7D20\u30E1\u30BD\u30C3\u30C9\u304C\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u305B\u3093 + +# 0: type, 1: number +compiler.err.invalid.repeatable.annotation.multiple.values=\u6CE8\u91C8\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059\u3002{0}\u306F\u6709\u52B9\u306A\u7E70\u8FD4\u3057\u53EF\u80FD\u306A\u3082\u306E\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002{1}\u5024\u8981\u7D20\u30E1\u30BD\u30C3\u30C9\u304C\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059 + +# 0: type +compiler.err.invalid.repeatable.annotation.invalid.value=\u6CE8\u91C8\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059\u3002{0}\u306F\u6709\u52B9\u306A\u7E70\u8FD4\u3057\u53EF\u80FD\u306A\u3082\u306E\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u5024\u8981\u7D20\u304C\u7121\u52B9\u3067\u3059\u3002\u30E1\u30BD\u30C3\u30C9\u304C\u5FC5\u8981\u3067\u3059 + +# 0: type, 1: type, 2: type +compiler.err.invalid.repeatable.annotation.value.return=\u6CE8\u91C8\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059\u3002\u5305\u542B\u3059\u308B\u6CE8\u91C8{0}\u306E\u5024\u8981\u7D20\u306B\u306F\u578B{2}\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002{1}\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F + +# 0: type, 1: symbol +compiler.err.invalid.repeatable.annotation.elem.nondefault=\u5305\u542B\u3059\u308B\u6CE8\u91C8{0}\u306B\u306F\u8981\u7D20{1}\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u5024\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093 + +# 0: symbol, 1: type, 2: symbol, 3: type +compiler.err.invalid.repeatable.annotation.retention=\u5305\u542B\u3059\u308B\u6CE8\u91C8{0}\u306B\u306F\u3001\u4FDD\u6709{3}\u3092\u542B\u3080\u5305\u542B\u3055\u308C\u305F\u6CE8\u91C8{2}\u3088\u308A\u77ED\u3044\u4FDD\u6709({1})\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059 + +# 0: symbol, 1: symbol +compiler.err.invalid.repeatable.annotation.not.documented=\u7E70\u308A\u8FD4\u3055\u308C\u305F\u6CE8\u91C8{1}\u306F@Documented\u3067\u3059\u304C\u3001\u5305\u542B\u3059\u308B\u6CE8\u91C8\u30BF\u30A4\u30D7{0}\u306F\u9055\u3044\u307E\u3059 + +# 0: symbol, 1: symbol +compiler.err.invalid.repeatable.annotation.not.inherited=\u308A\u8FD4\u3055\u308C\u305F\u6CE8\u91C8\u30BF\u30A4\u30D7{1}\u306F@Inherited\u3067\u3059\u304C\u3001\u5305\u542B\u3059\u308B\u6CE8\u91C8\u30BF\u30A4\u30D7{0}\u306F\u9055\u3044\u307E\u3059 + +# 0: symbol, 1: symbol +compiler.err.invalid.repeatable.annotation.incompatible.target=\u30B3\u30F3\u30C6\u30CA\u6CE8\u91C8{0}\u306E\u30BF\u30FC\u30B2\u30C3\u30C8\u306F\u3001\u7E70\u308A\u8FD4\u3055\u308C\u305F\u6CE8\u91C8{1}\u306E\u30BF\u30FC\u30B2\u30C3\u30C8\u306E\u30B5\u30D6\u30BB\u30C3\u30C8\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002 + +# 0: symbol +compiler.err.invalid.repeatable.annotation.repeated.and.container.present=\u30B3\u30F3\u30C6\u30CA{0}\u306F\u542B\u307E\u308C\u3066\u3044\u308B\u8981\u7D20\u3068\u540C\u6642\u306B\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093 + # 0: name compiler.err.duplicate.class=\u30AF\u30E9\u30B9{0}\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059 @@ -245,10 +341,10 @@ compiler.err.generic.throwable=\u6C4E\u7528\u30AF\u30E9\u30B9\u306Fjava.lang.Throwable\u3092\u62E1\u5F35\u3067\u304D\u307E\u305B\u3093 # 0: symbol -compiler.err.icls.cant.have.static.decl=\u5185\u90E8\u30AF\u30E9\u30B9{0}\u306E\u9759\u7684\u5BA3\u8A00\u304C\u4E0D\u6B63\u3067\u3059\n\u4FEE\u98FE\u5B50\''static\''\u306F\u5B9A\u6570\u304A\u3088\u3073\u5909\u6570\u306E\u5BA3\u8A00\u3067\u306E\u307F\u4F7F\u7528\u3067\u304D\u307E\u3059 +compiler.err.icls.cant.have.static.decl=\u5185\u90E8\u30AF\u30E9\u30B9{0}\u306E\u9759\u7684\u5BA3\u8A00\u304C\u4E0D\u6B63\u3067\u3059\n\u4FEE\u98FE\u5B50''static''\u306F\u5B9A\u6570\u304A\u3088\u3073\u5909\u6570\u306E\u5BA3\u8A00\u3067\u306E\u307F\u4F7F\u7528\u3067\u304D\u307E\u3059 # 0: string -compiler.err.illegal.char=\\{0}\u306F\u4E0D\u6B63\u306A\u6587\u5B57\u3067\u3059 +compiler.err.illegal.char=''{0}''\u306F\u4E0D\u6B63\u306A\u6587\u5B57\u3067\u3059 compiler.err.illegal.char.for.encoding=\u3053\u306E\u6587\u5B57\u306F\u3001\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0{0}\u306B\u30DE\u30C3\u30D7\u3067\u304D\u307E\u305B\u3093 @@ -280,11 +376,15 @@ compiler.err.illegal.underscore=\u4E0D\u6B63\u306A\u30A2\u30F3\u30C0\u30FC\u30B9\u30B3\u30A2\u3067\u3059 +compiler.err.illegal.dot=\u4E0D\u6B63\u306A''.''\u3067\u3059 + # 0: symbol compiler.err.illegal.qual.not.icls=\u4FEE\u98FE\u5B50\u304C\u4E0D\u6B63\u3067\u3059\u3002{0}\u306F\u5185\u90E8\u30AF\u30E9\u30B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093 compiler.err.illegal.start.of.expr=\u5F0F\u306E\u958B\u59CB\u304C\u4E0D\u6B63\u3067\u3059 +compiler.err.illegal.start.of.stmt=\u6587\u306E\u958B\u59CB\u304C\u4E0D\u6B63\u3067\u3059 + compiler.err.illegal.start.of.type=\u578B\u306E\u958B\u59CB\u304C\u4E0D\u6B63\u3067\u3059 compiler.err.illegal.unicode.esc=Unicode\u30A8\u30B9\u30B1\u30FC\u30D7\u304C\u4E0D\u6B63\u3067\u3059 @@ -302,8 +402,6 @@ # 0: number compiler.err.int.number.too.large=\u6574\u6570{0}\u304C\u5927\u304D\u3059\u304E\u307E\u3059 -compiler.err.internal.error.cant.instantiate=\u5185\u90E8\u30A8\u30E9\u30FC\u3067\u3059\u3002{0}\u3092{1}\u3067({2})\u306B\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u751F\u6210\u3067\u304D\u307E\u305B\u3093 - compiler.err.intf.annotation.members.cant.have.params=@interface\u30E1\u30F3\u30D0\u30FC\u304C\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u6301\u3064\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093 compiler.err.intf.annotation.cant.have.type.params=@interface\u304C\u578B\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u6301\u3064\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093 @@ -315,7 +413,7 @@ compiler.err.intf.expected.here=\u3053\u3053\u306B\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304C\u5FC5\u8981\u3067\u3059 -compiler.err.intf.meth.cant.have.body=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u30FB\u30E1\u30BD\u30C3\u30C9\u304C\u672C\u4F53\u3092\u6301\u3064\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093 +compiler.err.intf.meth.cant.have.body=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u62BD\u8C61\u30E1\u30BD\u30C3\u30C9\u304C\u672C\u4F53\u3092\u6301\u3064\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093 compiler.err.invalid.annotation.member.type=\u6CE8\u91C8\u30E1\u30F3\u30D0\u30FC\u306E\u578B\u304C\u4E0D\u6B63\u3067\u3059 @@ -327,6 +425,8 @@ compiler.err.varargs.and.old.array.syntax=\u65E7\u5F0F\u306E\u914D\u5217\u8868\u8A18\u6CD5\u306F\u53EF\u5909\u5F15\u6570\u30D1\u30E9\u30E1\u30FC\u30BF\u3067\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093 +compiler.err.variable.not.allowed=\u5909\u6570\u306E\u5BA3\u8A00\u3092\u3053\u3053\u3067\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093 + # 0: name compiler.err.label.already.in.use=\u30E9\u30D9\u30EB{0}\u306F\u3059\u3067\u306B\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059 @@ -337,6 +437,8 @@ compiler.err.cannot.create.array.with.type.arguments=\u578B\u5F15\u6570\u3092\u6301\u3064\u914D\u5217\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093 +compiler.err.cannot.create.array.with.diamond=''<>''\u3092\u6301\u3064\u914D\u5217\u306F\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093 + # # limits. We don't give the limits in the diagnostic because we expect # them to change, yet we want to use the same diagnostic. These are all @@ -360,7 +462,7 @@ compiler.err.limit.string=\u5B9A\u6570\u6587\u5B57\u5217\u304C\u9577\u3059\u304E\u307E\u3059 -compiler.err.limit.string.overflow=\u6587\u5B57\u5217\"{0}...\"\u306EUTF8\u8868\u73FE\u304C\u3001\u5B9A\u6570\u30D7\u30FC\u30EB\u306B\u5BFE\u3057\u3066\u9577\u3059\u304E\u307E\u3059 +compiler.err.limit.string.overflow=\u6587\u5B57\u5217"{0}..."\u306EUTF8\u8868\u73FE\u304C\u3001\u5B9A\u6570\u30D7\u30FC\u30EB\u306B\u5BFE\u3057\u3066\u9577\u3059\u304E\u307E\u3059 compiler.err.malformed.fp.lit=\u6D6E\u52D5\u5C0F\u6570\u70B9\u30EA\u30C6\u30E9\u30EB\u304C\u4E0D\u6B63\u3067\u3059 @@ -370,7 +472,9 @@ compiler.err.missing.ret.stmt=return\u6587\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093 -compiler.err.missing.ret.val=\u623B\u308A\u5024\u304C\u3042\u308A\u307E\u305B\u3093 +compiler.misc.missing.ret.val=\u623B\u308A\u5024\u304C\u3042\u308A\u307E\u305B\u3093 + +compiler.misc.unexpected.ret.val=\u4E88\u671F\u3057\u306A\u3044\u623B\u308A\u5024 # 0: set of modifier compiler.err.mod.not.allowed.here=\u4FEE\u98FE\u5B50{0}\u3092\u3053\u3053\u3067\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093 @@ -396,7 +500,26 @@ compiler.err.native.meth.cant.have.body=native\u30E1\u30BD\u30C3\u30C9\u304C\u672C\u4F53\u3092\u6301\u3064\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093 # 0: type, 1: type -compiler.err.neither.conditional.subtype=?\u306B\u5BFE\u3059\u308B\u4E92\u63DB\u6027\u306E\u306A\u3044\u578B : \u3069\u3061\u3089\u3082\u4ED6\u65B9\u306E\u30B5\u30D6\u30BF\u30A4\u30D7\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\n2\u756A\u76EE\u306E\u30AA\u30DA\u30E9\u30F3\u30C9 : {0}\n3\u756A\u76EE\u306E\u30AA\u30DA\u30E9\u30F3\u30C9 : {1} +compiler.err.neither.conditional.subtype=?\u306B\u5BFE\u3059\u308B\u4E0D\u9069\u5408\u306A\u578B : \u3069\u3061\u3089\u3082\u4ED6\u65B9\u306E\u30B5\u30D6\u30BF\u30A4\u30D7\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\n2\u756A\u76EE\u306E\u30AA\u30DA\u30E9\u30F3\u30C9 : {0}\n3\u756A\u76EE\u306E\u30AA\u30DA\u30E9\u30F3\u30C9 : {1} + +# 0: message segment +compiler.misc.incompatible.type.in.conditional=\u6761\u4EF6\u5F0F\u306E\u578B\u304C\u4E0D\u6B63\u3067\u3059\u3002{0} + +compiler.misc.conditional.target.cant.be.void=\u6761\u4EF6\u5F0F\u306E\u30BF\u30FC\u30B2\u30C3\u30C8\u578B\u306Fvoid\u306B\u3067\u304D\u307E\u305B\u3093 + +# 0: type +compiler.misc.incompatible.ret.type.in.lambda=\u30E9\u30E0\u30C0\u5F0F\u306E\u623B\u308A\u578B\u304C\u4E0D\u6B63\u3067\u3059\n{0} + +# 0: type +compiler.misc.incompatible.ret.type.in.mref=\u30E1\u30BD\u30C3\u30C9\u53C2\u7167\u306E\u623B\u308A\u578B\u304C\u4E0D\u6B63\u3067\u3059\n{0} + +# 0: list of type +compiler.err.incompatible.thrown.types.in.lambda=\u30E9\u30E0\u30C0\u5F0F\u3067\u30B9\u30ED\u30FC\u3055\u308C\u305F\u30BF\u30A4\u30D7{0}\u306F\u4E0D\u9069\u5408\u3067\u3059 + +# 0: list of type +compiler.err.incompatible.thrown.types.in.mref=\u30E1\u30BD\u30C3\u30C9\u53C2\u7167\u306E\u30B9\u30ED\u30FC\u3055\u308C\u305F\u30BF\u30A4\u30D7{0}\u306F\u4E0D\u9069\u5408\u3067\u3059 + +compiler.misc.incompatible.arg.types.in.lambda=\u30E9\u30E0\u30C0\u5F0F\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u578B\u306F\u4E0D\u9069\u5408\u3067\u3059 compiler.err.new.not.allowed.in.annotation=''new''\u306F\u6CE8\u91C8\u306B\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093 @@ -414,6 +537,12 @@ compiler.err.not.def.access.class.intf.cant.access={1}\u306E{0}\u304C\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u306A\u3044\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306B\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059 # 0: symbol, 1: symbol +compiler.misc.not.def.access.class.intf.cant.access={1}\u306E{0}\u304C\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u306A\u3044\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306B\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059 + +# 0: symbol, 1: list of type, 2: type +compiler.misc.cant.access.inner.cls.constr=\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF{0}({1})\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093\n\u5185\u90E8\u30AF\u30E9\u30B9\u3092\u56F2\u3080\u578B{2}\u306E\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u304C\u30B9\u30B3\u30FC\u30D7\u5185\u306B\u3042\u308A\u307E\u305B\u3093 + +# 0: symbol, 1: symbol compiler.err.not.def.public.cant.access={1}\u306E{0}\u306Fpublic\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u30D1\u30C3\u30B1\u30FC\u30B8\u5916\u304B\u3089\u306F\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093 # 0: name @@ -440,7 +569,7 @@ # Errors related to annotation processing # 0: symbol, 1: string, 2: stack-trace -compiler.err.proc.cant.access={0}\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093\n{1}\n\u8A73\u7D30\u306F\u6B21\u306E\u30B9\u30BF\u30C3\u30AF\u30C8\u30EC\u30FC\u30B9\u3067\u8ABF\u67FB\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n{2} +compiler.err.proc.cant.access={0}\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093\n{1}\n\u8A73\u7D30\u306F\u6B21\u306E\u30B9\u30BF\u30C3\u30AF\u30FB\u30C8\u30EC\u30FC\u30B9\u3067\u8ABF\u67FB\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n{2} # 0: symbol, 1: string compiler.err.proc.cant.access.1={0}\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093\n{1} @@ -455,15 +584,13 @@ # 0: list of string compiler.err.proc.no.explicit.annotation.processing.requested=\u30AF\u30E9\u30B9\u540D''{0}''\u304C\u53D7\u3051\u5165\u308C\u3089\u308C\u308B\u306E\u306F\u3001\u6CE8\u91C8\u51E6\u7406\u304C\u660E\u793A\u7684\u306B\u30EA\u30AF\u30A8\u30B9\u30C8\u3055\u308C\u305F\u5834\u5408\u306E\u307F\u3067\u3059 -compiler.err.proc.no.service=\u30B5\u30FC\u30D3\u30B9\u30FB\u30ED\u30FC\u30C0\u30FC\u30FB\u30AF\u30E9\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F\u3002\njava.util.ServiceLoader\u304Bsun.misc.Service\u304C\u4F7F\u7528\u3067\u304D\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002 +compiler.err.proc.no.service=\u30B5\u30FC\u30D3\u30B9\u30FB\u30ED\u30FC\u30C0\u30FC\u304C\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u304C\u3001\u6CE8\u91C8\u51E6\u7406\u306B\u5FC5\u8981\u3067\u3059\u3002 compiler.err.proc.processor.bad.option.name=\u30D7\u30ED\u30BB\u30C3\u30B5''{1}''\u306B\u3088\u3063\u3066\u6307\u5B9A\u3055\u308C\u305F\u30AA\u30D7\u30B7\u30E7\u30F3\u540D''{0}''\u304C\u4E0D\u6B63\u3067\u3059 # 0: string compiler.err.proc.processor.cant.instantiate=\u30D7\u30ED\u30BB\u30C3\u30B5''{0}''\u306E\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u3092\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u5316\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F -compiler.err.proc.processor.constructor.error=\u30D7\u30ED\u30BB\u30C3\u30B5\u30FB\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306E\u69CB\u7BC9\u4E2D\u306B\u4F8B\u5916\u304C\u30B9\u30ED\u30FC\u3055\u308C\u307E\u3057\u305F: {0} - # 0: string compiler.err.proc.processor.not.found=\u6CE8\u91C8\u30D7\u30ED\u30BB\u30C3\u30B5''{0}''\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 @@ -482,7 +609,10 @@ compiler.err.recursive.ctor.invocation=\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u306E\u547C\u51FA\u3057\u304C\u518D\u5E30\u7684\u3067\u3059 # 0: name, 1: symbol kind, 2: symbol, 3: symbol, 4: symbol kind, 5: symbol, 6: symbol -compiler.err.ref.ambiguous={0}\u306E\u53C2\u7167\u306F\u3042\u3044\u307E\u3044\u3067\u3059\u3002{3}\u306E{1} {2}\u3068{6}\u306E{4} {5}\u304C\u4E21\u65B9\u9069\u5408\u3057\u307E\u3059 +compiler.err.ref.ambiguous={0}\u306E\u53C2\u7167\u306F\u3042\u3044\u307E\u3044\u3067\u3059\n{3}\u306E{1} {2}\u3068{6}\u306E{4} {5}\u306E\u4E21\u65B9\u304C\u4E00\u81F4\u3057\u307E\u3059 + +# 0: name, 1: symbol kind, 2: symbol, 3: symbol, 4: symbol kind, 5: symbol, 6: symbol +compiler.misc.ref.ambiguous={0}\u306E\u53C2\u7167\u306F\u3042\u3044\u307E\u3044\u3067\u3059\n{3}\u306E{1} {2}\u3068{6}\u306E{4} {5}\u306E\u4E21\u65B9\u304C\u4E00\u81F4\u3057\u307E\u3059 compiler.err.repeated.annotation.target=\u6CE8\u91C8\u30BF\u30FC\u30B2\u30C3\u30C8\u304C\u7E70\u308A\u8FD4\u3055\u308C\u3066\u3044\u307E\u3059 @@ -495,9 +625,9 @@ compiler.err.ret.outside.meth=\u30E1\u30BD\u30C3\u30C9\u306E\u5916\u306Ereturn\u6587\u3067\u3059 -compiler.err.signature.doesnt.match.supertype=\u30B7\u30B0\u30CB\u30C1\u30E3\u304C{0}\u306B\u9069\u5408\u3057\u307E\u305B\u3093\u3002\u4E92\u63DB\u6027\u306E\u306A\u3044\u30B9\u30FC\u30D1\u30FC\u30BF\u30A4\u30D7\u3067\u3059 - -compiler.err.signature.doesnt.match.intf=\u30B7\u30B0\u30CB\u30C1\u30E3\u304C{0}\u306B\u9069\u5408\u3057\u307E\u305B\u3093\u3002\u4E92\u63DB\u6027\u306E\u306A\u3044\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3067\u3059 +compiler.err.signature.doesnt.match.supertype=\u30B7\u30B0\u30CD\u30C1\u30E3\u304C{0}\u306B\u4E00\u81F4\u3057\u307E\u305B\u3093\u3002\u4E0D\u9069\u5408\u306A\u30B9\u30FC\u30D1\u30FC\u30BF\u30A4\u30D7\u3067\u3059 + +compiler.err.signature.doesnt.match.intf=\u30B7\u30B0\u30CD\u30C1\u30E3\u304C{0}\u306B\u4E00\u81F4\u3057\u307E\u305B\u3093\u3002\u4E0D\u9069\u5408\u306A\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3067\u3059 # 0: symbol, 1: symbol, 2: symbol compiler.err.does.not.override.abstract={0}\u306Fabstract\u3067\u306A\u304F\u3001{2}\u5185\u306Eabstract\u30E1\u30BD\u30C3\u30C9{1}\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u307E\u305B\u3093 @@ -534,7 +664,28 @@ compiler.err.type.var.more.than.once.in.result=\u578B\u5909\u6570{0}\u306F{1}\u306E\u578B\u30672\u56DE\u4EE5\u4E0A\u51FA\u73FE\u3057\u307E\u3059\u3002\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u751F\u6210\u3055\u308C\u306A\u3044\u307E\u307E\u306B\u306F\u3067\u304D\u307E\u305B\u3093 # 0: type, 1: type, 2: string -compiler.err.types.incompatible.diff.ret=\u578B{0}\u3068\u578B{1}\u306E\u4E92\u63DB\u6027\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u4E21\u65B9\u3068\u3082{2}\u3092\u5B9A\u7FA9\u3057\u3066\u3044\u307E\u3059\u304C\u3001\u623B\u308A\u5024\u306E\u578B\u304C\u7121\u95A2\u4FC2\u3067\u3059 +compiler.err.types.incompatible.diff.ret=\u578B{0}\u3068\u578B{1}\u304C\u9069\u5408\u3057\u3066\u3044\u307E\u305B\u3093\u3002\u4E21\u65B9\u3068\u3082{2}\u3092\u5B9A\u7FA9\u3057\u3066\u3044\u307E\u3059\u304C\u3001\u623B\u308A\u5024\u306E\u578B\u304C\u7121\u95A2\u4FC2\u3067\u3059 + +# 0: kind, 1: type, 2: name, 3: list of type, 4: symbol, 5: symbol +compiler.err.types.incompatible.unrelated.defaults={0} {1}\u306F\u578B{4}\u3068{5}\u304B\u3089{2}({3})\u306E\u95A2\u9023\u3057\u306A\u3044\u30C7\u30D5\u30A9\u30EB\u30C8\u3092\u7D99\u627F\u3057\u307E\u3059 + +# 0: kind, 1: type, 2: name, 3: list of type, 4: symbol, 5: symbol +compiler.err.types.incompatible.abstract.default={0} {1}\u306F\u578B{4}\u3068{5}\u304B\u3089{2}({3})\u306E\u62BD\u8C61\u3068\u30C7\u30D5\u30A9\u30EB\u30C8\u3092\u7D99\u627F\u3057\u307E\u3059 + +# 0: name, 1: kind, 2: symbol +compiler.err.default.overrides.object.member={1} {2}\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30E1\u30BD\u30C3\u30C9{0}\u306Fjava.lang.Object\u306E\u30E1\u30F3\u30D0\u30FC\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u307E\u3059 + +# 0: type +compiler.err.illegal.static.intf.meth.call=static\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u30FB\u30E1\u30BD\u30C3\u30C9\u30FB\u30B3\u30FC\u30EB\u304C\u4E0D\u6B63\u3067\u3059\n\u53D7\u4FE1\u5F0F\u306F\u578B\u4FEE\u98FE\u5B50''{0}''\u3067\u7F6E\u63DB\u3055\u308C\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 + +# 0: type, 1: message segment +compiler.err.illegal.default.super.call=\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u30B9\u30FC\u30D1\u30FC\u30FB\u30B3\u30FC\u30EB\u306E\u578B\u4FEE\u98FE\u5B50{0}\u304C\u4E0D\u6B63\u3067\u3059\n{1} + +# 0: symbol, 1: type +compiler.misc.overridden.default={1}\u306E\u30E1\u30BD\u30C3\u30C9{0}\u306F\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3055\u308C\u307E\u3059 + +# 0: symbol, 1: symbol +compiler.misc.redundant.supertype=\u5197\u9577\u306A\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9{0}\u306F{1}\u306B\u3088\u3063\u3066\u62E1\u5F35\u3055\u308C\u307E\u3057\u305F compiler.err.unclosed.char.lit=\u6587\u5B57\u30EA\u30C6\u30E9\u30EB\u304C\u9589\u3058\u3089\u308C\u3066\u3044\u307E\u305B\u3093 @@ -550,19 +701,14 @@ # 0: name compiler.err.undef.label=\u30E9\u30D9\u30EB{0}\u306F\u672A\u5B9A\u7FA9\u3067\u3059 -compiler.err.undetermined.type={0}\u306E\u578B\u5F15\u6570\u3092\u63A8\u5B9A\u3067\u304D\u307E\u305B\u3093 - -# 0: type, 1: message segment -compiler.err.undetermined.type.1={0}\u306E\u578B\u5F15\u6570\u3092\u63A8\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002\n\u7406\u7531: {1} - -# 0: list of type, 1: message segment -compiler.err.invalid.inferred.types={0}\u306E\u63A8\u5B9A\u578B\u304C\u7121\u52B9\u3067\u3059\u3002{1} - # 0: message segment, 1: unused -compiler.err.cant.apply.diamond={0}\u306E\u578B\u5F15\u6570\u3092\u63A8\u5B9A\u3067\u304D\u307E\u305B\u3093 - -# 0: message segment, 1: message segment -compiler.err.cant.apply.diamond.1={0}\u306E\u578B\u5F15\u6570\u3092\u63A8\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002\n\u7406\u7531: {1} +compiler.err.cant.apply.diamond={0}\u306E\u578B\u5F15\u6570\u3092\u63A8\u8AD6\u3067\u304D\u307E\u305B\u3093 + +# 0: message segment or type, 1: message segment +compiler.err.cant.apply.diamond.1={0}\u306E\u578B\u5F15\u6570\u3092\u63A8\u8AD6\u3067\u304D\u307E\u305B\u3093\n\u7406\u7531: {1} + +# 0: message segment or type, 1: message segment +compiler.misc.cant.apply.diamond.1={0}\u306E\u578B\u5F15\u6570\u3092\u63A8\u8AD6\u3067\u304D\u307E\u305B\u3093\n\u7406\u7531: {1} compiler.err.unreachable.stmt=\u3053\u306E\u6587\u306B\u5236\u5FA1\u304C\u79FB\u308B\u3053\u3068\u306F\u3042\u308A\u307E\u305B\u3093 @@ -605,7 +751,7 @@ # 0: symbol compiler.misc.varargs.trustme.on.virtual.varargs=\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u30FB\u30E1\u30BD\u30C3\u30C9{0}\u306Ffinal\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002 -# 0: type, 1: kind, 2: symbol +# 0: type, 1: symbol kind, 2: symbol compiler.misc.inaccessible.varargs.type=\u4EEE\u53EF\u5909\u5F15\u6570\u8981\u7D20\u578B{0}\u306F{1} {2}\u304B\u3089\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093 # In the following string, {1} will always be the detail message from @@ -620,7 +766,7 @@ ## All errors which do not refer to a particular line in the source code are ## preceded by this string. -compiler.err.error=\u30A8\u30E9\u30FC:\u0020 +compiler.err.error=\u30A8\u30E9\u30FC: # The following error messages do not refer to a line in the source code. compiler.err.cant.read.file={0}\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093 @@ -637,7 +783,7 @@ compiler.misc.fatal.err.cant.locate.ctor=\u81F4\u547D\u7684\u30A8\u30E9\u30FC: {0}\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u3092\u691C\u51FA\u3067\u304D\u307E\u305B\u3093 -compiler.misc.fatal.err.cant.close.loader=\u81F4\u547D\u7684\u30A8\u30E9\u30FC: \u6CE8\u91C8\u30D7\u30ED\u30BB\u30C3\u30B5\u306E\u30AF\u30E9\u30B9\u30FB\u30ED\u30FC\u30C0\u30FC\u3092\u9589\u3058\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093 +compiler.misc.fatal.err.cant.close=\u81F4\u547D\u7684\u30A8\u30E9\u30FC: \u30B3\u30F3\u30D1\u30A4\u30E9\u30FB\u30EA\u30BD\u30FC\u30B9\u3092\u9589\u3058\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093 ##### @@ -659,21 +805,24 @@ ## The following string will appear before all messages keyed as: ## "compiler.note". + +compiler.note.potential.lambda.found=\u3053\u306E\u533F\u540D\u5185\u90E8\u30AF\u30E9\u30B9\u3092\u30E9\u30E0\u30C0\u5F0F\u306B\u5909\u63DB\u3067\u304D\u307E\u3059\u3002 + compiler.note.note=\u6CE8\u610F: # 0: file name -compiler.note.deprecated.filename={0}\u306F\u63A8\u5968\u3055\u308C\u306A\u3044API\u3092\u4F7F\u7528\u307E\u305F\u306F\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u3066\u3044\u307E\u3059\u3002 - -compiler.note.deprecated.plural=\u4E00\u90E8\u306E\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u306F\u63A8\u5968\u3055\u308C\u306A\u3044API\u3092\u4F7F\u7528\u307E\u305F\u306F\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u3066\u3044\u307E\u3059\u3002 +compiler.note.deprecated.filename={0}\u306F\u975E\u63A8\u5968\u306EAPI\u3092\u4F7F\u7528\u307E\u305F\u306F\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u3066\u3044\u307E\u3059\u3002 + +compiler.note.deprecated.plural=\u4E00\u90E8\u306E\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u306F\u975E\u63A8\u5968\u306EAPI\u3092\u4F7F\u7528\u307E\u305F\u306F\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u3066\u3044\u307E\u3059\u3002 # The following string may appear after one of the above deprecation # messages. compiler.note.deprecated.recompile=\u8A73\u7D30\u306F\u3001-Xlint:deprecation\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u6307\u5B9A\u3057\u3066\u518D\u30B3\u30F3\u30D1\u30A4\u30EB\u3057\u3066\u304F\u3060\u3055\u3044\u3002 # 0: file name -compiler.note.deprecated.filename.additional={0}\u306B\u63A8\u5968\u3055\u308C\u306A\u3044API\u306E\u8FFD\u52A0\u4F7F\u7528\u307E\u305F\u306F\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u304C\u3042\u308A\u307E\u3059\u3002 - -compiler.note.deprecated.plural.additional=\u4E00\u90E8\u306E\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u306F\u63A8\u5968\u3055\u308C\u306A\u3044API\u3092\u8FFD\u52A0\u4F7F\u7528\u307E\u305F\u306F\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u3066\u3044\u307E\u3059\u3002 +compiler.note.deprecated.filename.additional={0}\u306B\u975E\u63A8\u5968\u306EAPI\u306E\u8FFD\u52A0\u4F7F\u7528\u307E\u305F\u306F\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u304C\u3042\u308A\u307E\u3059\u3002 + +compiler.note.deprecated.plural.additional=\u4E00\u90E8\u306E\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u306F\u975E\u63A8\u5968\u306EAPI\u3092\u8FFD\u52A0\u4F7F\u7528\u307E\u305F\u306F\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u3066\u3044\u307E\u3059\u3002 # 0: file name compiler.note.unchecked.filename={0}\u306E\u64CD\u4F5C\u306F\u3001\u672A\u30C1\u30A7\u30C3\u30AF\u307E\u305F\u306F\u5B89\u5168\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002 @@ -773,12 +922,12 @@ ## ## All warning messages are preceded by the following string. -compiler.warn.warning=\u8B66\u544A: +compiler.warn.warning=\u8B66\u544A: ## Warning messages may also include the following prefix to identify a ## lint option # 0: option name -compiler.warn.lintOption=[{0}]\u0020 +compiler.warn.lintOption=[{0}] # 0: symbol compiler.warn.constant.SVUID=serialVersionUID\u306F\u30AF\u30E9\u30B9{0}\u306E\u5B9A\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 @@ -789,7 +938,7 @@ compiler.warn.finally.cannot.complete=finally\u7BC0\u304C\u6B63\u5E38\u306B\u5B8C\u4E86\u3067\u304D\u307E\u305B\u3093 # 0: symbol, 1: symbol -compiler.warn.has.been.deprecated={1}\u306E{0}\u306F\u63A8\u5968\u3055\u308C\u307E\u305B\u3093 +compiler.warn.has.been.deprecated={1}\u306E{0}\u306F\u975E\u63A8\u5968\u306B\u306A\u308A\u307E\u3057\u305F # 0: symbol compiler.warn.sun.proprietary={0}\u306F\u5185\u90E8\u6240\u6709\u306EAPI\u3067\u3042\u308A\u3001\u4ECA\u5F8C\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u524A\u9664\u3055\u308C\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059 @@ -925,7 +1074,7 @@ # 0: symbol compiler.warn.varargs.unsafe.use.varargs.param=\u53EF\u5909\u5F15\u6570\u30E1\u30BD\u30C3\u30C9\u306F\u3001\u578B\u60C5\u5831\u4FDD\u6301\u53EF\u80FD\u3067\u306A\u3044\u53EF\u5909\u5F15\u6570\u30D1\u30E9\u30E1\u30FC\u30BF{0}\u304B\u3089\u306E\u30D2\u30FC\u30D7\u6C5A\u67D3\u306E\u539F\u56E0\u3068\u306A\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059 -compiler.warn.missing.deprecated.annotation=\u63A8\u5968\u3055\u308C\u306A\u3044\u9805\u76EE\u306F@Deprecated\u3067\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u3066\u3044\u307E\u305B\u3093 +compiler.warn.missing.deprecated.annotation=\u975E\u63A8\u5968\u306E\u9805\u76EE\u306F@Deprecated\u3067\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u3066\u3044\u307E\u305B\u3093 compiler.warn.invalid.archive.file=\u30D1\u30B9\u4E0A\u306E\u4E88\u671F\u3057\u306A\u3044\u30D5\u30A1\u30A4\u30EB: {0} @@ -952,7 +1101,7 @@ compiler.warn.diamond.redundant.args=\u65B0\u3057\u3044\u5F0F\u306E\u578B\u5F15\u6570\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059(\u304B\u308F\u308A\u306B\u30C0\u30A4\u30E4\u30E2\u30F3\u30C9\u6F14\u7B97\u5B50\u3092\u4F7F\u7528\u3057\u307E\u3059)\u3002 # 0: type, 1: type -compiler.warn.diamond.redundant.args.1=\u65B0\u3057\u3044\u5F0F\u306E\u578B\u5F15\u6570\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059(\u304B\u308F\u308A\u306B\u30C0\u30A4\u30E4\u30E2\u30F3\u30C9\u6F14\u7B97\u5B50\u3092\u4F7F\u7528\u3057\u307E\u3059)\u3002\n\u660E\u793A\u7684: {0}\n\u63A8\u5B9A: {1} +compiler.warn.diamond.redundant.args.1=\u65B0\u3057\u3044\u5F0F\u306E\u578B\u5F15\u6570\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059(\u304B\u308F\u308A\u306B\u30C0\u30A4\u30E4\u30E2\u30F3\u30C9\u6F14\u7B97\u5B50\u3092\u4F7F\u7528\u3057\u307E\u3059)\u3002\n\u660E\u793A\u7684: {0}\n\u63A8\u8AD6: {1} # 0: symbol, 1: message segment compiler.warn.varargs.redundant.trustme.anno={0}\u6CE8\u91C8\u304C\u5197\u9577\u3067\u3059\u3002{1} @@ -1030,7 +1179,7 @@ ## The following are all possible strings for the second argument ({1}) of the ## above strings. -compiler.misc.bad.class.signature=\u30AF\u30E9\u30B9{0}\u306E\u30B7\u30B0\u30CB\u30C1\u30E3\u304C\u4E0D\u6B63\u3067\u3059 +compiler.misc.bad.class.signature=\u30AF\u30E9\u30B9{0}\u306E\u30B7\u30B0\u30CD\u30C1\u30E3\u304C\u4E0D\u6B63\u3067\u3059 #0: symbol, 1: symbol compiler.misc.bad.enclosing.class={0}\u306E\u5185\u90E8\u30AF\u30E9\u30B9\u304C\u4E0D\u6B63\u3067\u3059: {1} @@ -1044,7 +1193,9 @@ compiler.misc.bad.const.pool.tag.at=\u5B9A\u6570\u30D7\u30FC\u30EB\u30FB\u30BF\u30B0{1}\u3067\u306E{0}\u304C\u4E0D\u6B63\u3067\u3059 -compiler.misc.bad.signature=\u30B7\u30B0\u30CB\u30C1\u30E3{0}\u304C\u4E0D\u6B63\u3067\u3059 +compiler.misc.bad.signature=\u30B7\u30B0\u30CD\u30C1\u30E3{0}\u304C\u4E0D\u6B63\u3067\u3059 + +compiler.misc.bad.type.annotation.value=\u6CE8\u91C8\u30BF\u30FC\u30B2\u30C3\u30C8\u578B\u306E\u5024\u306E\u578B\u304C\u4E0D\u6B63\u3067\u3059: {0} compiler.misc.class.file.wrong.class=\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB{0}\u306B\u4E0D\u6B63\u306A\u30AF\u30E9\u30B9\u304C\u3042\u308A\u307E\u3059 @@ -1077,24 +1228,17 @@ ##### -# 0: message segment, 1: type, 2: type -compiler.err.prob.found.req={0}\n\u671F\u5F85\u5024: {2}\n\u691C\u51FA\u5024: {1} +# 0: message segment +compiler.err.prob.found.req=\u4E0D\u9069\u5408\u306A\u578B: {0} # 0: message segment, 1: type, 2: type compiler.warn.prob.found.req={0}\n\u671F\u5F85\u5024: {2}\n\u691C\u51FA\u5024: {1} -compiler.err.prob.found.req.1={0} {3}\n\u671F\u5F85\u5024: {2}\n\u691C\u51FA\u5024: {1} - -## The following are all possible strings for the first argument ({0}) of the -## above strings. -compiler.misc.incompatible.types=\u4E92\u63DB\u6027\u306E\u306A\u3044\u578B - -# 0: message segment -compiler.misc.incompatible.types.1=\u4E92\u63DB\u6027\u306E\u306A\u3044\u578B\u3002{0} - -compiler.misc.inconvertible.types=\u5909\u63DB\u3067\u304D\u306A\u3044\u578B - -compiler.misc.possible.loss.of.precision=\u7CBE\u5EA6\u304C\u4F4E\u4E0B\u3057\u3066\u3044\u308B\u53EF\u80FD\u6027 +# 0: type, 1: type +compiler.misc.inconvertible.types={0}\u3092{1}\u306B\u5909\u63DB\u3067\u304D\u307E\u305B\u3093: + +# 0: type, 1: type +compiler.misc.possible.loss.of.precision=\u7CBE\u5EA6\u304C\u5931\u308F\u308C\u308B\u53EF\u80FD\u6027\u304C\u3042\u308B{0}\u304B\u3089{1}\u3078\u306E\u5909\u63DB compiler.misc.unchecked.assign=\u7121\u691C\u67FB\u5909\u63DB @@ -1104,16 +1248,13 @@ # assigned array cannot dynamically check its stores compiler.misc.unchecked.cast.to.type=\u7121\u691C\u67FB\u30AD\u30E3\u30B9\u30C8 -compiler.misc.assignment.from.super-bound=\u30B9\u30FC\u30D1\u30FC\u30D0\u30A6\u30F3\u30C9\u578B{0}\u304B\u3089\u306E\u4EE3\u5165 - -compiler.misc.assignment.to.extends-bound=\u62E1\u5F35\u30D0\u30A6\u30F3\u30C9\u578B{0}\u3078\u306E\u4EE3\u5165 - # compiler.err.star.expected=\ # ''*'' expected # compiler.err.no.elem.type=\ # \[\*\] cannot have a type -compiler.misc.try.not.applicable.to.type=try-with-resource\u306F\u5909\u6570\u578B\u306B\u9069\u7528\u3055\u308C\u307E\u305B\u3093 +# 0: type +compiler.misc.try.not.applicable.to.type=try-with-resource\u306F\u5909\u6570\u578B\u306B\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\n({0}) ##### @@ -1139,25 +1280,44 @@ ## The following are all possible strings for the last argument of all those ## diagnostics whose key ends in ".1" -compiler.misc.undetermined.type=\u672A\u5B9A\u578B - -compiler.misc.type.variable.has.undetermined.type=\u578B\u5909\u6570{0}\u306F\u672A\u5B9A\u578B\u3067\u3059 # 0: type, 1: list of type compiler.misc.no.unique.maximal.instance.exists=\u578B\u5909\u6570{0}(\u4E0A\u9650{1})\u306E\u56FA\u6709\u306E\u6700\u5927\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u304C\u5B58\u5728\u3057\u307E\u305B\u3093 compiler.misc.no.unique.minimal.instance.exists=\u578B\u5909\u6570{0}(\u4E0B\u9650{1})\u306E\u56FA\u6709\u306E\u6700\u5C0F\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u304C\u5B58\u5728\u3057\u307E\u305B\u3093 -# 0: list of type, 1: type, 2: type -compiler.misc.infer.no.conforming.instance.exists=\u578B\u5909\u6570{0}\u306E\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u304C\u5B58\u5728\u3057\u306A\u3044\u306E\u3067\u3001{1}\u306F{2}\u306B\u9069\u5408\u3057\u307E\u305B\u3093 +# 0: type, 1: list of type +compiler.misc.incompatible.upper.bounds=\u63A8\u8AD6\u5909\u6570{0}\u306B\u306F\u3001\u4E0D\u9069\u5408\u306A\u4E0A\u9650{1}\u304C\u3042\u308A\u307E\u3059 + +# 0: type, 1: list of type, 2: list of type +compiler.misc.incompatible.eq.upper.bounds=\u63A8\u8AD6\u5909\u6570{0}\u306B\u306F\u3001\u4E0D\u9069\u5408\u306A\u5883\u754C\u304C\u3042\u308A\u307E\u3059\n\u7B49\u4FA1\u5236\u7D04: {1}\n\u4E0A\u9650: {2} + +# 0: type, 1: list of type, 2: list of type +compiler.misc.incompatible.eq.lower.bounds=\u63A8\u8AD6\u5909\u6570{0}\u306B\u306F\u3001\u4E0D\u9069\u5408\u306A\u5883\u754C\u304C\u3042\u308A\u307E\u3059\n\u7B49\u4FA1\u5236\u7D04: {1}\n\u4E0B\u9650: {2} # 0: list of type, 1: type, 2: type -compiler.misc.infer.no.conforming.assignment.exists=\u578B\u5909\u6570{0}\u306E\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u304C\u5B58\u5728\u3057\u306A\u3044\u306E\u3067\u3001\u5F15\u6570\u578B{1}\u306F\u4EEE\u30D1\u30E9\u30E1\u30FC\u30BF\u578B{2}\u306B\u9069\u5408\u3057\u307E\u305B\u3093 - -compiler.misc.infer.arg.length.mismatch=\u5B9F\u5F15\u6570\u30EA\u30B9\u30C8\u3068\u4EEE\u5F15\u6570\u30EA\u30B9\u30C8\u306E\u9577\u3055\u304C\u7570\u306A\u308B\u305F\u3081\u3001\u5F15\u6570\u304B\u3089\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093 +compiler.misc.infer.no.conforming.instance.exists=\u578B\u5909\u6570{0}\u306E\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u304C\u5B58\u5728\u3057\u306A\u3044\u306E\u3067\u3001{1}\u306F{2}\u306B\u9069\u5408\u3057\u307E\u305B\u3093 + +# 0: list of type, 1: message segment +compiler.misc.infer.no.conforming.assignment.exists=\u578B\u5909\u6570{0}\u3092\u63A8\u8AD6\u3067\u304D\u307E\u305B\u3093\n(\u5F15\u6570\u306E\u4E0D\u4E00\u81F4: {1}) + +# 0: list of type +compiler.misc.infer.arg.length.mismatch=\u578B\u5909\u6570{0}\u3092\u63A8\u8AD6\u3067\u304D\u307E\u305B\u3093\n(\u5B9F\u5F15\u6570\u30EA\u30B9\u30C8\u3068\u4EEE\u5F15\u6570\u30EA\u30B9\u30C8\u306E\u9577\u3055\u304C\u7570\u306A\u308A\u307E\u3059) + +# 0: list of type, 1: message segment +compiler.misc.infer.varargs.argument.mismatch=\u578B\u5909\u6570{0}\u3092\u63A8\u8AD6\u3067\u304D\u307E\u305B\u3093\n(\u53EF\u5909\u5F15\u6570\u306E\u4E0D\u4E00\u81F4: {1}) # 0: type, 1: list of type -compiler.misc.inferred.do.not.conform.to.bounds=\u63A8\u5B9A\u578B\u306F\u5BA3\u8A00\u3055\u308C\u305F\u5883\u754C\u306B\u9069\u5408\u3057\u307E\u305B\u3093\n\u63A8\u5B9A: {0}\n\u5883\u754C: {1} +compiler.misc.inferred.do.not.conform.to.upper.bounds=\u63A8\u8AD6\u578B\u304C\u4E0A\u9650\u306B\u9069\u5408\u3057\u307E\u305B\u3093\n\u63A8\u8AD6: {0}\n\u4E0A\u9650: {1} + +# 0: type, 1: list of type +compiler.misc.inferred.do.not.conform.to.lower.bounds=\u63A8\u8AD6\u578B\u304C\u4E0B\u9650\u306B\u9069\u5408\u3057\u307E\u305B\u3093\n\u63A8\u8AD6: {0}\n\u4E0B\u9650: {1} + +# 0: type, 1: list of type +compiler.misc.inferred.do.not.conform.to.eq.bounds=\u63A8\u8AD6\u578B\u304C\u7B49\u4FA1\u5236\u7D04\u306B\u9069\u5408\u3057\u307E\u305B\u3093\n\u63A8\u8AD6: {0}\n\u7B49\u4FA1\u5236\u7D04: {1} + +# 0: list of type +compiler.misc.cyclic.inference=\u63A8\u8AD6\u306E\u30EB\u30FC\u30D7\u306E\u305F\u3081\u3001\u63A8\u8AD6\u5909\u6570{0}\u306E\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093 # 0: symbol compiler.misc.diamond={0}<> @@ -1165,6 +1325,7 @@ # 0: type compiler.misc.diamond.non.generic=\u975E\u6C4E\u7528\u30AF\u30E9\u30B9{0}\u3067''<>''\u3092\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093 +# 0: unused compiler.misc.diamond.and.explicit.params=\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u306E\u660E\u793A\u7684\u306A\u578B\u30D1\u30E9\u30E1\u30FC\u30BF\u3067\u306F''<>''\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093 # 0: type, 1: list of type @@ -1172,14 +1333,18 @@ compiler.misc.arg.length.mismatch=\u5B9F\u5F15\u6570\u30EA\u30B9\u30C8\u3068\u4EEE\u5F15\u6570\u30EA\u30B9\u30C8\u306E\u9577\u3055\u304C\u7570\u306A\u308A\u307E\u3059 -# 0: type, 1: type -compiler.misc.no.conforming.assignment.exists=\u5B9F\u5F15\u6570{0}\u306F\u30E1\u30BD\u30C3\u30C9\u547C\u51FA\u5909\u63DB\u306B\u3088\u3063\u3066{1}\u306B\u5909\u63DB\u3067\u304D\u307E\u305B\u3093 - -# 0: type, 1: type -compiler.misc.varargs.argument.mismatch=\u5F15\u6570\u578B{0}\u306F\u53EF\u5909\u5F15\u6570\u8981\u7D20\u578B{1}\u306B\u9069\u5408\u3057\u307E\u305B\u3093 +# 0: message segment +compiler.misc.no.conforming.assignment.exists=\u5F15\u6570\u306E\u4E0D\u4E00\u81F4: {0} + +# 0: message segment +compiler.misc.varargs.argument.mismatch=\u53EF\u5909\u5F15\u6570\u306E\u4E0D\u4E00\u81F4: {0} ##### +# 0: type, 1: file name +compiler.warn.auxiliary.class.accessed.from.outside.of.its.source.file={1}\u306E\u88DC\u52A9\u30AF\u30E9\u30B9{0}\u306B\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u5916\u304B\u3089\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093 + + ## The first argument ({0}) is a "kindname". # 0: symbol kind, 1: symbol, 2: symbol compiler.err.abstract.cant.be.accessed.directly=\u62BD\u8C61{0}\u3067\u3042\u308B{1}({2}\u5185)\u306B\u76F4\u63A5\u30A2\u30AF\u30BB\u30B9\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093 @@ -1188,10 +1353,17 @@ # 0: symbol kind, 1: symbol compiler.err.non-static.cant.be.ref=static\u3067\u306A\u3044{0} {1}\u3092static\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u53C2\u7167\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093 +# 0: symbol kind, 1: symbol +compiler.misc.non-static.cant.be.ref=static\u3067\u306A\u3044{0} {1}\u3092static\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u53C2\u7167\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093 + ## Both arguments ({0}, {1}) are "kindname"s. {0} is a comma-separated list ## of kindnames (the list should be identical to that provided in source. compiler.err.unexpected.type=\u4E88\u671F\u3057\u306A\u3044\u578B\n\u671F\u5F85\u5024: {0}\n\u691C\u51FA\u5024: {1} +compiler.err.unexpected.lambda=\u3053\u3053\u3067\u306F\u30E9\u30E0\u30C0\u5F0F\u306F\u4E88\u671F\u3055\u308C\u3066\u3044\u307E\u305B\u3093 + +compiler.err.unexpected.mref=\u3053\u3053\u3067\u306F\u30E1\u30BD\u30C3\u30C9\u53C2\u7167\u306F\u4E88\u671F\u3055\u308C\u3066\u3044\u307E\u305B\u3093 + ## The first argument {0} is a "kindname" (e.g. 'constructor', 'field', etc.) ## The second argument {1} is the non-resolved symbol ## The third argument {2} is a list of type parameters (non-empty if {1} is a method) @@ -1216,12 +1388,20 @@ # 0: symbol kind, 1: name, 2: list of type, 3: list, 4: message segment compiler.err.cant.resolve.location.args.params=\u30B7\u30F3\u30DC\u30EB\u3092\u898B\u3064\u3051\u3089\u308C\u307E\u305B\u3093\n\u30B7\u30F3\u30DC\u30EB: {0} <{2}>{1}({3})\n\u5834\u6240: {4} +### Following are replicated/used for method reference diagnostics + +# 0: symbol kind, 1: name, 2: unused, 3: list of type, 4: message segment +compiler.misc.cant.resolve.location.args=\u30B7\u30F3\u30DC\u30EB\u3092\u898B\u3064\u3051\u3089\u308C\u307E\u305B\u3093\n\u30B7\u30F3\u30DC\u30EB: {0} {1}({3})\n\u5834\u6240: {4} + +# 0: symbol kind, 1: name, 2: list of type, 3: list, 4: message segment +compiler.misc.cant.resolve.location.args.params=\u30B7\u30F3\u30DC\u30EB\u3092\u898B\u3064\u3051\u3089\u308C\u307E\u305B\u3093\n\u30B7\u30F3\u30DC\u30EB: {0} <{2}>{1}({3})\n\u5834\u6240: {4} + ##a location subdiagnostic is composed as follows: ## The first argument {0} is the location "kindname" (e.g. 'constructor', 'field', etc.) ## The second argument {1} is the location name ## The third argument {2} is the location type (only when {1} is a variable name) -# 0: symbol kind, 1: symbol, 2: unused +# 0: symbol kind, 1: type or symbol, 2: unused compiler.misc.location={0} {1} # 0: symbol kind, 1: symbol, 2: type @@ -1236,7 +1416,7 @@ compiler.misc.kindname.constructor=\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF -compiler.misc.kindname.enum=\u5217\u6319 +compiler.misc.kindname.enum=\u5217\u6319\u578B compiler.misc.kindname.interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9 @@ -1256,6 +1436,10 @@ compiler.misc.kindname.package=\u30D1\u30C3\u30B1\u30FC\u30B8 +compiler.misc.kindname.static.init=static\u521D\u671F\u5316\u5B50 + +compiler.misc.kindname.instance.init=\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u521D\u671F\u5316\u5B50 + ##### compiler.misc.no.args=\u5F15\u6570\u304C\u3042\u308A\u307E\u305B\u3093 @@ -1312,6 +1496,7 @@ # 0: symbol, 1: symbol, 2: symbol, 3: symbol compiler.misc.varargs.clash.with={1}\u306E{0}\u306F{3}\u306E{2}\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u307E\u3059 +# 0: unused compiler.misc.diamond.and.anon.class=\u533F\u540D\u5185\u90E8\u30AF\u30E9\u30B9\u3067\u306F''<>''\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093 # 0: symbol kind, 1: symbol, 2: symbol, 3: message segment @@ -1336,13 +1521,23 @@ compiler.warn.assert.as.identifier=\u30EA\u30EA\u30FC\u30B91.4\u304B\u3089''assert''\u306F\u30AD\u30FC\u30EF\u30FC\u30C9\u306A\u306E\u3067\u3001\u8B58\u5225\u5B50\u3068\u3057\u3066\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\n(''assert''\u3092\u30AD\u30FC\u30EF\u30FC\u30C9\u3068\u3057\u3066\u4F7F\u7528\u3059\u308B\u306B\u306F\u3001-source 1.4\u4EE5\u964D\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044) +compiler.warn.underscore.as.identifier=\u8B58\u5225\u5B50\u3068\u3057\u3066''_''\u304C\u4F7F\u7528\u3055\u308C\u307E\u3057\u305F\n(\u8B58\u5225\u5B50\u3068\u3057\u3066\u306E''_''\u306E\u4F7F\u7528\u306F\u3001\u5C06\u6765\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059) + compiler.err.enum.as.identifier=\u30EA\u30EA\u30FC\u30B95\u304B\u3089''enum''\u306F\u30AD\u30FC\u30EF\u30FC\u30C9\u306A\u306E\u3067\u8B58\u5225\u5B50\u3068\u3057\u3066\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\n(''enum''\u3092\u8B58\u5225\u5B50\u3068\u3057\u3066\u4F7F\u7528\u3059\u308B\u306B\u306F-source 1.4\u4EE5\u524D\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044) compiler.err.assert.as.identifier=\u30EA\u30EA\u30FC\u30B91.4\u304B\u3089''assert''\u306F\u30AD\u30FC\u30EF\u30FC\u30C9\u306A\u306E\u3067\u3001\u8B58\u5225\u5B50\u3068\u3057\u3066\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\n(''assert''\u3092\u8B58\u5225\u5B50\u3068\u3057\u3066\u4F7F\u7528\u3059\u308B\u306B\u306F\u3001-source 1.3\u4EE5\u524D\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044) # TODO 308: make a better error message -# compiler.err.this.as.identifier=\ -# as of release 8, ''this'' is allowed as the parameter name for the receiver type only, which has to be the first parameter +compiler.err.this.as.identifier=\u30EA\u30EA\u30FC\u30B98\u304B\u3089''this''\u306F\u53D7\u4FE1\u30BF\u30A4\u30D7\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u540D\u3068\u3057\u3066\u306E\u307F\u8A31\u53EF\u3055\u308C\u3001\u6700\u521D\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 + +# TODO 308: make a better error message +compiler.err.cant.annotate.static.class=\u5305\u542B\u3059\u308Bstatic\u306E\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30AF\u30E9\u30B9\u306F\u6CE8\u91C8\u4ED8\u3051\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093 +# TODO 308: make a better error message +compiler.err.cant.annotate.nested.type=\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30BF\u30A4\u30D7\u306F\u6CE8\u91C8\u4ED8\u3051\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093 + +compiler.err.incorrect.receiver.type=\u53D7\u4FE1\u30BF\u30A4\u30D7\u304C\u3001\u5305\u542B\u3059\u308B\u30AF\u30E9\u30B9\u30FB\u30BF\u30A4\u30D7\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093 + +compiler.err.no.annotations.on.dot.class=\u6CE8\u91C8\u306F\u30AF\u30E9\u30B9\u30FB\u30EA\u30C6\u30E9\u30EB\u306E\u30BF\u30A4\u30D7\u3067\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093 # 0: string compiler.err.generics.not.supported.in.source=\u7DCF\u79F0\u578B\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(\u7DCF\u79F0\u578B\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 5\u4EE5\u964D\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044) @@ -1353,9 +1548,8 @@ # 0: string compiler.err.annotations.not.supported.in.source=\u6CE8\u91C8\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(\u6CE8\u91C8\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 5\u4EE5\u964D\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044) -#308 compiler.err.type.annotations.not.supported.in.source=\ -#308 type annotations are not supported in -source {0}\n\ -#308 (use -source 8 or higher to enable type annotations) +# 0: string +compiler.err.type.annotations.not.supported.in.source=\u30BF\u30A4\u30D7\u6CE8\u91C8\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(\u30BF\u30A4\u30D7\u6CE8\u91C8\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 8\u4EE5\u4E0A\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044) # 0: string compiler.err.foreach.not.supported.in.source=for-each\u30EB\u30FC\u30D7\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(for-each\u30EB\u30FC\u30D7\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 5\u4EE5\u964D\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044) @@ -1375,6 +1569,47 @@ # 0: string compiler.err.string.switch.not.supported.in.source=switch\u5185\u306E\u6587\u5B57\u5217\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(switch\u5185\u306E\u6587\u5B57\u5217\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 7\u4EE5\u964D\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044) +# 0: string +compiler.err.lambda.not.supported.in.source=\u30E9\u30E0\u30C0\u5F0F\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(\u30E9\u30E0\u30C0\u5F0F\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 8\u4EE5\u4E0A\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044) + +# 0: string +compiler.err.method.references.not.supported.in.source=\u30E1\u30BD\u30C3\u30C9\u53C2\u7167\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(\u30E1\u30BD\u30C3\u30C9\u53C2\u7167\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 8\u4EE5\u4E0A\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044) + +# 0: string +compiler.err.default.methods.not.supported.in.source=\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30E1\u30BD\u30C3\u30C9\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 8\u4EE5\u4E0A\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044) + +# 0: string +compiler.err.intersection.types.in.cast.not.supported.in.source=\u30AD\u30E3\u30B9\u30C8\u5185\u306Eintersection\u578B\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 8\u4EE5\u4E0A\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044) + +# 0: string +compiler.err.static.intf.methods.not.supported.in.source=static\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306F-source {0}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\n(static\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u306B\u306F\u3001-source 8\u4EE5\u4E0A\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044) + +######################################## +# Diagnostics for verbose resolution +# used by Resolve (debug only) +######################################## + +# 0: number, 1: symbol, 2: unused +compiler.misc.applicable.method.found=#{0}\u500B\u306E\u4F7F\u7528\u53EF\u80FD\u30E1\u30BD\u30C3\u30C9\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F: {1} + +# 0: number, 1: symbol, 2: message segment +compiler.misc.applicable.method.found.1=#{0}\u500B\u306E\u4F7F\u7528\u53EF\u80FD\u30E1\u30BD\u30C3\u30C9\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F: {1}\n({2}) + +# 0: number, 1: symbol, 2: message segment +compiler.misc.not.applicable.method.found=#{0}\u500B\u306E\u4F7F\u7528\u3067\u304D\u306A\u3044\u30E1\u30BD\u30C3\u30C9\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F: {1}\n({2}) + +# 0: type +compiler.misc.partial.inst.sig=\u90E8\u5206\u7684\u306B\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u5316\u3055\u308C\u307E\u3057\u305F: {0} + +# 0: name, 1: symbol, 2: number, 3: MethodResolutionPhase, 4: list of type or message segment, 5: list of type or message segment +compiler.note.verbose.resolve.multi=\u578B{1}\u306E\u30E1\u30BD\u30C3\u30C9{0}\u3092\u5019\u88DC{2}\u306B\u89E3\u6C7A\u3057\u3066\u3044\u307E\u3059\n\u30D5\u30A7\u30FC\u30BA: {3}\n\u5B9F\u969B\u306E\u578B: {4}\n\u578B\u5F15\u6570: {5}\n\u5019\u88DC: + +# 0: name, 1: symbol, 2: unused, 3: MethodResolutionPhase, 4: list of type or message segment, 5: list of type or message segment +compiler.note.verbose.resolve.multi.1=\u578B{1}\u306E\u30E1\u30BD\u30C3\u30C9{0}\u306E\u89E3\u6C7A\u306B\u30A8\u30E9\u30FC\u304C\u3042\u308A\u307E\u3059\n\u30D5\u30A7\u30FC\u30BA: {3}\n\u5B9F\u969B\u306E\u578B: {4}\n\u578B\u5F15\u6570: {5}\n\u5019\u88DC: + +# 0: symbol, 1: type, 2: type +compiler.note.deferred.method.inst=\u30E1\u30BD\u30C3\u30C9{0}\u306E\u9045\u5EF6\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u5316\n\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u5316\u3055\u308C\u305F\u30B7\u30B0\u30CD\u30C1\u30E3: {1}\n\u30BF\u30FC\u30B2\u30C3\u30C8\u578B: {2} + ######################################## # Diagnostics for where clause implementation # used by the RichDiagnosticFormatter. @@ -1397,26 +1632,32 @@ # where clause for captured type: contains upper ('extends {1}') and lower # ('super {2}') bound along with the wildcard that generated this captured type ({3}) # 0: type, 1: type, 2: type, 3: type -compiler.misc.where.captured={3}\u306E\u30AD\u30E3\u30D7\u30C1\u30E3\u304B\u3089\u306E{0} extends {1} super: {2} +compiler.misc.where.captured={0}\u306F{3}\u306E\u30AD\u30E3\u30D7\u30C1\u30E3\u304B\u3089{1}\u3092\u62E1\u5F35\u3057{2}\u3092\u30B9\u30FC\u30D1\u30FC\u3057\u307E\u3059 # compact where clause for captured type: contains upper ('extends {1}') along # with the wildcard that generated this captured type ({3}) # 0: type, 1: type, 2: unused, 3: type -compiler.misc.where.captured.1={3}\u306E\u30AD\u30E3\u30D7\u30C1\u30E3\u304B\u3089\u306E{0} extends {1} +compiler.misc.where.captured.1={0}\u306F{3}\u306E\u30AD\u30E3\u30D7\u30C1\u30E3\u304B\u3089{1}\u3092\u62E1\u5F35\u3057\u307E\u3059 # where clause for type variable: contains upper bound(s) ('extends {1}') along with # the kindname ({2}) and location ({3}) in which the typevar has been declared # 0: type, 1: list of type, 2: symbol kind, 3: symbol -compiler.misc.where.typevar={2} {3}\u3067\u5BA3\u8A00\u3055\u308C\u3066\u3044\u308B{0} extends {1} +compiler.misc.where.typevar={2} {3}\u3067\u5BA3\u8A00\u3055\u308C\u3066\u3044\u308B{0}\u306F{1}\u3092\u62E1\u5F35\u3057\u307E\u3059 # compact where clause for type variable: contains the kindname ({2}) and location ({3}) # in which the typevar has been declared +# 0: type, 1: list of type, 2: symbol kind, 3: symbol compiler.misc.where.typevar.1={2} {3}\u3067\u5BA3\u8A00\u3055\u308C\u305F{0} +# where clause for fresh type variable: contains upper bound(s) ('extends {1}'). +# Since a fresh type-variable is synthetic - there's no location/kindname here. +# 0: type, 1: list of type +compiler.misc.where.fresh.typevar={0}\u306F{1}\u3092\u62E1\u5F35\u3057\u307E\u3059 + # where clause for type variable: contains all the upper bound(s) ('extends {1}') # of this intersection type # 0: type, 1: list of type -compiler.misc.where.intersection={0} extends {1} +compiler.misc.where.intersection={0}\u306F{1}\u3092\u62E1\u5F35\u3057\u307E\u3059 ### Where clause headers ### compiler.misc.where.description.captured={0}\u304C\u65B0\u3057\u3044\u578B\u5909\u6570\u306E\u5834\u5408: @@ -1435,4 +1676,39 @@ compiler.misc.where.description.intersection.1={0}\u304Cintersection\u578B\u306E\u5834\u5408: - +### +# errors related to doc comments + +compiler.err.dc.bad.entity=HTML\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u304C\u4E0D\u6B63\u3067\u3059 + +compiler.err.dc.bad.gt=''>''\u306E\u4F7F\u7528\u304C\u4E0D\u6B63\u3067\u3059 + +compiler.err.dc.bad.inline.tag=\u30A4\u30F3\u30E9\u30A4\u30F3\u30FB\u30BF\u30B0\u306E\u4F7F\u7528\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093 + +compiler.err.dc.identifier.expected=\u8B58\u5225\u5B50\u304C\u5FC5\u8981\u3067\u3059 + +compiler.err.dc.malformed.html=HTML\u304C\u4E0D\u6B63\u3067\u3059 + +compiler.err.dc.missing.semicolon=\u30BB\u30DF\u30B3\u30ED\u30F3\u304C\u3042\u308A\u307E\u305B\u3093 + +compiler.err.dc.no.content=\u30B3\u30F3\u30C6\u30F3\u30C4\u306A\u3057 + +compiler.err.dc.no.tag.name='@'\u306E\u5F8C\u306B\u30BF\u30B0\u540D\u304C\u3042\u308A\u307E\u305B\u3093 + +compiler.err.dc.gt.expected=''>''\u304C\u5FC5\u8981\u3067\u3059 + +compiler.err.dc.ref.bad.parens=\u53C2\u7167\u306B'')''\u304C\u3042\u308A\u307E\u305B\u3093 + +compiler.err.dc.ref.syntax.error=\u53C2\u7167\u306B\u69CB\u6587\u30A8\u30E9\u30FC\u304C\u3042\u308A\u307E\u3059 + +compiler.err.dc.ref.unexpected.input=\u4E88\u671F\u3057\u306A\u3044\u30C6\u30AD\u30B9\u30C8\u3067\u3059 + +compiler.err.dc.unexpected.content=\u4E88\u671F\u3057\u306A\u3044\u30B3\u30F3\u30C6\u30F3\u30C4\u3067\u3059 + +compiler.err.dc.unterminated.inline.tag=\u30A4\u30F3\u30E9\u30A4\u30F3\u30FB\u30BF\u30B0\u304C\u7D42\u4E86\u3057\u3066\u3044\u307E\u305B\u3093 + +compiler.err.dc.unterminated.signature=\u30B7\u30B0\u30CD\u30C1\u30E3\u304C\u7D42\u4E86\u3057\u3066\u3044\u307E\u305B\u3093 + +compiler.err.dc.unterminated.string=\u6587\u5B57\u5217\u304C\u7D42\u4E86\u3057\u3066\u3044\u307E\u305B\u3093 + + diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javac/resources/compiler_zh_CN.properties --- a/src/share/classes/com/sun/tools/javac/resources/compiler_zh_CN.properties Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/javac/resources/compiler_zh_CN.properties Mon Apr 01 21:42:15 2013 -0700 @@ -65,8 +65,11 @@ compiler.err.already.annotated={0} {1}\u5DF2\u8FDB\u884C\u6CE8\u91CA -# 0: symbol, 1: symbol -compiler.err.already.defined=\u5DF2\u5728{1}\u4E2D\u5B9A\u4E49{0} +# 0: symbol kind, 1: symbol, 2: symbol kind, 3: symbol +compiler.err.already.defined=\u5DF2\u5728{2} {3}\u4E2D\u5B9A\u4E49\u4E86{0} {1} + +# 0: symbol kind, 1: symbol, 2: symbol kind, 3: symbol kind, 4: symbol +compiler.err.already.defined.in.clinit=\u5DF2\u5728{3} {4}\u7684{2}\u4E2D\u5B9A\u4E49\u4E86{0} {1} # 0: string compiler.err.already.defined.single.import=\u5DF2\u5728 single-type \u5BFC\u5165\u4E2D\u5B9A\u4E49{0} @@ -109,28 +112,84 @@ # 0: type compiler.err.array.req.but.found=\u9700\u8981\u6570\u7EC4, \u4F46\u627E\u5230{0} -compiler.err.assignment.from.super-bound=\u901A\u8FC7\u901A\u914D\u7B26 {0} \u5206\u914D - -compiler.err.assignment.to.extends-bound=\u5206\u914D\u7ED9\u901A\u914D\u7B26 {0} - compiler.err.attribute.value.must.be.constant=\u5C5E\u6027\u503C\u5FC5\u987B\u4E3A\u5E38\u91CF +# 0: statement type +compiler.err.bad.initializer={0}\u7684\u521D\u59CB\u5316\u7A0B\u5E8F\u9519\u8BEF + compiler.err.break.outside.switch.loop=\u5728 switch \u6216 loop \u5916\u90E8\u4E2D\u65AD # 0: name compiler.err.call.must.be.first.stmt.in.ctor=\u5BF9{0}\u7684\u8C03\u7528\u5FC5\u987B\u662F\u6784\u9020\u5668\u4E2D\u7684\u7B2C\u4E00\u4E2A\u8BED\u53E5 -compiler.err.cant.apply.symbol=\u65E0\u6CD5\u5C06{4} {5}\u4E2D\u7684{0} {1}\u5E94\u7528\u5230\u7ED9\u5B9A\u7C7B\u578B\n\u9700\u8981: {2}\n\u627E\u5230: {3} - # 0: symbol kind, 1: name, 2: list of type or message segment, 3: list of type or message segment, 4: symbol kind, 5: type, 6: message segment -compiler.err.cant.apply.symbol.1=\u65E0\u6CD5\u5C06{4} {5}\u4E2D\u7684{0} {1}\u5E94\u7528\u5230\u7ED9\u5B9A\u7C7B\u578B;\n\u9700\u8981: {2}\n\u627E\u5230: {3}\n\u539F\u56E0: {6} +compiler.err.cant.apply.symbol=\u65E0\u6CD5\u5C06{4} {5}\u4E2D\u7684{0} {1}\u5E94\u7528\u5230\u7ED9\u5B9A\u7C7B\u578B;\n\u9700\u8981: {2}\n\u627E\u5230: {3}\n\u539F\u56E0: {6} # 0: symbol kind, 1: name, 2: list of type compiler.err.cant.apply.symbols=\u5BF9\u4E8E{1}({2}), \u627E\u4E0D\u5230\u5408\u9002\u7684{0} +# 0: symbol kind, 1: name, 2: list of type or message segment, 3: list of type or message segment, 4: symbol kind, 5: type, 6: message segment +compiler.misc.cant.apply.symbol=\u65E0\u6CD5\u5C06 {4} {5}\u4E2D\u7684 {0} {1}\u5E94\u7528\u5230\u7ED9\u5B9A\u7C7B\u578B\n\u9700\u8981: {2}\n\u627E\u5230: {3}\n\u539F\u56E0: {6} + +# 0: symbol kind, 1: name, 2: list of type +compiler.misc.cant.apply.symbols=\u5BF9\u4E8E{1}({2}), \u627E\u4E0D\u5230\u5408\u9002\u7684{0} + +# 0: symbol kind, 1: symbol +compiler.misc.no.abstracts=\u5728 {0} {1} \u4E2D\u627E\u4E0D\u5230\u62BD\u8C61\u65B9\u6CD5 + +# 0: symbol kind, 1: symbol +compiler.misc.incompatible.abstracts=\u5728 {0} {1} \u4E2D\u627E\u5230\u591A\u4E2A\u975E\u8986\u76D6\u62BD\u8C61\u65B9\u6CD5 + +compiler.err.bad.functional.intf.anno=\u610F\u5916\u7684 @FunctionalInterface \u6CE8\u91CA + +# 0: message segment +compiler.err.bad.functional.intf.anno.1=\u610F\u5916\u7684 @FunctionalInterface \u6CE8\u91CA\n{0} + +# 0: symbol +compiler.misc.not.a.functional.intf={0} \u4E0D\u662F\u51FD\u6570\u63A5\u53E3 + +# 0: symbol, 1: message segment +compiler.misc.not.a.functional.intf.1={0} \u4E0D\u662F\u51FD\u6570\u63A5\u53E3\n{1} + +# 0: symbol, 1: symbol kind, 2: symbol +compiler.misc.invalid.generic.lambda.target=lambda \u8868\u8FBE\u5F0F\u7684\u51FD\u6570\u63CF\u8FF0\u7B26\u65E0\u6548\n{1} {2} \u4E2D\u7684\u65B9\u6CD5 {0} \u4E3A\u6CDB\u578B\u65B9\u6CD5 + +# 0: symbol kind, 1: symbol +compiler.misc.incompatible.descs.in.functional.intf=\u5728 {0} {1} \u4E2D\u627E\u5230\u4E0D\u517C\u5BB9\u7684\u51FD\u6570\u63CF\u8FF0\u7B26 + +# 0: name, 1: list of type, 2: type, 3: list of type +compiler.misc.descriptor=\u63CF\u8FF0\u7B26: {2} {0}({1}) + +# 0: name, 1: list of type, 2: type, 3: list of type +compiler.misc.descriptor.throws=\u63CF\u8FF0\u7B26: {2} {0}({1}) \u629B\u51FA{3} + +# 0: type +compiler.misc.no.suitable.functional.intf.inst=\u65E0\u6CD5\u63A8\u65AD{0}\u7684\u51FD\u6570\u63A5\u53E3\u63CF\u8FF0\u7B26 + +# 0: type +compiler.misc.secondary.bound.must.be.marker.intf=\u6B21\u7EA7\u9650\u5236\u8303\u56F4{0}\u5FC5\u987B\u4E3A\u6807\u8BB0\u63A5\u53E3 + +# 0: symbol kind, 1: message segment +compiler.err.invalid.mref={0} \u5F15\u7528\u65E0\u6548; {1} + +# 0: symbol kind, 1: message segment +compiler.misc.invalid.mref={0} \u5F15\u7528\u65E0\u6548; {1} + +compiler.misc.static.mref.with.targs=\u6709\u5173\u9759\u6001\u65B9\u6CD5\u5F15\u7528\u7684\u53C2\u6570\u5316\u9650\u5B9A\u7B26 + +compiler.misc.static.bound.mref=\u9759\u6001\u9650\u5236\u8303\u56F4\u65B9\u6CD5\u5F15\u7528 + # 0: symbol compiler.err.cant.assign.val.to.final.var=\u65E0\u6CD5\u4E3A\u6700\u7EC8\u53D8\u91CF{0}\u5206\u914D\u503C +# 0: symbol, 1: message segment +compiler.err.cant.ref.non.effectively.final.var=\u4ECE{1}\u5F15\u7528\u7684\u672C\u5730\u53D8\u91CF\u5FC5\u987B\u662F\u6700\u7EC8\u53D8\u91CF\u6216\u5B9E\u9645\u4E0A\u7684\u6700\u7EC8\u53D8\u91CF + + +compiler.misc.lambda=lambda \u8868\u8FBE\u5F0F + +compiler.misc.inner.cls=\u5185\u90E8\u7C7B + # 0: type compiler.err.cant.deref=\u65E0\u6CD5\u53D6\u6D88\u5F15\u7528{0} @@ -142,8 +201,6 @@ # 0: symbol compiler.err.cant.ref.before.ctor.called=\u65E0\u6CD5\u5728\u8C03\u7528\u8D85\u7C7B\u578B\u6784\u9020\u5668\u4E4B\u524D\u5F15\u7528{0} -compiler.err.cant.ret.val.from.meth.decl.void=\u5BF9\u4E8E\u7ED3\u679C\u7C7B\u578B\u4E3A\u7A7A\u7684\u65B9\u6CD5, \u65E0\u6CD5\u8FD4\u56DE\u503C - compiler.err.cant.select.static.class.from.param.type=\u65E0\u6CD5\u4ECE\u53C2\u6570\u5316\u7684\u7C7B\u578B\u4E2D\u9009\u62E9\u9759\u6001\u7C7B # 0: symbol, 1: string, 2: string @@ -154,6 +211,8 @@ # 0: symbol kind, 1: symbol compiler.err.clash.with.pkg.of.same.name={0} {1}\u4E0E\u5E26\u6709\u76F8\u540C\u540D\u79F0\u7684\u7A0B\u5E8F\u5305\u51B2\u7A81 +compiler.err.class.not.allowed=\u6B64\u5904\u4E0D\u5141\u8BB8\u4F7F\u7528\u7C7B, \u63A5\u53E3\u6216\u679A\u4E3E\u58F0\u660E + compiler.err.const.expr.req=\u9700\u8981\u5E38\u91CF\u8868\u8FBE\u5F0F compiler.err.cont.outside.loop=continue \u5728 loop \u5916\u90E8 @@ -169,8 +228,6 @@ # 0: type compiler.err.no.superclass={0}\u4E0D\u5177\u6709\u8D85\u7C7B -compiler.err.wrong.target.for.polymorphic.signature.definition=MethodHandle API \u6784\u5EFA\u9700\u8981 -target 7 \u8FD0\u884C\u65F6\u6216\u66F4\u9AD8; \u5F53\u524D\u4E3A -target {0} - # 0: symbol, 1: type, 2: symbol, 3: type, 4: unused compiler.err.concrete.inheritance.conflict={1}\u4E2D\u7684\u65B9\u6CD5{0}\u548C{3}\u4E2D\u7684\u65B9\u6CD5{2}\u662F\u4F7F\u7528\u76F8\u540C\u7684\u7B7E\u540D\u7EE7\u627F\u7684 @@ -181,9 +238,48 @@ compiler.err.duplicate.annotation=\u6CE8\u91CA\u91CD\u590D +# 0: type +compiler.err.duplicate.annotation.invalid.repeated=\u65E0\u6CD5\u91CD\u590D\u6CE8\u91CA{0}\n\u5B83\u6CA1\u6709\u5B9A\u4E49\u6709\u6548\u7684\u5305\u542B\u6CE8\u91CA\u3002 + # 0: name, 1: type compiler.err.duplicate.annotation.member.value={1}\u4E2D\u7684\u6CE8\u91CA\u6210\u5458\u503C{0}\u91CD\u590D +# 0: type, 1: type +compiler.err.duplicate.annotation.missing.container=\u6CE8\u91CA\u91CD\u590D, {0}\u7684\u58F0\u660E\u6CA1\u6709\u6709\u6548\u7684{1}\u6CE8\u91CA + +# 0: type +compiler.err.invalid.repeatable.annotation=\u6CE8\u91CA\u91CD\u590D, \u4F7F\u7528\u65E0\u6548\u7684\u53EF\u91CD\u590D\u6CE8\u91CA\u5BF9{0}\u8FDB\u884C\u4E86\u6CE8\u91CA + +# 0: type +compiler.err.invalid.repeatable.annotation.no.value=\u6CE8\u91CA\u91CD\u590D, {0}\u4E0D\u662F\u6709\u6548\u7684\u53EF\u91CD\u590D\u7C7B\u578B, \u672A\u58F0\u660E\u4EFB\u4F55\u503C\u5143\u7D20\u65B9\u6CD5 + +# 0: type, 1: number +compiler.err.invalid.repeatable.annotation.multiple.values=\u6CE8\u91CA\u91CD\u590D, {0}\u4E0D\u662F\u6709\u6548\u7684\u53EF\u91CD\u590D\u7C7B\u578B, \u5DF2\u58F0\u660E {1} \u4E2A\u503C\u5143\u7D20\u65B9\u6CD5 + +# 0: type +compiler.err.invalid.repeatable.annotation.invalid.value=\u6CE8\u91CA\u91CD\u590D, {0}\u4E0D\u662F\u6709\u6548\u7684\u53EF\u91CD\u590D\u7C7B\u578B, \u503C\u5143\u7D20\u65E0\u6548, \u9700\u8981\u65B9\u6CD5 + +# 0: type, 1: type, 2: type +compiler.err.invalid.repeatable.annotation.value.return=\u6CE8\u91CA\u91CD\u590D, \u5305\u542B\u6CE8\u91CA{0}\u7684\u503C\u5143\u7D20\u5E94\u5177\u6709\u7C7B\u578B{2}, \u4F46\u627E\u5230\u7684\u662F{1} + +# 0: type, 1: symbol +compiler.err.invalid.repeatable.annotation.elem.nondefault=\u5305\u542B\u6CE8\u91CA{0}\u6CA1\u6709\u5143\u7D20 {1} \u7684\u9ED8\u8BA4\u503C + +# 0: symbol, 1: type, 2: symbol, 3: type +compiler.err.invalid.repeatable.annotation.retention=\u5305\u542B\u6CE8\u91CA {0} \u7684\u4FDD\u7559\u671F ({1}) \u77ED\u4E8E\u5DF2\u5305\u542B\u6CE8\u91CA {2} \u7684\u4FDD\u7559\u671F ({3}) + +# 0: symbol, 1: symbol +compiler.err.invalid.repeatable.annotation.not.documented=\u5305\u542B\u6CE8\u91CA\u7C7B\u578B {0} \u4E0D\u662F @Documented, \u800C\u91CD\u590D\u7684\u6CE8\u91CA\u7C7B\u578B {1} \u4E3A + +# 0: symbol, 1: symbol +compiler.err.invalid.repeatable.annotation.not.inherited=\u5305\u542B\u6CE8\u91CA\u7C7B\u578B {0} \u4E0D\u662F @Inherited, \u800C\u91CD\u590D\u7684\u6CE8\u91CA\u7C7B\u578B {1} \u4E3A + +# 0: symbol, 1: symbol +compiler.err.invalid.repeatable.annotation.incompatible.target=\u5BB9\u5668\u6CE8\u91CA {0} \u7684\u76EE\u6807\u4E0D\u662F\u91CD\u590D\u6CE8\u91CA {1} \u7684\u76EE\u6807\u5B50\u96C6 + +# 0: symbol +compiler.err.invalid.repeatable.annotation.repeated.and.container.present=\u5BB9\u5668 {0} \u4E0D\u5F97\u4E0E\u5176\u5305\u542B\u7684\u5143\u7D20\u540C\u65F6\u5B58\u5728 + # 0: name compiler.err.duplicate.class=\u7C7B\u91CD\u590D: {0} @@ -245,10 +341,10 @@ compiler.err.generic.throwable=\u6CDB\u578B\u7C7B\u4E0D\u80FD\u6269\u5C55 java.lang.Throwable # 0: symbol -compiler.err.icls.cant.have.static.decl=\u5185\u90E8\u7C7B{0}\u4E2D\u7684\u9759\u6001\u58F0\u660E\u975E\u6CD5\n\u4FEE\u9970\u7B26 \''static\'' \u4EC5\u5141\u8BB8\u5728\u5E38\u91CF\u53D8\u91CF\u58F0\u660E\u4E2D\u4F7F\u7528 +compiler.err.icls.cant.have.static.decl=\u5185\u90E8\u7C7B{0}\u4E2D\u7684\u9759\u6001\u58F0\u660E\u975E\u6CD5\n\u4FEE\u9970\u7B26 ''static'' \u4EC5\u5141\u8BB8\u5728\u5E38\u91CF\u53D8\u91CF\u58F0\u660E\u4E2D\u4F7F\u7528 # 0: string -compiler.err.illegal.char=\u975E\u6CD5\u5B57\u7B26: \\{0} +compiler.err.illegal.char=\u975E\u6CD5\u5B57\u7B26: ''{0}'' compiler.err.illegal.char.for.encoding=\u7F16\u7801{0}\u7684\u4E0D\u53EF\u6620\u5C04\u5B57\u7B26 @@ -280,11 +376,15 @@ compiler.err.illegal.underscore=\u975E\u6CD5\u4E0B\u5212\u7EBF +compiler.err.illegal.dot=\u975E\u6CD5 ''.'' + # 0: symbol compiler.err.illegal.qual.not.icls=\u975E\u6CD5\u9650\u5B9A\u7B26; {0}\u4E0D\u662F\u5185\u90E8\u7C7B compiler.err.illegal.start.of.expr=\u975E\u6CD5\u7684\u8868\u8FBE\u5F0F\u5F00\u59CB +compiler.err.illegal.start.of.stmt=\u975E\u6CD5\u7684\u8BED\u53E5\u5F00\u59CB + compiler.err.illegal.start.of.type=\u975E\u6CD5\u7684\u7C7B\u578B\u5F00\u59CB compiler.err.illegal.unicode.esc=\u975E\u6CD5\u7684 Unicode \u8F6C\u4E49 @@ -302,8 +402,6 @@ # 0: number compiler.err.int.number.too.large=\u8FC7\u5927\u7684\u6574\u6570: {0} -compiler.err.internal.error.cant.instantiate=\u5185\u90E8\u9519\u8BEF; \u65E0\u6CD5\u5C06\u4F4D\u4E8E{1}\u7684{0}\u5B9E\u4F8B\u5316\u4E3A ({2}) - compiler.err.intf.annotation.members.cant.have.params=@interface \u6210\u5458\u4E0D\u80FD\u5E26\u6709\u53C2\u6570 compiler.err.intf.annotation.cant.have.type.params=@interface \u4E0D\u80FD\u5E26\u6709\u7C7B\u578B\u53C2\u6570 @@ -315,7 +413,7 @@ compiler.err.intf.expected.here=\u6B64\u5904\u9700\u8981\u63A5\u53E3 -compiler.err.intf.meth.cant.have.body=\u63A5\u53E3\u65B9\u6CD5\u4E0D\u80FD\u5E26\u6709\u4E3B\u4F53 +compiler.err.intf.meth.cant.have.body=\u63A5\u53E3\u62BD\u8C61\u65B9\u6CD5\u4E0D\u80FD\u5E26\u6709\u4E3B\u4F53 compiler.err.invalid.annotation.member.type=\u6CE8\u91CA\u6210\u5458\u7684\u7C7B\u578B\u65E0\u6548 @@ -327,6 +425,8 @@ compiler.err.varargs.and.old.array.syntax=variable-arity \u53C2\u6570\u4E2D\u4E0D\u5141\u8BB8\u4F7F\u7528\u4F20\u7EDF\u6570\u7EC4\u8BB0\u53F7 +compiler.err.variable.not.allowed=\u6B64\u5904\u4E0D\u5141\u8BB8\u4F7F\u7528\u53D8\u91CF\u58F0\u660E + # 0: name compiler.err.label.already.in.use=\u6807\u7B7E{0}\u5DF2\u4F7F\u7528 @@ -337,6 +437,8 @@ compiler.err.cannot.create.array.with.type.arguments=\u65E0\u6CD5\u521B\u5EFA\u5177\u6709\u7C7B\u578B\u53D8\u91CF\u7684\u6570\u7EC4 +compiler.err.cannot.create.array.with.diamond=\u65E0\u6CD5\u521B\u5EFA\u5177\u6709 ''<>'' \u7684\u6570\u7EC4 + # # limits. We don't give the limits in the diagnostic because we expect # them to change, yet we want to use the same diagnostic. These are all @@ -360,7 +462,7 @@ compiler.err.limit.string=\u5E38\u91CF\u5B57\u7B26\u4E32\u8FC7\u957F -compiler.err.limit.string.overflow=\u5BF9\u4E8E\u5E38\u91CF\u6C60\u6765\u8BF4, \u5B57\u7B26\u4E32 \"{0}...\" \u7684 UTF8 \u8868\u793A\u8FC7\u957F +compiler.err.limit.string.overflow=\u5BF9\u4E8E\u5E38\u91CF\u6C60\u6765\u8BF4, \u5B57\u7B26\u4E32 "{0}..." \u7684 UTF8 \u8868\u793A\u8FC7\u957F compiler.err.malformed.fp.lit=\u6D6E\u70B9\u6587\u5B57\u7684\u683C\u5F0F\u9519\u8BEF @@ -370,7 +472,9 @@ compiler.err.missing.ret.stmt=\u7F3A\u5C11\u8FD4\u56DE\u8BED\u53E5 -compiler.err.missing.ret.val=\u7F3A\u5C11\u8FD4\u56DE\u503C +compiler.misc.missing.ret.val=\u7F3A\u5C11\u8FD4\u56DE\u503C + +compiler.misc.unexpected.ret.val=\u610F\u5916\u7684\u8FD4\u56DE\u503C # 0: set of modifier compiler.err.mod.not.allowed.here=\u6B64\u5904\u4E0D\u5141\u8BB8\u4F7F\u7528\u4FEE\u9970\u7B26{0} @@ -398,6 +502,25 @@ # 0: type, 1: type compiler.err.neither.conditional.subtype=? \u7684\u4E0D\u517C\u5BB9\u7C7B\u578B: \u4E24\u8005\u90FD\u4E0D\u662F\u5BF9\u65B9\u7684\u5B50\u7C7B\u578B\n\u7B2C\u4E8C\u4E2A\u64CD\u4F5C\u6570: {0}\n\u7B2C\u4E09\u4E2A\u64CD\u4F5C\u6570: {1} +# 0: message segment +compiler.misc.incompatible.type.in.conditional=\u6761\u4EF6\u8868\u8FBE\u5F0F\u4E2D\u7684\u7C7B\u578B\u9519\u8BEF; {0} + +compiler.misc.conditional.target.cant.be.void=\u6761\u4EF6\u8868\u8FBE\u5F0F\u7684\u76EE\u6807\u7C7B\u578B\u4E0D\u80FD\u4E3A\u7A7A + +# 0: type +compiler.misc.incompatible.ret.type.in.lambda=lambda \u8868\u8FBE\u5F0F\u4E2D\u7684\u8FD4\u56DE\u7C7B\u578B\u9519\u8BEF\n{0} + +# 0: type +compiler.misc.incompatible.ret.type.in.mref=\u65B9\u6CD5\u5F15\u7528\u4E2D\u7684\u8FD4\u56DE\u7C7B\u578B\u9519\u8BEF\n{0} + +# 0: list of type +compiler.err.incompatible.thrown.types.in.lambda=lambda \u8868\u8FBE\u5F0F\u4E2D\u629B\u51FA\u7684\u7C7B\u578B{0}\u4E0D\u517C\u5BB9 + +# 0: list of type +compiler.err.incompatible.thrown.types.in.mref=\u65B9\u6CD5\u5F15\u7528\u4E2D\u629B\u51FA\u7684\u7C7B\u578B{0}\u4E0D\u517C\u5BB9 + +compiler.misc.incompatible.arg.types.in.lambda=lambda \u8868\u8FBE\u5F0F\u4E2D\u7684\u53C2\u6570\u7C7B\u578B\u4E0D\u517C\u5BB9 + compiler.err.new.not.allowed.in.annotation=\u6CE8\u91CA\u4E2D\u4E0D\u5141\u8BB8\u4F7F\u7528 ''new'' compiler.err.no.annotation.member={1}\u4E2D\u6CA1\u6709\u6CE8\u91CA\u6210\u5458{0} @@ -414,6 +537,12 @@ compiler.err.not.def.access.class.intf.cant.access={1}\u4E2D\u7684{0}\u662F\u5728\u4E0D\u53EF\u8BBF\u95EE\u7684\u7C7B\u6216\u63A5\u53E3\u4E2D\u5B9A\u4E49\u7684 # 0: symbol, 1: symbol +compiler.misc.not.def.access.class.intf.cant.access={1}\u4E2D\u7684{0}\u662F\u5728\u4E0D\u53EF\u8BBF\u95EE\u7684\u7C7B\u6216\u63A5\u53E3\u4E2D\u5B9A\u4E49\u7684 + +# 0: symbol, 1: list of type, 2: type +compiler.misc.cant.access.inner.cls.constr=\u65E0\u6CD5\u8BBF\u95EE\u6784\u9020\u5668 {0}({1})\n\u4F5C\u7528\u57DF\u4E2D\u6CA1\u6709\u7C7B\u578B\u4E3A{2}\u7684\u5C01\u95ED\u5B9E\u4F8B + +# 0: symbol, 1: symbol compiler.err.not.def.public.cant.access={0}\u5728{1}\u4E2D\u4E0D\u662F\u516C\u5171\u7684; \u65E0\u6CD5\u4ECE\u5916\u90E8\u7A0B\u5E8F\u5305\u4E2D\u5BF9\u5176\u8FDB\u884C\u8BBF\u95EE # 0: name @@ -455,15 +584,13 @@ # 0: list of string compiler.err.proc.no.explicit.annotation.processing.requested=\u4EC5\u5F53\u663E\u5F0F\u8BF7\u6C42\u6CE8\u91CA\u5904\u7406\u65F6\u624D\u63A5\u53D7\u7C7B\u540D\u79F0 ''{0}'' -compiler.err.proc.no.service=\u627E\u4E0D\u5230\u670D\u52A1\u52A0\u8F7D\u5668\u7C7B\u3002\njava.util.ServiceLoader \u6216 sun.misc.Service \u5FC5\u987B\u53EF\u7528\u3002 +compiler.err.proc.no.service=ServiceLoader \u4E0D\u53EF\u7528, \u4F46\u5B83\u662F\u6CE8\u91CA\u5904\u7406\u6240\u5FC5\u9700\u7684\u3002 compiler.err.proc.processor.bad.option.name=\u5904\u7406\u7A0B\u5E8F ''{1}'' \u63D0\u4F9B\u7684\u9009\u9879\u540D\u79F0 ''{0}'' \u9519\u8BEF # 0: string compiler.err.proc.processor.cant.instantiate=\u65E0\u6CD5\u5B9E\u4F8B\u5316\u5904\u7406\u7A0B\u5E8F ''{0}'' \u7684\u5B9E\u4F8B -compiler.err.proc.processor.constructor.error=\u6784\u9020\u5904\u7406\u7A0B\u5E8F\u5BF9\u8C61{0}\u65F6\u629B\u51FA\u5F02\u5E38\u9519\u8BEF - # 0: string compiler.err.proc.processor.not.found=\u627E\u4E0D\u5230\u6CE8\u91CA\u5904\u7406\u7A0B\u5E8F ''{0}'' @@ -482,7 +609,10 @@ compiler.err.recursive.ctor.invocation=\u9012\u5F52\u6784\u9020\u5668\u8C03\u7528 # 0: name, 1: symbol kind, 2: symbol, 3: symbol, 4: symbol kind, 5: symbol, 6: symbol -compiler.err.ref.ambiguous=\u5BF9{0}\u7684\u5F15\u7528\u4E0D\u660E\u786E, {3}\u4E2D\u7684{1} {2}\u548C{6}\u4E2D\u7684{4} {5}\u90FD\u5339\u914D +compiler.err.ref.ambiguous=\u5BF9{0}\u7684\u5F15\u7528\u4E0D\u660E\u786E\n{3} \u4E2D\u7684{1} {2} \u548C {6} \u4E2D\u7684{4} {5} \u90FD\u5339\u914D + +# 0: name, 1: symbol kind, 2: symbol, 3: symbol, 4: symbol kind, 5: symbol, 6: symbol +compiler.misc.ref.ambiguous=\u5BF9{0}\u7684\u5F15\u7528\u4E0D\u660E\u786E\n{3} \u4E2D\u7684{1} {2} \u548C {6} \u4E2D\u7684{4} {5} \u90FD\u5339\u914D compiler.err.repeated.annotation.target=\u6CE8\u91CA\u76EE\u6807\u91CD\u590D @@ -536,6 +666,27 @@ # 0: type, 1: type, 2: string compiler.err.types.incompatible.diff.ret=\u7C7B\u578B{0}\u548C{1}\u4E0D\u517C\u5BB9; \u4E24\u8005\u90FD\u5B9A\u4E49\u4E86{2}, \u4F46\u5374\u5E26\u6709\u4E0D\u76F8\u5173\u7684\u8FD4\u56DE\u7C7B\u578B +# 0: kind, 1: type, 2: name, 3: list of type, 4: symbol, 5: symbol +compiler.err.types.incompatible.unrelated.defaults={0} {1}\u4ECE\u7C7B\u578B {4} \u548C {5} \u4E2D\u7EE7\u627F\u4E86{2}({3}) \u7684\u4E0D\u76F8\u5173\u9ED8\u8BA4\u503C + +# 0: kind, 1: type, 2: name, 3: list of type, 4: symbol, 5: symbol +compiler.err.types.incompatible.abstract.default={0} {1}\u4ECE\u7C7B\u578B {4} \u548C {5} \u4E2D\u7EE7\u627F\u4E86{2}({3}) \u7684\u62BD\u8C61\u548C\u9ED8\u8BA4\u503C + +# 0: name, 1: kind, 2: symbol +compiler.err.default.overrides.object.member={1} {2} \u4E2D\u7684\u9ED8\u8BA4\u65B9\u6CD5{0}\u8986\u76D6\u4E86 java.lang.Object \u7684\u6210\u5458 + +# 0: type +compiler.err.illegal.static.intf.meth.call=\u9759\u6001\u63A5\u53E3\u65B9\u6CD5\u8C03\u7528\u975E\u6CD5\n\u5E94\u5C06\u63A5\u6536\u65B9\u8868\u8FBE\u5F0F\u66FF\u6362\u4E3A\u7C7B\u578B\u9650\u5B9A\u7B26 ''{0}'' + +# 0: type, 1: message segment +compiler.err.illegal.default.super.call=\u9ED8\u8BA4\u8D85\u7EA7\u8C03\u7528\u4E2D\u7684\u7C7B\u578B\u9650\u5B9A\u7B26{0}\u9519\u8BEF\n{1} + +# 0: symbol, 1: type +compiler.misc.overridden.default=\u8986\u76D6\u4E86{1}\u4E2D\u7684\u65B9\u6CD5 {0} + +# 0: symbol, 1: symbol +compiler.misc.redundant.supertype=\u5197\u4F59\u63A5\u53E3 {0} \u5DF2\u7531 {1} \u6269\u5C55 + compiler.err.unclosed.char.lit=\u672A\u7ED3\u675F\u7684\u5B57\u7B26\u6587\u5B57 compiler.err.unclosed.comment=\u672A\u7ED3\u675F\u7684\u6CE8\u91CA @@ -550,19 +701,14 @@ # 0: name compiler.err.undef.label=\u672A\u5B9A\u4E49\u7684\u6807\u7B7E: {0} -compiler.err.undetermined.type=\u65E0\u6CD5\u63A8\u65AD{0}\u7684\u7C7B\u578B\u53C2\u6570 - -# 0: type, 1: message segment -compiler.err.undetermined.type.1=\u65E0\u6CD5\u63A8\u65AD{0}\u7684\u7C7B\u578B\u53C2\u6570;\n\u539F\u56E0: {1} - -# 0: list of type, 1: message segment -compiler.err.invalid.inferred.types={0}\u7684\u63A8\u65AD\u7C7B\u578B\u65E0\u6548; {1} - # 0: message segment, 1: unused compiler.err.cant.apply.diamond=\u65E0\u6CD5\u63A8\u65AD{0}\u7684\u7C7B\u578B\u53C2\u6570 -# 0: message segment, 1: message segment -compiler.err.cant.apply.diamond.1=\u65E0\u6CD5\u63A8\u65AD{0}\u7684\u7C7B\u578B\u53C2\u6570;\n\u539F\u56E0: {1} +# 0: message segment or type, 1: message segment +compiler.err.cant.apply.diamond.1=\u65E0\u6CD5\u63A8\u65AD{0}\u7684\u7C7B\u578B\u53C2\u6570\n\u539F\u56E0: {1} + +# 0: message segment or type, 1: message segment +compiler.misc.cant.apply.diamond.1=\u65E0\u6CD5\u63A8\u65AD{0}\u7684\u7C7B\u578B\u53C2\u6570\n\u539F\u56E0: {1} compiler.err.unreachable.stmt=\u65E0\u6CD5\u8BBF\u95EE\u7684\u8BED\u53E5 @@ -605,7 +751,7 @@ # 0: symbol compiler.misc.varargs.trustme.on.virtual.varargs=\u5B9E\u4F8B\u65B9\u6CD5 {0} \u4E0D\u662F\u6700\u7EC8\u7684\u3002 -# 0: type, 1: kind, 2: symbol +# 0: type, 1: symbol kind, 2: symbol compiler.misc.inaccessible.varargs.type=\u5F62\u5F0F varargs \u5143\u7D20\u7C7B\u578B{0}\u65E0\u6CD5\u4ECE {1} {2} \u8FDB\u884C\u8BBF\u95EE # In the following string, {1} will always be the detail message from @@ -620,7 +766,7 @@ ## All errors which do not refer to a particular line in the source code are ## preceded by this string. -compiler.err.error=\u9519\u8BEF:\u0020 +compiler.err.error=\u9519\u8BEF: # The following error messages do not refer to a line in the source code. compiler.err.cant.read.file=\u65E0\u6CD5\u8BFB\u53D6: {0} @@ -637,7 +783,7 @@ compiler.misc.fatal.err.cant.locate.ctor=\u81F4\u547D\u9519\u8BEF: \u627E\u4E0D\u5230{0}\u7684\u6784\u9020\u5668 -compiler.misc.fatal.err.cant.close.loader=\u81F4\u547D\u9519\u8BEF: \u65E0\u6CD5\u5173\u95ED\u6CE8\u91CA\u5904\u7406\u7A0B\u5E8F\u7684\u7C7B\u52A0\u8F7D\u5668 +compiler.misc.fatal.err.cant.close=\u81F4\u547D\u9519\u8BEF: \u65E0\u6CD5\u5173\u95ED\u7F16\u8BD1\u5668\u8D44\u6E90 ##### @@ -659,7 +805,10 @@ ## The following string will appear before all messages keyed as: ## "compiler.note". -compiler.note.note=\u6CE8:\u0020 + +compiler.note.potential.lambda.found=\u53EF\u5C06\u6B64\u533F\u540D\u5185\u90E8\u7C7B\u521B\u5EFA\u8F6C\u6362\u4E3A lambda \u8868\u8FBE\u5F0F\u3002 + +compiler.note.note=\u6CE8: # 0: file name compiler.note.deprecated.filename={0}\u4F7F\u7528\u6216\u8986\u76D6\u4E86\u5DF2\u8FC7\u65F6\u7684 API\u3002 @@ -773,12 +922,12 @@ ## ## All warning messages are preceded by the following string. -compiler.warn.warning=\u8B66\u544A:\u0020 +compiler.warn.warning=\u8B66\u544A: ## Warning messages may also include the following prefix to identify a ## lint option # 0: option name -compiler.warn.lintOption=[{0}]\u0020 +compiler.warn.lintOption=[{0}] # 0: symbol compiler.warn.constant.SVUID=serialVersionUID \u5728\u7C7B{0}\u4E2D\u5FC5\u987B\u662F\u5E38\u91CF @@ -1046,6 +1195,8 @@ compiler.misc.bad.signature=\u9519\u8BEF\u7684\u7B7E\u540D: {0} +compiler.misc.bad.type.annotation.value=\u9519\u8BEF\u7684\u7C7B\u578B\u6CE8\u91CA\u76EE\u6807\u7C7B\u578B\u503C: {0} + compiler.misc.class.file.wrong.class=\u7C7B\u6587\u4EF6\u5305\u542B\u9519\u8BEF\u7684\u7C7B: {0} compiler.misc.class.file.not.found=\u627E\u4E0D\u5230{0}\u7684\u7C7B\u6587\u4EF6 @@ -1077,24 +1228,17 @@ ##### -# 0: message segment, 1: type, 2: type -compiler.err.prob.found.req={0}\n\u9700\u8981: {2}\n\u627E\u5230: {1} +# 0: message segment +compiler.err.prob.found.req=\u4E0D\u517C\u5BB9\u7684\u7C7B\u578B: {0} # 0: message segment, 1: type, 2: type compiler.warn.prob.found.req={0}\n\u9700\u8981: {2}\n\u627E\u5230: {1} -compiler.err.prob.found.req.1={0} {3}\n\u9700\u8981: {2}\n\u627E\u5230: {1} - -## The following are all possible strings for the first argument ({0}) of the -## above strings. -compiler.misc.incompatible.types=\u4E0D\u517C\u5BB9\u7684\u7C7B\u578B - -# 0: message segment -compiler.misc.incompatible.types.1=\u4E0D\u517C\u5BB9\u7684\u7C7B\u578B; {0} - -compiler.misc.inconvertible.types=\u4E0D\u53EF\u8F6C\u6362\u7684\u7C7B\u578B - -compiler.misc.possible.loss.of.precision=\u53EF\u80FD\u635F\u5931\u7CBE\u5EA6 +# 0: type, 1: type +compiler.misc.inconvertible.types={0}\u65E0\u6CD5\u8F6C\u6362\u4E3A{1} + +# 0: type, 1: type +compiler.misc.possible.loss.of.precision=\u4ECE{0}\u8F6C\u6362\u5230{1}\u53EF\u80FD\u4F1A\u6709\u635F\u5931 compiler.misc.unchecked.assign=\u672A\u7ECF\u68C0\u67E5\u7684\u8F6C\u6362 @@ -1104,16 +1248,13 @@ # assigned array cannot dynamically check its stores compiler.misc.unchecked.cast.to.type=\u672A\u7ECF\u68C0\u67E5\u7684\u8F6C\u6362 -compiler.misc.assignment.from.super-bound=\u4ECE super-bound \u7C7B\u578B{0}\u8FDB\u884C\u5206\u914D - -compiler.misc.assignment.to.extends-bound=\u5230 extends-bound \u7C7B\u578B{0}\u7684\u5206\u914D - # compiler.err.star.expected=\ # ''*'' expected # compiler.err.no.elem.type=\ # \[\*\] cannot have a type -compiler.misc.try.not.applicable.to.type=try-with-resources \u4E0D\u9002\u7528\u4E8E\u53D8\u91CF\u7C7B\u578B +# 0: type +compiler.misc.try.not.applicable.to.type=try-with-resources \u4E0D\u9002\u7528\u4E8E\u53D8\u91CF\u7C7B\u578B\n({0}) ##### @@ -1139,25 +1280,44 @@ ## The following are all possible strings for the last argument of all those ## diagnostics whose key ends in ".1" -compiler.misc.undetermined.type=\u672A\u786E\u5B9A\u7684\u7C7B\u578B - -compiler.misc.type.variable.has.undetermined.type=\u7C7B\u578B\u53D8\u91CF{0}\u5E26\u6709\u672A\u786E\u5B9A\u7684\u7C7B\u578B # 0: type, 1: list of type compiler.misc.no.unique.maximal.instance.exists=\u5BF9\u4E8E\u4E0A\u9650\u4E3A{1}\u7684\u7C7B\u578B\u53D8\u91CF{0}, \u4E0D\u5B58\u5728\u552F\u4E00\u6700\u5927\u5B9E\u4F8B compiler.misc.no.unique.minimal.instance.exists=\u5BF9\u4E8E\u4E0B\u9650\u4E3A{1}\u7684\u7C7B\u578B\u53D8\u91CF{0}, \u4E0D\u5B58\u5728\u552F\u4E00\u6700\u5C0F\u5B9E\u4F8B -# 0: list of type, 1: type, 2: type -compiler.misc.infer.no.conforming.instance.exists=\u4E0D\u5B58\u5728\u7C7B\u578B\u53D8\u91CF{0}\u7684\u5B9E\u4F8B, \u4EE5\u4F7F{1}\u4E0E{2}\u4E00\u81F4 +# 0: type, 1: list of type +compiler.misc.incompatible.upper.bounds=\u63A8\u8BBA\u53D8\u91CF {0} \u5177\u6709\u4E0D\u517C\u5BB9\u7684\u4E0A\u9650 {1} + +# 0: type, 1: list of type, 2: list of type +compiler.misc.incompatible.eq.upper.bounds=\u63A8\u8BBA\u53D8\u91CF {0} \u5177\u6709\u4E0D\u517C\u5BB9\u7684\u9650\u5236\u8303\u56F4\n\u7B49\u5F0F\u7EA6\u675F\u6761\u4EF6: {1}\n\u4E0A\u9650: {2} + +# 0: type, 1: list of type, 2: list of type +compiler.misc.incompatible.eq.lower.bounds=\u63A8\u8BBA\u53D8\u91CF{0}\u5177\u6709\u4E0D\u517C\u5BB9\u7684\u9650\u5236\u8303\u56F4\n\u7B49\u5F0F\u7EA6\u675F\u6761\u4EF6: {1}\n\u4E0B\u9650: {2} # 0: list of type, 1: type, 2: type -compiler.misc.infer.no.conforming.assignment.exists=\u4E0D\u5B58\u5728\u7C7B\u578B\u53D8\u91CF{0}\u7684\u5B9E\u4F8B, \u4EE5\u4F7F\u53C2\u6570\u7C7B\u578B{1}\u4E0E\u5F62\u5F0F\u53C2\u6570\u7C7B\u578B{2}\u4E00\u81F4 - -compiler.misc.infer.arg.length.mismatch=\u65E0\u6CD5\u4ECE\u53C2\u6570\u8FDB\u884C\u5B9E\u4F8B\u5316, \u56E0\u4E3A\u5B9E\u9645\u53C2\u6570\u5217\u8868\u548C\u5F62\u5F0F\u53C2\u6570\u5217\u8868\u957F\u5EA6\u4E0D\u540C +compiler.misc.infer.no.conforming.instance.exists=\u4E0D\u5B58\u5728\u7C7B\u578B\u53D8\u91CF{0}\u7684\u5B9E\u4F8B, \u4EE5\u4F7F{1}\u4E0E{2}\u4E00\u81F4 + +# 0: list of type, 1: message segment +compiler.misc.infer.no.conforming.assignment.exists=\u65E0\u6CD5\u63A8\u65AD\u7C7B\u578B\u53D8\u91CF {0}\n(\u53C2\u6570\u4E0D\u5339\u914D; {1}) + +# 0: list of type +compiler.misc.infer.arg.length.mismatch=\u65E0\u6CD5\u63A8\u65AD\u7C7B\u578B\u53D8\u91CF {0}\n(\u5B9E\u9645\u53C2\u6570\u5217\u8868\u548C\u5F62\u5F0F\u53C2\u6570\u5217\u8868\u957F\u5EA6\u4E0D\u540C) + +# 0: list of type, 1: message segment +compiler.misc.infer.varargs.argument.mismatch=\u65E0\u6CD5\u63A8\u65AD\u7C7B\u578B\u53D8\u91CF {0}\n(varargs \u4E0D\u5339\u914D; {1}) # 0: type, 1: list of type -compiler.misc.inferred.do.not.conform.to.bounds=\u63A8\u65AD\u7C7B\u578B\u4E0D\u7B26\u5408\u58F0\u660E\u7684\u8303\u56F4\n\u63A8\u65AD: {0}\n\u8303\u56F4: {1} +compiler.misc.inferred.do.not.conform.to.upper.bounds=\u63A8\u65AD\u7C7B\u578B\u4E0D\u7B26\u5408\u4E0A\u9650\n\u63A8\u65AD: {0}\n\u4E0A\u9650: {1} + +# 0: type, 1: list of type +compiler.misc.inferred.do.not.conform.to.lower.bounds=\u63A8\u65AD\u7C7B\u578B\u4E0D\u7B26\u5408\u4E0B\u9650\n\u63A8\u65AD: {0}\n\u4E0B\u9650: {1} + +# 0: type, 1: list of type +compiler.misc.inferred.do.not.conform.to.eq.bounds=\u63A8\u65AD\u7C7B\u578B\u4E0D\u7B26\u5408\u7B49\u5F0F\u7EA6\u675F\u6761\u4EF6\n\u63A8\u65AD: {0}\n\u7B49\u5F0F\u7EA6\u675F\u6761\u4EF6: {1} + +# 0: list of type +compiler.misc.cyclic.inference=\u7531\u4E8E\u63A8\u8BBA\u5FAA\u73AF, \u65E0\u6CD5\u5B9E\u4F8B\u5316\u63A8\u8BBA\u53D8\u91CF{0} # 0: symbol compiler.misc.diamond={0}<> @@ -1165,6 +1325,7 @@ # 0: type compiler.misc.diamond.non.generic=\u65E0\u6CD5\u5C06 ''<>'' \u4E0E\u975E\u6CDB\u578B\u7C7B{0}\u4E00\u8D77\u4F7F\u7528 +# 0: unused compiler.misc.diamond.and.explicit.params=\u4E0D\u80FD\u5C06 ''<>'' \u4E0E\u6784\u9020\u5668\u7684\u663E\u5F0F\u7C7B\u578B\u53C2\u6570\u4E00\u8D77\u4F7F\u7528 # 0: type, 1: list of type @@ -1172,14 +1333,18 @@ compiler.misc.arg.length.mismatch=\u5B9E\u9645\u53C2\u6570\u5217\u8868\u548C\u5F62\u5F0F\u53C2\u6570\u5217\u8868\u957F\u5EA6\u4E0D\u540C -# 0: type, 1: type -compiler.misc.no.conforming.assignment.exists=\u65E0\u6CD5\u901A\u8FC7\u65B9\u6CD5\u8C03\u7528\u8F6C\u6362\u5C06\u5B9E\u9645\u53C2\u6570{0}\u8F6C\u6362\u4E3A{1} - -# 0: type, 1: type -compiler.misc.varargs.argument.mismatch=\u53C2\u6570\u7C7B\u578B{0}\u4E0D\u7B26\u5408 vararg \u5143\u7D20\u7C7B\u578B{1} +# 0: message segment +compiler.misc.no.conforming.assignment.exists=\u53C2\u6570\u4E0D\u5339\u914D; {0} + +# 0: message segment +compiler.misc.varargs.argument.mismatch=varargs \u4E0D\u5339\u914D; {0} ##### +# 0: type, 1: file name +compiler.warn.auxiliary.class.accessed.from.outside.of.its.source.file={1} \u4E2D\u7684\u8F85\u52A9\u7C7B{0}\u4E0D\u5E94\u4ECE\u5176\u81EA\u8EAB\u7684\u6E90\u6587\u4EF6\u4EE5\u5916\u8BBF\u95EE + + ## The first argument ({0}) is a "kindname". # 0: symbol kind, 1: symbol, 2: symbol compiler.err.abstract.cant.be.accessed.directly=\u65E0\u6CD5\u76F4\u63A5\u8BBF\u95EE{2}\u4E2D\u7684\u62BD\u8C61{0} {1} @@ -1188,10 +1353,17 @@ # 0: symbol kind, 1: symbol compiler.err.non-static.cant.be.ref=\u65E0\u6CD5\u4ECE\u9759\u6001\u4E0A\u4E0B\u6587\u4E2D\u5F15\u7528\u975E\u9759\u6001 {0} {1} +# 0: symbol kind, 1: symbol +compiler.misc.non-static.cant.be.ref=\u65E0\u6CD5\u4ECE\u9759\u6001\u4E0A\u4E0B\u6587\u4E2D\u5F15\u7528\u975E\u9759\u6001 {0} {1} + ## Both arguments ({0}, {1}) are "kindname"s. {0} is a comma-separated list ## of kindnames (the list should be identical to that provided in source. compiler.err.unexpected.type=\u610F\u5916\u7684\u7C7B\u578B\n\u9700\u8981: {0}\n\u627E\u5230: {1} +compiler.err.unexpected.lambda=\u6B64\u5904\u4E0D\u5E94\u4E3A lambda \u8868\u8FBE\u5F0F + +compiler.err.unexpected.mref=\u6B64\u5904\u4E0D\u5E94\u4E3A\u65B9\u6CD5\u5F15\u7528 + ## The first argument {0} is a "kindname" (e.g. 'constructor', 'field', etc.) ## The second argument {1} is the non-resolved symbol ## The third argument {2} is a list of type parameters (non-empty if {1} is a method) @@ -1216,12 +1388,20 @@ # 0: symbol kind, 1: name, 2: list of type, 3: list, 4: message segment compiler.err.cant.resolve.location.args.params=\u627E\u4E0D\u5230\u7B26\u53F7\n\u7B26\u53F7: {0} <{2}>{1}({3})\n\u4F4D\u7F6E: {4} +### Following are replicated/used for method reference diagnostics + +# 0: symbol kind, 1: name, 2: unused, 3: list of type, 4: message segment +compiler.misc.cant.resolve.location.args=\u627E\u4E0D\u5230\u7B26\u53F7\n\u7B26\u53F7: {0} {1}({3})\n\u4F4D\u7F6E: {4} + +# 0: symbol kind, 1: name, 2: list of type, 3: list, 4: message segment +compiler.misc.cant.resolve.location.args.params=\u627E\u4E0D\u5230\u7B26\u53F7\n\u7B26\u53F7: {0} <{2}>{1}({3})\n\u4F4D\u7F6E: {4} + ##a location subdiagnostic is composed as follows: ## The first argument {0} is the location "kindname" (e.g. 'constructor', 'field', etc.) ## The second argument {1} is the location name ## The third argument {2} is the location type (only when {1} is a variable name) -# 0: symbol kind, 1: symbol, 2: unused +# 0: symbol kind, 1: type or symbol, 2: unused compiler.misc.location={0} {1} # 0: symbol kind, 1: symbol, 2: type @@ -1256,6 +1436,10 @@ compiler.misc.kindname.package=\u7A0B\u5E8F\u5305 +compiler.misc.kindname.static.init=\u9759\u6001\u521D\u59CB\u5316\u7A0B\u5E8F + +compiler.misc.kindname.instance.init=\u5B9E\u4F8B\u521D\u59CB\u5316\u7A0B\u5E8F + ##### compiler.misc.no.args=\u6CA1\u6709\u53C2\u6570 @@ -1312,6 +1496,7 @@ # 0: symbol, 1: symbol, 2: symbol, 3: symbol compiler.misc.varargs.clash.with={1}\u4E2D\u7684{0}\u8986\u76D6\u4E86{3}\u4E2D\u7684{2} +# 0: unused compiler.misc.diamond.and.anon.class=\u65E0\u6CD5\u5C06 ''<>'' \u4E0E\u533F\u540D\u5185\u90E8\u7C7B\u4E00\u8D77\u4F7F\u7528 # 0: symbol kind, 1: symbol, 2: symbol, 3: message segment @@ -1336,13 +1521,23 @@ compiler.warn.assert.as.identifier=\u4ECE\u53D1\u884C\u7248 1.4 \u5F00\u59CB, ''assert'' \u662F\u4E00\u4E2A\u5173\u952E\u5B57, \u4F46\u4E0D\u80FD\u7528\u4F5C\u6807\u8BC6\u7B26\n(\u8BF7\u4F7F\u7528 -source 1.4 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u5C06 ''assert'' \u7528\u4F5C\u5173\u952E\u5B57) +compiler.warn.underscore.as.identifier=''_'' \u5DF2\u7528\u4F5C\u6807\u8BC6\u7B26\n(\u4EE5\u540E\u7684\u53D1\u884C\u7248\u53EF\u80FD\u4E0D\u652F\u6301\u5C06 ''_'' \u7528\u4F5C\u6807\u8BC6\u7B26) + compiler.err.enum.as.identifier=\u4ECE\u53D1\u884C\u7248 5 \u5F00\u59CB, ''enum'' \u4E3A\u5173\u952E\u5B57, \u800C\u4E0D\u7528\u4F5C\u6807\u8BC6\u7B26\n(\u8BF7\u4F7F\u7528 -source 1.4 \u6216\u66F4\u4F4E\u7248\u672C\u4EE5\u5C06 ''enum'' \u7528\u4F5C\u6807\u8BC6\u7B26) compiler.err.assert.as.identifier=\u4ECE\u53D1\u884C\u7248 1.4 \u5F00\u59CB, ''assert'' \u662F\u4E00\u4E2A\u5173\u952E\u5B57, \u4F46\u4E0D\u80FD\u7528\u4F5C\u6807\u8BC6\u7B26\n(\u8BF7\u4F7F\u7528 -source 1.3 \u6216\u66F4\u4F4E\u7248\u672C\u4EE5\u5C06 ''assert'' \u7528\u4F5C\u6807\u8BC6\u7B26) # TODO 308: make a better error message -# compiler.err.this.as.identifier=\ -# as of release 8, ''this'' is allowed as the parameter name for the receiver type only, which has to be the first parameter +compiler.err.this.as.identifier=\u4ECE\u53D1\u884C\u7248 8 \u5F00\u59CB, ''this'' \u53EA\u80FD\u4F5C\u4E3A\u63A5\u6536\u65B9\u7C7B\u578B\u7684\u53C2\u6570\u540D, \u8BE5\u53C2\u6570\u5FC5\u987B\u4E3A\u7B2C\u4E00\u4E2A\u53C2\u6570 + +# TODO 308: make a better error message +compiler.err.cant.annotate.static.class=\u65E0\u6CD5\u5BF9\u5C01\u95ED\u9759\u6001\u5D4C\u5957\u7C7B\u8FDB\u884C\u6CE8\u91CA +# TODO 308: make a better error message +compiler.err.cant.annotate.nested.type=\u65E0\u6CD5\u5BF9\u5D4C\u5957\u7C7B\u578B\u8FDB\u884C\u6CE8\u91CA + +compiler.err.incorrect.receiver.type=\u63A5\u6536\u65B9\u7C7B\u578B\u4E0E\u5C01\u95ED\u7C7B\u7C7B\u578B\u4E0D\u5339\u914D + +compiler.err.no.annotations.on.dot.class=\u7C7B\u6587\u5B57\u7C7B\u578B\u4E2D\u4E0D\u5141\u8BB8\u4F7F\u7528\u4EFB\u4F55\u6CE8\u91CA # 0: string compiler.err.generics.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301\u6CDB\u578B\n(\u8BF7\u4F7F\u7528 -source 5 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528\u6CDB\u578B) @@ -1353,9 +1548,8 @@ # 0: string compiler.err.annotations.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301\u6CE8\u91CA\n(\u8BF7\u4F7F\u7528 -source 5 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528\u6CE8\u91CA) -#308 compiler.err.type.annotations.not.supported.in.source=\ -#308 type annotations are not supported in -source {0}\n\ -#308 (use -source 8 or higher to enable type annotations) +# 0: string +compiler.err.type.annotations.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301\u7C7B\u578B\u6CE8\u91CA\n(\u8BF7\u4F7F\u7528 -source 8 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528\u7C7B\u578B\u6CE8\u91CA) # 0: string compiler.err.foreach.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301 for-each \u5FAA\u73AF\n(\u8BF7\u4F7F\u7528 -source 5 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528 for-each \u5FAA\u73AF) @@ -1375,6 +1569,47 @@ # 0: string compiler.err.string.switch.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301 switch \u4E2D\u5B58\u5728\u5B57\u7B26\u4E32\n(\u8BF7\u4F7F\u7528 -source 7 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u5141\u8BB8 switch \u4E2D\u5B58\u5728\u5B57\u7B26\u4E32) +# 0: string +compiler.err.lambda.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301 lambda \u8868\u8FBE\u5F0F\n(\u8BF7\u4F7F\u7528 -source 8 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528 lambda \u8868\u8FBE\u5F0F) + +# 0: string +compiler.err.method.references.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301\u65B9\u6CD5\u5F15\u7528\n(\u8BF7\u4F7F\u7528 -source 8 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528\u65B9\u6CD5\u5F15\u7528) + +# 0: string +compiler.err.default.methods.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301\u9ED8\u8BA4\u65B9\u6CD5\n(\u8BF7\u4F7F\u7528 -source 8 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528\u9ED8\u8BA4\u65B9\u6CD5) + +# 0: string +compiler.err.intersection.types.in.cast.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301\u8F6C\u6362\u4E2D\u7684\u4EA4\u53C9\u7C7B\u578B\n(\u8BF7\u4F7F\u7528 -source 8 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528\u9ED8\u8BA4\u65B9\u6CD5) + +# 0: string +compiler.err.static.intf.methods.not.supported.in.source=-source {0} \u4E2D\u4E0D\u652F\u6301\u9759\u6001\u63A5\u53E3\u65B9\u6CD5\n(\u8BF7\u4F7F\u7528 -source 8 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u542F\u7528\u9759\u6001\u63A5\u53E3\u65B9\u6CD5) + +######################################## +# Diagnostics for verbose resolution +# used by Resolve (debug only) +######################################## + +# 0: number, 1: symbol, 2: unused +compiler.misc.applicable.method.found=\u627E\u5230\u7B2C {0} \u4E2A\u9002\u7528\u65B9\u6CD5: {1} + +# 0: number, 1: symbol, 2: message segment +compiler.misc.applicable.method.found.1=\u627E\u5230\u7B2C {0} \u4E2A\u9002\u7528\u65B9\u6CD5: {1}\n({2}) + +# 0: number, 1: symbol, 2: message segment +compiler.misc.not.applicable.method.found=\u627E\u5230\u7B2C {0} \u4E2A\u4E0D\u9002\u7528\u7684\u65B9\u6CD5: {1}\n({2}) + +# 0: type +compiler.misc.partial.inst.sig=\u90E8\u5206\u5B9E\u4F8B\u5316\u4E3A: {0} + +# 0: name, 1: symbol, 2: number, 3: MethodResolutionPhase, 4: list of type or message segment, 5: list of type or message segment +compiler.note.verbose.resolve.multi=\u5C06\u7C7B\u578B {1} \u7684\u65B9\u6CD5 {0} \u89E3\u6790\u4E3A\u5019\u9009\u9879 {2}\n\u9636\u6BB5: {3}\n\u5177\u6709\u5B9E\u9645\u503C: {4}\n\u5177\u6709\u7C7B\u578B\u53C2\u6570: {5}\n\u5019\u9009\u9879: + +# 0: name, 1: symbol, 2: unused, 3: MethodResolutionPhase, 4: list of type or message segment, 5: list of type or message segment +compiler.note.verbose.resolve.multi.1=\u7C7B\u578B {1} \u7684\u65B9\u6CD5 {0} \u89E3\u6790\u9519\u8BEF\n\u9636\u6BB5: {3}\n\u5177\u6709\u5B9E\u9645\u503C: {4}\n\u5177\u6709\u7C7B\u578B\u53C2\u6570: {5}\n\u5019\u9009\u9879: + +# 0: symbol, 1: type, 2: type +compiler.note.deferred.method.inst=\u65B9\u6CD5 {0} \u7684\u5EF6\u8FDF\u5B9E\u4F8B\u5316\n\u5B9E\u4F8B\u5316\u7B7E\u540D: {1}\n\u76EE\u6807\u7C7B\u578B: {2} + ######################################## # Diagnostics for where clause implementation # used by the RichDiagnosticFormatter. @@ -1411,8 +1646,14 @@ # compact where clause for type variable: contains the kindname ({2}) and location ({3}) # in which the typevar has been declared +# 0: type, 1: list of type, 2: symbol kind, 3: symbol compiler.misc.where.typevar.1={0}\u5DF2\u5728{2} {3}\u4E2D\u58F0\u660E +# where clause for fresh type variable: contains upper bound(s) ('extends {1}'). +# Since a fresh type-variable is synthetic - there's no location/kindname here. +# 0: type, 1: list of type +compiler.misc.where.fresh.typevar={0}\u6269\u5C55{1} + # where clause for type variable: contains all the upper bound(s) ('extends {1}') # of this intersection type # 0: type, 1: list of type @@ -1435,4 +1676,39 @@ compiler.misc.where.description.intersection.1=\u5176\u4E2D, {0}\u662F\u4EA4\u53C9\u7C7B\u578B: - +### +# errors related to doc comments + +compiler.err.dc.bad.entity=HTML \u5B9E\u4F53\u9519\u8BEF + +compiler.err.dc.bad.gt=''>'' \u7684\u7528\u6CD5\u9519\u8BEF + +compiler.err.dc.bad.inline.tag=\u5185\u5D4C\u6807\u8BB0\u7684\u7528\u6CD5\u4E0D\u6B63\u786E + +compiler.err.dc.identifier.expected=\u9700\u8981\u6807\u8BC6\u7B26 + +compiler.err.dc.malformed.html=\u683C\u5F0F\u9519\u8BEF\u7684 HTML + +compiler.err.dc.missing.semicolon=\u7F3A\u5C11\u5206\u53F7 + +compiler.err.dc.no.content=\u65E0\u5185\u5BB9 + +compiler.err.dc.no.tag.name='@' \u540E\u6CA1\u6709\u6807\u8BB0\u540D + +compiler.err.dc.gt.expected=\u9700\u8981 ''>'' + +compiler.err.dc.ref.bad.parens=\u5F15\u7528\u4E2D\u7F3A\u5C11 '')'' + +compiler.err.dc.ref.syntax.error=\u5F15\u7528\u4E2D\u51FA\u73B0\u8BED\u6CD5\u9519\u8BEF + +compiler.err.dc.ref.unexpected.input=\u610F\u5916\u7684\u6587\u672C + +compiler.err.dc.unexpected.content=\u610F\u5916\u7684\u5185\u5BB9 + +compiler.err.dc.unterminated.inline.tag=\u672A\u7EC8\u6B62\u7684\u5185\u5D4C\u6807\u8BB0 + +compiler.err.dc.unterminated.signature=\u672A\u7EC8\u6B62\u7684\u7B7E\u540D + +compiler.err.dc.unterminated.string=\u672A\u7EC8\u6B62\u7684\u5B57\u7B26\u4E32 + + diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javac/resources/javac_ja.properties --- a/src/share/classes/com/sun/tools/javac/resources/javac_ja.properties Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/javac/resources/javac_ja.properties Mon Apr 01 21:42:15 2013 -0700 @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2012, 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,7 +30,7 @@ javac.opt.g.lines.vars.source=\u3044\u304F\u3064\u304B\u306E\u30C7\u30D0\u30C3\u30B0\u60C5\u5831\u306E\u307F\u3092\u751F\u6210\u3059\u308B javac.opt.nowarn=\u8B66\u544A\u3092\u767A\u751F\u3055\u305B\u306A\u3044 javac.opt.verbose=\u30B3\u30F3\u30D1\u30A4\u30E9\u306E\u52D5\u4F5C\u306B\u3064\u3044\u3066\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u3059\u308B -javac.opt.deprecation=\u63A8\u5968\u3055\u308C\u306A\u3044API\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u30BD\u30FC\u30B9\u306E\u4F4D\u7F6E\u3092\u51FA\u529B\u3059\u308B +javac.opt.deprecation=\u975E\u63A8\u5968\u306EAPI\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u30BD\u30FC\u30B9\u306E\u4F4D\u7F6E\u3092\u51FA\u529B\u3059\u308B javac.opt.classpath=\u30E6\u30FC\u30B6\u30FC\u30FB\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u304A\u3088\u3073\u6CE8\u91C8\u30D7\u30ED\u30BB\u30C3\u30B5\u3092\u691C\u7D22\u3059\u308B\u4F4D\u7F6E\u3092\u6307\u5B9A\u3059\u308B javac.opt.sourcepath=\u5165\u529B\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u4F4D\u7F6E\u3092\u6307\u5B9A\u3059\u308B javac.opt.bootclasspath=\u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30D1\u30B9\u306E\u4F4D\u7F6E\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B @@ -40,9 +40,11 @@ javac.opt.extdirs=\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u6E08\u307F\u62E1\u5F35\u6A5F\u80FD\u306E\u4F4D\u7F6E\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B javac.opt.processorpath=\u6CE8\u91C8\u30D7\u30ED\u30BB\u30C3\u30B5\u3092\u691C\u7D22\u3059\u308B\u4F4D\u7F6E\u3092\u6307\u5B9A\u3059\u308B javac.opt.processor=\u5B9F\u884C\u3059\u308B\u6CE8\u91C8\u30D7\u30ED\u30BB\u30C3\u30B5\u306E\u540D\u524D\u3002\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u691C\u51FA\u51E6\u7406\u3092\u30D0\u30A4\u30D1\u30B9 +javac.opt.parameters=\u30E1\u30BD\u30C3\u30C9\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF\u306B\u30EA\u30D5\u30EC\u30AF\u30B7\u30E7\u30F3\u7528\u306E\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u751F\u6210\u3057\u307E\u3059 javac.opt.proc.none.only=\u6CE8\u91C8\u51E6\u7406\u3084\u30B3\u30F3\u30D1\u30A4\u30EB\u3092\u5B9F\u884C\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002 javac.opt.d=\u751F\u6210\u3055\u308C\u305F\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u683C\u7D0D\u3059\u308B\u4F4D\u7F6E\u3092\u6307\u5B9A\u3059\u308B javac.opt.sourceDest=\u751F\u6210\u3055\u308C\u305F\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u683C\u7D0D\u3059\u308B\u5834\u6240\u3092\u6307\u5B9A\u3059\u308B +javac.opt.headerDest=\u751F\u6210\u3055\u308C\u305F\u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30D8\u30C3\u30C0\u30FC\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u683C\u7D0D\u3059\u308B\u5834\u6240\u3092\u6307\u5B9A\u3059\u308B javac.opt.J=\u3092\u5B9F\u884C\u30B7\u30B9\u30C6\u30E0\u306B\u76F4\u63A5\u6E21\u3059 javac.opt.encoding=\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u304C\u4F7F\u7528\u3059\u308B\u6587\u5B57\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3092\u6307\u5B9A\u3059\u308B javac.opt.target=\u7279\u5B9A\u306EVM\u30D0\u30FC\u30B8\u30E7\u30F3\u7528\u306E\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210\u3059\u308B @@ -61,6 +63,8 @@ javac.opt.arg.encoding= javac.opt.arg.release= javac.opt.arg.number= +javac.opt.plugin=\u5B9F\u884C\u3055\u308C\u308B\u30D7\u30E9\u30B0\u30A4\u30F3\u306E\u540D\u524D\u3068\u30AA\u30D7\u30B7\u30E7\u30F3\u5F15\u6570 +javac.opt.arg.plugin="name args" ## extended options @@ -80,6 +84,9 @@ javac.opt.arg.file= javac.opt.Xlint=\u63A8\u5968\u306E\u8B66\u544A\u3092\u6709\u52B9\u306B\u3059\u308B javac.opt.Xlint.suboptlist=\u7279\u5B9A\u306E\u8B66\u544A\u3092\u6709\u52B9\u307E\u305F\u306F\u7121\u52B9\u306B\u3059\u308B +javac.opt.Xdoclint=javadoc\u30B3\u30E1\u30F3\u30C8\u306E\u554F\u984C\u306B\u95A2\u3059\u308B\u63A8\u5968\u30C1\u30A7\u30C3\u30AF\u3092\u6709\u52B9\u306B\u3059\u308B +javac.opt.Xdoclint.subopts = (all|[-])[/] +javac.opt.Xdoclint.custom=\n javadoc\u30B3\u30E1\u30F3\u30C8\u306E\u554F\u984C\u306B\u95A2\u3059\u308B\u7279\u5B9A\u306E\u30C1\u30A7\u30C3\u30AF\u3092\u6709\u52B9\u307E\u305F\u306F\u7121\u52B9\u306B\u3057\u307E\u3059\u3002\n \u3053\u3053\u3067\u3001\u306Faccessibility\u3001html\u3001reference\u307E\u305F\u306Fsyntax\u306E\u3044\u305A\u308C\u304B\u3067\u3001\n \u306Fpublic\u3001protected\u3001package\u307E\u305F\u306Fprivate\u306E\u3044\u305A\u308C\u304B\u3067\u3059\u3002 javac.opt.Xstdout=\u6A19\u6E96\u51FA\u529B\u3092\u30EA\u30C0\u30A4\u30EC\u30AF\u30C8\u3059\u308B javac.opt.X=\u975E\u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u6982\u8981\u3092\u51FA\u529B\u3059\u308B javac.opt.help=\u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u6982\u8981\u3092\u51FA\u529B\u3059\u308B @@ -107,6 +114,7 @@ javac.err.file.not.found=\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0} javac.err.file.not.directory=\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u306F\u3042\u308A\u307E\u305B\u3093: {0} javac.err.file.not.file=\u30D5\u30A1\u30A4\u30EB\u3067\u306F\u3042\u308A\u307E\u305B\u3093: {0} +javac.msg.plugin.not.found=\u30D7\u30E9\u30B0\u30A4\u30F3\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0} ## messages javac.msg.usage.header=\u4F7F\u7528\u65B9\u6CD5: {0} \n\u4F7F\u7528\u53EF\u80FD\u306A\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u306F\u6B21\u306E\u3082\u306E\u304C\u3042\u308A\u307E\u3059\u3002 @@ -117,11 +125,13 @@ javac.msg.bug=\u30B3\u30F3\u30D1\u30A4\u30E9\u3067\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F({0})\u3002Bug Parade\u306B\u540C\u3058\u30D0\u30B0\u304C\u767B\u9332\u3055\u308C\u3066\u3044\u306A\u3044\u3053\u3068\u3092\u3054\u78BA\u8A8D\u306E\u4E0A\u3001Java Developer Connection(http://java.sun.com/webapps/bugreport)\u3067\u30D0\u30B0\u306E\u767B\u9332\u3092\u304A\u9858\u3044\u3044\u305F\u3057\u307E\u3059\u3002\u30EC\u30DD\u30FC\u30C8\u306B\u306F\u3001\u305D\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u3068\u4E0B\u8A18\u306E\u8A3A\u65AD\u5185\u5BB9\u3092\u542B\u3081\u3066\u304F\u3060\u3055\u3044\u3002\u3054\u5354\u529B\u3042\u308A\u304C\u3068\u3046\u3054\u3056\u3044\u307E\u3059\u3002 -javac.msg.io=\n\n\u5165\u51FA\u529B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\n\u8A73\u7D30\u306F\u6B21\u306E\u30B9\u30BF\u30C3\u30AF\u30C8\u30EC\u30FC\u30B9\u3067\u8ABF\u67FB\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n +javac.msg.io=\n\n\u5165\u51FA\u529B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\n\u8A73\u7D30\u306F\u6B21\u306E\u30B9\u30BF\u30C3\u30AF\u30FB\u30C8\u30EC\u30FC\u30B9\u3067\u8ABF\u67FB\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n + +javac.msg.proc.annotation.uncaught.exception=\n\n\u6CE8\u91C8\u51E6\u7406\u3067\u6355\u6349\u3055\u308C\u306A\u3044\u4F8B\u5916\u304C\u30B9\u30ED\u30FC\u3055\u308C\u307E\u3057\u305F\u3002\n\u8A73\u7D30\u306F\u6B21\u306E\u30B9\u30BF\u30C3\u30AF\u30FB\u30C8\u30EC\u30FC\u30B9\u3067\u8ABF\u67FB\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n -javac.msg.proc.annotation.uncaught.exception=\n\n\u6CE8\u91C8\u51E6\u7406\u3067\u6355\u6349\u3055\u308C\u306A\u3044\u4F8B\u5916\u304C\u30B9\u30ED\u30FC\u3055\u308C\u307E\u3057\u305F\u3002\n\u8A73\u7D30\u306F\u6B21\u306E\u30B9\u30BF\u30C3\u30AF\u30C8\u30EC\u30FC\u30B9\u3067\u8ABF\u67FB\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n +javac.msg.plugin.uncaught.exception=\n\n\u30D7\u30E9\u30B0\u30A4\u30F3\u3067\u6355\u6349\u3055\u308C\u306A\u3044\u4F8B\u5916\u304C\u30B9\u30ED\u30FC\u3055\u308C\u307E\u3057\u305F\u3002\n\u8A73\u7D30\u306F\u6B21\u306E\u30B9\u30BF\u30C3\u30AF\u30FB\u30C8\u30EC\u30FC\u30B9\u3067\u8ABF\u67FB\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n -javac.msg.resource=\n\n\u30B7\u30B9\u30C6\u30E0\u30FB\u30EA\u30BD\u30FC\u30B9\u304C\u4E0D\u8DB3\u3057\u3066\u3044\u307E\u3059\u3002\n\u8A73\u7D30\u306F\u6B21\u306E\u30B9\u30BF\u30C3\u30AF\u30C8\u30EC\u30FC\u30B9\u3067\u8ABF\u67FB\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n +javac.msg.resource=\n\n\u30B7\u30B9\u30C6\u30E0\u30FB\u30EA\u30BD\u30FC\u30B9\u304C\u4E0D\u8DB3\u3057\u3066\u3044\u307E\u3059\u3002\n\u8A73\u7D30\u306F\u6B21\u306E\u30B9\u30BF\u30C3\u30AF\u30FB\u30C8\u30EC\u30FC\u30B9\u3067\u8ABF\u67FB\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n javac.version={0} {1} javac.fullVersion={0}\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"{1}" diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties --- a/src/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties Mon Apr 01 21:42:15 2013 -0700 @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2012, 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 @@ -40,9 +40,11 @@ javac.opt.extdirs=\u8986\u76D6\u6240\u5B89\u88C5\u6269\u5C55\u7684\u4F4D\u7F6E javac.opt.processorpath=\u6307\u5B9A\u67E5\u627E\u6CE8\u91CA\u5904\u7406\u7A0B\u5E8F\u7684\u4F4D\u7F6E javac.opt.processor=\u8981\u8FD0\u884C\u7684\u6CE8\u91CA\u5904\u7406\u7A0B\u5E8F\u7684\u540D\u79F0; \u7ED5\u8FC7\u9ED8\u8BA4\u7684\u641C\u7D22\u8FDB\u7A0B +javac.opt.parameters=\u751F\u6210\u5143\u6570\u636E\u4EE5\u7528\u4E8E\u65B9\u6CD5\u53C2\u6570\u7684\u53CD\u5C04 javac.opt.proc.none.only=\u63A7\u5236\u662F\u5426\u6267\u884C\u6CE8\u91CA\u5904\u7406\u548C/\u6216\u7F16\u8BD1\u3002 javac.opt.d=\u6307\u5B9A\u653E\u7F6E\u751F\u6210\u7684\u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E javac.opt.sourceDest=\u6307\u5B9A\u653E\u7F6E\u751F\u6210\u7684\u6E90\u6587\u4EF6\u7684\u4F4D\u7F6E +javac.opt.headerDest=\u6307\u5B9A\u653E\u7F6E\u751F\u6210\u7684\u672C\u673A\u6807\u5934\u6587\u4EF6\u7684\u4F4D\u7F6E javac.opt.J=\u76F4\u63A5\u5C06 <\u6807\u8BB0> \u4F20\u9012\u7ED9\u8FD0\u884C\u65F6\u7CFB\u7EDF javac.opt.encoding=\u6307\u5B9A\u6E90\u6587\u4EF6\u4F7F\u7528\u7684\u5B57\u7B26\u7F16\u7801 javac.opt.target=\u751F\u6210\u7279\u5B9A VM \u7248\u672C\u7684\u7C7B\u6587\u4EF6 @@ -61,6 +63,8 @@ javac.opt.arg.encoding=<\u7F16\u7801> javac.opt.arg.release=<\u53D1\u884C\u7248> javac.opt.arg.number=<\u7F16\u53F7> +javac.opt.plugin=\u8981\u8FD0\u884C\u7684\u63D2\u4EF6\u7684\u540D\u79F0\u548C\u53EF\u9009\u53C2\u6570 +javac.opt.arg.plugin="\u540D\u79F0\u53C2\u6570" ## extended options @@ -80,6 +84,9 @@ javac.opt.arg.file=<\u6587\u4EF6\u540D> javac.opt.Xlint=\u542F\u7528\u5EFA\u8BAE\u7684\u8B66\u544A javac.opt.Xlint.suboptlist=\u542F\u7528\u6216\u7981\u7528\u7279\u5B9A\u7684\u8B66\u544A +javac.opt.Xdoclint=\u4E3A javadoc \u6CE8\u91CA\u4E2D\u7684\u95EE\u9898\u542F\u7528\u5EFA\u8BAE\u7684\u68C0\u67E5 +javac.opt.Xdoclint.subopts = (all|[-])[/] +javac.opt.Xdoclint.custom=\n \u4E3A javadoc \u6CE8\u91CA\u4E2D\u7684\u95EE\u9898\u542F\u7528\u6216\u7981\u7528\u7279\u5B9A\u68C0\u67E5,\n \u5176\u4E2D \u4E3A\u53EF\u8BBF\u95EE\u6027, html, \u5F15\u7528\u6216\u8BED\u6CD5\u4E4B\u4E00,\n \u4E3A public, protected, package \u6216 private \u4E4B\u4E00\u3002 javac.opt.Xstdout=\u91CD\u5B9A\u5411\u6807\u51C6\u8F93\u51FA javac.opt.X=\u8F93\u51FA\u975E\u6807\u51C6\u9009\u9879\u7684\u63D0\u8981 javac.opt.help=\u8F93\u51FA\u6807\u51C6\u9009\u9879\u7684\u63D0\u8981 @@ -107,6 +114,7 @@ javac.err.file.not.found=\u627E\u4E0D\u5230\u6587\u4EF6: {0} javac.err.file.not.directory=\u4E0D\u662F\u76EE\u5F55: {0} javac.err.file.not.file=\u4E0D\u662F\u6587\u4EF6: {0} +javac.msg.plugin.not.found=\u627E\u4E0D\u5230\u63D2\u4EF6: {0} ## messages javac.msg.usage.header=\u7528\u6CD5: {0} \n\u5176\u4E2D, \u53EF\u80FD\u7684\u9009\u9879\u5305\u62EC: @@ -121,6 +129,8 @@ javac.msg.proc.annotation.uncaught.exception=\n\n\u6CE8\u91CA\u5904\u7406\u7A0B\u5E8F\u629B\u51FA\u672A\u6355\u83B7\u7684\u5F02\u5E38\u9519\u8BEF\u3002\n\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605\u4EE5\u4E0B\u5806\u6808\u8DDF\u8E2A\u3002\n +javac.msg.plugin.uncaught.exception=\n\n\u63D2\u4EF6\u629B\u51FA\u672A\u6355\u83B7\u7684\u5F02\u5E38\u9519\u8BEF\u3002\n\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605\u4EE5\u4E0B\u5806\u6808\u8DDF\u8E2A\u3002\n + javac.msg.resource=\n\n\u7CFB\u7EDF\u8D44\u6E90\u4E0D\u8DB3\u3002\n\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605\u4EE5\u4E0B\u5806\u6808\u8DDF\u8E2A\u3002\n javac.version={0} {1} diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javac/sym/Profiles.java --- a/src/share/classes/com/sun/tools/javac/sym/Profiles.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/javac/sym/Profiles.java Mon Apr 01 21:42:15 2013 -0700 @@ -149,12 +149,13 @@ } final static Map packages = new TreeMap(); - int maxProfile; + + final int maxProfile = 4; // Three compact profiles plus full JRE MakefileProfiles(Properties p) { - int profile = 1; - while (true) { - String inclPackages = p.getProperty("PROFILE_" + profile + "_RTJAR_INCLUDE_PACKAGES"); + for (int profile = 1; profile <= maxProfile; profile++) { + String prefix = (profile < maxProfile ? "PROFILE_" + profile : "FULL_JRE"); + String inclPackages = p.getProperty(prefix + "_RTJAR_INCLUDE_PACKAGES"); if (inclPackages == null) break; for (String pkg: inclPackages.substring(1).trim().split("\\s+")) { @@ -162,22 +163,20 @@ pkg = pkg.substring(0, pkg.length() - 1); includePackage(profile, pkg); } - String inclTypes = p.getProperty("PROFILE_" + profile + "_RTJAR_INCLUDE_TYPES"); + String inclTypes = p.getProperty(prefix + "_RTJAR_INCLUDE_TYPES"); if (inclTypes != null) { for (String type: inclTypes.replace("$$", "$").split("\\s+")) { if (type.endsWith(".class")) includeType(profile, type.substring(0, type.length() - 6)); } } - String exclTypes = p.getProperty("PROFILE_" + profile + "_RTJAR_EXCLUDE_TYPES"); + String exclTypes = p.getProperty(prefix + "_RTJAR_EXCLUDE_TYPES"); if (exclTypes != null) { for (String type: exclTypes.replace("$$", "$").split("\\s+")) { if (type.endsWith(".class")) excludeType(profile, type.substring(0, type.length() - 6)); } } - maxProfile = profile; - profile++; } } diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javac/util/ArrayUtils.java --- a/src/share/classes/com/sun/tools/javac/util/ArrayUtils.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/javac/util/ArrayUtils.java Mon Apr 01 21:42:15 2013 -0700 @@ -85,17 +85,4 @@ } } - public static T[] concat(T[] anArr, T[] anotherArr) { - int newLength = anArr.length + anotherArr.length; - @SuppressWarnings("unchecked") - T[] result = (T[]) Array.newInstance(anArr.getClass().getComponentType(), newLength); - System.arraycopy(anArr, 0, result, 0, anArr.length); - System.arraycopy(anotherArr, 0, result, anArr.length, anotherArr.length); - return result; - } - - @SuppressWarnings("unchecked") - public static T[] concatOpen(T[] anArr, T... anotherArr) { - return concat(anArr, anotherArr); - } } diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java --- a/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java Mon Apr 01 21:42:15 2013 -0700 @@ -509,6 +509,16 @@ visit(supertype); visit(interfaces); } + } else if (t.tsym.name.isEmpty()) { + //anon class + ClassType norm = (ClassType) t.tsym.type; + if (norm != null) { + if (norm.interfaces_field != null && norm.interfaces_field.nonEmpty()) { + visit(norm.interfaces_field.head); + } else { + visit(norm.supertype_field); + } + } } nameSimplifier.addUsage(t.tsym); visit(t.getTypeArguments()); @@ -562,7 +572,7 @@ // /** * Preprocess a given symbol looking for (i) additional info (where clauses) to be - * asdded to the main diagnostic (ii) names to be compacted + * added to the main diagnostic (ii) names to be compacted */ protected void preprocessSymbol(Symbol s) { symbolPreprocessor.visit(s, null); diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javadoc/ExecutableMemberDocImpl.java --- a/src/share/classes/com/sun/tools/javadoc/ExecutableMemberDocImpl.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/javadoc/ExecutableMemberDocImpl.java Mon Apr 01 21:42:15 2013 -0700 @@ -205,7 +205,7 @@ if (recvtype == null) { return new AnnotationDesc[0]; } - if (recvtype.getKind() != TypeKind.ANNOTATED) { + if (!recvtype.isAnnotated()) { return new AnnotationDesc[0]; } List typeAnnos = ((com.sun.tools.javac.code.Type.AnnotatedType)recvtype).typeAnnotations; diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javadoc/TypeMaker.java --- a/src/share/classes/com/sun/tools/javadoc/TypeMaker.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/javadoc/TypeMaker.java Mon Apr 01 21:42:15 2013 -0700 @@ -65,11 +65,11 @@ t = env.types.erasure(t); } if (considerAnnotations - && t.getKind() == TypeKind.ANNOTATED) { + && t.isAnnotated()) { return new AnnotatedTypeImpl(env, (com.sun.tools.javac.code.Type.AnnotatedType) t); } - if (t.getKind() == TypeKind.ANNOTATED) { + if (t.isAnnotated()) { Type.AnnotatedType at = (Type.AnnotatedType) t; return new AnnotatedTypeImpl(env, at); } @@ -147,7 +147,7 @@ */ static String getTypeString(DocEnv env, Type t, boolean full) { // TODO: should annotations be included here? - if (t.getKind() == TypeKind.ANNOTATED) { + if (t.isAnnotated()) { Type.AnnotatedType at = (Type.AnnotatedType)t; t = at.underlyingType; } diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javadoc/TypeVariableImpl.java --- a/src/share/classes/com/sun/tools/javadoc/TypeVariableImpl.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/javadoc/TypeVariableImpl.java Mon Apr 01 21:42:15 2013 -0700 @@ -127,7 +127,7 @@ final Type upperBound = v.getUpperBound(); Name boundname = upperBound.tsym.getQualifiedName(); if (boundname == boundname.table.names.java_lang_Object - && upperBound.getKind() != TypeKind.ANNOTATED) { + && !upperBound.isAnnotated()) { return List.nil(); } else { return env.types.getBounds(v); @@ -139,7 +139,7 @@ * Return an empty array if there are none. */ public AnnotationDesc[] annotations() { - if (type.getKind() != TypeKind.ANNOTATED) { + if (!type.isAnnotated()) { return new AnnotationDesc[0]; } List tas = ((com.sun.tools.javac.code.Type.AnnotatedType) type).typeAnnotations; diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javadoc/resources/javadoc_ja.properties --- a/src/share/classes/com/sun/tools/javadoc/resources/javadoc_ja.properties Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/javadoc/resources/javadoc_ja.properties Mon Apr 01 21:42:15 2013 -0700 @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2012, 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 @@ -37,7 +37,6 @@ main.incompatible.access.flags=-public\u3001-private\u3001-package\u307E\u305F\u306F-protected\u306E\u3046\u3061\u306E2\u3064\u4EE5\u4E0A\u3092\u6307\u5B9A\u3057\u307E\u3057\u305F\u3002 main.cant.read={0}\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093 main.Loading_source_files_for_package=\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u306E\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u307F\u8FBC\u3093\u3067\u3044\u307E\u3059... -main.Loading_source_file_for_class=\u30AF\u30E9\u30B9{0}\u306E\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u307F\u8FBC\u3093\u3067\u3044\u307E\u3059... main.Loading_source_file=\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB{0}\u3092\u8AAD\u307F\u8FBC\u3093\u3067\u3044\u307E\u3059... main.Building_tree=Javadoc\u60C5\u5831\u3092\u69CB\u7BC9\u3057\u3066\u3044\u307E\u3059... main.no_source_files_for_package=\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u306E\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u304C\u3042\u308A\u307E\u305B\u3093 @@ -67,13 +66,12 @@ tag.see.can_not_find_member=\u30BF\u30B0{0}: {2}\u3067{1}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 tag.see.no_close_bracket_on_url=\u30BF\u30B0{0}: \u9589\u3058\u30BF\u30B0''>''\u304C\u3042\u308A\u307E\u305B\u3093: "{1}" tag.see.no_close_quote=\u30BF\u30B0{0}: \u9589\u3058\u5F15\u7528\u7B26\u304C\u3042\u308A\u307E\u305B\u3093: "{1}" -tag.see.class_not_found=@see\u30BF\u30B0\u7528\u306E\u30AF\u30E9\u30B9{0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: "{1}" tag.see.class_not_specified=\u30BF\u30B0{0}: \u30AF\u30E9\u30B9\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093: "{1}" tag.see.illegal_character=\u30BF\u30B0{0}: "{2}"\u306B\u4E0D\u6B63\u306A\u6587\u5B57"{1}"\u304C\u3042\u308A\u307E\u3059 tag.see.malformed_see_tag=\u30BF\u30B0{0}: \u66F8\u5F0F\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093: "{1}" -tag.throws.exception_not_found={0}\u30BF\u30B0\u3001\u30AF\u30E9\u30B9{1}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002 tag.End_delimiter_missing_for_possible_SeeTag=\u30B3\u30E1\u30F3\u30C8\u6587\u5B57\u5217"{0}"\u3067\u3001\u6709\u52B9\u306Asee\u30BF\u30B0\u306B\u7D42\u7AEF\u30C7\u30EA\u30DF\u30BF}\u304C\u3042\u308A\u307E\u305B\u3093 tag.Improper_Use_Of_Link_Tag=\u30A4\u30F3\u30E9\u30A4\u30F3\u30FB\u30BF\u30B0"{0}"\u306B\u7D42\u4E86\u6587\u5B57''}''\u304C\u3042\u308A\u307E\u305B\u3093 +tag.serialField.illegal_character=@serialField\u30BF\u30B0\u306B\u4E0D\u6B63\u306A\u6587\u5B57{0}\u304C\u3042\u308A\u307E\u3059: {1}\u3002 javadoc.File_Read_Error=\u30D5\u30A1\u30A4\u30EB{0}\u306E\u8AAD\u8FBC\u307F\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F javadoc.Body_missing_from_html_file=HTML\u306Bbody\u30BF\u30B0\u304C\u3042\u308A\u307E\u305B\u3093 javadoc.End_body_missing_from_html_file=HTML\u30D5\u30A1\u30A4\u30EB\u306Bbody\u306E\u9589\u3058\u30BF\u30B0\u304C\u3042\u308A\u307E\u305B\u3093 @@ -81,4 +79,8 @@ javadoc.class_not_found=\u30AF\u30E9\u30B9{0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002 javadoc.error=\u30A8\u30E9\u30FC javadoc.warning=\u8B66\u544A -tag.serialField.illegal_character=@serialField\u30BF\u30B0\u306B\u4E0D\u6B63\u306A\u6587\u5B57{0}\u304C\u3042\u308A\u307E\u3059: {1}\u3002 + +javadoc.error.msg={0}: \u30A8\u30E9\u30FC - {1} +javadoc.warning.msg={0}: \u8B66\u544A - {1} +javadoc.note.msg = {1} +javadoc.note.pos.msg= {0}: {1} diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javadoc/resources/javadoc_zh_CN.properties --- a/src/share/classes/com/sun/tools/javadoc/resources/javadoc_zh_CN.properties Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/javadoc/resources/javadoc_zh_CN.properties Mon Apr 01 21:42:15 2013 -0700 @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2012, 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 @@ -37,7 +37,6 @@ main.incompatible.access.flags=\u6307\u5B9A\u4E86\u591A\u4E2A -public, -private, -package \u6216 -protected\u3002 main.cant.read=\u65E0\u6CD5\u8BFB\u53D6{0} main.Loading_source_files_for_package=\u6B63\u5728\u52A0\u8F7D\u7A0B\u5E8F\u5305{0}\u7684\u6E90\u6587\u4EF6... -main.Loading_source_file_for_class=\u6B63\u5728\u52A0\u8F7D\u7C7B{0}\u7684\u6E90\u6587\u4EF6... main.Loading_source_file=\u6B63\u5728\u52A0\u8F7D\u6E90\u6587\u4EF6{0}... main.Building_tree=\u6B63\u5728\u6784\u9020 Javadoc \u4FE1\u606F... main.no_source_files_for_package=\u6CA1\u6709\u7A0B\u5E8F\u5305{0}\u7684\u6E90\u6587\u4EF6 @@ -67,13 +66,12 @@ tag.see.can_not_find_member=\u6807\u8BB0{0}: \u5728{2}\u4E2D\u627E\u4E0D\u5230{1} tag.see.no_close_bracket_on_url=\u6807\u8BB0{0}: \u7F3A\u5C11\u6700\u540E\u7684 ''>'': "{1}" tag.see.no_close_quote=\u6807\u8BB0{0}: \u65E0\u53F3\u5F15\u53F7: "{1}" -tag.see.class_not_found=\u627E\u4E0D\u5230 @see \u6807\u8BB0\u7684\u7C7B{0}: "{1}" tag.see.class_not_specified=\u6807\u8BB0{0}: \u672A\u6307\u5B9A\u7C7B: "{1}" tag.see.illegal_character=\u6807\u8BB0{0}: "{2}" \u4E2D\u7684 "{1}" \u4E3A\u975E\u6CD5\u5B57\u7B26 tag.see.malformed_see_tag=\u6807\u8BB0{0}: \u683C\u5F0F\u9519\u8BEF: "{1}" -tag.throws.exception_not_found=\u6807\u8BB0{0}: \u627E\u4E0D\u5230\u7C7B{1}\u3002 tag.End_delimiter_missing_for_possible_SeeTag=\u6CE8\u91CA\u5B57\u7B26\u4E32\u4E2D\u53EF\u80FD\u51FA\u73B0\u7684 See \u6807\u8BB0\u7F3A\u5C11\u7ED3\u675F\u5206\u9694\u7B26 }: "{0}" tag.Improper_Use_Of_Link_Tag=\u5185\u5D4C\u6807\u8BB0\u7F3A\u5C11\u7ED3\u675F ''}'' \u5B57\u7B26: "{0}" +tag.serialField.illegal_character=@serialField \u6807\u8BB0\u4E2D\u7684\u975E\u6CD5\u5B57\u7B26 {0}: {1}\u3002 javadoc.File_Read_Error=\u8BFB\u53D6\u6587\u4EF6{0}\u65F6\u51FA\u9519 javadoc.Body_missing_from_html_file=HTML \u6587\u4EF6\u4E2D\u7F3A\u5C11\u4E3B\u4F53\u6807\u8BB0 javadoc.End_body_missing_from_html_file=HTML \u6587\u4EF6\u4E2D\u7F3A\u5C11\u4E3B\u4F53\u7ED3\u675F\u6807\u8BB0 @@ -81,4 +79,8 @@ javadoc.class_not_found=\u627E\u4E0D\u5230\u7C7B{0}\u3002 javadoc.error=\u9519\u8BEF javadoc.warning=\u8B66\u544A -tag.serialField.illegal_character=@serialField \u6807\u8BB0\u4E2D\u7684\u975E\u6CD5\u5B57\u7B26 {0}: {1}\u3002 + +javadoc.error.msg={0}: \u9519\u8BEF - {1} +javadoc.warning.msg={0}: \u8B66\u544A - {1} +javadoc.note.msg = {1} +javadoc.note.pos.msg= {0}: {1} diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javah/Util.java --- a/src/share/classes/com/sun/tools/javah/Util.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/javah/Util.java Mon Apr 01 21:42:15 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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 @@ -144,10 +144,6 @@ throw new Exit(15); } - private void fatal(String msg) throws Exit { - fatal(msg, null); - } - private void fatal(String msg, Exception e) throws Exit { dl.report(createDiagnostic(Diagnostic.Kind.ERROR, "", msg)); throw new Exit(10, e); diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javah/resources/l10n_ja.properties --- a/src/share/classes/com/sun/tools/javah/resources/l10n_ja.properties Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/javah/resources/l10n_ja.properties Mon Apr 01 21:42:15 2013 -0700 @@ -1,5 +1,5 @@ # -# Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2010, 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 @@ -33,10 +33,10 @@ old.jni.mixed=\u30AA\u30D7\u30B7\u30E7\u30F3-jni\u3068-old\u3092\u540C\u6642\u306B\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002-help\u3067\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002 old.llni.mixed=\u30AA\u30D7\u30B7\u30E7\u30F3-old\u3068-llni\u3092\u540C\u6642\u306B\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002-help\u3067\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002 old.not.supported=\u3053\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u306Ejavah\u3067\u306F\u30AA\u30D7\u30B7\u30E7\u30F3-old\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002 -invalid.method.signature=\u7121\u52B9\u306A\u30E1\u30BD\u30C3\u30C9\u30FB\u30B7\u30B0\u30CB\u30C1\u30E3: {0} +invalid.method.signature=\u7121\u52B9\u306A\u30E1\u30BD\u30C3\u30C9\u30FB\u30B7\u30B0\u30CD\u30C1\u30E3: {0} jni.llni.mixed=\u30AA\u30D7\u30B7\u30E7\u30F3-jni\u3068-llni\u3092\u540C\u6642\u306B\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002-help\u3067\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002 jni.no.stubs=JNI\u306F\u30B9\u30BF\u30D6\u3092\u5FC5\u8981\u3068\u3057\u307E\u305B\u3093\u3002JNI\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002 -jni.sigerror={0}\u306E\u7F72\u540D\u3092\u5224\u5B9A\u3067\u304D\u307E\u305B\u3093 +jni.sigerror={0}\u306E\u30B7\u30B0\u30CD\u30C1\u30E3\u3092\u5224\u5225\u3067\u304D\u307E\u305B\u3093 dir.file.mixed=\u30AA\u30D7\u30B7\u30E7\u30F3-d\u3068-o\u3092\u540C\u6642\u306B\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002-help\u3067\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002 no.classes.specified=\u30B3\u30DE\u30F3\u30C9\u30E9\u30A4\u30F3\u3067\u30AF\u30E9\u30B9\u304C\u6307\u5B9A\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002-help\u3067\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002 no.outputfile.specified=\u30B3\u30DE\u30F3\u30C9\u30E9\u30A4\u30F3\u3067\u51FA\u529B\u30D5\u30A1\u30A4\u30EB\u304C\u6307\u5B9A\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002-help\u3067\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002 @@ -51,7 +51,7 @@ # usage=\u4F7F\u7528\u65B9\u6CD5: javah [options] \n\n[options]\u306B\u306F\u6B21\u306E\u3082\u306E\u304C\u3042\u308A\u307E\u3059\u3002\n\n\t-help \u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3057\u3066\u7D42\u4E86\u3059\u308B\n\t-classpath \u30AF\u30E9\u30B9\u3092\u30ED\u30FC\u30C9\u3059\u308B\u30D1\u30B9\n\t-bootclasspath \u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u3092\u30ED\u30FC\u30C9\u3059\u308B\u30D1\u30B9\n\t-d \u51FA\u529B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\n\t-o \u51FA\u529B\u30D5\u30A1\u30A4\u30EB(-d\u304B-o\u306E\u3069\u3061\u3089\u304B\u4E00\u65B9\u3092\u4F7F\u7528\u3059\u308B)\n\t-jni JNI\u5F62\u5F0F\u306E\u30D8\u30C3\u30C0\u30FC\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210\u3059\u308B(\u30C7\u30D5\u30A9\u30EB\u30C8)\n\t-version \u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\u8868\u793A\u3059\u308B\n\t-verbose \u8A73\u7D30\u306A\u51FA\u529B\u3092\u884C\u3046\n\t-force \u5E38\u306B\u51FA\u529B\u30D5\u30A1\u30A4\u30EB\u3092\u66F8\u304D\u8FBC\u3080\n\n \u306F\u5B8C\u5168\u6307\u5B9A\u306E\u540D\u524D\u3067\u6307\u5B9A\u3057\u307E\u3059\n(java.lang.Object\u306A\u3069)\u3002\n -main.usage=\u4F7F\u7528\u65B9\u6CD5: \n\ javah [options] \n[options]\u306B\u306F\u6B21\u306E\u3082\u306E\u304C\u3042\u308A\u307E\u3059\u3002 +main.usage=\u4F7F\u7528\u65B9\u6CD5: \n javah [options] \n[options]\u306B\u306F\u6B21\u306E\u3082\u306E\u304C\u3042\u308A\u307E\u3059\u3002 main.opt.o=\ -o \u51FA\u529B\u30D5\u30A1\u30A4\u30EB(-d\u304B-o\u306E\u3069\u3061\u3089\u304B\u4E00\u65B9\u3092\u4F7F\u7528\u3059\u308B) main.opt.d=\ -d \u51FA\u529B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA main.opt.v=\ -v -verbose \u8A73\u7D30\u306A\u51FA\u529B\u3092\u884C\u3046 diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javah/resources/l10n_zh_CN.properties --- a/src/share/classes/com/sun/tools/javah/resources/l10n_zh_CN.properties Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/javah/resources/l10n_zh_CN.properties Mon Apr 01 21:42:15 2013 -0700 @@ -1,5 +1,5 @@ # -# Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2010, 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 @@ -51,7 +51,7 @@ # usage=\u7528\u6CD5: javah [options] \n\n\u5176\u4E2D, [options] \u5305\u62EC:\n\n\t-help \u8F93\u51FA\u6B64\u5E2E\u52A9\u6D88\u606F\u5E76\u9000\u51FA\n\t-classpath \u4ECE\u4E2D\u52A0\u8F7D\u7C7B\u7684\u8DEF\u5F84\n\t-bootclasspath \u4ECE\u4E2D\u52A0\u8F7D\u5F15\u5BFC\u7C7B\u7684\u8DEF\u5F84\n\t-d \u8F93\u51FA\u76EE\u5F55\n\t-o \u8F93\u51FA\u6587\u4EF6 (\u53EA\u80FD\u4F7F\u7528 -d \u6216 -o \u4E4B\u4E00)\n\t-jni \u751F\u6210 JNI \u6837\u5F0F\u7684\u6807\u5934\u6587\u4EF6 (\u9ED8\u8BA4\u503C)\n\t-version \u8F93\u51FA\u7248\u672C\u4FE1\u606F\n\t-verbose \u542F\u7528\u8BE6\u7EC6\u8F93\u51FA\n\t-force \u59CB\u7EC8\u5199\u5165\u8F93\u51FA\u6587\u4EF6\n\n \u662F\u4F7F\u7528\u5176\u5168\u9650\u5B9A\u540D\u79F0\u6307\u5B9A\u7684,\n(\u4F8B\u5982 java.lang.Object)\u3002\n -main.usage=\u7528\u6CD5: \n\ javah [options] \n\u5176\u4E2D, [options] \u5305\u62EC: +main.usage=\u7528\u6CD5: \n javah [options] \n\u5176\u4E2D, [options] \u5305\u62EC: main.opt.o=\ -o \u8F93\u51FA\u6587\u4EF6 (\u53EA\u80FD\u4F7F\u7528 -d \u6216 -o \u4E4B\u4E00) main.opt.d=\ -d \u8F93\u51FA\u76EE\u5F55 main.opt.v=\ -v -verbose \u542F\u7528\u8BE6\u7EC6\u8F93\u51FA diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/javap/StackMapWriter.java --- a/src/share/classes/com/sun/tools/javap/StackMapWriter.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/javap/StackMapWriter.java Mon Apr 01 21:42:15 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 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 @@ -269,7 +269,7 @@ } - class StackMap { + static class StackMap { StackMap(verification_type_info[] locals, verification_type_info[] stack) { this.locals = locals; this.stack = stack; @@ -279,7 +279,7 @@ private final verification_type_info[] stack; } - class CustomVerificationTypeInfo extends verification_type_info { + static class CustomVerificationTypeInfo extends verification_type_info { public CustomVerificationTypeInfo(String text) { super(-1); this.text = text; diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/jdeps/Analyzer.java --- a/src/share/classes/com/sun/tools/jdeps/Analyzer.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/jdeps/Analyzer.java Mon Apr 01 21:42:15 2013 -0700 @@ -91,9 +91,11 @@ result.requiredArchives.add(source); } // either a profile name or the archive name - String tname = getProfile(target); - if (tname.isEmpty()){ - tname = source.toString(); + String tname = result.getTargetProfile(target); + if (tname.isEmpty()) { + tname = PlatformClassPath.contains(source) + ? "JDK internal API (" + source.getFileName() + ")" + : source.toString(); } if (!result.targetNames.contains(tname)) { result.targetNames.add(tname); @@ -110,7 +112,7 @@ * a fully-qualified classname, a package name, a profile or * archive name depending on the Analyzer's type. */ - void visit(String origin, String target); + void visit(String origin, String target, String profile); /** * Visits the source archive to its destination archive of * a recorded dependency. @@ -124,7 +126,7 @@ v.visit(r.archive, a); } for (String name : r.targetNames) { - v.visit(r.archive.getFileName(), name); + v.visit(r.archive.getFileName(), name, name); } } } @@ -138,7 +140,7 @@ for (String target : r.deps.get(origin)) { // filter intra-dependency unless in verbose mode if (type == Type.VERBOSE || getArchive(origin) != getArchive(target)) { - v.visit(origin, target); + v.visit(origin, target, r.getTargetProfile(target)); } } } @@ -149,21 +151,16 @@ return map.containsKey(name) ? map.get(name) : NOT_FOUND; } - public String getArchiveName(String name) { - return getArchive(name).getFileName(); - } - - public String getProfile(String name) { - String pn = type == Type.CLASS ? packageOf(name) : name; - Archive source = map.get(name); - if (source != null && PlatformClassPath.contains(source)) { - String profile = PlatformClassPath.getProfileName(pn); - if (profile.isEmpty()) { - return "JDK internal API (" + source.getFileName() + ")"; - } - return profile; - } - return ""; + /** + * Returns the file name of the archive for non-JRE class or + * internal JRE classes. It returns empty string for SE API. + */ + public String getArchiveName(String target, String profile) { + Archive source = getArchive(target); + String name = source.getFileName(); + if (PlatformClassPath.contains(source)) + return profile.isEmpty() ? "JDK internal API (" + name + ")" : ""; + return name; } private abstract class ArchiveDeps implements Archive.Visitor { @@ -200,6 +197,8 @@ } public abstract void visit(Location o, Location t); + public abstract String getTargetProfile(String target); + } private class ClassVisitor extends ArchiveDeps { @@ -212,6 +211,10 @@ public void visit(Location o, Location t) { add(o.getClassName(), t.getClassName()); } + public String getTargetProfile(String target) { + int i = target.lastIndexOf('.'); + return (i > 0) ? Profiles.getProfileName(target.substring(0, i)) : ""; + } } private class PackageVisitor extends ArchiveDeps { @@ -221,19 +224,15 @@ public void visit(Location o, Location t) { add(packageOf(o), packageOf(t)); } - public void visit(Location l) { add(packageOf(l)); } - private String packageOf(Location loc) { String pkg = loc.getPackageName(); return pkg.isEmpty() ? "" : pkg; } - } - - private static String packageOf(String cn) { - int i = cn.lastIndexOf('.'); - return (i > 0) ? cn.substring(0, i) : ""; + public String getTargetProfile(String target) { + return Profiles.getProfileName(target); + } } } diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/jdeps/ClassFileReader.java --- a/src/share/classes/com/sun/tools/jdeps/ClassFileReader.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/jdeps/ClassFileReader.java Mon Apr 01 21:42:15 2013 -0700 @@ -59,6 +59,13 @@ } } + /** + * Returns a ClassFileReader instance of a given JarFile. + */ + public static ClassFileReader newInstance(Path path, JarFile jf) throws IOException { + return new JarFileReader(path, jf); + } + protected final Path path; protected final String baseFileName; private ClassFileReader(Path path) { @@ -228,8 +235,11 @@ private static class JarFileReader extends ClassFileReader { final JarFile jarfile; JarFileReader(Path path) throws IOException { + this(path, new JarFile(path.toFile())); + } + JarFileReader(Path path, JarFile jf) throws IOException { super(path); - this.jarfile = new JarFile(path.toFile()); + this.jarfile = jf; } public ClassFile getClassFile(String name) throws IOException { diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/jdeps/JdepsTask.java --- a/src/share/classes/com/sun/tools/jdeps/JdepsTask.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/jdeps/JdepsTask.java Mon Apr 01 21:42:15 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 @@ -38,7 +38,7 @@ * Implementation for the jdeps tool for static class dependency analysis. */ class JdepsTask { - class BadArgs extends Exception { + static class BadArgs extends Exception { static final long serialVersionUID = 8765093759964640721L; BadArgs(String key, Object... args) { super(JdepsTask.getMessage(key, args)); @@ -119,7 +119,7 @@ } else if ("class".equals(arg)) { task.options.verbose = Analyzer.Type.CLASS; } else { - throw task.new BadArgs("err.invalid.arg.for.option", opt); + throw new BadArgs("err.invalid.arg.for.option", opt); } } }, @@ -139,8 +139,11 @@ } }, new Option(false, "-P", "--profile") { - void process(JdepsTask task, String opt, String arg) { + void process(JdepsTask task, String opt, String arg) throws BadArgs { task.options.showProfile = true; + if (Profiles.getProfileCount() == 0) { + throw new BadArgs("err.option.unsupported", opt, getMessage("err.profiles.msg")); + } } }, new Option(false, "-R", "--recursive") { @@ -153,7 +156,7 @@ try { task.options.depth = Integer.parseInt(arg); } catch (NumberFormatException e) { - throw task.new BadArgs("err.invalid.arg.for.option", opt); + throw new BadArgs("err.invalid.arg.for.option", opt); } } }, @@ -382,9 +385,9 @@ private void printSummary(final PrintWriter out, final Analyzer analyzer) { Analyzer.Visitor visitor = new Analyzer.Visitor() { - public void visit(String origin, String profile) { + public void visit(String origin, String target, String profile) { if (options.showProfile) { - out.format("%-30s -> %s%n", origin, profile); + out.format("%-30s -> %s%n", origin, target); } } public void visit(Archive origin, Archive target) { @@ -399,17 +402,15 @@ private void printDependencies(final PrintWriter out, final Analyzer analyzer) { Analyzer.Visitor visitor = new Analyzer.Visitor() { private String pkg = ""; - public void visit(String origin, String target) { + public void visit(String origin, String target, String profile) { if (!origin.equals(pkg)) { pkg = origin; - out.format(" %s (%s)%n", origin, analyzer.getArchiveName(origin)); + out.format(" %s (%s)%n", origin, analyzer.getArchive(origin).getFileName()); } - Archive source = analyzer.getArchive(target); - String profile = options.showProfile ? analyzer.getProfile(target) : ""; out.format(" -> %-50s %s%n", target, - PlatformClassPath.contains(source) + (options.showProfile && !profile.isEmpty()) ? profile - : analyzer.getArchiveName(target)); + : analyzer.getArchiveName(target, profile)); } public void visit(Archive origin, Archive target) { out.format("%s -> %s%n", origin, target); @@ -514,7 +515,6 @@ boolean help; boolean version; boolean fullVersion; - boolean showFlags; boolean showProfile; boolean showSummary; boolean wildcard; diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/jdeps/PlatformClassPath.java --- a/src/share/classes/com/sun/tools/jdeps/PlatformClassPath.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/jdeps/PlatformClassPath.java Mon Apr 01 21:42:15 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 @@ -37,34 +37,6 @@ * ClassPath for Java SE and JDK */ class PlatformClassPath { - /* - * Profiles for Java SE - * - * This is a temporary workaround until a common API is defined for langtools - * to determine which profile a given classname belongs to. The list of - * packages and profile names are hardcoded in jdk.properties and - * split packages are not supported. - */ - static class Profile { - final String name; - final Set packages; - - Profile(String name) { - this.name = name; - this.packages = new HashSet(); - } - } - - private final static String JAVAFX = "javafx"; - private final static Map map = getProfilePackages(); - static String getProfileName(String packageName) { - Profile profile = map.get(packageName); - if (packageName.startsWith(JAVAFX + ".")) { - profile = map.get(JAVAFX); - } - return profile != null ? profile.name : ""; - } - private final static List javaHomeArchives = init(); static List getArchives() { return javaHomeArchives; @@ -77,7 +49,6 @@ private static List init() { List result = new ArrayList(); String javaHome = System.getProperty("java.home"); - List files = new ArrayList(); File jre = new File(javaHome, "jre"); File lib = new File(javaHome, "lib"); @@ -100,13 +71,6 @@ } catch (IOException e) { throw new RuntimeException(e); } - - // add a JavaFX profile if there is jfxrt.jar - for (Archive archive : result) { - if (archive.getFileName().equals("jfxrt.jar")) { - map.put(JAVAFX, new Profile("jfxrt.jar")); - } - } return result; } @@ -140,30 +104,4 @@ }); return result; } - - private static Map getProfilePackages() { - Map map = new HashMap(); - - // read the properties as a ResourceBundle as the build compiles - // the properties file into Java class. Another alternative is - // to load it as Properties and fix the build to exclude this file. - ResourceBundle profileBundle = - ResourceBundle.getBundle("com.sun.tools.jdeps.resources.jdk"); - - int i=1; - String key; - while (profileBundle.containsKey((key = "profile." + i + ".name"))) { - Profile profile = new Profile(profileBundle.getString(key)); - String n = profileBundle.getString("profile." + i + ".packages"); - String[] pkgs = n.split("\\s+"); - for (String p : pkgs) { - if (p.isEmpty()) continue; - assert(map.containsKey(p) == false); - profile.packages.add(p); - map.put(p, profile); - } - i++; - } - return map; - } } diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/jdeps/Profiles.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/share/classes/com/sun/tools/jdeps/Profiles.java Mon Apr 01 21:42:15 2013 -0700 @@ -0,0 +1,241 @@ +/* + * 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * 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 com.sun.tools.jdeps; + +import com.sun.tools.classfile.Annotation; +import com.sun.tools.classfile.Annotation.*; +import com.sun.tools.classfile.Attribute; +import com.sun.tools.classfile.ClassFile; +import com.sun.tools.classfile.ConstantPool; +import com.sun.tools.classfile.ConstantPool.*; +import com.sun.tools.classfile.ConstantPoolException; +import com.sun.tools.classfile.RuntimeAnnotations_attribute; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.*; +import java.util.jar.JarFile; + +/** + * Build the profile information from ct.sym if exists. + */ +class Profiles { + private static final Map map = initProfiles(); + /** + * Returns the name of the profile for the given package name. + * It returns an empty string if the given package is not in any profile. + */ + public static String getProfileName(String pn) { + Profile profile = map.get(pn); + return (profile != null && profile.packages.contains(pn)) + ? profile.name : ""; + } + + public static int getProfileCount() { + return new HashSet(map.values()).size(); + } + + private static Map initProfiles() { + List profiles = new ArrayList(); + try { + String profilesProps = System.getProperty("jdeps.profiles"); + if (profilesProps != null) { + // for testing for JDK development build where ct.sym doesn't exist + initProfilesFromProperties(profiles, profilesProps); + } else { + Path home = Paths.get(System.getProperty("java.home")); + if (home.endsWith("jre")) { + home = home.getParent(); + } + Path ctsym = home.resolve("lib").resolve("ct.sym"); + if (ctsym.toFile().exists()) { + // add a default Full JRE + profiles.add(0, new Profile("Full JRE", 0)); + // parse ct.sym and load information about profiles + try (JarFile jf = new JarFile(ctsym.toFile())) { + ClassFileReader reader = ClassFileReader.newInstance(ctsym, jf); + for (ClassFile cf : reader.getClassFiles()) { + findProfile(profiles, cf); + } + } + + // merge the last Profile with the "Full JRE" + if (profiles.size() > 1) { + Profile fullJRE = profiles.get(0); + Profile p = profiles.remove(profiles.size() - 1); + for (String pn : fullJRE.packages) { + // The last profile contains the packages determined from ct.sym. + // Move classes annotated profile==0 or no attribute that are + // added in the fullJRE profile to either supported or proprietary + // packages appropriately + if (p.proprietaryPkgs.contains(pn)) { + p.proprietaryPkgs.add(pn); + } else { + p.packages.add(pn); + } + } + fullJRE.packages.clear(); + fullJRE.proprietaryPkgs.clear(); + fullJRE.packages.addAll(p.packages); + fullJRE.proprietaryPkgs.addAll(p.proprietaryPkgs); + } + } + } + } catch (IOException | ConstantPoolException e) { + throw new Error(e); + } + HashMap map = new HashMap(); + for (Profile profile : profiles) { + // Inner classes are not annotated with the profile annotation + // packages may be in one profile but also appear in the Full JRE + // Full JRE is always the first element in profiles list and + // so the map will contain the appropriate Profile + for (String pn : profile.packages) { + map.put(pn, profile); + } + for (String pn : profile.proprietaryPkgs) { + map.put(pn, profile); + } + } + return map; + } + + private static final String PROFILE_ANNOTATION = "Ljdk/Profile+Annotation;"; + private static final String PROPRIETARY_ANNOTATION = "Lsun/Proprietary+Annotation;"; + private static Profile findProfile(List profiles, ClassFile cf) + throws ConstantPoolException + { + RuntimeAnnotations_attribute attr = (RuntimeAnnotations_attribute) + cf.attributes.get(Attribute.RuntimeInvisibleAnnotations); + int index = 0; + boolean proprietary = false; + if (attr != null) { + for (int i = 0; i < attr.annotations.length; i++) { + Annotation ann = attr.annotations[i]; + String annType = cf.constant_pool.getUTF8Value(ann.type_index); + if (PROFILE_ANNOTATION.equals(annType)) { + for (int j = 0; j < ann.num_element_value_pairs; j++) { + Annotation.element_value_pair pair = ann.element_value_pairs[j]; + Primitive_element_value ev = (Primitive_element_value)pair.value; + CONSTANT_Integer_info info = (CONSTANT_Integer_info) + cf.constant_pool.get(ev.const_value_index); + index = info.value; + break; + } + } else if (PROPRIETARY_ANNOTATION.equals(annType)) { + proprietary = true; + } + } + if (index >= profiles.size()) { + Profile p = null; + for (int i = profiles.size(); i <= index; i++) { + p = new Profile(i); + profiles.add(p); + } + } + } + + Profile p = profiles.get(index); + String name = cf.getName(); + int i = name.lastIndexOf('/'); + name = (i > 0) ? name.substring(0, i).replace('/','.') : ""; + if (proprietary) { + p.proprietaryPkgs.add(name); + } else { + p.packages.add(name); + } + return p; + } + + private static void initProfilesFromProperties(List profiles, String path) + throws IOException + { + Properties props = new Properties(); + try (FileReader reader = new FileReader(path)) { + props.load(reader); + } + int i=1; + String key; + while (props.containsKey((key = "profile." + i + ".name"))) { + Profile profile = new Profile(props.getProperty(key), i); + profiles.add(profile); + String n = props.getProperty("profile." + i + ".packages"); + String[] pkgs = n.split("\\s+"); + for (String p : pkgs) { + if (p.isEmpty()) continue; + profile.packages.add(p); + } + i++; + } + } + + private static class Profile { + final String name; + final int profile; + final Set packages; + final Set proprietaryPkgs; + Profile(int profile) { + this("compact" + profile, profile); + } + Profile(String name, int profile) { + this.name = name; + this.profile = profile; + this.packages = new HashSet(); + this.proprietaryPkgs = new HashSet(); + } + public String toString() { + return name; + } + } + + // for debugging + public static void main(String[] args) { + if (args.length == 0) { + Profile[] profiles = new Profile[getProfileCount()]; + for (Profile p : map.values()) { + // move the zeroth profile to the last + int index = p.profile == 0 ? profiles.length-1 : p.profile-1; + profiles[index] = p; + } + for (Profile p : profiles) { + String profileName = p.name; + SortedSet set = new TreeSet(p.packages); + for (String s : set) { + // filter out the inner classes that are not annotated with + // the profile annotation + if (map.get(s) == p) { + System.out.format("%-10s %s%n", profileName, s); + profileName = ""; + } + } + } + } + for (String pn : args) { + System.out.format("%s in %s%n", pn, getProfileName(pn)); + } + } +} diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/jdeps/resources/jdeps.properties --- a/src/share/classes/com/sun/tools/jdeps/resources/jdeps.properties Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/jdeps/resources/jdeps.properties Mon Apr 01 21:42:15 2013 -0700 @@ -51,6 +51,8 @@ err.internal.error=internal error: {0} {1} {2} err.invalid.arg.for.option=invalid argument for option: {0} err.option.after.class=option must be specified before classes: {0} +err.option.unsupported={0} not supported: {1} +err.profiles.msg=No profile information warn.invalid.arg=Invalid classname or pathname not exist: {0} warn.split.package=package {0} defined in {1} {2} diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/jdeps/resources/jdk.properties --- a/src/share/classes/com/sun/tools/jdeps/resources/jdk.properties Thu Mar 28 10:55:14 2013 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,262 +0,0 @@ -# This properties file does not need localization. - -profile.1.name = compact1 -profile.1.packages = \ - java.io \ - java.lang \ - java.lang.annotation \ - java.lang.invoke \ - java.lang.ref \ - java.lang.reflect \ - java.math \ - java.net \ - java.nio \ - java.nio.channels \ - java.nio.channels.spi \ - java.nio.charset \ - java.nio.charset.spi \ - java.nio.file \ - java.nio.file.attribute \ - java.nio.file.spi \ - java.security \ - java.security.cert \ - java.security.interfaces \ - java.security.spec \ - java.text \ - java.text.spi \ - java.util \ - java.util.concurrent \ - java.util.concurrent.atomic \ - java.util.concurrent.locks \ - java.util.jar \ - java.util.logging \ - java.util.regex \ - java.util.spi \ - java.util.zip \ - javax.crypto \ - javax.crypto.interfaces \ - javax.crypto.spec \ - javax.security.auth \ - javax.security.auth.callback \ - javax.security.auth.login \ - javax.security.auth.spi \ - javax.security.auth.x500 \ - javax.net \ - javax.net.ssl \ - javax.security.cert \ - \ - com.sun.net.ssl \ - com.sun.nio.file \ - com.sun.nio.sctp \ - com.sun.security.auth \ - com.sun.security.auth.login - -profile.2.name = compact2 -profile.2.packages = \ - java.sql \ - javax.sql \ - javax.xml \ - javax.xml.datatype \ - javax.xml.namespace \ - javax.xml.parsers \ - javax.xml.stream \ - javax.xml.stream.events \ - javax.xml.stream.util \ - javax.xml.transform \ - javax.xml.transform.dom \ - javax.xml.transform.sax \ - javax.xml.transform.stax \ - javax.xml.transform.stream \ - javax.xml.validation \ - javax.xml.xpath \ - org.w3c.dom \ - org.w3c.dom.bootstrap \ - org.w3c.dom.events \ - org.w3c.dom.ls \ - org.xml.sax \ - org.xml.sax.ext \ - org.xml.sax.helpers \ - java.rmi \ - java.rmi.activation \ - java.rmi.dgc \ - java.rmi.registry \ - java.rmi.server \ - javax.rmi.ssl \ - javax.transaction \ - javax.transaction.xa \ - \ - com.sun.net.httpserver \ - com.sun.net.httpserver.spi - -profile.3.name = compact3 -profile.3.packages = \ - java.lang.instrument \ - java.lang.management \ - java.security.acl \ - java.util.prefs \ - javax.management \ - javax.management.loading \ - javax.management.modelmbean \ - javax.management.monitor \ - javax.management.openmbean \ - javax.management.relation \ - javax.management.remote \ - javax.management.remote.rmi \ - javax.management.timer \ - javax.naming \ - javax.naming.directory \ - javax.naming.event \ - javax.naming.ldap \ - javax.naming.spi \ - javax.sql.rowset \ - javax.sql.rowset.serial \ - javax.sql.rowset.spi \ - javax.security.auth.kerberos \ - javax.security.sasl \ - javax.script \ - javax.smartcardio \ - javax.xml.crypto \ - javax.xml.crypto.dom \ - javax.xml.crypto.dsig \ - javax.xml.crypto.dsig.dom \ - javax.xml.crypto.dsig.keyinfo \ - javax.xml.crypto.dsig.spec \ - javax.annotation.processing \ - javax.lang.model \ - javax.lang.model.element \ - javax.lang.model.type \ - javax.lang.model.util \ - javax.tools \ - javax.tools.annotation \ - org.ietf.jgss \ - \ - com.sun.management \ - com.sun.security.auth.callback \ - com.sun.security.auth.module \ - com.sun.security.jgss - -profile.4.name = Full JRE -profile.4.packages = \ - java.applet \ - java.awt \ - java.awt.color \ - java.awt.datatransfer \ - java.awt.dnd \ - java.awt.dnd.peer \ - java.awt.event \ - java.awt.font \ - java.awt.geom \ - java.awt.im \ - java.awt.im.spi \ - java.awt.image \ - java.awt.image.renderable \ - java.awt.peer \ - java.awt.print \ - java.beans \ - java.beans.beancontext \ - javax.accessibility \ - javax.imageio \ - javax.imageio.event \ - javax.imageio.metadata \ - javax.imageio.plugins.bmp \ - javax.imageio.plugins.jpeg \ - javax.imageio.spi \ - javax.imageio.stream \ - javax.print \ - javax.print.attribute \ - javax.print.attribute.standard \ - javax.print.event \ - javax.sound.midi \ - javax.sound.midi.spi \ - javax.sound.sampled \ - javax.sound.sampled.spi \ - javax.swing \ - javax.swing.border \ - javax.swing.colorchooser \ - javax.swing.event \ - javax.swing.filechooser \ - javax.swing.plaf \ - javax.swing.plaf.basic \ - javax.swing.plaf.metal \ - javax.swing.plaf.multi \ - javax.swing.plaf.nimbus \ - javax.swing.plaf.synth \ - javax.swing.table \ - javax.swing.text \ - javax.swing.text.html \ - javax.swing.text.html.parser \ - javax.swing.text.rtf \ - javax.swing.tree \ - javax.swing.undo \ - javax.activation \ - javax.jws \ - javax.jws.soap \ - javax.rmi \ - javax.rmi.CORBA \ - javax.xml.bind \ - javax.xml.bind.annotation \ - javax.xml.bind.annotation.adapters \ - javax.xml.bind.attachment \ - javax.xml.bind.helpers \ - javax.xml.bind.util \ - javax.xml.soap \ - javax.xml.ws \ - javax.xml.ws.handler \ - javax.xml.ws.handler.soap \ - javax.xml.ws.http \ - javax.xml.ws.soap \ - javax.xml.ws.spi \ - javax.xml.ws.spi.http \ - javax.xml.ws.wsaddressing \ - javax.annotation \ - org.omg.CORBA \ - org.omg.CORBA.DynAnyPackage \ - org.omg.CORBA.ORBPackage \ - org.omg.CORBA.TypeCodePackage \ - org.omg.CORBA.portable \ - org.omg.CORBA_2_3 \ - org.omg.CORBA_2_3.portable \ - org.omg.CosNaming \ - org.omg.CosNaming.NamingContextExtPackage \ - org.omg.CosNaming.NamingContextPackage \ - org.omg.Dynamic \ - org.omg.DynamicAny \ - org.omg.DynamicAny.DynAnyFactoryPackage \ - org.omg.DynamicAny.DynAnyPackage \ - org.omg.IOP \ - org.omg.IOP.CodecFactoryPackage \ - org.omg.IOP.CodecPackage \ - org.omg.Messaging \ - org.omg.PortableInterceptor \ - org.omg.PortableInterceptor.ORBInitInfoPackage \ - org.omg.PortableServer \ - org.omg.PortableServer.CurrentPackage \ - org.omg.PortableServer.POAManagerPackage \ - org.omg.PortableServer.POAPackage \ - org.omg.PortableServer.ServantLocatorPackage \ - org.omg.PortableServer.portable \ - org.omg.SendingContext \ - org.omg.stub.java.rmi \ - org.omg.stub.javax.management.remote.rmi - -# Remaining JDK supported API -profile.5.name = JDK tools -profile.5.packages = \ - com.sun.jdi \ - com.sun.jdi.connect \ - com.sun.jdi.connect.spi \ - com.sun.jdi.event \ - com.sun.jdi.request \ - com.sun.javadoc \ - com.sun.tools.doclets \ - com.sun.tools.doctree \ - com.sun.source.tree \ - com.sun.source.util \ - com.sun.tools.attach \ - com.sun.tools.attach.spi \ - com.sun.tools.jconsole \ - com.sun.tools.javac \ - com.sun.tools.javah \ - com.sun.tools.javap \ - com.sun.tools.javadoc \ - com.sun.servicetag diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/sjavac/Main.java --- a/src/share/classes/com/sun/tools/sjavac/Main.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/sjavac/Main.java Mon Apr 01 21:42:15 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 @@ -26,18 +26,13 @@ package com.sun.tools.sjavac; import java.io.File; -import java.util.HashMap; -import java.util.HashSet; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import com.sun.tools.sjavac.server.JavacServer; import java.io.IOException; import java.io.PrintStream; import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import com.sun.tools.sjavac.server.JavacServer; /** * The main class of the smart javac wrapper tool. @@ -268,12 +263,12 @@ // Find all class files allowable for linking. // And pickup knowledge of all modules found here. // This cannot currently filter classes inside jar files. - Map classes_to_link_to = new HashMap(); +// Map classes_to_link_to = new HashMap(); // findFiles(args, "-classpath", Util.set(".class"), classes_to_link_to, modules, current_module, true); // Find all module sources allowable for linking. - Map modules_to_link_to = new HashMap(); - // findFiles(args, "-modulepath", Util.set(".class"), modules_to_link_to, modules, current_module, true); +// Map modules_to_link_to = new HashMap(); +// findFiles(args, "-modulepath", Util.set(".class"), modules_to_link_to, modules, current_module, true); // Add the set of sources to the build database. javac_state.now().collectPackagesSourcesAndArtifacts(modules); @@ -935,13 +930,13 @@ if (roots.contains(root)) { throw new ProblemException("\""+r+"\" has already been used for "+option); } - if (roots.equals(bin_dir)) { + if (root.equals(bin_dir)) { throw new ProblemException("\""+r+"\" cannot be used both for "+option+" and -d"); } - if (roots.equals(gensrc_dir)) { + if (root.equals(gensrc_dir)) { throw new ProblemException("\""+r+"\" cannot be used both for "+option+" and -s"); } - if (roots.equals(header_dir)) { + if (root.equals(header_dir)) { throw new ProblemException("\""+r+"\" cannot be used both for "+option+" and -h"); } roots.add(root); diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/com/sun/tools/sjavac/comp/Dependencies.java --- a/src/share/classes/com/sun/tools/sjavac/comp/Dependencies.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/com/sun/tools/sjavac/comp/Dependencies.java Mon Apr 01 21:42:15 2013 -0700 @@ -108,7 +108,7 @@ return new_deps; } - class CompareNames implements Comparator { + static class CompareNames implements Comparator { public int compare(Name a, Name b) { return a.toString().compareTo(b.toString()); } diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/javax/lang/model/AnnotatedConstruct.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/share/classes/javax/lang/model/AnnotatedConstruct.java Mon Apr 01 21:42:15 2013 -0700 @@ -0,0 +1,190 @@ +/* + * 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * 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 javax.lang.model; + +import java.lang.annotation.*; +import java.util.List; +import javax.lang.model.element.*; +import javax.lang.model.type.*; + +/** + * Represents a construct that can be annotated. + * + * A construct is either an {@linkplain + * javax.lang.model.element.Element element} or a {@linkplain + * javax.lang.model.type.TypeMirror type}. Annotations on an element + * are on a declaration, whereas annotations on a type are on + * a specific use of a type name. + * + * The terms directly present and present are used + * throughout this interface to describe precisely which annotations + * are returned by methods: + * + *

An annotation A is directly present on a + * construct E if E is annotated, and: + * + *

    + * + *
  • for an invocation of {@code getAnnotation(Class)} or + * {@code getAnnotationMirrors()}, E's annotations contain A. + * + *
  • for an invocation of getAnnotationsByType(Class), + * E's annotations either contain A or, if the type of + * A is repeatable, contain exactly one annotation whose value + * element contains A and whose type is the containing + * annotation type of A's type. + * + *
+ * + *

An annotation A is present on a construct E if either: + * + *

    + *
  • A is directly present on E; or + * + *
  • A is not directly present on E, and + * E is an element representing a class, and A's type + * is inheritable, and A is present on the element + * representing the superclass of E. + * + *
+ * + * @since 1.8 + * @jls 9.6 Annotation Types + * @jls 9.6.3.3 @Inherited + */ +public interface AnnotatedConstruct { + /** + * Returns the annotations that are directly present on + * this construct. + * + * @return the annotations directly present on this + * construct; an empty list if there are none + */ + List getAnnotationMirrors(); + + /** + * Returns this construct's annotation of the + * specified type if such an annotation is present, else {@code + * null}. + * + *

The annotation returned by this method could contain an element + * whose value is of type {@code Class}. + * This value cannot be returned directly: information necessary to + * locate and load a class (such as the class loader to use) is + * not available, and the class might not be loadable at all. + * Attempting to read a {@code Class} object by invoking the relevant + * method on the returned annotation + * will result in a {@link MirroredTypeException}, + * from which the corresponding {@link TypeMirror} may be extracted. + * Similarly, attempting to read a {@code Class[]}-valued element + * will result in a {@link MirroredTypesException}. + * + *

+ * Note: This method is unlike others in this and related + * interfaces. It operates on runtime reflective information — + * representations of annotation types currently loaded into the + * VM — rather than on the representations defined by and used + * throughout these interfaces. Consequently, calling methods on + * the returned annotation object can throw many of the exceptions + * that can be thrown when calling methods on an annotation object + * returned by core reflection. This method is intended for + * callers that are written to operate on a known, fixed set of + * annotation types. + *
+ * + * @param
the annotation type + * @param annotationType the {@code Class} object corresponding to + * the annotation type + * @return this element's or type use's annotation for the + * specified annotation type if present on this element, else + * {@code null} + * + * @see #getAnnotationMirrors() + * @see java.lang.reflect.AnnotatedElement#getAnnotation + * @see EnumConstantNotPresentException + * @see AnnotationTypeMismatchException + * @see IncompleteAnnotationException + * @see MirroredTypeException + * @see MirroredTypesException + * @jls 9.6.1 Annotation Type Elements + */ + A getAnnotation(Class annotationType); + + /** + * Returns annotations that are present on this construct. + * + * If there are no annotations present on this construct, + * the return value is an array of length 0. + * + * The difference between this method and {@link #getAnnotation(Class)} + * is that this method detects if its argument is a repeatable + * annotation type, and if so, attempts to find one or more + * annotations of that type by "looking through" a container annotation. + * + *

The annotations returned by this method could contain an element + * whose value is of type {@code Class}. + * This value cannot be returned directly: information necessary to + * locate and load a class (such as the class loader to use) is + * not available, and the class might not be loadable at all. + * Attempting to read a {@code Class} object by invoking the relevant + * method on the returned annotation + * will result in a {@link MirroredTypeException}, + * from which the corresponding {@link TypeMirror} may be extracted. + * Similarly, attempting to read a {@code Class[]}-valued element + * will result in a {@link MirroredTypesException}. + * + *

+ * Note: This method is unlike others in this and related + * interfaces. It operates on runtime reflective information — + * representations of annotation types currently loaded into the + * VM — rather than on the representations defined by and used + * throughout these interfaces. Consequently, calling methods on + * the returned annotation object can throw many of the exceptions + * that can be thrown when calling methods on an annotation object + * returned by core reflection. This method is intended for + * callers that are written to operate on a known, fixed set of + * annotation types. + *
+ * + * @param
the annotation type + * @param annotationType the {@code Class} object corresponding to + * the annotation type + * @return this element's annotations for the specified annotation + * type if present on this element, else an empty array + * + * @see #getAnnotationMirrors() + * @see #getAnnotation(java.lang.Class) + * @see java.lang.reflect.AnnotatedElement#getAnnotationsByType + * @see EnumConstantNotPresentException + * @see AnnotationTypeMismatchException + * @see IncompleteAnnotationException + * @see MirroredTypeException + * @see MirroredTypesException + * @jls 9.6 Annotation Types + * @jls 9.6.1 Annotation Type Elements + */ + A[] getAnnotationsByType(Class annotationType); +} diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/javax/lang/model/element/Element.java --- a/src/share/classes/javax/lang/model/element/Element.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/javax/lang/model/element/Element.java Mon Apr 01 21:42:15 2013 -0700 @@ -60,8 +60,7 @@ * @see TypeMirror * @since 1.6 */ -public interface Element { - +public interface Element extends javax.lang.model.AnnotatedConstruct { /** * Returns the type defined by this element. * @@ -89,119 +88,6 @@ ElementKind getKind(); /** - * Returns the annotations that are directly present on this element. - * - *

To get inherited annotations as well, use - * {@link Elements#getAllAnnotationMirrors(Element) getAllAnnotationMirrors}. - * - * @see ElementFilter - * - * @return the annotations directly present on this element; - * an empty list if there are none - */ - List getAnnotationMirrors(); - - /** - * Returns this element's annotation for the specified type if - * such an annotation is present, else {@code null}. The - * annotation may be either inherited or directly present on this - * element. - * - *

The annotation returned by this method could contain an element - * whose value is of type {@code Class}. - * This value cannot be returned directly: information necessary to - * locate and load a class (such as the class loader to use) is - * not available, and the class might not be loadable at all. - * Attempting to read a {@code Class} object by invoking the relevant - * method on the returned annotation - * will result in a {@link MirroredTypeException}, - * from which the corresponding {@link TypeMirror} may be extracted. - * Similarly, attempting to read a {@code Class[]}-valued element - * will result in a {@link MirroredTypesException}. - * - *

- * Note: This method is unlike others in this and related - * interfaces. It operates on runtime reflective information — - * representations of annotation types currently loaded into the - * VM — rather than on the representations defined by and used - * throughout these interfaces. Consequently, calling methods on - * the returned annotation object can throw many of the exceptions - * that can be thrown when calling methods on an annotation object - * returned by core reflection. This method is intended for - * callers that are written to operate on a known, fixed set of - * annotation types. - *
- * - * @param
the annotation type - * @param annotationType the {@code Class} object corresponding to - * the annotation type - * @return this element's annotation for the specified annotation - * type if present on this element, else {@code null} - * - * @see #getAnnotationMirrors() - * @see java.lang.reflect.AnnotatedElement#getAnnotation - * @see EnumConstantNotPresentException - * @see AnnotationTypeMismatchException - * @see IncompleteAnnotationException - * @see MirroredTypeException - * @see MirroredTypesException - */ - A getAnnotation(Class annotationType); - - /** - * Returns annotations that are present on this element. - * - * If there are no annotations present on this element, the return - * value is an array of length 0. - * - * The difference between this method and {@link #getAnnotation(Class)} - * is that this method detects if its argument is a repeatable - * annotation type (JLS 9.6), and if so, attempts to find one or more - * annotations of that type by "looking through" a container annotation. - * - *

The annotations returned by this method could contain an element - * whose value is of type {@code Class}. - * This value cannot be returned directly: information necessary to - * locate and load a class (such as the class loader to use) is - * not available, and the class might not be loadable at all. - * Attempting to read a {@code Class} object by invoking the relevant - * method on the returned annotation - * will result in a {@link MirroredTypeException}, - * from which the corresponding {@link TypeMirror} may be extracted. - * Similarly, attempting to read a {@code Class[]}-valued element - * will result in a {@link MirroredTypesException}. - * - *

- * Note: This method is unlike others in this and related - * interfaces. It operates on runtime reflective information — - * representations of annotation types currently loaded into the - * VM — rather than on the representations defined by and used - * throughout these interfaces. Consequently, calling methods on - * the returned annotation object can throw many of the exceptions - * that can be thrown when calling methods on an annotation object - * returned by core reflection. This method is intended for - * callers that are written to operate on a known, fixed set of - * annotation types. - *
- * - * @param
the annotation type - * @param annotationType the {@code Class} object corresponding to - * the annotation type - * @return this element's annotations for the specified annotation - * type if present on this element, else an empty array - * - * @see #getAnnotationMirrors() - * @see #getAnnotation(java.lang.Class) - * @see java.lang.reflect.AnnotatedElement#getAnnotationsByType - * @see EnumConstantNotPresentException - * @see AnnotationTypeMismatchException - * @see IncompleteAnnotationException - * @see MirroredTypeException - * @see MirroredTypesException - */ - A[] getAnnotationsByType(Class annotationType); - - /** * Returns the modifiers of this element, excluding annotations. * Implicit modifiers, such as the {@code public} and {@code static} * modifiers of interface members, are included. @@ -325,6 +211,19 @@ */ int hashCode(); + + /** + * {@inheritDoc} + * + *

To get inherited annotations as well, use {@link + * Elements#getAllAnnotationMirrors(Element) + * getAllAnnotationMirrors}. + * + * @see ElementFilter + * @since 1.6 + */ + @Override + List getAnnotationMirrors(); /** * Applies a visitor to this element. * diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/javax/lang/model/element/ExecutableElement.java --- a/src/share/classes/javax/lang/model/element/ExecutableElement.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/javax/lang/model/element/ExecutableElement.java Mon Apr 01 21:42:15 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -69,6 +69,25 @@ List getParameters(); /** + * Returns the receiver type of this executable, + * or {@link javax.lang.model.type.NoType NoType} with + * kind {@link javax.lang.model.type.TypeKind#NONE NONE} + * if the executable has no receiver type. + * + * An executable which is an instance method, or a constructor of an + * inner class, has a receiver type derived from the {@linkplain + * #getEnclosingElement declaring type}. + * + * An executable which is a static method, or a constructor of a + * non-inner class, or an initializer (static or instance), has no + * receiver type. + * + * @return the receiver type of this executable + * @since 1.8 + */ + TypeMirror getReceiverType(); + + /** * Returns {@code true} if this method or constructor accepts a variable * number of arguments and returns {@code false} otherwise. * diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/javax/lang/model/type/AnnotatedType.java --- a/src/share/classes/javax/lang/model/type/AnnotatedType.java Thu Mar 28 10:55:14 2013 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2012, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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 javax.lang.model.type; - -import java.util.List; - -import javax.lang.model.element.AnnotationMirror; - -/** - * Represents an annotated type. - * - * As of the {@link javax.lang.model.SourceVersion#RELEASE_8 - * RELEASE_8} source version, annotated types can appear for all - * type uses. - * - * @author Werner Dietl - * @since 1.8 - */ -public interface AnnotatedType extends TypeMirror, - DeclaredType, TypeVariable, WildcardType, - PrimitiveType, ArrayType { - - List getAnnotations(); - TypeMirror getUnderlyingType(); -} diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/javax/lang/model/type/ExecutableType.java --- a/src/share/classes/javax/lang/model/type/ExecutableType.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/javax/lang/model/type/ExecutableType.java Mon Apr 01 21:42:15 2013 -0700 @@ -30,7 +30,6 @@ import javax.lang.model.element.ExecutableElement; - /** * Represents the type of an executable. An executable * is a method, constructor, or initializer. @@ -78,10 +77,21 @@ List getParameterTypes(); /** - * Returns the type of this executable's receiver parameter. + * Returns the receiver type of this executable, + * or {@link javax.lang.model.type.NoType NoType} with + * kind {@link javax.lang.model.type.TypeKind#NONE NONE} + * if the executable has no receiver type. * - * @return the type of this executable's receiver parameter - * TODO: null if none specified or always a valid value? + * An executable which is an instance method, or a constructor of an + * inner class, has a receiver type derived from the {@linkplain + * ExecutableElement#getEnclosingElement declaring type}. + * + * An executable which is a static method, or a constructor of a + * non-inner class, or an initializer (static or instance), has no + * receiver type. + * + * @return the receiver type of this executable + * @since 1.8 */ TypeMirror getReceiverType(); diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/javax/lang/model/type/TypeKind.java --- a/src/share/classes/javax/lang/model/type/TypeKind.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/javax/lang/model/type/TypeKind.java Mon Apr 01 21:42:15 2013 -0700 @@ -151,14 +151,7 @@ * * @since 1.8 */ - INTERSECTION, - - /** - * An annotated type. - * - * @since 1.8 - */ - ANNOTATED; + INTERSECTION; /** * Returns {@code true} if this kind corresponds to a primitive diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/javax/lang/model/type/TypeMirror.java --- a/src/share/classes/javax/lang/model/type/TypeMirror.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/javax/lang/model/type/TypeMirror.java Mon Apr 01 21:42:15 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -25,6 +25,8 @@ package javax.lang.model.type; +import java.lang.annotation.Annotation; +import java.util.List; import javax.lang.model.element.*; import javax.lang.model.util.Types; @@ -55,7 +57,7 @@ * @see Types * @since 1.6 */ -public interface TypeMirror { +public interface TypeMirror extends javax.lang.model.AnnotatedConstruct { /** * Returns the {@code kind} of this type. diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/javax/lang/model/type/TypeVisitor.java --- a/src/share/classes/javax/lang/model/type/TypeVisitor.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/javax/lang/model/type/TypeVisitor.java Mon Apr 01 21:42:15 2013 -0700 @@ -194,14 +194,4 @@ * @since 1.8 */ R visitIntersection(IntersectionType t, P p); - - /** - * Visits an annotated type. - * - * @param t the type to visit - * @param p a visitor-specified parameter - * @return a visitor-specified result - * @since 1.8 - */ - R visitAnnotated(AnnotatedType t, P p); } diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/javax/lang/model/util/AbstractTypeVisitor6.java --- a/src/share/classes/javax/lang/model/util/AbstractTypeVisitor6.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/javax/lang/model/util/AbstractTypeVisitor6.java Mon Apr 01 21:42:15 2013 -0700 @@ -134,23 +134,6 @@ } /** - * Visits an {@code AnnotatedType} element by calling {@code - * visit} on the underlying type. - - * @param t {@inheritDoc} - * @param p {@inheritDoc} - * @return the result of calling {@code visit} on the underlying type - * - * @since 1.8 - * - * TODO: should xxxVisitor8 subclasses override this and call - * the defaultAction? - */ - public R visitAnnotated(AnnotatedType t, P p) { - return visit(t.getUnderlyingType(), p); - } - - /** * {@inheritDoc} * *

The default implementation of this method in {@code diff -r 35cef52b0023 -r cfb65ca92082 src/share/classes/javax/lang/model/util/Types.java --- a/src/share/classes/javax/lang/model/util/Types.java Thu Mar 28 10:55:14 2013 -0700 +++ b/src/share/classes/javax/lang/model/util/Types.java Mon Apr 01 21:42:15 2013 -0700 @@ -59,6 +59,13 @@ /** * Tests whether two {@code TypeMirror} objects represent the same type. * + *

Since annotations are only meta-data associated with a type, + * the set of annotations on either argument is not taken + * into account when computing whether or not two {@code + * TypeMirror} objects are the same type. In particular, two + * {@code TypeMirror} objects can have different annotations and + * still be considered the same. + * *

Caveat: if either of the arguments to this method represents a * wildcard, this method will return false. As a consequence, a wildcard * is not the same type as itself. This might be surprising at first, @@ -301,116 +308,4 @@ * for the given type */ TypeMirror asMemberOf(DeclaredType containing, Element element); - - /** - * Returns the annotations targeting the type. - * - * @param type the targeted type - * @return the type annotations targeting the type - */ - List typeAnnotationsOf(TypeMirror type); - - /** - * Returns the type's annotation for the specified type if - * such an annotation is present, else {@code null}. The - * annotation has to be directly present on this - * element. - * - *

The annotation returned by this method could contain an element - * whose value is of type {@code Class}. - * This value cannot be returned directly: information necessary to - * locate and load a class (such as the class loader to use) is - * not available, and the class might not be loadable at all. - * Attempting to read a {@code Class} object by invoking the relevant - * method on the returned annotation - * will result in a {@link MirroredTypeException}, - * from which the corresponding {@link TypeMirror} may be extracted. - * Similarly, attempting to read a {@code Class[]}-valued element - * will result in a {@link MirroredTypesException}. - * - *

- * Note: This method is unlike others in this and related - * interfaces. It operates on runtime reflective information — - * representations of annotation types currently loaded into the - * VM — rather than on the representations defined by and used - * throughout these interfaces. Consequently, calling methods on - * the returned annotation object can throw many of the exceptions - * that can be thrown when calling methods on an annotation object - * returned by core reflection. This method is intended for - * callers that are written to operate on a known, fixed set of - * annotation types. - *
- * - * @param
the annotation type - * @param type the targeted type - * @param annotationType the {@code Class} object corresponding to - * the annotation type - * @return the type's annotation for the specified annotation - * type if present on the type, else {@code null} - * - * @see Element#getAnnotationMirrors() - * @see EnumConstantNotPresentException - * @see AnnotationTypeMismatchException - * @see IncompleteAnnotationException - * @see MirroredTypeException - * @see MirroredTypesException - */ - A typeAnnotationOf(TypeMirror type, Class annotationType); - - /** - * Returns the annotations targeting the method receiver type. - * - * @param type the targeted type - * @return the receiver type of the executable type - */ - TypeMirror receiverTypeOf(ExecutableType type); - - /** - * Returns the type's annotation for the specified executable type - * receiver if such an annotation is present, else {@code null}. The - * annotation has to be directly present on this - * element. - * - *

The annotation returned by this method could contain an element - * whose value is of type {@code Class}. - * This value cannot be returned directly: information necessary to - * locate and load a class (such as the class loader to use) is - * not available, and the class might not be loadable at all. - * Attempting to read a {@code Class} object by invoking the relevant - * method on the returned annotation - * will result in a {@link MirroredTypeException}, - * from which the corresponding {@link TypeMirror} may be extracted. - * Similarly, attempting to read a {@code Class[]}-valued element - * will result in a {@link MirroredTypesException}. - * - *

- * Note: This method is unlike others in this and related - * interfaces. It operates on runtime reflective information — - * representations of annotation types currently loaded into the - * VM — rather than on the representations defined by and used - * throughout these interfaces. Consequently, calling methods on - * the returned annotation object can throw many of the exceptions - * that can be thrown when calling methods on an annotation object - * returned by core reflection. This method is intended for - * callers that are written to operate on a known, fixed set of - * annotation types. - *
- * - * @param
the annotation type - * @param type the method type - * @param annotationType the {@code Class} object corresponding to - * the annotation type - * @return the type's annotation for the specified annotation - * type if present on the type, else {@code null} - * - * @see Element#getAnnotationMirrors() - * @see EnumConstantNotPresentException - * @see AnnotationTypeMismatchException - * @see IncompleteAnnotationException - * @see MirroredTypeException - * @see MirroredTypesException - */ - // TODO: no longer needed? - // A receiverTypeAnnotationOf(ExecutableType type, Class annotationType); - } diff -r 35cef52b0023 -r cfb65ca92082 test/com/sun/javadoc/testProfiles/TestProfiles.java --- a/test/com/sun/javadoc/testProfiles/TestProfiles.java Thu Mar 28 10:55:14 2013 -0700 +++ b/test/com/sun/javadoc/testProfiles/TestProfiles.java Mon Apr 01 21:42:15 2013 -0700 @@ -23,7 +23,7 @@ /* * @test - * @bug 8006124 + * @bug 8006124 8009684 * @summary Test javadoc support for profiles. * @author Bhavesh Patel * @library ../lib/ @@ -33,7 +33,7 @@ public class TestProfiles extends JavadocTester { //Test information. - private static final String BUG_ID = "8006124"; + private static final String BUG_ID = "8006124-8009684"; private static final String PROFILE_BUG_ID = BUG_ID + "-1"; private static final String PACKAGE_BUG_ID = BUG_ID + "-2"; //Javadoc arguments. @@ -49,17 +49,17 @@ // Tests for profile-overview-frame.html listing all profiles. {PROFILE_BUG_ID + FS + "profile-overview-frame.html", "All Packages" + + "target=\"packageListFrame\">All Packages" }, {PROFILE_BUG_ID + FS + "profile-overview-frame.html", - "
  • " + "
  • " + "compact1
  • " }, // Tests for profileName-frame.html listing all packages in a profile. {PROFILE_BUG_ID + FS + "compact2-frame.html", - "" + "" + "All PackagesAll Profiles" + + "target=\"packageListFrame\">All Profiles" }, {PROFILE_BUG_ID + FS + "compact2-frame.html", "
  • All Profiles" + + "target=\"packageListFrame\">All Profiles" }, //Test for "className.html" showing the profile information for the type. {PROFILE_BUG_ID + FS + "pkg2" + FS + "Class1Pkg2.html", "
    compact1, compact2, compact3
    " + }, + {PROFILE_BUG_ID + FS + "index.html", + "" } }; private static final String[][] PROFILES_NEGATED_TEST = { @@ -131,12 +135,12 @@ private static final String[][] PACKAGES_NEGATED_TEST = { {PACKAGE_BUG_ID + FS + "profile-overview-frame.html", "All Packages" + + "target=\"packageListFrame\">All Packages" }, {PACKAGE_BUG_ID + FS + "compact2-frame.html", - "" + "" + "All PackagesAll Profiles" + + "target=\"packageListFrame\">All Profiles" }, {PACKAGE_BUG_ID + FS + "pkg2" + FS + "compact2-package-frame.html", "" @@ -151,7 +155,7 @@ }, {PACKAGE_BUG_ID + FS + "overview-frame.html", "All Profiles" + + "target=\"packageListFrame\">All Profiles" }, {PACKAGE_BUG_ID + FS + "pkg2" + FS + "Class1Pkg2.html", "
    compact1, compact2, compact3
    " diff -r 35cef52b0023 -r cfb65ca92082 test/tools/doclint/EmptyPreTest.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/doclint/EmptyPreTest.java Mon Apr 01 21:42:15 2013 -0700 @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2012, 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 8010317 + * @summary DocLint incorrectly reports some
     tags as empty
    + * @build DocLintTester
    + * @run main DocLintTester -Xmsgs:html EmptyPreTest.java
    + */
    +
    +public class EmptyPreTest {
    +    /** 
     {@code xyzzy} 
    */ + public void m1() { } + + /**
     {@docRoot} 
    */ + public void m2() { } + + /**
     {@link java.lang.String} 
    */ + public void m3() { } + + /**
     {@value} 
    */ + public static final int v1 = 1; +} diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/4846262/CheckEBCDICLocaleTest.java --- a/test/tools/javac/4846262/CheckEBCDICLocaleTest.java Thu Mar 28 10:55:14 2013 -0700 +++ b/test/tools/javac/4846262/CheckEBCDICLocaleTest.java Mon Apr 01 21:42:15 2013 -0700 @@ -34,9 +34,7 @@ import java.nio.file.Files; import java.nio.file.Paths; import java.util.Arrays; -import com.sun.tools.javac.util.ArrayUtils; -//original test: test/tools/javac/4846262/Test.sh public class CheckEBCDICLocaleTest { private static final String TestSrc = @@ -46,11 +44,11 @@ " }\n" + "}"; - private static final String TestOut = - "output/Test.java:3: error: not a statement\n" + + private static final String TestOutTemplate = + "output%1$sTest.java:3: error: not a statement\n" + " abcdefg\n" + " ^\n" + - "output/Test.java:3: error: ';' expected\n" + + "output%1$sTest.java:3: error: ';' expected\n" + " abcdefg\n" + " ^\n" + "2 errors\n"; @@ -62,38 +60,37 @@ public void test() throws Exception { String native2asciiBinary = Paths.get( System.getProperty("test.jdk"),"bin", "native2ascii").toString(); - String testVMOpts = System.getProperty("test.tool.vm.opts"); - String[] mainArgs = ToolBox.getJavacBin(); ToolBox.createJavaFileFromSource(TestSrc); Files.createDirectory(Paths.get("output")); -//"${TESTJAVA}${FS}bin${FS}native2ascii" ${TESTTOOLVMOPTS} -reverse -encoding IBM1047 ${TESTSRC}${FS}Test.java Test.java ToolBox.AnyToolArgs nativeCmdParams = new ToolBox.AnyToolArgs() - .setAllArgs(native2asciiBinary, testVMOpts, - "-reverse", "-encoding", "IBM1047", - "Test.java", "output/Test.java"); + .appendArgs(native2asciiBinary) + .appendArgs(ToolBox.testToolVMOpts) + .appendArgs("-reverse", "-encoding", "IBM1047", "Test.java", + "output/Test.java"); ToolBox.executeCommand(nativeCmdParams); -//"${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -J-Duser.language=en -J-Duser.region=US -J-Dfile.encoding=IBM1047 Test.java 2>Test.tmp ToolBox.AnyToolArgs javacParams = new ToolBox.AnyToolArgs(ToolBox.Expect.FAIL) - .setAllArgs(ArrayUtils.concatOpen(mainArgs, "-J-Duser.language=en", + .appendArgs(ToolBox.javacBinary) + .appendArgs(ToolBox.testToolVMOpts) + .appendArgs("-J-Duser.language=en", "-J-Duser.region=US", "-J-Dfile.encoding=IBM1047", - "output/Test.java")) + "output/Test.java") .setErrOutput(new File("Test.tmp")); ToolBox.executeCommand(javacParams); -//"${TESTJAVA}${FS}bin${FS}native2ascii" ${TESTTOOLVMOPTS} -encoding IBM1047 Test.tmp Test.out - nativeCmdParams.setAllArgs(native2asciiBinary, "-encoding", "IBM1047", - "Test.tmp", "Test.out"); + nativeCmdParams = new ToolBox.AnyToolArgs() + .appendArgs(native2asciiBinary) + .appendArgs(ToolBox.testToolVMOpts) + .appendArgs("-encoding", "IBM1047", "Test.tmp", "Test.out"); ToolBox.executeCommand(nativeCmdParams); -//diff ${DIFFOPTS} -c "${TESTSRC}${FS}Test.out" Test.out + String goldenFile = String.format(TestOutTemplate, File.separator); ToolBox.compareLines(Paths.get("Test.out"), - Arrays.asList(TestOut.split("\n")), null); - + Arrays.asList(goldenFile.split("\n")), null, true); } } diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/ClassFileModifiers/MemberModifiers.java --- a/test/tools/javac/ClassFileModifiers/MemberModifiers.java Thu Mar 28 10:55:14 2013 -0700 +++ b/test/tools/javac/ClassFileModifiers/MemberModifiers.java Mon Apr 01 21:42:15 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -26,7 +26,7 @@ * @bug 4249112 4785453 * @summary Verify that implicit member modifiers are set correctly. * - * @compile/ref=MemberModifiers.out -source 1.4 -target 1.4.2 -Xlint:-options -XDdumpmodifiers=cfm MemberModifiers.java + * @compile/ref=MemberModifiers.out -source 1.4 -target 1.5 -Xlint:-options -XDdumpmodifiers=cfm MemberModifiers.java */ // Currently, we check only that members of final classes are not final. diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/ClassPathTest/ClassPathTest.java --- a/test/tools/javac/ClassPathTest/ClassPathTest.java Thu Mar 28 10:55:14 2013 -0700 +++ b/test/tools/javac/ClassPathTest/ClassPathTest.java Mon Apr 01 21:42:15 2013 -0700 @@ -31,9 +31,11 @@ */ import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; import java.util.Map; import java.util.TreeMap; -import com.sun.tools.javac.util.ArrayUtils; //original test: test/tools/javac/ClassPathTest/ClassPathTest.sh public class ClassPathTest { @@ -92,24 +94,31 @@ } void checkCompileCommands() throws Exception { - String[] mainArgs = ToolBox.getJavacBin(); - // Without the -cp . parameter the command will fail seems like when called // from the command line, the current dir is added to the classpath // automatically but this is not happening when called using ProcessBuilder // testJavac success ClassPathTest3.java - String[] commonArgs = ArrayUtils.concatOpen(mainArgs, "-cp", "."); + List mainArgs = new ArrayList<>(); + mainArgs.add(ToolBox.javacBinary.toString()); + if (ToolBox.testToolVMOpts != null) { + mainArgs.addAll(ToolBox.testToolVMOpts); + } - ToolBox.AnyToolArgs successParams = - new ToolBox.AnyToolArgs() - .setAllArgs(ArrayUtils.concatOpen(commonArgs, "ClassPathTest3.java")); + List commonArgs = new ArrayList<>(); + commonArgs.addAll(mainArgs); + commonArgs.addAll(Arrays.asList("-cp", ".")); + + ToolBox.AnyToolArgs successParams = new ToolBox.AnyToolArgs() + .appendArgs(commonArgs) + .appendArgs("ClassPathTest3.java"); ToolBox.executeCommand(successParams); // testJavac failure ClassPathTest1.java ToolBox.AnyToolArgs failParams = new ToolBox.AnyToolArgs(ToolBox.Expect.FAIL) - .setAllArgs(ArrayUtils.concatOpen(commonArgs, "ClassPathTest1.java")); + .appendArgs(commonArgs) + .appendArgs("ClassPathTest1.java"); ToolBox.executeCommand(failParams); // This is done inside the executeCommand method @@ -119,29 +128,50 @@ extVars.put("CLASSPATH", "bar"); // testJavac success ClassPathTest2.java - successParams.setAllArgs(ArrayUtils.concatOpen(mainArgs, "ClassPathTest2.java")).set(extVars); + successParams = new ToolBox.AnyToolArgs() + .appendArgs(mainArgs) + .appendArgs("ClassPathTest2.java") + .set(extVars); ToolBox.executeCommand(successParams); // testJavac failure ClassPathTest1.java - failParams.setAllArgs(ArrayUtils.concatOpen(mainArgs, "ClassPathTest1.java")).set(extVars); + failParams = new ToolBox.AnyToolArgs(ToolBox.Expect.FAIL) + .appendArgs(mainArgs) + .appendArgs("ClassPathTest1.java") + .set(extVars); ToolBox.executeCommand(failParams); // testJavac failure ClassPathTest3.java - failParams.setAllArgs(ArrayUtils.concatOpen(mainArgs, "ClassPathTest3.java")); + failParams = new ToolBox.AnyToolArgs(ToolBox.Expect.FAIL) + .appendArgs(mainArgs) + .appendArgs("ClassPathTest3.java") + .set(extVars); ToolBox.executeCommand(failParams); // testJavac success -classpath foo ClassPathTest1.java - commonArgs = ArrayUtils.concatOpen(mainArgs, "-cp", "foo"); - successParams.setAllArgs(ArrayUtils.concatOpen(commonArgs, "ClassPathTest1.java")); + commonArgs.clear(); + commonArgs.addAll(mainArgs); + commonArgs.addAll(Arrays.asList("-cp", "foo")); + + successParams = new ToolBox.AnyToolArgs() + .appendArgs(commonArgs) + .appendArgs("ClassPathTest1.java") + .set(extVars); ToolBox.executeCommand(successParams); // testJavac failure -classpath foo ClassPathTest2.java - failParams.setAllArgs(ArrayUtils.concatOpen(commonArgs, "ClassPathTest2.java")); + failParams = new ToolBox.AnyToolArgs(ToolBox.Expect.FAIL) + .appendArgs(commonArgs) + .appendArgs("ClassPathTest2.java") + .set(extVars); ToolBox.executeCommand(failParams); // testJavac failure -classpath foo ClassPathTest3.java - failParams.setAllArgs(ArrayUtils.concatOpen(commonArgs, "ClassPathTest3.java")); + failParams = new ToolBox.AnyToolArgs(ToolBox.Expect.FAIL) + .appendArgs(commonArgs) + .appendArgs("ClassPathTest3.java") + .set(extVars); ToolBox.executeCommand(failParams); } diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/Diagnostics/8010387/T8010387.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/Diagnostics/8010387/T8010387.java Mon Apr 01 21:42:15 2013 -0700 @@ -0,0 +1,17 @@ +/** + * @test /nodynamiccopyright/ + * @bug 8010387 + * @summary rich diagnostic sometimes contain wrong type variable numbering + * @compile/fail/ref=T8010387.out -XDrawDiagnostics -XDdiags=disambiguateTvars,where T8010387.java + */ +abstract class T8010387 { + + interface F { } + +

    void test() { + m(new F

    () { }); + } + + + abstract T8010387 m(F fx); +} diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/Diagnostics/8010387/T8010387.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/Diagnostics/8010387/T8010387.out Mon Apr 01 21:42:15 2013 -0700 @@ -0,0 +1,3 @@ +T8010387.java:12:9: compiler.err.cant.apply.symbol: kindname.method, m, T8010387.F, compiler.misc.anonymous.class: T8010387.F

    , kindname.class, T8010387, (compiler.misc.infer.no.conforming.assignment.exists: T, (compiler.misc.inconvertible.types: compiler.misc.anonymous.class: T8010387.F

    , T8010387.F)) +- compiler.misc.where.description.typevar.1: X,P,T,{(compiler.misc.where.typevar: X, java.lang.Object, kindname.class, T8010387),(compiler.misc.where.typevar: P, java.lang.Object, kindname.method,

    test()),(compiler.misc.where.typevar: T, java.lang.Object, kindname.method, m(T8010387.F))} +1 error diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/ProtectedInnerClass/ProtectedInnerClassesTest.java --- a/test/tools/javac/ProtectedInnerClass/ProtectedInnerClassesTest.java Thu Mar 28 10:55:14 2013 -0700 +++ b/test/tools/javac/ProtectedInnerClass/ProtectedInnerClassesTest.java Mon Apr 01 21:42:15 2013 -0700 @@ -91,7 +91,9 @@ //"${TESTJAVA}${FS}bin${FS}java" ${TESTVMOPTS} -classpath "${CLASSPATH}${PS}${TESTCLASSES}" p2.ProtectedInnerClass2 ToolBox.AnyToolArgs javaParams = new ToolBox.AnyToolArgs() - .setAllArgs(ToolBox.javaBinary, "-classpath", System.getProperty("user.dir"), + .appendArgs(ToolBox.javaBinary) + .appendArgs(ToolBox.testVMOpts) + .appendArgs("-classpath", System.getProperty("user.dir"), "p2.ProtectedInnerClass2"); ToolBox.executeCommand(javaParams); } @@ -101,14 +103,15 @@ //@run compile p1/ProtectedInnerClass1.java ToolBox.JavaToolArgs javacParams = new ToolBox.JavaToolArgs() - .setOptions("-d", ".") + .appendArgs("-d", ".") .setSources(protectedInnerClass1Src); ToolBox.javac(javacParams); //@run compile/fail p2/ProtectedInnerClass3.java - javacParams.setSources(protectedInnerClass3Src) - .set(ToolBox.Expect.FAIL); + javacParams = new ToolBox.JavaToolArgs(ToolBox.Expect.FAIL) + .appendArgs("-d", ".") + .setSources(protectedInnerClass3Src); ToolBox.javac(javacParams); } diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/T5053846/MethodRefDupInConstantPoolTest.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/T5053846/MethodRefDupInConstantPoolTest.java Mon Apr 01 21:42:15 2013 -0700 @@ -0,0 +1,91 @@ +/* + * 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 5053846 + * @summary javac: MethodRef entries are duplicated in the constant pool + */ + +import java.io.PrintWriter; +import java.io.StringWriter; +import java.nio.file.Paths; +import java.util.*; + +public class MethodRefDupInConstantPoolTest { + + private static final String methodToLookFor = + "java/util/Vector.iterator:()Ljava/util/Iterator;"; + + public static void main(String[] args) { + new MethodRefDupInConstantPoolTest().run(); + } + + void run() { + check("-v", Paths.get(System.getProperty("test.classes"), + "TestHelper1.class").toString()); + check("-v", Paths.get(System.getProperty("test.classes"), + "TestHelper2.class").toString()); + } + + void check(String... params) { + StringWriter s; + String out; + try (PrintWriter pw = new PrintWriter(s = new StringWriter())) { + com.sun.tools.javap.Main.run(params, pw); + out = s.toString(); + } + String constantPool = getConstantPool(out); + if (constantPool.indexOf(methodToLookFor) != + constantPool.lastIndexOf(methodToLookFor)) { + throw new AssertionError("There is more than one entry for the method seek " + + methodToLookFor); + } + } + + String getConstantPool(String out) { + int start = out.indexOf("Constant pool:"); + int end = out.indexOf("{"); + return out.substring(start, end); + } +} + +class TestHelper1 { + void m() { + Vector v = new Vector(); + Iterator iter = v.iterator(); + while (iter.hasNext()) { + Object o = iter.next(); + Object o2 = o; + } + for (Object o: v) { + Object o2 = o; + } + } +} + +class TestHelper2> { + void test(X x) { + for (String s : x) { } + } +} diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/annotations/repeatingAnnotations/DefaultTarget.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/annotations/repeatingAnnotations/DefaultTarget.java Mon Apr 01 21:42:15 2013 -0700 @@ -0,0 +1,47 @@ +/* + * 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. + */ + +import java.lang.annotation.*; + +/** + * @test + * @bug 8006547 + * @compile DefaultTarget.java + */ + +@Target({ + ElementType.CONSTRUCTOR, + ElementType.PARAMETER, + ElementType.TYPE, + ElementType.METHOD, + ElementType.LOCAL_VARIABLE, + ElementType.PACKAGE, + ElementType.ANNOTATION_TYPE, + ElementType.FIELD, +}) +@interface Container { + DefaultTarget[] value(); +} + +@Repeatable(Container.class) +public @interface DefaultTarget {} diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/annotations/repeatingAnnotations/DefaultTargetTypeParameter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/annotations/repeatingAnnotations/DefaultTargetTypeParameter.java Mon Apr 01 21:42:15 2013 -0700 @@ -0,0 +1,40 @@ +/* + * 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. + */ + +import java.lang.annotation.*; + +/** + * @test + * @bug 8006547 + * @compile/fail/ref=DefaultTargetTypeParameter.out -XDrawDiagnostics DefaultTargetTypeParameter.java + */ + +@Target({ + ElementType.TYPE_PARAMETER, +}) +@interface Container { + DefaultTargetTypeParameter[] value(); +} + +@Repeatable(Container.class) +public @interface DefaultTargetTypeParameter {} diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/annotations/repeatingAnnotations/DefaultTargetTypeParameter.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/annotations/repeatingAnnotations/DefaultTargetTypeParameter.out Mon Apr 01 21:42:15 2013 -0700 @@ -0,0 +1,2 @@ +DefaultTargetTypeParameter.java:39:1: compiler.err.invalid.repeatable.annotation.incompatible.target: Container, DefaultTargetTypeParameter +1 error diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/annotations/repeatingAnnotations/DefaultTargetTypeUse.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/annotations/repeatingAnnotations/DefaultTargetTypeUse.java Mon Apr 01 21:42:15 2013 -0700 @@ -0,0 +1,40 @@ +/* + * 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. + */ + +import java.lang.annotation.*; + +/** + * @test + * @bug 8006547 + * @compile/fail/ref=DefaultTargetTypeUse.out -XDrawDiagnostics DefaultTargetTypeUse.java + */ + +@Target({ + ElementType.TYPE_USE, +}) +@interface Container { + DefaultTargetTypeUse[] value(); +} + +@Repeatable(Container.class) +public @interface DefaultTargetTypeUse {} diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/annotations/repeatingAnnotations/DefaultTargetTypeUse.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/annotations/repeatingAnnotations/DefaultTargetTypeUse.out Mon Apr 01 21:42:15 2013 -0700 @@ -0,0 +1,2 @@ +DefaultTargetTypeUse.java:39:1: compiler.err.invalid.repeatable.annotation.incompatible.target: Container, DefaultTargetTypeUse +1 error diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/annotations/repeatingAnnotations/NoTargetOnContainer.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/annotations/repeatingAnnotations/NoTargetOnContainer.java Mon Apr 01 21:42:15 2013 -0700 @@ -0,0 +1,49 @@ +/* + * 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. + */ + +import java.lang.annotation.*; + +/** + * @test + * @bug 8006547 + * @compile NoTargetOnContainer.java + */ + +@interface FooContainer { + Foo[] value(); +} + +@Target({ + ElementType.CONSTRUCTOR, + ElementType.PARAMETER, + ElementType.TYPE, + ElementType.METHOD, + ElementType.LOCAL_VARIABLE, + ElementType.PACKAGE, + ElementType.ANNOTATION_TYPE, + ElementType.FIELD, +}) +@Repeatable(FooContainer.class) +@interface Foo {} + +class NoTargetOnContainer {} diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/annotations/repeatingAnnotations/NoTargetOnContainer2.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/annotations/repeatingAnnotations/NoTargetOnContainer2.java Mon Apr 01 21:42:15 2013 -0700 @@ -0,0 +1,50 @@ +/* + * 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. + */ + +import java.lang.annotation.*; + +/** + * @test + * @bug 8006547 + * @compile NoTargetOnContainer2.java + */ + +@interface FooContainer { + Foo[] value(); +} + +@Target({ + ElementType.CONSTRUCTOR, + ElementType.PARAMETER, + ElementType.TYPE, + ElementType.METHOD, + ElementType.LOCAL_VARIABLE, + ElementType.PACKAGE, + ElementType.ANNOTATION_TYPE, + ElementType.FIELD, + ElementType.TYPE_USE, + ElementType.TYPE_PARAMETER}) +@Repeatable(FooContainer.class) +@interface Foo {} + +class NoTargetOnContainer2 {} diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/annotations/repeatingAnnotations/combo/Helper.java --- a/test/tools/javac/annotations/repeatingAnnotations/combo/Helper.java Thu Mar 28 10:55:14 2013 -0700 +++ b/test/tools/javac/annotations/repeatingAnnotations/combo/Helper.java Mon Apr 01 21:42:15 2013 -0700 @@ -146,6 +146,7 @@ public static final String template = "/*PACKAGE*/\n" + "//pkg test;\n\n" + + "/*ANNODATA*/\n" // import statements, declaration of Foo/FooContainer + "/*TYPE*/ //class\n" + "class #ClassName {\n" + " /*FIELD*/ //instance var\n" diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/annotations/repeatingAnnotations/combo/TargetAnnoCombo.java --- a/test/tools/javac/annotations/repeatingAnnotations/combo/TargetAnnoCombo.java Thu Mar 28 10:55:14 2013 -0700 +++ b/test/tools/javac/annotations/repeatingAnnotations/combo/TargetAnnoCombo.java Mon Apr 01 21:42:15 2013 -0700 @@ -21,245 +21,404 @@ * questions. */ -/** +/* * @test - * @bug 7195131 - * @author sogoel - * @summary Combo test for all possible combinations for Target values - * @ignore 8008339 Test TargetAnnoCombo.java is broken + * @bug 7151010 8006547 8007766 + * @summary Default test cases for running combinations for Target values * @build Helper - * @compile TargetAnnoCombo.java TestCaseGenerator.java * @run main TargetAnnoCombo */ +import java.util.Set; +import java.util.List; import java.io.IOException; +import java.lang.annotation.ElementType; import java.util.ArrayList; import java.util.Arrays; -import java.util.HashSet; -import java.util.Set; +import java.util.EnumSet; import javax.tools.Diagnostic; import javax.tools.DiagnosticCollector; import javax.tools.JavaFileObject; -/* - * TargetAnnoCombo gets a list of test case numbers using TestCaseGenerator. - * For each of the test case number, @Target sets for base and container annotations - * are determined, source files are generated, compiled, and the result is verified - * based on if the @Target set for base and container is a positive or negative combination. - * - * @Target sets for base and container annotations are determined using a bit mapping of - * 10 ElementType enum constants defined in JDK8. - * - * Bit Target value - * 0 "ElementType.ANNOTATION_TYPE" - * 1 "ElementType.CONSTRUCTOR" - * 2 "ElementType.FIELD" - * 3 "ElementType.LOCAL_VARIABLE" - * 4 "ElementType.METHOD" - * 5 "ElementType.TYPE" - * 6 "ElementType.PARAMETER" - * 7 "ElementType.PACKAGE" - * 8 "ElementType.TYPE_USE" - * 9 "ElementType.TYPE_PARAMETER" - * - * Group 1: - * 20 bits mapping, representing a test case number, is used for all target set - * combinations ( 0 to 1048575 ) including empty @Target sets => @Target({}). - * From this 20 bits, 10 bits are for base followed by 10 bits for container - * where each bit maps to an ElementType enum constant defined in JDK8. - * - * Examples: - * Test case number: 4, binary: 100 => container=100, base=[], container=["ElementType.FIELD"] - * Test case number: 1003575, binary: 11110101000000110111 => base=1111010100, container=0000110111; - * base=["ElementType.PARAMETER", "ElementType.TYPE_USE", "ElementType.METHOD", "ElementType.FIELD", "ElementType.PACKAGE", "ElementType.TYPE_PARAMETER"], - * container=["ElementType.TYPE", "ElementType.METHOD", "ElementType.ANNOTATION_TYPE", "ElementType.CONSTRUCTOR", "ElementType.FIELD"] - * - * In the following groups, no @Target set is represented by null. - * Group 2: - * @Target is not defined on base. - * Target sets for container are determined using the 10-bit binary number - * resulting in 1024 test cases, mapping them to test case numbers from - * 1048576 to (1048576 + 1023) => 1048576 to 1049599. - * - * Example: - * Test case number: 1048587 => 1048587 - 1048576 = test case 11 in Group 2, binary: 1011 => - * base = null, - * container = ["ElementType.ANNOTATION_TYPE","ElementType.CONSTRUCTOR","ElementType.LOCAL_VARIABLE"] - * - * Group 3: - * @Target is not defined on container - * Target sets for base are determined using the 10-bit binary number - * resulting in 1024 test cases, mapping them to test case numbers from - * 1049600 to (1049600 + 1023) => 1049600 to 1050623. - * - * Example: - * Test case number: 1049708 => 1049708 - 1049600 = test case 108 in Group 3, binary: 1101100 => - * base = ["ElementType.FIELD", "ElementType.LOCAL_VARIABLE", "ElementType.TYPE", "ElementType.PARAMETER"], - * container = null - * - * For the above group, test case number: 1049855 gives compiler error, JDK-8006547 filed - * - * Group 4: - * @Target not defined for both base and container annotations. - * - * This is the last test and corresponds to test case number 1050624. base=null, container=null - * - * Examples to run this test: - * 1. Run a specific test case number: - * ${JTREG} -DTestCaseNum=10782 -samevm -jdk:${JAVA_TEST} -reportDir ${REPORT} -workDir ${WORK} TargetAnnoCombo.java - * 2. Run specific number of tests: - * ${JTREG} -DNumberOfTests=4 -samevm -jdk:${JAVA_TEST} -reportDir ${REPORT} -workDir ${WORK} TargetAnnoCombo.java - * 3. Run specific number of tests with a seed: - * ${JTREG} -DNumberOfTests=4 -DTestSeed=-972894659 -samevm -jdk:${JAVA_TEST} -reportDir ${REPORT} -workDir ${WORK} TargetAnnoCombo.java - * 4. Run tests in default mode (number of tests = 1000): - * ${JTREG} -DTestMode=DEFAULT -samevm -jdk:${JAVA_TEST} -reportDir ${REPORT} -workDir ${WORK} TargetAnnoCombo.java - * 5. Run all tests (FULL mode): - * ${JTREG} -DTestMode=FULL -samevm -jdk:${JAVA_TEST} -reportDir ${REPORT} -workDir ${WORK} TargetAnnoCombo.java - * - */ +import static java.lang.annotation.ElementType.ANNOTATION_TYPE; +import static java.lang.annotation.ElementType.CONSTRUCTOR; +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PARAMETER; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.ElementType.PACKAGE; +import static java.lang.annotation.ElementType.LOCAL_VARIABLE; +import static java.lang.annotation.ElementType.TYPE_USE; +import static java.lang.annotation.ElementType.TYPE_PARAMETER; public class TargetAnnoCombo { - int errors = 0; + static final String TESTPKG = "testpkg"; - /* - * Set it to true to get more debug information including base and - * container target sets for a given test case number - */ + + // Set it to true to get more debug information including base and container + // target sets for a given test case. static final boolean DEBUG = false; - // JDK 5/6/7/8 Targets - static final String[] targetVals = {"ElementType.ANNOTATION_TYPE", - "ElementType.CONSTRUCTOR", "ElementType.FIELD", - "ElementType.LOCAL_VARIABLE", "ElementType.METHOD", - "ElementType.TYPE", "ElementType.PARAMETER", - "ElementType.PACKAGE", "ElementType.TYPE_USE", - "ElementType.TYPE_PARAMETER"}; + // Define constant target sets to be used for the combination of the target values. + final static Set noSet = null; + final static Set empty = EnumSet.noneOf(ElementType.class); + + // [TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE, ANNOTATION_TYPE, + // PACKAGE, TYPE_PARAMETER, TYPE_USE] + final static Set allTargets = EnumSet.allOf(ElementType.class); + + // [TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE, ANNOTATION_TYPE, + // PACKAGE] + final static Set jdk7 = EnumSet.range(TYPE, PACKAGE); + + // [TYPE_USE, TYPE_PARAMETER] + final static Set jdk8 = EnumSet.range(TYPE_PARAMETER, TYPE_USE); + + // List of test cases to run. This list is created in generate(). + // To run a specific test cases add case number in @run main line. + List testCases = new ArrayList(); + + int errors = 0; + + // Identify test cases that fail. + enum IgnoreKind { + RUN, + IGNORE + }; + + private class TestCase { + + private Set baseAnnotations; + private Set containerAnnotations; + private IgnoreKind ignore; + + public TestCase(Set baseAnnotations, Set containerAnnotations) { + this(baseAnnotations, containerAnnotations, IgnoreKind.RUN); + } + + public TestCase(Set baseAnnotations, Set containerAnnotations, + IgnoreKind ignoreKind) { + this.baseAnnotations = baseAnnotations; + this.containerAnnotations = containerAnnotations; + this.ignore = ignoreKind; + } + + public Set getBaseAnnotations() { + return baseAnnotations; + } + + public Set getContainerAnnotations() { + return containerAnnotations; + } + + public boolean isIgnored() { + return ignore == IgnoreKind.IGNORE; + } - // TYPE_USE and TYPE_PARAMETER (added in JDK8) are not part of default Target set - static final int DEFAULT_TARGET_CNT = 8; + // Determine if a testCase should compile or not. + private boolean isValidSubSet() { + /* + * RULE 1: conAnnoTarget should be a subset of baseAnnoTarget + * RULE 2: For empty @Target ({}) - annotation cannot be applied anywhere + * - Empty sets for both is valid + * - Empty baseTarget set is invalid with non-empty conTarget set + * - Non-empty baseTarget set is valid with empty conTarget set + * RULE 3: For no @Target specified - annotation can be applied to any JDK 7 targets + * - No @Target for both is valid + * - No @Target for baseTarget set with @Target conTarget set is valid + * - @Target for baseTarget set with no @Target for conTarget is invalid + */ + + + /* If baseAnno has no @Target, Foo can be either applied to @Target specified + * for container annotation else will be applicable for all default targets + * if no @Target is present for container annotation. + * In both cases, the set will be a valid set with no @Target for base annotation + */ + if (baseAnnotations == null) { + if (containerAnnotations == null) { + return true; + } + return !(containerAnnotations.contains(TYPE_USE) || + containerAnnotations.contains(TYPE_PARAMETER)); + } + + Set tempBaseSet = EnumSet.noneOf(ElementType.class); + tempBaseSet.addAll(baseAnnotations); + // If BaseAnno has TYPE, then ANNOTATION_TYPE is allowed by default. + if (baseAnnotations.contains(TYPE)) { + tempBaseSet.add(ANNOTATION_TYPE); + } + + // If containerAnno has no @Target, only valid case if baseAnnoTarget has + // all targets defined else invalid set. + if (containerAnnotations == null) { + return tempBaseSet.containsAll(jdk7); + } + + // At this point, neither conAnnoTarget or baseAnnoTarget are null. + if (containerAnnotations.isEmpty()) { + return true; + } + + // At this point, conAnnoTarget is non-empty. + if (baseAnnotations.isEmpty()) { + return false; + } + + // At this point, neither conAnnoTarget or baseAnnoTarget are empty. + return tempBaseSet.containsAll(containerAnnotations); + } + } public static void main(String args[]) throws Exception { - - /* maxTestNum = (base and container combinations of targetVals elems [0 - 1048575 combos]) - * + (combinations where base or container has no Target [1024 combos]) - * + (no -1 even though 1st test is number 0 as last test is where both - * base and container have no target) - */ - - int maxTestNum = (int)Math.pow(2, 2*targetVals.length) + 2*(int)Math.pow(2, targetVals.length); - TestCaseGenerator tcg = new TestCaseGenerator(maxTestNum); TargetAnnoCombo tac = new TargetAnnoCombo(); - - int testCtr = 0; - int testCase = -1; - while ( (testCase=tcg.getNextTestCase()) != -1 ) { - tac.executeTestCase(testCase, maxTestNum); - testCtr++; + // Generates all test cases to be run. + tac.generate(); + List cases = new ArrayList(); + for (int i = 0; i < args.length; i++) { + cases.add(Integer.parseInt(args[i])); } - - System.out.println("Total tests run: " + testCtr); - if (tac.errors > 0) - throw new Exception(tac.errors + " errors found"); + if (cases.isEmpty()) { + tac.run(); + } else { + for (int index : cases) { + tac.executeTestCase(tac.testCases.get(index), index); + } + } } - /* - * For given testCase, determine the base and container annotation Target sets, - * get if testCase should compile, get test source file(s), get compilation result and verify. - * - */ - private void executeTestCase(int testCase, int maxTestNum) { - - // Determine base and container annotation Target sets for the testCase - Set baseAnnoTarget = null; - Set conAnnoTarget = null; - - //Number of base and container combinations [0 - 1048575 combos] - int baseContCombos = (int)Math.pow(2, 2*targetVals.length); - //Number of either base or container combinations when one of them has no @Target [1024 combos] - int targetValsCombos = (int)Math.pow(2, targetVals.length); - - if (testCase >= baseContCombos) { - //Base annotation do not have @Target - if (testCase < baseContCombos + targetValsCombos) { - baseAnnoTarget = null; - conAnnoTarget = getSetFromBitVec(Integer.toBinaryString(testCase - baseContCombos)); - } else if (testCase < baseContCombos + 2*targetValsCombos) { - //Container annotation do not have @Target - baseAnnoTarget = getSetFromBitVec(Integer.toBinaryString(testCase - baseContCombos - targetValsCombos)); - conAnnoTarget = null; - } else { - //Both Base and Container annotation do not have @Target - baseAnnoTarget = null; - conAnnoTarget = null; + private void generate() { + // Adding test cases to run. + testCases.addAll(Arrays.asList( + // No base target against no container target. + new TestCase(noSet, noSet), + // No base target against empty container target. + new TestCase(noSet, empty), + // No base target against TYPE_USE only container target. + new TestCase(noSet, less(jdk8, TYPE_PARAMETER)), + // No base target against TYPE_PARAMETER only container target. + new TestCase(noSet, less(jdk8, TYPE_USE)), + // No base target against TYPE_USE + TYPE_PARAMETER only container target. + new TestCase(noSet, jdk8), + // No base target against TYPE_USE + some selection of jdk7 targets. + new TestCase(noSet, + plus(EnumSet.range(TYPE, LOCAL_VARIABLE), TYPE_USE)), + // No base target against TYPE_PARAMETER + some selection of jdk7 targets. + new TestCase(noSet, + plus(EnumSet.range(TYPE, LOCAL_VARIABLE), TYPE_PARAMETER)), + // No base target against each jdk7 target alone as container target. + new TestCase(noSet, plus(empty, TYPE)), + new TestCase(noSet, plus(empty, PARAMETER)), + new TestCase(noSet, plus(empty, PACKAGE)), + new TestCase(noSet, plus(empty, METHOD)), + new TestCase(noSet, plus(empty, LOCAL_VARIABLE)), + new TestCase(noSet, plus(empty, FIELD)), + new TestCase(noSet, plus(empty, CONSTRUCTOR)), + new TestCase(noSet, plus(empty, ANNOTATION_TYPE)), + // Empty base target against no container target. + new TestCase(empty, noSet), + // Empty base target against empty container target. + new TestCase(empty, empty), + // Empty base target against any lone container target. + new TestCase(empty, plus(empty, TYPE)), + new TestCase(empty, plus(empty, PARAMETER)), + new TestCase(empty, plus(empty, PACKAGE)), + new TestCase(empty, plus(empty, METHOD)), + new TestCase(empty, plus(empty, LOCAL_VARIABLE)), + new TestCase(empty, plus(empty, FIELD)), + new TestCase(empty, plus(empty, CONSTRUCTOR)), + new TestCase(empty, plus(empty, ANNOTATION_TYPE)), + new TestCase(empty, less(jdk8, TYPE_USE)), + new TestCase(empty, less(jdk8, TYPE_PARAMETER)), + // No container target against all all-but one jdk7 targets. + new TestCase(less(jdk7, TYPE), noSet), + new TestCase(less(jdk7, PARAMETER), noSet), + new TestCase(less(jdk7, PACKAGE), noSet), + new TestCase(less(jdk7, METHOD), noSet), + new TestCase(less(jdk7, LOCAL_VARIABLE), noSet), + new TestCase(less(jdk7, FIELD), noSet), + new TestCase(less(jdk7, CONSTRUCTOR), noSet), + new TestCase(less(jdk7, ANNOTATION_TYPE), noSet), + // No container against all but TYPE and ANNOTATION_TYPE + new TestCase(less(jdk7, TYPE, ANNOTATION_TYPE), noSet), + // No container against jdk7 targets. + new TestCase(jdk7, noSet), + // No container against jdk7 targets plus one or both of TYPE_USE, TYPE_PARAMETER + new TestCase(plus(jdk7, TYPE_USE), noSet), + new TestCase(plus(jdk7, TYPE_PARAMETER), noSet), + new TestCase(allTargets, noSet), + // Empty container target against any lone target. + new TestCase(plus(empty, TYPE), empty), + new TestCase(plus(empty, PARAMETER), empty), + new TestCase(plus(empty, PACKAGE), empty), + new TestCase(plus(empty, METHOD), empty), + new TestCase(plus(empty, LOCAL_VARIABLE), empty), + new TestCase(plus(empty, FIELD), empty), + new TestCase(plus(empty, CONSTRUCTOR), empty), + new TestCase(plus(empty, ANNOTATION_TYPE), empty), + new TestCase(plus(empty, TYPE_USE), empty), + new TestCase(plus(empty, TYPE_PARAMETER), empty), + // All base targets against all container targets. + new TestCase(allTargets, allTargets), + // All base targets against all but one container targets. + new TestCase(allTargets, less(allTargets, TYPE)), + new TestCase(allTargets, less(allTargets, PARAMETER)), + new TestCase(allTargets, less(allTargets, PACKAGE)), + new TestCase(allTargets, less(allTargets, METHOD)), + new TestCase(allTargets, less(allTargets, LOCAL_VARIABLE)), + new TestCase(allTargets, less(allTargets, FIELD)), + new TestCase(allTargets, less(allTargets, CONSTRUCTOR)), + new TestCase(allTargets, less(allTargets, ANNOTATION_TYPE)), + new TestCase(allTargets, less(allTargets, TYPE_USE)), + new TestCase(allTargets, less(allTargets, TYPE_PARAMETER)), + // All container targets against all but one base targets. + new TestCase(less(allTargets, TYPE), allTargets), + new TestCase(less(allTargets, PARAMETER), allTargets), + new TestCase(less(allTargets, PACKAGE), allTargets), + new TestCase(less(allTargets, METHOD), allTargets), + new TestCase(less(allTargets, LOCAL_VARIABLE), allTargets), + new TestCase(less(allTargets, FIELD), allTargets), + new TestCase(less(allTargets, CONSTRUCTOR), allTargets), + new TestCase(less(allTargets, ANNOTATION_TYPE), allTargets), + new TestCase(less(allTargets, TYPE_USE), allTargets), + new TestCase(less(allTargets, TYPE_PARAMETER), allTargets))); + // Generates 100 test cases for any lone base target contained in Set + // allTargets against any lone container target. + for (ElementType b : allTargets) { + for (ElementType c : allTargets) { + testCases.add(new TestCase(plus(empty, b), plus(empty, c))); } - } else { - //TestCase number is represented as 10-bits for base followed by container bits - String bin = Integer.toBinaryString(testCase); - String base="", cont=bin; - if (bin.length() > targetVals.length){ - base = bin.substring(0, bin.length() - targetVals.length); - cont = bin.substring(bin.length() - targetVals.length,bin.length()); - } - baseAnnoTarget = getSetFromBitVec(base); - conAnnoTarget = getSetFromBitVec(cont); } - - debugPrint("Test case number = " + testCase + " => binary = " + Integer.toBinaryString(testCase)); - debugPrint(" => baseAnnoTarget = " + baseAnnoTarget); - debugPrint(" => containerAnnoTarget = " + conAnnoTarget); + } - // Determine if a testCase should compile or not - String className = "TC" + testCase; - boolean shouldCompile = isValidSubSet(baseAnnoTarget, conAnnoTarget); - - // Get test source file(s) - Iterable files = getFileList(className, baseAnnoTarget, - conAnnoTarget, shouldCompile); + void run() throws Exception { + int testCtr = 0; + for (TestCase tc : testCases) { + if (!tc.isIgnored()) { + executeTestCase(tc, testCases.indexOf(tc)); + testCtr++; + } + } + System.out.println("Total tests run: " + testCtr); + if (errors > 0) { + throw new Exception(errors + " errors found"); + } + } - // Get result of compiling test src file(s) - boolean result = getCompileResult(className, shouldCompile, files); + private void executeTestCase(TestCase testCase, int index) { + debugPrint("Test case number = " + index); + debugPrint(" => baseAnnoTarget = " + testCase.getBaseAnnotations()); + debugPrint(" => containerAnnoTarget = " + testCase.getContainerAnnotations()); - // List test src code if test fails - if(!result) { - System.out.println("FAIL: Test " + testCase); + String className = "TC" + index; + boolean shouldCompile = testCase.isValidSubSet(); + Iterable files = getFileList(className, testCase, shouldCompile); + // Get result of compiling test src file(s). + boolean result = getCompileResult(className, shouldCompile, files); + // List test src code if test fails. + if (!result) { + System.out.println("FAIL: Test " + index); try { - for (JavaFileObject f: files) { + for (JavaFileObject f : files) { System.out.println("File: " + f.getName() + "\n" + f.getCharContent(true)); } } catch (IOException ioe) { System.out.println("Exception: " + ioe); } } else { - debugPrint("PASS: Test " + testCase); + debugPrint("PASS: Test " + index); } + } - // Get a Set based on bits that are set to 1 - public Set getSetFromBitVec(String bitVec) { - Set ret = new HashSet<>(); - char[] bit = bitVec.toCharArray(); - for (int i=bit.length-1, j=0; i>=0; i--, j++){ - if (bit[i] == '1') { - ret.add(targetVals[j]); + // Create src code and corresponding JavaFileObjects. + private Iterable getFileList(String className, + TestCase testCase, boolean shouldCompile) { + Set baseAnnoTarget = testCase.getBaseAnnotations(); + Set conAnnoTarget = testCase.getContainerAnnotations(); + String srcContent = ""; + String pkgInfoContent = ""; + String template = Helper.template; + String baseTarget = "", conTarget = ""; + + String target = Helper.ContentVars.TARGET.getVal(); + if (baseAnnoTarget != null) { + String tmp = target.replace("#VAL", convertToString(baseAnnoTarget).toString()); + baseTarget = tmp.replace("[", "{").replace("]", "}"); + } + if (conAnnoTarget != null) { + String tmp = target.replace("#VAL", convertToString(conAnnoTarget).toString()); + conTarget = tmp.replace("[", "{").replace("]", "}"); + } + + String annoData = Helper.ContentVars.IMPORTSTMTS.getVal() + + conTarget + + Helper.ContentVars.CONTAINER.getVal() + + baseTarget + + Helper.ContentVars.REPEATABLE.getVal() + + Helper.ContentVars.BASE.getVal(); + + JavaFileObject pkgInfoFile = null; + + // If shouldCompile = true and no @Target is specified for container annotation, + // then all 8 ElementType enum constants are applicable as targets for + // container annotation. + if (shouldCompile && conAnnoTarget == null) { + Set copySet = EnumSet.noneOf(ElementType.class); + copySet.addAll(jdk7); + conAnnoTarget = copySet; + } + + if (shouldCompile) { + boolean isPkgCasePresent = conAnnoTarget.contains(PACKAGE); + String repeatableAnno = Helper.ContentVars.BASEANNO.getVal() + + " " + Helper.ContentVars.BASEANNO.getVal(); + for (ElementType s : conAnnoTarget) { + String replaceStr = "/*" + s.name() + "*/"; + if (s.name().equalsIgnoreCase("PACKAGE")) { + //Create packageInfo file. + String pkgInfoName = TESTPKG + "." + "package-info"; + pkgInfoContent = repeatableAnno + "\npackage " + TESTPKG + ";" + annoData; + pkgInfoFile = Helper.getFile(pkgInfoName, pkgInfoContent); + } else { + template = template.replace(replaceStr, repeatableAnno); + if (!isPkgCasePresent) { + srcContent = template.replace( + "/*ANNODATA*/", annoData).replace("#ClassName", className); + } else { + replaceStr = "/*PACKAGE*/"; + String tmp = template.replace(replaceStr, "package " + TESTPKG + ";"); + srcContent = tmp.replace("#ClassName", className); + } + } } + } else { + // For invalid cases, compilation should fail at declaration site. + template = "class #ClassName {}"; + srcContent = annoData + template.replace("#ClassName", className); } - return ret; + JavaFileObject srcFile = Helper.getFile(className, srcContent); + Iterable files = null; + if (pkgInfoFile != null) { + files = Arrays.asList(pkgInfoFile, srcFile); + } else { + files = Arrays.asList(srcFile); + } + return files; } - // Compile the test source file(s) and return test result + // Compile the test source file(s) and return test result. private boolean getCompileResult(String className, boolean shouldCompile, Iterable files) { DiagnosticCollector diagnostics = new DiagnosticCollector(); Helper.compileCode(diagnostics, files); - - // Test case pass or fail + // Test case pass or fail. boolean ok = false; - String errMesg = ""; int numDiags = diagnostics.getDiagnostics().size(); - if (numDiags == 0) { if (shouldCompile) { debugPrint("Test passed, compiled as expected."); @@ -270,201 +429,80 @@ } } else { if (shouldCompile) { - // did not compile + // did not compile. errMesg = "Test failed, did not compile."; ok = false; } else { - // Error in compilation as expected - String expectedErrKey = "compiler.err.invalid.repeatable." + - "annotation.incompatible.target"; + // Error in compilation as expected. + String expectedErrKey = "compiler.err.invalid.repeatable." + + "annotation.incompatible.target"; for (Diagnostic d : diagnostics.getDiagnostics()) { - if((d.getKind() == Diagnostic.Kind.ERROR) && - d.getCode().contains(expectedErrKey)) { - // Error message as expected + if ((d.getKind() == Diagnostic.Kind.ERROR) + && d.getCode().contains(expectedErrKey)) { + // Error message as expected. debugPrint("Error message as expected."); ok = true; break; } else { - // error message is incorrect + // error message is incorrect. ok = false; } } if (!ok) { - errMesg = "Incorrect error received when compiling " + - className + ", expected: " + expectedErrKey; + errMesg = "Incorrect error received when compiling " + + className + ", expected: " + expectedErrKey; } } } - if(!ok) { + if (!ok) { error(errMesg); - for (Diagnostic d : diagnostics.getDiagnostics()) + for (Diagnostic d : diagnostics.getDiagnostics()) { System.out.println(" Diags: " + d); + } } return ok; } - private void debugPrint(String string) { - if(DEBUG) - System.out.println(string); + private Set less(Set base, ElementType... sub) { + Set res = EnumSet.noneOf(ElementType.class); + res.addAll(base); + for (ElementType t : sub) { + res.remove(t); + } + return res; + } + + private Set plus(Set base, ElementType... add) { + Set res = EnumSet.noneOf(ElementType.class); + res.addAll(base); + for (ElementType t : add) { + res.add(t); + } + return res; } - // Create src code and corresponding JavaFileObjects - private Iterable getFileList(String className, - Set baseAnnoTarget, Set conAnnoTarget, - boolean shouldCompile) { - - String srcContent = ""; - String pkgInfoContent = ""; - String template = Helper.template; - String baseTarget = "", conTarget = ""; - - String target = Helper.ContentVars.TARGET.getVal(); - if(baseAnnoTarget != null) { - baseTarget = target.replace("#VAL", baseAnnoTarget.toString()) - .replace("[", "{").replace("]", "}"); - } - if(conAnnoTarget != null) { - conTarget = target.replace("#VAL", conAnnoTarget.toString()) - .replace("[", "{").replace("]", "}"); + // Iterate target set and add "ElementType." in front of every target type. + private List convertToString(Set annoTarget) { + if (annoTarget == null) { + return null; } - - String annoData = Helper.ContentVars.IMPORTSTMTS.getVal() + - conTarget + - Helper.ContentVars.CONTAINER.getVal() + - baseTarget + - Helper.ContentVars.REPEATABLE.getVal() + - Helper.ContentVars.BASE.getVal(); - - JavaFileObject pkgInfoFile = null; - - /* - * If shouldCompile = true and no @Target is specified for container annotation, - * then all 8 ElementType enum constants are applicable as targets for - * container annotation. - */ - if(shouldCompile && conAnnoTarget == null) { - //conAnnoTarget = new HashSet(Arrays.asList(targetVals)); - conAnnoTarget = getDefaultTargetSet(); + List annoTargets = new ArrayList(); + for (ElementType e : annoTarget) { + annoTargets.add("ElementType." + e.name()); } - - if(shouldCompile) { - boolean isPkgCasePresent = new ArrayList(conAnnoTarget).contains("ElementType.PACKAGE"); - String repeatableAnno = Helper.ContentVars.BASEANNO.getVal() + " " + Helper.ContentVars.BASEANNO.getVal(); - for(String s: conAnnoTarget) { - s = s.replace("ElementType.",""); - String replaceStr = "/*"+s+"*/"; - if(s.equalsIgnoreCase("PACKAGE")) { - //Create packageInfo file - String pkgInfoName = TESTPKG + "." + "package-info"; - pkgInfoContent = repeatableAnno + "\npackage " + TESTPKG + ";" + annoData; - pkgInfoFile = Helper.getFile(pkgInfoName, pkgInfoContent); - } else { - template = template.replace(replaceStr, repeatableAnno); - //srcContent = template.replace("#ClassName",className); - if(!isPkgCasePresent) { - srcContent = template.replace("/*ANNODATA*/", annoData).replace("#ClassName",className); - } else { - replaceStr = "/*PACKAGE*/"; - srcContent = template.replace(replaceStr, "package " + TESTPKG + ";") - .replace("#ClassName", className); - } - } - } - } else { - // For invalid cases, compilation should fail at declaration site - template = "class #ClassName {}"; - srcContent = annoData + template.replace("#ClassName",className); - } - JavaFileObject srcFile = Helper.getFile(className, srcContent); - Iterable files = null; - if(pkgInfoFile != null) - files = Arrays.asList(pkgInfoFile,srcFile); - else - files = Arrays.asList(srcFile); - return files; + return annoTargets; } - private Set getDefaultTargetSet() { - Set defaultSet = new HashSet<>(); - int ctr = 0; - for(String s : targetVals) { - if(ctr++ < DEFAULT_TARGET_CNT) { - defaultSet.add(s); - } + private void debugPrint(String string) { + if (DEBUG) { + System.out.println(string); } - return defaultSet; } - private boolean isValidSubSet(Set baseAnnoTarget, Set conAnnoTarget) { - /* - * RULE 1: conAnnoTarget should be a subset of baseAnnoTarget - * RULE 2: For empty @Target ({}) - annotation cannot be applied anywhere - * - Empty sets for both is valid - * - Empty baseTarget set is invalid with non-empty conTarget set - * - Non-empty baseTarget set is valid with empty conTarget set - * RULE 3: For no @Target specified - annotation can be applied to any JDK 7 targets - * - No @Target for both is valid - * - No @Target for baseTarget set with @Target conTarget set is valid - * - @Target for baseTarget set with no @Target for conTarget is invalid - */ - - - /* If baseAnno has no @Target, Foo can be either applied to @Target specified for container annotation - * else will be applicable for all default targets if no @Target is present for container annotation. - * In both cases, the set will be a valid set with no @Target for base annotation - */ - if(baseAnnoTarget == null) { - if(conAnnoTarget == null) return true; - return !(conAnnoTarget.contains("ElementType.TYPE_USE") || conAnnoTarget.contains("ElementType.TYPE_PARAMETER")); - } - - Set tempBaseSet = new HashSet<>(baseAnnoTarget); - // If BaseAnno has TYPE, then ANNOTATION_TYPE is allowed by default - if(baseAnnoTarget.contains("ElementType.TYPE")) { - tempBaseSet.add("ElementType.ANNOTATION_TYPE"); - } - - /* - * If containerAnno has no @Target, only valid case if baseAnnoTarget has all targets defined - * else invalid set - */ - if(conAnnoTarget == null) { - return (tempBaseSet.containsAll(getDefaultTargetSet())); - } - - // At this point, neither conAnnoTarget or baseAnnoTarget are null - if(conAnnoTarget.size() == 0) return true; - - // At this point, conAnnoTarget is non-empty - if (baseAnnoTarget.size() == 0) return false; - - // At this point, neither conAnnoTarget or baseAnnoTarget are empty - return tempBaseSet.containsAll(conAnnoTarget); - } - - void error(String msg) { + private void error(String msg) { System.out.println("ERROR: " + msg); errors++; } - - // Lists the start and end range for the given set of target vals - void showGroups() { - //Group 1: All target set combinations ( 0 to 1048575 ) including empty @Target sets => @Target({}) - int grpEnd1 = (int)Math.pow(2, 2*targetVals.length) - 1; - System.out.println("[Group 1]: 0 - " + grpEnd1); +} - //Group 2: @Target not defined for base annotation ( 1048576 - 1049599 ). - System.out.print("[Group 2]: " + (grpEnd1 + 1) + " - "); - int grpEnd2 = grpEnd1 + 1 + (int)Math.pow(2, targetVals.length) - 1; - System.out.println(grpEnd2); - - //Group 3: @Target not defined for container annotation ( 1049600 - 1050623 ). - System.out.print("[Group 3]: " + (grpEnd2 + 1) + " - "); - int grpEnd3 = grpEnd2 + 1 + (int)Math.pow(2, targetVals.length) - 1; - System.out.println(grpEnd3); - - //Group 4: @Target not defined for both base and container annotations ( 1050624 ). - System.out.println("[Group 4]: " + (grpEnd3 + 1)); - } -} diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/annotations/repeatingAnnotations/combo/TestCaseGenerator.java --- a/test/tools/javac/annotations/repeatingAnnotations/combo/TestCaseGenerator.java Thu Mar 28 10:55:14 2013 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,191 +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. - */ - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Random; - -/* System properties: - * NumberOfTests, TestMode, and TestCaseNum are mutually exclusive - * TestSeed will be used only with NumberOfTests or TestMode, otherwise it will be ignored - * -DNumberOfTests=[0 to 2^20+2^11+1] - * -DTestMode=[FULL|DEFAULT] - * -DTestSeed=[seedNumber] - * -DTestCaseNum=[0 to 2^20+2^11+1] - */ -public class TestCaseGenerator { - // Total number of tests to be run - int numberOfTests = -1; - //Single test case - int testCaseNum = -1; - //Seed used to generate test cases - int testSeed; - - int maxTestNum; - Random randNum; - - // used in getNextTestCase - int curTestNum; - int testCompletedCount; - HashSet uniqueTestSet; - - static final int DEFAULT_TEST_COUNT = 250; - - /* - * Get parameter values from command line to set numberOfTests, testCaseNum, - * and testSeed - */ - public TestCaseGenerator(int maxTestNum) { - this.maxTestNum = maxTestNum; - - // Set values for variables based on input from command line - - // TestMode system property - String testModeVal = System.getProperty("TestMode"); - if(testModeVal != null && !testModeVal.isEmpty()) { - switch (testModeVal.toUpperCase()) { - case "FULL": - numberOfTests = maxTestNum; - break; - case "DEFAULT": - numberOfTests = DEFAULT_TEST_COUNT; - break; - default: - System.out.println("Invalid property value " + testModeVal + - " for numberOfTests. Possible range: 0 to " + - maxTestNum + ". Ignoring property"); - numberOfTests = -1; - } - } - - // NumberOfTests system property - String numTestsStr = System.getProperty("NumberOfTests"); - if(numTestsStr != null && !numTestsStr.isEmpty()) { - int numTests = -1; - try { - numTests = Integer.parseInt(numTestsStr); - if (numTests < 0 || numTests > maxTestNum) { - throw new NumberFormatException(); - } - } catch(NumberFormatException nfe) { - System.out.println("Invalid NumberOfTests property value " + - numTestsStr + ". Possible range: 0 to " + maxTestNum + - "Reset to default: " + DEFAULT_TEST_COUNT); - numTests = DEFAULT_TEST_COUNT; - } - - if (numberOfTests != -1 && numTests != -1) { - System.out.println("TestMode and NumberOfTests cannot be set together. Ignoring TestMode."); - } - numberOfTests = numTests; - } - - // TestSeed system property - String seedVal = System.getProperty("TestSeed"); - if(seedVal != null && !seedVal.isEmpty()) { - try { - testSeed = Integer.parseInt(seedVal); - } catch(NumberFormatException nfe) { - Random srand = new Random(); - testSeed = srand.nextInt(); - } - } else { - Random srand = new Random(); - testSeed = srand.nextInt(); - } - - // TestCaseNum system property - String testNumStr = System.getProperty("TestCaseNum"); - if(testNumStr != null && !testNumStr.isEmpty()) { - try { - testCaseNum = Integer.parseInt(testNumStr); - if (testCaseNum < 0 || testCaseNum > maxTestNum) { - throw new NumberFormatException(); - } - } catch(NumberFormatException nfe) { - System.out.println("Invalid TestCaseNumber property value " + - testNumStr + ". Possible value in range: 0 to " + - maxTestNum + ". Defaulting to last test case."); - testCaseNum = maxTestNum; - } - - if ( numberOfTests != -1) { - System.out.println("TestMode or NumberOfTests cannot be set along with TestCaseNum. Ignoring TestCaseNumber."); - testCaseNum = -1; - } - } - - if (numberOfTests == -1 && testCaseNum == -1) { - numberOfTests = DEFAULT_TEST_COUNT; - System.out.println("Setting TestMode to default, will run " + numberOfTests + "tests."); - } - - /* - * By this point in code, we will have: - * - testSeed: as per TestSeed or a Random one - * - numberOfTests to run or -1 to denote not set - * - testCaseNum to run or -1 to denote not set - */ - - /* - * If numberOfTests = maxTestNum, all tests are to be run, - * so no randNum will be required - */ - if (numberOfTests != -1 && numberOfTests < maxTestNum) { - System.out.println("Seed = " + testSeed); - randNum = new Random(testSeed); - uniqueTestSet = new HashSet<>(); - } - - testCompletedCount = 0; - // to be used to keep sequential count when running all tests - curTestNum = 0; - } - - /* - * returns next test case number to run - * returns -1 when there are no more tests to run - */ - public int getNextTestCase() { - if (testCaseNum != -1) { - int nextTC = testCaseNum; - testCaseNum = -1; - return nextTC; - } - if (++testCompletedCount <= numberOfTests) { - if (numberOfTests == maxTestNum) { - //all the tests need to be run, so just return - //next test case sequentially - return curTestNum++; - } else { - int nextTC = -1; - // Ensuring unique test are run - while(!uniqueTestSet.add(nextTC = randNum.nextInt(maxTestNum))) { - } - return nextTC; - } - } - return -1; - } -} diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/api/TestJavacTaskScanner.java --- a/test/tools/javac/api/TestJavacTaskScanner.java Thu Mar 28 10:55:14 2013 -0700 +++ b/test/tools/javac/api/TestJavacTaskScanner.java Mon Apr 01 21:42:15 2013 -0700 @@ -179,7 +179,6 @@ @Override public Scanner newScanner(CharSequence input, boolean keepDocComments) { - assert !keepDocComments; if (input instanceof CharBuffer) { return new MyScanner(this, (CharBuffer)input, test); } else { @@ -190,7 +189,6 @@ @Override public Scanner newScanner(char[] input, int inputLength, boolean keepDocComments) { - assert !keepDocComments; return new MyScanner(this, input, inputLength, test); } diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/diags/MessageFile.java --- a/test/tools/javac/diags/MessageFile.java Thu Mar 28 10:55:14 2013 -0700 +++ b/test/tools/javac/diags/MessageFile.java Mon Apr 01 21:42:15 2013 -0700 @@ -65,7 +65,7 @@ } void insertAfter(Line l) { - assert prev == null && next == null; + assert l.prev == null && l.next == null; l.prev = this; l.next = next; if (next == null) @@ -82,7 +82,7 @@ } void insertBefore(Line l) { - assert prev == null && next == null; + assert l.prev == null && l.next == null; l.prev = prev; l.next = this; if (prev == null) diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/diags/MessageInfo.java --- a/test/tools/javac/diags/MessageInfo.java Thu Mar 28 10:55:14 2013 -0700 +++ b/test/tools/javac/diags/MessageInfo.java Mon Apr 01 21:42:15 2013 -0700 @@ -409,5 +409,3 @@ } } - - diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/lambda/DoubleStaticImport.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/lambda/DoubleStaticImport.java Mon Apr 01 21:42:15 2013 -0700 @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2011, 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 8009820 + * @summary AssertionError when compiling java code with two identical static imports + * @compile DoubleStaticImport.java + */ + +import static java.lang.Thread.holdsLock; +import static java.lang.Thread.holdsLock; //dup + +class DoubleStaticImport { + public void test() { + holdsLock(null); + } +} diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/lambda/Intersection02.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/lambda/Intersection02.java Mon Apr 01 21:42:15 2013 -0700 @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2012, 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 8010101 + * @summary Intersection type cast issues redundant unchecked warning + * @compile/fail/ref=Intersection02.out -Werror -Xlint:unchecked -XDrawDiagnostics Intersection02.java + */ +import java.io.Serializable; +import java.util.List; + +class Intersection02 { + + interface P { } + + void test(List ls) { + Object o1 = (List & Serializable)ls; + Object o2 = (List & Serializable & P)ls; + } +} diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/lambda/Intersection02.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/lambda/Intersection02.out Mon Apr 01 21:42:15 2013 -0700 @@ -0,0 +1,4 @@ +Intersection02.java:39:62: compiler.warn.prob.found.req: (compiler.misc.unchecked.cast.to.type), java.util.List, java.lang.Object&java.util.List&java.io.Serializable&Intersection02.P +- compiler.err.warnings.and.werror +1 error +1 warning diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/lambda/LambdaLambdaSerialized.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/lambda/LambdaLambdaSerialized.java Mon Apr 01 21:42:15 2013 -0700 @@ -0,0 +1,79 @@ +/* + * 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 8010010 +@summary NPE generating serializedLambdaName for nested lambda +*/ + +import java.io.*; +import java.util.Map; +import java.util.HashMap; + +public class LambdaLambdaSerialized { + + static int assertionCount = 0; + + static void assertTrue(boolean cond) { + assertionCount++; + if (!cond) + throw new AssertionError(); + } + + public static void main(String[] args) throws Exception { + try { + // Write lambdas out + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + ObjectOutput out = new ObjectOutputStream(baos); + LSI> ssi = () -> (() -> new HashMap()); + write(out, ssi ); + out.flush(); + out.close(); + + // Read them back + ByteArrayInputStream bais = + new ByteArrayInputStream(baos.toByteArray()); + ObjectInputStream in = new ObjectInputStream(bais); + readAssert(in, "[X]"); + in.close(); + } catch (IOException e) { + e.printStackTrace(); + throw e; + } + } + + static void write(ObjectOutput out, LSI> lamb) throws IOException { + out.writeObject(lamb); + } + + static void readAssert(ObjectInputStream in, String expected) throws IOException, ClassNotFoundException { + LSI> ls = (LSI>) in.readObject(); + Map result = ls.get().get(); + System.out.printf("Result: %s\n", result); + } +} + +interface LSI extends Serializable { + T get(); +} diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/lambda/TargetType28.out --- a/test/tools/javac/lambda/TargetType28.out Thu Mar 28 10:55:14 2013 -0700 +++ b/test/tools/javac/lambda/TargetType28.out Mon Apr 01 21:42:15 2013 -0700 @@ -1,2 +1,2 @@ -TargetType28.java:20:32: compiler.err.prob.found.req: (compiler.misc.incompatible.eq.upper.bounds: X, java.lang.String,R, java.lang.Object,java.lang.Number) +TargetType28.java:20:32: compiler.err.prob.found.req: (compiler.misc.incompatible.eq.upper.bounds: X, R,java.lang.String, java.lang.Object,java.lang.Number) 1 error diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/lambda/TargetType67.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/lambda/TargetType67.java Mon Apr 01 21:42:15 2013 -0700 @@ -0,0 +1,50 @@ +/* + * 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 8010303 + * @summary Graph inference: missing incorporation step causes spurious inference error + * @compile TargetType67.java + */ +class TargetType67 { + + interface Func { + B f(A a); + } + + class List { + + List map(Func f) { + return null; + } + + List apply(final List> lf) { + return null; + } + + List bind(final List lb, final Func> f) { + return lb.apply(map(f)); + } + } +} diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/lambda/TargetType68.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/lambda/TargetType68.java Mon Apr 01 21:42:15 2013 -0700 @@ -0,0 +1,63 @@ +/* + * 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 8010303 + * @summary Graph inference: missing incorporation step causes spurious inference error + * @compile TargetType68.java + */ +import java.util.*; + +class TargetType68 { + + //derived from FX 2.2 API + static class XYChart { + static final class Series { + Series(java.lang.String name, ObservableList> data) { } + } + + static final class Data { } + + ObservableList> getData() { return null; } + } + + //derived from FX 2.2 API + interface ObservableList extends List { + boolean setAll(Collection col); + } + + //derived from FX 2.2 API + static class FXCollections { + static ObservableList observableList(List l) { return null; } + } + + private void testMethod() { + XYChart numberChart = null; + List> data_1 = new ArrayList<>(); + List> data_2 = new ArrayList<>(); + numberChart.getData().setAll( + Arrays.asList(new XYChart.Series<>("Data", FXCollections.observableList(data_1)), + new XYChart.Series<>("Data", FXCollections.observableList(data_2)))); + } +} diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/lambda/TargetType69.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/lambda/TargetType69.java Mon Apr 01 21:42:15 2013 -0700 @@ -0,0 +1,51 @@ +/* + * 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 8010303 + * @summary Graph inference: missing incorporation step causes spurious inference error + * @compile TargetType68.java + */ +import java.util.*; + +class TargetType68 { + + interface Function { + Y m(X x); + } + + abstract class TabulationAssertion { } + + class GroupedMapAssertion> extends TabulationAssertion { + GroupedMapAssertion(Function classifier) { } + } + + + void exerciseMapTabulation(Function collector, + TabulationAssertion assertion) { } + + void test(Function classifier, Function>> coll) { + exerciseMapTabulation(coll, new GroupedMapAssertion<>(classifier)); + } +} diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/lambda/bytecode/TestLambdaBytecode.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/lambda/bytecode/TestLambdaBytecode.java Mon Apr 01 21:42:15 2013 -0700 @@ -0,0 +1,365 @@ +/* + * 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 8009649 + * @summary Lambda back-end should generate invokespecial for method handles referring to private instance methods + * @library ../../lib + * @build JavacTestingAbstractThreadedTest + * @run main/othervm TestLambdaBytecode + */ + +// use /othervm to avoid jtreg timeout issues (CODETOOLS-7900047) +// see JDK-8006746 + +import com.sun.tools.classfile.Attribute; +import com.sun.tools.classfile.BootstrapMethods_attribute; +import com.sun.tools.classfile.ClassFile; +import com.sun.tools.classfile.Code_attribute; +import com.sun.tools.classfile.ConstantPool.*; +import com.sun.tools.classfile.Instruction; +import com.sun.tools.classfile.Method; + +import com.sun.tools.javac.api.JavacTaskImpl; + + +import java.io.File; +import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Locale; + +import javax.tools.Diagnostic; +import javax.tools.JavaFileObject; +import javax.tools.SimpleJavaFileObject; + +import static com.sun.tools.javac.jvm.ClassFile.*; + +public class TestLambdaBytecode + extends JavacTestingAbstractThreadedTest + implements Runnable { + + enum ClassKind { + CLASS("class"), + INTERFACE("interface"); + + String classStr; + + ClassKind(String classStr) { + this.classStr = classStr; + } + } + + enum AccessKind { + PUBLIC("public"), + PRIVATE("private"); + + String accessStr; + + AccessKind(String accessStr) { + this.accessStr = accessStr; + } + } + + enum StaticKind { + STATIC("static"), + INSTANCE(""); + + String staticStr; + + StaticKind(String staticStr) { + this.staticStr = staticStr; + } + } + + enum DefaultKind { + DEFAULT("default"), + NO_DEFAULT(""); + + String defaultStr; + + DefaultKind(String defaultStr) { + this.defaultStr = defaultStr; + } + } + + enum ExprKind { + LAMBDA("Runnable r = ()->{ target(); };"); + + String exprString; + + ExprKind(String exprString) { + this.exprString = exprString; + } + } + + static class MethodKind { + ClassKind ck; + AccessKind ak; + StaticKind sk; + DefaultKind dk; + + MethodKind(ClassKind ck, AccessKind ak, StaticKind sk, DefaultKind dk) { + this.ck = ck; + this.ak = ak; + this.sk = sk; + this.dk = dk; + } + + boolean inInterface() { + return ck == ClassKind.INTERFACE; + } + + boolean isPrivate() { + return ak == AccessKind.PRIVATE; + } + + boolean isStatic() { + return sk == StaticKind.STATIC; + } + + boolean isDefault() { + return dk == DefaultKind.DEFAULT; + } + + boolean isOK() { + if (isDefault() && (!inInterface() || isStatic())) { + return false; + } else if (inInterface() && + ((!isStatic() && !isDefault()) || isPrivate())) { + return false; + } else { + return true; + } + } + + String mods() { + StringBuilder buf = new StringBuilder(); + buf.append(ak.accessStr); + buf.append(' '); + buf.append(sk.staticStr); + buf.append(' '); + buf.append(dk.defaultStr); + return buf.toString(); + } + } + + public static void main(String... args) throws Exception { + for (ClassKind ck : ClassKind.values()) { + for (AccessKind ak1 : AccessKind.values()) { + for (StaticKind sk1 : StaticKind.values()) { + for (DefaultKind dk1 : DefaultKind.values()) { + for (AccessKind ak2 : AccessKind.values()) { + for (StaticKind sk2 : StaticKind.values()) { + for (DefaultKind dk2 : DefaultKind.values()) { + for (ExprKind ek : ExprKind.values()) { + pool.execute(new TestLambdaBytecode(ck, ak1, ak2, sk1, sk2, dk1, dk2, ek)); + } + } + } + } + } + } + } + } + + checkAfterExec(); + } + + MethodKind mk1, mk2; + ExprKind ek; + DiagChecker dc; + + TestLambdaBytecode(ClassKind ck, AccessKind ak1, AccessKind ak2, StaticKind sk1, + StaticKind sk2, DefaultKind dk1, DefaultKind dk2, ExprKind ek) { + mk1 = new MethodKind(ck, ak1, sk1, dk1); + mk2 = new MethodKind(ck, ak2, sk2, dk2); + this.ek = ek; + dc = new DiagChecker(); + } + + public void run() { + int id = checkCount.incrementAndGet(); + JavaSource source = new JavaSource(id); + JavacTaskImpl ct = (JavacTaskImpl)comp.getTask(null, fm.get(), dc, + null, null, Arrays.asList(source)); + try { + ct.generate(); + } catch (Throwable t) { + t.printStackTrace(); + throw new AssertionError( + String.format("Error thrown when compiling following code\n%s", + source.source)); + } + if (dc.diagFound) { + boolean errorExpected = !mk1.isOK() || !mk2.isOK(); + errorExpected |= mk1.isStatic() && !mk2.isStatic(); + + if (!errorExpected) { + throw new AssertionError( + String.format("Diags found when compiling following code\n%s\n\n%s", + source.source, dc.printDiags())); + } + return; + } + verifyBytecode(id, source); + } + + void verifyBytecode(int id, JavaSource source) { + File compiledTest = new File(String.format("Test%d.class", id)); + try { + ClassFile cf = ClassFile.read(compiledTest); + Method testMethod = null; + for (Method m : cf.methods) { + if (m.getName(cf.constant_pool).equals("test")) { + testMethod = m; + break; + } + } + if (testMethod == null) { + throw new Error("Test method not found"); + } + Code_attribute ea = + (Code_attribute)testMethod.attributes.get(Attribute.Code); + if (testMethod == null) { + throw new Error("Code attribute for test() method not found"); + } + + int bsmIdx = -1; + + for (Instruction i : ea.getInstructions()) { + if (i.getMnemonic().equals("invokedynamic")) { + CONSTANT_InvokeDynamic_info indyInfo = + (CONSTANT_InvokeDynamic_info)cf + .constant_pool.get(i.getShort(1)); + bsmIdx = indyInfo.bootstrap_method_attr_index; + if (!indyInfo.getNameAndTypeInfo().getType().equals(makeIndyType(id))) { + throw new + AssertionError("type mismatch for CONSTANT_InvokeDynamic_info " + source.source + "\n" + indyInfo.getNameAndTypeInfo().getType() + "\n" + makeIndyType(id)); + } + } + } + if (bsmIdx == -1) { + throw new Error("Missing invokedynamic in generated code"); + } + + BootstrapMethods_attribute bsm_attr = + (BootstrapMethods_attribute)cf + .getAttribute(Attribute.BootstrapMethods); + if (bsm_attr.bootstrap_method_specifiers.length != 1) { + throw new Error("Bad number of method specifiers " + + "in BootstrapMethods attribute"); + } + BootstrapMethods_attribute.BootstrapMethodSpecifier bsm_spec = + bsm_attr.bootstrap_method_specifiers[0]; + + if (bsm_spec.bootstrap_arguments.length != MF_ARITY) { + throw new Error("Bad number of static invokedynamic args " + + "in BootstrapMethod attribute"); + } + + CONSTANT_MethodHandle_info mh = + (CONSTANT_MethodHandle_info)cf.constant_pool.get(bsm_spec.bootstrap_arguments[1]); + + boolean kindOK; + switch (mh.reference_kind) { + case REF_invokeStatic: kindOK = mk2.isStatic(); break; + case REF_invokeSpecial: kindOK = !mk2.isStatic(); break; + case REF_invokeInterface: kindOK = mk2.inInterface(); break; + default: + kindOK = false; + } + + if (!kindOK) { + throw new Error("Bad invoke kind in implementation method handle"); + } + + if (!mh.getCPRefInfo().getNameAndTypeInfo().getType().toString().equals(MH_SIG)) { + throw new Error("Type mismatch in implementation method handle"); + } + } catch (Exception e) { + e.printStackTrace(); + throw new Error("error reading " + compiledTest +": " + e); + } + } + String makeIndyType(int id) { + StringBuilder buf = new StringBuilder(); + buf.append("("); + if (!mk2.isStatic() || mk1.inInterface()) { + buf.append(String.format("LTest%d;", id)); + } + buf.append(")Ljava/lang/Runnable;"); + return buf.toString(); + } + + static final int MF_ARITY = 3; + static final String MH_SIG = "()V"; + + class JavaSource extends SimpleJavaFileObject { + + static final String source_template = + "#CK Test#ID {\n" + + " #MOD1 void test() { #EK }\n" + + " #MOD2 void target() { }\n" + + "}\n"; + + String source; + + JavaSource(int id) { + super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE); + source = source_template.replace("#CK", mk1.ck.classStr) + .replace("#MOD1", mk1.mods()) + .replace("#MOD2", mk2.mods()) + .replace("#EK", ek.exprString) + .replace("#ID", String.valueOf(id)); + } + + @Override + public CharSequence getCharContent(boolean ignoreEncodingErrors) { + return source; + } + } + + static class DiagChecker + implements javax.tools.DiagnosticListener { + + boolean diagFound; + ArrayList diags = new ArrayList<>(); + + public void report(Diagnostic diagnostic) { + diags.add(diagnostic.getMessage(Locale.getDefault())); + diagFound = true; + } + + String printDiags() { + StringBuilder buf = new StringBuilder(); + for (String s : diags) { + buf.append(s); + buf.append("\n"); + } + return buf.toString(); + } + } + +} diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/lib/ToolBox.java --- a/test/tools/javac/lib/ToolBox.java Thu Mar 28 10:55:14 2013 -0700 +++ b/test/tools/javac/lib/ToolBox.java Mon Apr 01 21:42:15 2013 -0700 @@ -38,6 +38,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; +import java.util.Collections; import java.util.EnumSet; import java.util.List; import java.util.Map; @@ -65,15 +66,32 @@ public static final String lineSeparator = System.getProperty("line.separator"); public static final String jdkUnderTest = System.getProperty("test.jdk"); - public static final String testVMOpts = System.getProperty("test.tool.vm.opts"); - public static final String javaBinary = Paths.get(jdkUnderTest, "bin", "java").toString(); - //why this one private. Because the function which provide also the test options should be used - private static final String javacBinary = Paths.get(jdkUnderTest, "bin", "javac").toString(); + public static final Path javaBinary = Paths.get(jdkUnderTest, "bin", "java"); + public static final Path javacBinary = Paths.get(jdkUnderTest, "bin", "javac"); + + public static final List testToolVMOpts; + public static final List testVMOpts; private static final Charset defaultCharset = Charset.defaultCharset(); static final JavaCompiler comp = ToolProvider.getSystemJavaCompiler(); + static { + String sysProp = System.getProperty("test.tool.vm.opts"); + if (sysProp != null && sysProp.length() > 0) { + testToolVMOpts = Arrays.asList(sysProp.split("\\s+")); + } else { + testToolVMOpts = Collections.emptyList(); + } + + sysProp = System.getProperty("test.vm.opts"); + if (sysProp != null && sysProp.length() > 0) { + testVMOpts = Arrays.asList(sysProp.split("\\s+")); + } else { + testVMOpts = Collections.emptyList(); + } + } + /** * The expected result of command-like method execution. */ @@ -199,8 +217,8 @@ protected Expect whatToExpect; protected WriterHelper stdOutput; protected WriterHelper errOutput; - protected List options; - protected String[] optionsArr; + protected List args = new ArrayList<>(); + protected String[] argsArr; protected GenericArgs() { set(Expect.SUCCESS); @@ -238,19 +256,50 @@ public T setAllArgs(String... args) { currentParams.add(AcceptedParams.OPTIONS); - this.optionsArr = args; + this.argsArr = args; + return (T) this; + } + + + public T appendArgs(String... args) { + appendArgs(Arrays.asList(args)); + return (T)this; + } + + public T appendArgs(Path... args) { + if (args != null) { + List list = new ArrayList<>(); + for (int i = 0; i < args.length; i++) { + if (args[i] != null) { + list.add(args[i].toString()); + } + } + appendArgs(list); + } + return (T)this; + } + + public T appendArgs(List args) { + if (args != null && args.size() > 0) { + currentParams.add(AcceptedParams.OPTIONS); + for (int i = 0; i < args.size(); i++) { + if (args.get(i) != null) { + this.args.add(args.get(i)); + } + } + } return (T)this; } public T setOptions(List options) { currentParams.add(AcceptedParams.OPTIONS); - this.options = options; + this.args = options; return (T)this; } public T setOptions(String... options) { currentParams.add(AcceptedParams.OPTIONS); - this.options = Arrays.asList(options); + this.args = Arrays.asList(options); return (T)this; } @@ -365,8 +414,12 @@ * Custom exception for not equal resources. */ public static class ResourcesNotEqualException extends Exception { - public ResourcesNotEqualException() { - super("The resources provided for comparison are different"); + public ResourcesNotEqualException(List res1, List res2) { + super(createMessage(res1, res2)); + } + + public ResourcesNotEqualException(String line1, String line2) { + super(createMessage(line1, line2)); } public ResourcesNotEqualException(Path path1, Path path2) { @@ -379,15 +432,20 @@ .append(path1.toString()).append(" and \n") .append(path2.toString()).append("are different").toString(); } - } - /** - * Method to get the a path to the javac command available at the jdk being - * tested along with the test vm options. - * @return a String[] with the two components mentioned. - */ - public static String[] getJavacBin() { - return new String[]{javacBinary, testVMOpts}; + private static String createMessage(String line1, String line2) { + return new StringBuilder() + .append("The resources provided for comparison are different at lines: \n") + .append(line1).append(" and \n") + .append(line2).toString(); + } + + private static String createMessage(List res1, List res2) { + return new StringBuilder() + .append("The resources provided for comparison are different: \n") + .append("Resource 1 is: ").append(res1).append("\n and \n") + .append("Resource 2 is: ").append(res2).append("\n").toString(); + } } /** @@ -396,7 +454,7 @@ public static int javac(JavaToolArgs params) throws CommandExecutionException, IOException { if (params.hasMinParams()) { - if (params.optionsArr != null) { + if (params.argsArr != null) { return genericJavaCMD(JavaCMD.JAVAC, params); } else { return genericJavaCMD(JavaCMD.JAVAC_API, params); @@ -437,14 +495,14 @@ JAVAC { @Override int run(JavaToolArgs params, PrintWriter pw) { - return com.sun.tools.javac.Main.compile(params.optionsArr, pw); + return com.sun.tools.javac.Main.compile(params.argsArr, pw); } }, JAVAC_API { @Override int run(JavaToolArgs params, PrintWriter pw) { JavacTask ct = (JavacTask)comp.getTask(pw, null, null, - params.options, null, params.sources); + params.args, null, params.sources); return ((JavacTaskImpl)ct).doCall().exitCode; } @@ -467,13 +525,13 @@ JAVAH { @Override int run(JavaToolArgs params, PrintWriter pw) { - return com.sun.tools.javah.Main.run(params.optionsArr, pw); + return com.sun.tools.javah.Main.run(params.argsArr, pw); } }, JAVAP { @Override int run(JavaToolArgs params, PrintWriter pw) { - return com.sun.tools.javap.Main.run(params.optionsArr, pw); + return com.sun.tools.javap.Main.run(params.argsArr, pw); } }; @@ -486,9 +544,9 @@ List getExceptionMsgContent(JavaToolArgs params) { List result = new ArrayList<>(); result.add(getName()); - result.addAll(params.optionsArr != null ? - Arrays.asList(params.optionsArr) : - params.options); + result.addAll(params.argsArr != null ? + Arrays.asList(params.argsArr) : + params.args); return result; } } @@ -509,7 +567,7 @@ String out = (sw == null) ? null : sw.toString(); if (params.errOutput != null && (out != null) && !out.isEmpty()) { - params.errOutput.addAll(splitLines(out)); + params.errOutput.addAll(splitLines(out, lineSeparator)); } if ( (rc == 0 && params.whatToExpect == Expect.SUCCESS) || @@ -542,9 +600,9 @@ public static int executeCommand(AnyToolArgs params) throws CommandExecutionException, IOException, InterruptedException { if (params.hasMinParams()) { - List cmd = (params.options != null) ? - params.options : - Arrays.asList(params.optionsArr); + List cmd = (params.args != null) ? + params.args : + Arrays.asList(params.argsArr); return executeCommand(cmd, params.extraEnv, params.stdOutput, params.errOutput, params.whatToExpect); } @@ -630,7 +688,7 @@ List list2, boolean trim) throws ResourcesNotEqualException { if ((list1 == list2) || (list1 == null && list2 == null)) return; if (list1.size() != list2.size()) - throw new ResourcesNotEqualException(); + throw new ResourcesNotEqualException(list1, list2); int i = 0; int j = 0; while (i < list1.size() && @@ -639,7 +697,7 @@ i++; j++; } if (!(i == list1.size() && j == list2.size())) - throw new ResourcesNotEqualException(); + throw new ResourcesNotEqualException(list1, list2); } private static boolean equals(String s1, String s2, boolean trim) { @@ -652,8 +710,8 @@ * and later the regExpr is seek in every split line. If a match is found, * the whole line is added to the result. */ - public static List grep(String regExpr, String text) { - return grep(regExpr, splitLines(text)); + public static List grep(String regExpr, String text, String sep) { + return grep(regExpr, splitLines(text, sep)); } public static List grep(String regExpr, List text) { @@ -865,8 +923,8 @@ /** * Splits a String using the System's line separator character as splitting point. */ - public static List splitLines(String lines) { - return Arrays.asList(lines.split(lineSeparator)); + public static List splitLines(String lines, String sep) { + return Arrays.asList(lines.split(sep)); } /** @@ -882,6 +940,14 @@ } /** + * Returns true if the OS is a Windows version. + */ + public static boolean isWindows() { + String osName = System.getProperty("os.name"); + return osName.toUpperCase().startsWith("WINDOWS"); + } + + /** * Class representing an in-memory java source file. It is able to extract * the file name from simple source codes using regular expressions. */ diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/links/LinksTest.java --- a/test/tools/javac/links/LinksTest.java Thu Mar 28 10:55:14 2013 -0700 +++ b/test/tools/javac/links/LinksTest.java Mon Apr 01 21:42:15 2013 -0700 @@ -50,14 +50,17 @@ // cp ${TESTSRC}/b/B.java tmp ToolBox.writeFile(Paths.get("tmp", "B.java"), BSrc); + try { // ln -s `pwd`/tmp "${TESTCLASSES}/a" - Files.createSymbolicLink(Paths.get("a"), Paths.get("tmp")); -// -////"${TESTJAVA}/bin/javac" ${TESTTOOLVMOPTS} -sourcepath "${TESTCLASSES}" -d "${TESTCLASSES}/classes" "${TESTSRC}/T.java" 2>&1 - ToolBox.JavaToolArgs javacArgs = - new ToolBox.JavaToolArgs() - .setOptions("-sourcepath", ".", "-d", ".").setSources(TSrc); - ToolBox.javac(javacArgs); + Files.createSymbolicLink(Paths.get("a"), Paths.get("tmp")); + ////"${TESTJAVA}/bin/javac" ${TESTTOOLVMOPTS} -sourcepath "${TESTCLASSES}" -d "${TESTCLASSES}/classes" "${TESTSRC}/T.java" 2>&1 + ToolBox.JavaToolArgs javacArgs = + new ToolBox.JavaToolArgs() + .setOptions("-sourcepath", ".", "-d", ".").setSources(TSrc); + ToolBox.javac(javacArgs); + } catch (UnsupportedOperationException e) { + System.err.println("Symbolic links not supported on this system. The test can't finish"); + } } } diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/newlines/NewLineTest.java --- a/test/tools/javac/newlines/NewLineTest.java Thu Mar 28 10:55:14 2013 -0700 +++ b/test/tools/javac/newlines/NewLineTest.java Mon Apr 01 21:42:15 2013 -0700 @@ -34,19 +34,18 @@ import java.nio.charset.Charset; import java.nio.file.Files; import java.util.List; -import com.sun.tools.javac.util.ArrayUtils; //original test: test/tools/javac/newlines/Newlines.sh public class NewLineTest { public static void main(String args[]) throws Exception { - String[] mainArgs = ToolBox.getJavacBin(); - // "${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -J-Dline.separator='@' > ${TMP1} 2>&1 File javacErrOutput = new File("output.txt"); ToolBox.AnyToolArgs cmdArgs = new ToolBox.AnyToolArgs(ToolBox.Expect.FAIL) - .setAllArgs(ArrayUtils.concatOpen(mainArgs, "-J-Dline.separator='@'")) + .appendArgs(ToolBox.javacBinary) + .appendArgs(ToolBox.testToolVMOpts) + .appendArgs("-J-Dline.separator='@'") .setErrOutput(javacErrOutput); ToolBox.executeCommand(cmdArgs); diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javac/profiles/ProfileOptionTest.java --- a/test/tools/javac/profiles/ProfileOptionTest.java Thu Mar 28 10:55:14 2013 -0700 +++ b/test/tools/javac/profiles/ProfileOptionTest.java Mon Apr 01 21:42:15 2013 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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 @@ -106,7 +106,6 @@ for (Target t: Target.values()) { switch (t) { case JDK1_1: case JDK1_2: // no equivalent -source - case JDK1_4_1: case JDK1_4_2: case JSR14: // transitional values continue; } diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javah/6257087/T6257087.java --- a/test/tools/javah/6257087/T6257087.java Thu Mar 28 10:55:14 2013 -0700 +++ b/test/tools/javah/6257087/T6257087.java Mon Apr 01 21:42:15 2013 -0700 @@ -32,7 +32,6 @@ import java.nio.file.Paths; -//original test: test/tools/javah/6257087/foo.sh public class T6257087 { private static final String fooBarGoldenFile = @@ -59,17 +58,13 @@ "#endif"; public static void main(String[] args) throws Exception { -// "${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -d "${TC}" "${TS}${FS}foo.java" - -// "${TESTJAVA}${FS}bin${FS}javah" ${TESTTOOLVMOPTS} -classpath "${TC}" -d "${TC}" foo ToolBox.JavaToolArgs javahArgs = new ToolBox.JavaToolArgs() .setAllArgs("-cp", System.getProperty("test.classes"), "foo"); ToolBox.javah(javahArgs); -// diff ${DIFFOPTS} -c "${TS}${FS}foo_bar.h" "${TC}${FS}foo_bar.h" ToolBox.compareLines(Paths.get("foo_bar.h"), - ToolBox.splitLines(fooBarGoldenFile), null); + ToolBox.splitLines(fooBarGoldenFile, "\n"), null, true); } } diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javah/constMacroTest/ConstMacroTest.java --- a/test/tools/javah/constMacroTest/ConstMacroTest.java Thu Mar 28 10:55:14 2013 -0700 +++ b/test/tools/javah/constMacroTest/ConstMacroTest.java Mon Apr 01 21:42:15 2013 -0700 @@ -38,7 +38,7 @@ //original test: test/tools/javah/ConstMacroTest.sh public class ConstMacroTest { - private static final String SubClassConstsGoldenFile = + private static final String subClassConstsGoldenFileTemplate = "/* DO NOT EDIT THIS FILE - it is machine generated */\n" + "#include \n" + "/* Header for class SubClassConsts */\n" + @@ -49,7 +49,7 @@ "extern \"C\" {\n" + "#endif\n" + "#undef SubClassConsts_serialVersionUID\n" + - "#define SubClassConsts_serialVersionUID 6733861379283244755LL\n" + + "#define SubClassConsts_serialVersionUID 6733861379283244755%s\n" + "#undef SubClassConsts_SUPER_INT_CONSTANT\n" + "#define SubClassConsts_SUPER_INT_CONSTANT 3L\n" + "#undef SubClassConsts_SUPER_FLOAT_CONSTANT\n" + @@ -71,6 +71,9 @@ "#endif\n" + "#endif"; + private static final String serialVersionUIDSuffix = + ToolBox.isWindows() ? "i64" : "LL"; ; + public static void main(String[] args) throws Exception { //first steps are now done by jtreg // cp "${TESTSRC}${FS}SuperClassConsts.java" . @@ -85,8 +88,10 @@ ToolBox.javah(successParams); // diff ${DIFFOPTS} "${TESTSRC}${FS}${EXPECTED_JAVAH_OUT_FILE}" "${GENERATED_HEADER_FILE}" + String subClassConstGoldenFile = String.format(subClassConstsGoldenFileTemplate, + serialVersionUIDSuffix); ToolBox.compareLines(Paths.get("SubClassConsts.h"), - ToolBox.splitLines(SubClassConstsGoldenFile), null); + ToolBox.splitLines(subClassConstGoldenFile, "\n"), null, true); } } diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javap/output/RepeatingTypeAnnotations.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javap/output/RepeatingTypeAnnotations.java Mon Apr 01 21:42:15 2013 -0700 @@ -0,0 +1,400 @@ +/* + * 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 8005220 + * @summary javap must display repeating annotations + */ +import java.io.*; +import java.util.*; + +/** + * This class extends the abstract {@link Tester} test-driver, and + * encapusulates a number of test-case classes (i.e. classes extending + * this class and annotated with {@code TestCase}). + *

    + * By default (no argument), this test runs all test-cases, except + * if annotated with {@code ignore}. + *

    + * Individual test cases can be executed using a run action. + *

    + * Example: @run main RepeatingTypeAnnotations RepeatingTypeAnnotations$TC4 + *

    + * Note: when specific test-cases are run, additional debug output is + * produced to help debugging. Test annotated with {@code ignore} + * can be executed explicitly. + */ +public class RepeatingTypeAnnotations extends Tester { + + /** + * Main method instantiates test and run test-cases. + */ + public static void main(String... args) throws Exception { + Tester tester = new RepeatingTypeAnnotations(); + tester.run(args); + } + + /** + * Testcases are classes extending {@code RepeatingTypeAnnotations}, + * and calling {@link setSrc}, followed by one or more invocations + * of {@link verify} in the body of the constructor. + */ + public RepeatingTypeAnnotations() { + setSrc(new TestSource(template)); + } + + /** + * Common template for test cases. The line TESTCASE is + * replaced with the specific lines of individual tests. + */ + private static final String[] template = { + "import java.lang.annotation.*;", + "class Test {", + " @Repeatable(As.class)", + " @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})", + " @Retention(RetentionPolicy.CLASS)", + " @interface A {", + " Class f() default int.class;", + " }", + + " @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})", + " @Retention(RetentionPolicy.CLASS)", + " @interface As { A[] value(); }", + + " @Repeatable(Bs.class)", + " @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})", + " @Retention(RetentionPolicy.CLASS)", + " @interface B {", + " Class f() default int.class;", + " }", + + " @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})", + " @Retention(RetentionPolicy.CLASS)", + " @interface Bs { B[] value(); }", + + " @Repeatable(Cs.class)", + " @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})", + " @Retention(RetentionPolicy.RUNTIME)", + " @interface C {", + " Class f() default int.class;", + " }", + + " @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})", + " @Retention(RetentionPolicy.RUNTIME)", + " @interface Cs { C[] value(); }", + "TESTCASE", + "}" + }; + + /* + * The test cases covers annotation in the following locations: + * - static and non-static fields + * - local variables + * - constructor and method return type and parameter types + * - casts in class and method contexts. + * For the above locations the test-cases covers: + * - single annotation type + * - two annotation types with same retention + * - two annotation types with different retention + * - three annotation types, two of same retention, one different. + */ + + @TestCase + @ignore // 8008082:missing type annotation for cast + public static class TC1 extends RepeatingTypeAnnotations { + public TC1() { + setSrc(" static String so = \"hello world\";", + " public @A @A @A Object o = (@A @A @A String) Test.so;"); + verify("RuntimeInvisibleTypeAnnotations", + "0: #25(#26=[@#27(),@#27(),@#27()]): FIELD", + "1: #25(#26=[@#27(),@#27(),@#27()]): CAST, offset=5"); + } + } + + @TestCase + public static class TC2 extends RepeatingTypeAnnotations { + public TC2() { + setSrc(" static String so = \"hello world\";", + " public @A @B @A Object o = (@B @A @B String) Test.so;"); + verify("RuntimeInvisibleTypeAnnotations", + "0: #25(#26=[@#27(),@#27()]): FIELD", + "1: #28(): FIELD", + "2: #29(#26=[@#28(),@#28()]): CAST, offset=5", + "3: #27(): CAST, offset=5"); + } + } + + @TestCase + public static class TC3 extends RepeatingTypeAnnotations { + public TC3() { + setSrc(" static String so = \"hello world\";", + " public @A @A @C Object o = (@B @C @B String) Test.so;"); + verify("RuntimeInvisibleTypeAnnotations", + "0: #25(): FIELD", + "1: #25(): CAST, offset=5", + "RuntimeVisibleTypeAnnotations", + "0: #27(#28=[@#29(),@#29()]): FIELD", + "1: #30(#28=[@#31(),@#31()]): CAST, offset=5"); + } + } + + @TestCase + public static class TC4 extends RepeatingTypeAnnotations { + public TC4() { + setSrc(" static String so = \"hello world\";", + " public @A @B @C Object o = (@C @B @A String) Test.so;"); + verify("RuntimeInvisibleTypeAnnotations", + "RuntimeVisibleTypeAnnotations", + "0: #25(): FIELD", + "1: #25(): CAST, offset=5", + "0: #27(): FIELD", + "1: #28(): FIELD", + "2: #28(): CAST, offset=5", + "3: #27(): CAST, offset=5"); + } + } + + @TestCase + @ignore // 8008082:missing type annotation for cast + public static class TC5 extends RepeatingTypeAnnotations { + public TC5() { + setSrc(" static String so = \"hello world\";", + " public static @A @A @A Object o = (@B @B @B String) Test.so;"); + verify("RuntimeInvisibleTypeAnnotations", + "0: #25(#26=[@#27(),@#27(),@#27()]): FIELD", + "1: #28(#26=[@#29(),@#29(),@#29()]): CAST, offset=5, type_index=0"); + } + } + + @TestCase + public static class TC6 extends RepeatingTypeAnnotations { + public TC6() { + setSrc(" static String so = \"hello world\";", + " public static @A @B @A Object o = (@B @A @B String) Test.so;"); + verify("RuntimeInvisibleTypeAnnotations", + "0: #25(#26=[@#27(),@#27()]): FIELD", + "1: #28(): FIELD", + "2: #29(#26=[@#28(),@#28()]): CAST, offset=5", + "3: #27(): CAST, offset=5"); + } + } + + @TestCase + public static class TC7 extends RepeatingTypeAnnotations { + public TC7() { + setSrc(" static String so = \"hello world\";", + " public static @A @A @C Object o = (@B @C @B String) Test.so;"); + verify("RuntimeInvisibleTypeAnnotations", + "RuntimeVisibleTypeAnnotations", + "0: #25(): FIELD", + "1: #25(): CAST, offset=5", + "0: #27(#28=[@#29(),@#29()]): FIELD", + "1: #30(#28=[@#31(),@#31()]): CAST, offset=5"); + } + } + + @TestCase + public static class TC8 extends RepeatingTypeAnnotations { + public TC8() { + setSrc(" static String so = \"hello world\";", + " public static @A @B @C Object o = (@C @B @A String) Test.so;"); + verify("RuntimeInvisibleTypeAnnotations", + "RuntimeVisibleTypeAnnotations", + "0: #25(): FIELD", + "1: #25(): CAST, offset=5", + "0: #27(): FIELD", + "1: #28(): FIELD", + "2: #28(): CAST, offset=5", + "3: #27(): CAST, offset=5"); + } + } + + @TestCase + @ignore // 8008082:missing type annotation for cast + public static class TC9 extends RepeatingTypeAnnotations { + public TC9() { + setSrc(" public Test(@A @A @A Object o, @A int i, long l) {", + " @A @A @A String ls = (@B @B @B String) o;", + " }"); + verify("RuntimeInvisibleTypeAnnotations", + "0: #34(#35=[@#36(),@#36(),@#36()]): METHOD_FORMAL_PARAMETER, param_index=0", + "1: #36(): METHOD_FORMAL_PARAMETER, param_index=1", + "2: #37(#35=[@#38(),@#38(),@#38()]): CAST, offset=4, type_index=0", + "3: #34(#35=[@#36(),@#36(),@#36()]): LOCAL_VARIABLE, {start_pc=10, length=1, index=5}"); + } + } + + @TestCase + public static class TC10 extends RepeatingTypeAnnotations { + public TC10() { + setSrc(" public Test(@A @A @B Object o, @A @B int i, long l) {", + " @A @A @B String ls = (@B @A @B String) o;", + " }"); + verify("RuntimeInvisibleTypeAnnotations:", + "0: #34(#35=[@#36(),@#36()]): METHOD_FORMAL_PARAMETER, param_index=0", + "1: #37(): METHOD_FORMAL_PARAMETER, param_index=0", + "2: #36(): METHOD_FORMAL_PARAMETER, param_index=1", + "3: #37(): METHOD_FORMAL_PARAMETER, param_index=1", + "4: #38(#35=[@#37(),@#37()]): CAST, offset=4, type_index=0", + "5: #36(): CAST, offset=4, type_index=0", + "6: #34(#35=[@#36(),@#36()]): LOCAL_VARIABLE, {start_pc=10, length=1, index=5}", + "7: #37(): LOCAL_VARIABLE, {start_pc=10, length=1, index=5}"); + } + } + + @TestCase + public static class TC11 extends RepeatingTypeAnnotations { + public TC11() { + setSrc(" public Test(@C @C @A Object o, @A @B int i, long l) {", + " @C @C @A String ls = (@A @A @C String) o;", + " }"); + verify("RuntimeInvisibleTypeAnnotations", + "RuntimeVisibleTypeAnnotations", + "0: #34(#35=[@#36(),@#36()]): METHOD_FORMAL_PARAMETER, param_index=0", + "1: #36(): CAST, offset=4", + "2: #34(#35=[@#36(),@#36()]): LOCAL_VARIABLE, {start_pc=10, length=1, index=5}", + "0: #38(): METHOD_FORMAL_PARAMETER, param_index=0", + "1: #38(): METHOD_FORMAL_PARAMETER, param_index=1", + "2: #39(): METHOD_FORMAL_PARAMETER, param_index=1", + "3: #40(#35=[@#38(),@#38()]): CAST, offset=4", + "4: #38(): LOCAL_VARIABLE, {start_pc=10, length=1, index=5}"); + } + } + + @TestCase + public static class TC12 extends RepeatingTypeAnnotations { + public TC12() { + setSrc(" public Test(@A @B @C Object o, @A @C int i, long l) {", + " @A @B @C String ls = (@C @A @B String) o;", + " }"); + verify("RuntimeInvisibleTypeAnnotations", + "RuntimeVisibleTypeAnnotations", + "0: #34(): METHOD_FORMAL_PARAMETER, param_index=0", + "1: #34(): METHOD_FORMAL_PARAMETER, param_index=1", + "2: #34(): CAST, offset=4", + "3: #34(): LOCAL_VARIABLE, {start_pc=10, length=1, index=5}", + "0: #36(): METHOD_FORMAL_PARAMETER, param_index=0", + "1: #37(): METHOD_FORMAL_PARAMETER, param_index=0", + "2: #36(): METHOD_FORMAL_PARAMETER, param_index=1", + "3: #36(): CAST, offset=4", + "4: #37(): CAST, offset=4", + "5: #36(): LOCAL_VARIABLE, {start_pc=10, length=1, index=5}", + "6: #37(): LOCAL_VARIABLE, {start_pc=10, length=1, index=5}"); + } + } + + @TestCase + @ignore // 8008082:missing type annotation for cast + public static class TC13 extends RepeatingTypeAnnotations { + public TC13() { + setSrc(" public @A @A @A String foo(@A @A @A Object o, @A int i, long l) {", + " @A @A @A String ls = (@B @B @B String) o;", + " return (@A @A @A String) o;", + " }"); + verify("RuntimeInvisibleTypeAnnotations", + "0: #36(#37=[@#38(),@#38(),@#38()]): METHOD_RETURN", + "1: #36(#37=[@#38(),@#38(),@#38()]): METHOD_FORMAL_PARAMETER, param_index=0", + "2: #38(): METHOD_FORMAL_PARAMETER, param_index=1", + "3: #39(#37=[@#40(),@#40(),@#40()]): CAST, offset=0, type_index=0", + "4: #36(#37=[@#38(),@#38(),@#38()]): CAST, offset=6, type_index=0", + "5: #36(#37=[@#38(),@#38(),@#38()]): LOCAL_VARIABLE, {start_pc=6, length=5, index=5}"); + } + } + + @TestCase + public static class TC14 extends RepeatingTypeAnnotations { + public TC14() { + setSrc(" public @A @B @B String foo(@A @A @B Object o, @A @B int i, long l) {", + " @A @A @B String ls = (@B @A @B String) o;", + " return (@A @B @B String) o;", + " }"); + verify("RuntimeInvisibleTypeAnnotations", + "0: #36(): METHOD_RETURN", + "1: #37(#38=[@#39(),@#39()]): METHOD_RETURN", + "2: #40(#38=[@#36(),@#36()]): METHOD_FORMAL_PARAMETER, param_index=0", + "3: #39(): METHOD_FORMAL_PARAMETER, param_index=0", + "4: #36(): METHOD_FORMAL_PARAMETER, param_index=1", + "5: #39(): METHOD_FORMAL_PARAMETER, param_index=1", + "6: #37(#38=[@#39(),@#39()]): CAST, offset=0", + "7: #36(): CAST, offset=0", + "8: #36(): CAST, offset=6", + "9: #37(#38=[@#39(),@#39()]): CAST, offset=6", + "10: #40(#38=[@#36(),@#36()]): LOCAL_VARIABLE, {start_pc=6, length=5, index=5}", + "11: #39(): LOCAL_VARIABLE, {start_pc=6, length=5, index=5}"); + } + } + + @TestCase + public static class TC15 extends RepeatingTypeAnnotations { + public TC15() { + setSrc(" public @A @A @C String foo(@C @C @A Object o, @A @B int i, long l) {", + " @C @C @A String ls = (@A @A @C String) o;", + " return (@C @B @B String) o;", + " }"); + verify("RuntimeInvisibleTypeAnnotations", + "RuntimeVisibleTypeAnnotations", + "0: #36(): METHOD_RETURN", + "1: #37(#38=[@#36(),@#36()]): METHOD_FORMAL_PARAMETER, param_index=0", + "2: #36(): CAST, offset=0", + "3: #36(): CAST, offset=6", + "4: #37(#38=[@#36(),@#36()]): LOCAL_VARIABLE, {start_pc=6, length=5, index=5}", + "0: #40(#38=[@#41(),@#41()]): METHOD_RETURN", + "1: #41(): METHOD_FORMAL_PARAMETER, param_index=0", + "2: #41(): METHOD_FORMAL_PARAMETER, param_index=1", + "3: #42(): METHOD_FORMAL_PARAMETER, param_index=1", + "4: #40(#38=[@#41(),@#41()]): CAST, offset=0", + "5: #43(#38=[@#42(),@#42()]): CAST, offset=6", + "6: #41(): LOCAL_VARIABLE, {start_pc=6, length=5, index=5}"); + } + } + + @TestCase + public static class TC16 extends RepeatingTypeAnnotations { + public TC16() { + setSrc(" public @A @B @C String foo(@A @B @C Object o, @A @C int i, long l) {", + " @A @B @C String ls = (@C @A @B String) o;", + " return (@B @A @C String) o;", + " }"); + verify("RuntimeInvisibleTypeAnnotations", + "RuntimeVisibleTypeAnnotations", + "0: #36(): METHOD_RETURN", + "1: #36(): METHOD_FORMAL_PARAMETER, param_index=0", + "2: #36(): METHOD_FORMAL_PARAMETER, param_index=1", + "3: #36(): CAST, offset=0", + "4: #36(): CAST, offset=6", + "5: #36(): LOCAL_VARIABLE, {start_pc=6, length=5, index=5}", + "0: #38(): METHOD_RETURN", + "1: #39(): METHOD_RETURN", + "2: #38(): METHOD_FORMAL_PARAMETER, param_index=0", + "3: #39(): METHOD_FORMAL_PARAMETER, param_index=0", + "4: #38(): METHOD_FORMAL_PARAMETER, param_index=1", + "5: #38(): CAST, offset=0", + "6: #39(): CAST, offset=0", + "7: #39(): CAST, offset=6", + "8: #38(): CAST, offset=6", + "9: #38(): LOCAL_VARIABLE, {start_pc=6, length=5, index=5}", + "10: #39(): LOCAL_VARIABLE, {start_pc=6, length=5, index=5}"); + } + } +} diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javap/output/Tester.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javap/output/Tester.java Mon Apr 01 21:42:15 2013 -0700 @@ -0,0 +1,389 @@ +/* + * 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. + */ + +import java.io.*; +import java.util.*; +import java.lang.annotation.*; +import java.lang.reflect.InvocationTargetException; + +/** + * {@code Tester} is an abstract test-driver that provides the logic + * to execute test-cases, grouped by test classes. + * A test class is a main class extending this class, that instantiate + * itself, and calls the {@link run} method, passing any command line + * arguments. + *

    + * The {@code run} method, expects arguments to identify test-case classes. + * A test-case class is a class extending the test class, and annotated + * with {@code TestCase}. + *

    + * If no test-cases are specified, the test class directory is searched for + * co-located test-case classes (i.e. any class extending the test class, + * annotated with {@code TestCase}). + *

    + * Besides serving to group test-cases, extending the driver allow + * setting up a test-case template, and possibly overwrite default + * test-driver behaviour. + */ +public abstract class Tester { + + private static boolean debug = false; + private static final PrintStream out = System.err; + private static final PrintStream err = System.err; + + + protected void run(String... args) throws Exception { + + final File classesdir = new File(System.getProperty("test.classes", ".")); + + String[] classNames = args; + + // If no test-cases are specified, we regard all co-located classes + // as potential test-cases. + if (args.length == 0) { + final String pattern = ".*\\.class"; + final File classFiles[] = classesdir.listFiles(new FileFilter() { + public boolean accept(File f) { + return f.getName().matches(pattern); + } + }); + ArrayList names = new ArrayList(classFiles.length); + for (File f : classFiles) { + String fname = f.getName(); + names.add(fname.substring(0, fname.length() -6)); + } + classNames = names.toArray(new String[names.size()]); + } else { + debug = true; + } + // Test-cases must extend the driver type, and be marked + // @TestCase. Other arguments (classes) are ignored. + // Test-cases are instantiated, and thereby executed. + for (String clname : classNames) { + try { + final Class tclass = Class.forName(clname); + if (!getClass().isAssignableFrom(tclass)) continue; + TestCase anno = (TestCase) tclass.getAnnotation(TestCase.class); + if (anno == null) continue; + if (!debug) { + ignore i = (ignore) tclass.getAnnotation(ignore.class); + if (i != null) { + out.println("Ignore: " + clname); + ignored++; + continue; + } + } + out.println("TestCase: " + clname); + cases++; + Tester tc = (Tester) tclass.getConstructor().newInstance(); + if (tc.errors > 0) { + error("" + tc.errors + " test points failed in " + clname); + errors += tc.errors - 1; + fcases++; + } + } catch(ReflectiveOperationException roe) { + error("Warning: " + clname + " - ReflectiveOperationException"); + roe.printStackTrace(err); + } catch(Exception unknown) { + error("Warning: " + clname + " - uncaught exception"); + unknown.printStackTrace(err); + } + } + + String imsg = ignored > 0 ? " (" + ignored + " ignored)" : ""; + if (errors > 0) + throw new Error(errors + " error, in " + fcases + " of " + cases + " test-cases" + imsg); + else + err.println("" + cases + " test-cases executed" + imsg + ", no errors"); + } + + + /** + * Test-cases must be marked with the {@code TestCase} annotation, + * as well as extend {@code Tester} (or an driver extension + * specified as the first argument to the {@code main()} method. + */ + @Retention(RetentionPolicy.RUNTIME) + @interface TestCase { } + + /** + * Individual test-cases failing due to product bugs, may temporarily + * be excluded by marking them like this: + * @ignore // 1234567:bug synopsis + */ + @Retention(RetentionPolicy.RUNTIME) + @interface ignore { } + + /** + * Test-cases are classes extending {@code Tester}, and + * calling {@link setSrc}, followed by one or more invocations + * of {@link verify} in the body of the constructor. + *

    + * Sets a default test-case template, which is empty except + * for a key of {@code "TESTCASE"}. + * Subclasses will typically call {@code setSrc(TestSource)} + * to setup a useful test-case template. + */ + public Tester() { + this.testCase = this.getClass().getName(); + src = new TestSource("TESTCASE"); + } + + /** + * Set the top-level source template. + */ + protected Tester setSrc(TestSource src) { + this.src = src; + return this; + } + + /** + * Convenience method for calling {@code innerSrc("TESTCASE", ...)}. + */ + protected Tester setSrc(String... lines) { + return innerSrc("TESTCASE", lines); + } + + /** + * Convenience method for calling {@code innerSrc(key, new TestSource(...))}. + */ + protected Tester innerSrc(String key, String... lines) { + return innerSrc(key, new TestSource(lines)); + } + + /** + * Specialize the testcase template, setting replacement content + * for the specified key. + */ + protected Tester innerSrc(String key, TestSource content) { + if (src == null) { + src = new TestSource(key); + } + src.setInner(key, content); + return this; + } + + /** + * On the first invocation, call {@code execute()} to compile + * the test-case source and process the resulting class(se) + * into verifiable output. + *

    + * Verify that the output matches each of the regular expressions + * given as argument. + *

    + * Any failure to match constitutes a test failure, but doesn't + * abort the test-case. + *

    + * Any exception (e.g. bad regular expression syntax) results in + * a test failure, and aborts the test-case. + */ + protected void verify(String... expect) { + if (!didExecute) { + try { + execute(); + } catch(Exception ue) { + throw new Error(ue); + } finally { + didExecute = true; + } + } + if (output == null) { + error("output is null"); + return; + } + for (String e: expect) { + // Escape regular expressions (to allow input to be literals). + // Notice, characters to be escaped are themselves identified + // using regular expressions + String rc[] = { "(", ")", "[", "]", "{", "}", "$" }; + for (String c : rc) { + e = e.replace(c, "\\" + c); + } + // DEBUG: Uncomment this to test modulo constant pool index. + // e = e.replaceAll("#[0-9]{2}", "#[0-9]{2}"); + if (!output.matches("(?s).*" + e + ".*")) { + if (!didPrint) { + out.println(output); + didPrint = true; + } + error("not matched: '" + e + "'"); + } else if(debug) { + out.println("matched: '" + e + "'"); + } + } + } + + /** + * Calls {@code writeTestFile()} to write out the test-case source + * content to a file, then call {@code compileTestFile()} to + * compile it, and finally run the {@link process} method to produce + * verifiable output. The default {@code process} method runs javap. + *

    + * If an exception occurs, it results in a test failure, and + * aborts the test-case. + */ + protected void execute() throws IOException { + err.println("TestCase: " + testCase); + writeTestFile(); + compileTestFile(); + process(); + } + + /** + * Generate java source from test-case. + * TBD: change to use javaFileObject, possibly make + * this class extend JavaFileObject. + */ + protected void writeTestFile() throws IOException { + javaFile = new File("Test.java"); + FileWriter fw = new FileWriter(javaFile); + BufferedWriter bw = new BufferedWriter(fw); + PrintWriter pw = new PrintWriter(bw); + for (String line : src) { + pw.println(line); + if (debug) out.println(line); + } + pw.close(); + } + + /** + * Compile the Java source code. + */ + protected void compileTestFile() { + String path = javaFile.getPath(); + String params[] = { "-source", "1.8", "-g", path }; + int rc = com.sun.tools.javac.Main.compile(params); + if (rc != 0) + throw new Error("compilation failed. rc=" + rc); + classFile = new File(path.substring(0, path.length() - 5) + ".class"); + } + + + /** + * Process class file to generate output for verification. + * The default implementation simply runs javap. This might be + * overwritten to generate output in a different manner. + */ + protected void process() { + String testClasses = "."; //System.getProperty("test.classes", "."); + StringWriter sw = new StringWriter(); + PrintWriter pw = new PrintWriter(sw); + String[] args = { "-v", "-classpath", testClasses, "Test" }; + int rc = com.sun.tools.javap.Main.run(args, pw); + if (rc != 0) + throw new Error("javap failed. rc=" + rc); + pw.close(); + output = sw.toString(); + if (debug) { + out.println(output); + didPrint = true; + } + + } + + + private String testCase; + private TestSource src; + private File javaFile = null; + private File classFile = null; + private String output = null; + private boolean didExecute = false; + private boolean didPrint = false; + + + protected void error(String msg) { + err.println("Error: " + msg); + errors++; + } + + private int cases; + private int fcases; + private int errors; + private int ignored; + + /** + * The TestSource class provides a simple container for + * test cases. It contains an array of source code lines, + * where zero or more lines may be markers for nested lines. + * This allows representing templates, with specialization. + *

    + * This may be generalized to support more advance combo + * tests, but presently it's only used with a static template, + * and one level of specialization. + */ + public class TestSource implements Iterable { + + private String[] lines; + private Hashtable innerSrc; + + public TestSource(String... lines) { + this.lines = lines; + innerSrc = new Hashtable(); + } + + public void setInner(String key, TestSource inner) { + innerSrc.put(key, inner); + } + + public void setInner(String key, String... lines) { + innerSrc.put(key, new TestSource(lines)); + } + + public Iterator iterator() { + return new LineIterator(); + } + + private class LineIterator implements Iterator { + + int nextLine = 0; + Iterator innerIt = null; + + public boolean hasNext() { + return nextLine < lines.length; + } + + public String next() { + if (!hasNext()) throw new NoSuchElementException(); + String str = lines[nextLine]; + TestSource inner = innerSrc.get(str); + if (inner == null) { + nextLine++; + return str; + } + if (innerIt == null) { + innerIt = inner.iterator(); + } + if (innerIt.hasNext()) { + return innerIt.next(); + } + innerIt = null; + nextLine++; + return next(); + } + + public void remove() { + throw new UnsupportedOperationException(); + } + } + } +} diff -r 35cef52b0023 -r cfb65ca92082 test/tools/javap/stackmap/StackmapTest.java --- a/test/tools/javap/stackmap/StackmapTest.java Thu Mar 28 10:55:14 2013 -0700 +++ b/test/tools/javap/stackmap/StackmapTest.java Mon Apr 01 21:42:15 2013 -0700 @@ -84,10 +84,11 @@ new ToolBox.JavaToolArgs() .setAllArgs("-v", "Test.class"); String out = ToolBox.javap(javapParams); - List grepResult = ToolBox.grep("frame_type", out); - grepResult.addAll(ToolBox.grep("offset_delta", out)); - grepResult.addAll(ToolBox.grep("stack = ", out)); - grepResult.addAll(ToolBox.grep("locals = ", out)); + List grepResult = ToolBox.grep("frame_type", out, + ToolBox.lineSeparator); + grepResult.addAll(ToolBox.grep("offset_delta", out, ToolBox.lineSeparator)); + grepResult.addAll(ToolBox.grep("stack = ", out, ToolBox.lineSeparator)); + grepResult.addAll(ToolBox.grep("locals = ", out, ToolBox.lineSeparator)); List goldenList = Arrays.asList(goldenOut.split("\n")); // diff -w "${OUTFILE}" "${TESTSRC}${FS}T6271292.out" diff -r 35cef52b0023 -r cfb65ca92082 test/tools/jdeps/Basic.java --- a/test/tools/jdeps/Basic.java Thu Mar 28 10:55:14 2013 -0700 +++ b/test/tools/jdeps/Basic.java Mon Apr 01 21:42:15 2013 -0700 @@ -23,7 +23,7 @@ /* * @test - * @bug 8003562 + * @bug 8003562 8005428 * @summary Basic tests for jdeps tool * @build Test p.Foo * @run main Basic @@ -33,13 +33,35 @@ import java.io.IOException; import java.io.PrintWriter; import java.io.StringWriter; +import java.nio.file.Path; +import java.nio.file.Paths; import java.util.*; import java.util.regex.*; public class Basic { + private static boolean symbolFileExist = initProfiles(); + private static boolean initProfiles() { + // check if ct.sym exists; if not use the profiles.properties file + Path home = Paths.get(System.getProperty("java.home")); + if (home.endsWith("jre")) { + home = home.getParent(); + } + Path ctsym = home.resolve("lib").resolve("ct.sym"); + boolean symbolExists = ctsym.toFile().exists(); + if (!symbolExists) { + Path testSrcProfiles = + Paths.get(System.getProperty("test.src", "."), "profiles.properties"); + if (!testSrcProfiles.toFile().exists()) + throw new Error(testSrcProfiles + " does not exist"); + System.out.format("%s doesn't exist.%nUse %s to initialize profiles info%n", + ctsym, testSrcProfiles); + System.setProperty("jdeps.profiles", testSrcProfiles.toString()); + } + return symbolExists; + } + public static void main(String... args) throws Exception { int errors = 0; - errors += new Basic().run(); if (errors > 0) throw new Exception(errors + " errors found"); @@ -49,54 +71,70 @@ File testDir = new File(System.getProperty("test.classes", ".")); // test a .class file test(new File(testDir, "Test.class"), - new String[] {"java.lang", "p"}); + new String[] {"java.lang", "p"}, + new String[] {"compact1", "not found"}); // test a directory test(new File(testDir, "p"), - new String[] {"java.lang", "java.util"}); + new String[] {"java.lang", "java.util", "java.lang.management"}, + new String[] {"compact1", "compact1", "compact3"}); // test class-level dependency output test(new File(testDir, "Test.class"), new String[] {"java.lang.Object", "p.Foo"}, + new String[] {"compact1", "not found"}, new String[] {"-V", "class"}); // test -p option test(new File(testDir, "Test.class"), new String[] {"p.Foo"}, + new String[] {"not found"}, new String[] {"--verbose-level=class", "-p", "p"}); // test -e option test(new File(testDir, "Test.class"), new String[] {"p.Foo"}, + new String[] {"not found"}, new String[] {"-V", "class", "-e", "p\\..*"}); test(new File(testDir, "Test.class"), new String[] {"java.lang"}, + new String[] {"compact1"}, new String[] {"-V", "package", "-e", "java\\.lang\\..*"}); // test -classpath and wildcard options test(null, new String[] {"com.sun.tools.jdeps", "java.lang", "java.util", - "java.util.regex", "java.io"}, + "java.util.regex", "java.io", "java.nio.file", + "java.lang.management"}, + new String[] {(symbolFileExist? "not found" : "JDK internal API (classes)"), + "compact1", "compact1", "compact1", + "compact1", "compact1", "compact3"}, new String[] {"--classpath", testDir.getPath(), "*"}); - // -v shows intra-dependency - test(new File(testDir, "Test.class"), - new String[] {"java.lang.Object", "p.Foo"}, - new String[] {"-v", "--classpath", testDir.getPath(), "Test.class"}); + /* Temporary disable this test case. Test.class has a dependency + * on java.lang.String on certain windows machine (8008479). + // -v shows intra-dependency + test(new File(testDir, "Test.class"), + new String[] {"java.lang.Object", "p.Foo"}, + new String[] {"compact1", testDir.getName()}, + new String[] {"-v", "--classpath", testDir.getPath(), "Test.class"}); + */ return errors; } - void test(File file, String[] expect) { - test(file, expect, new String[0]); + void test(File file, String[] expect, String[] profiles) { + test(file, expect, profiles, new String[0]); } - void test(File file, String[] expect, String[] options) { - String[] args; + void test(File file, String[] expect, String[] profiles, String[] options) { + List args = new ArrayList<>(Arrays.asList(options)); if (file != null) { - args = Arrays.copyOf(options, options.length+1); - args[options.length] = file.getPath(); - } else { - args = options; + args.add(file.getPath()); } - String[] deps = jdeps(args); - checkEqual("dependencies", expect, deps); + List argsWithDashP = new ArrayList<>(); + argsWithDashP.add("-P"); + argsWithDashP.addAll(args); + // test without -P + checkResult("dependencies", expect, jdeps(args.toArray(new String[0])).keySet()); + // test with -P + checkResult("profiles", expect, profiles, jdeps(argsWithDashP.toArray(new String[0]))); } - String[] jdeps(String... args) { + Map jdeps(String... args) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); System.err.println("jdeps " + Arrays.toString(args)); @@ -112,12 +150,12 @@ // Pattern used to parse lines private static Pattern linePattern = Pattern.compile(".*\r?\n"); - private static Pattern pattern = Pattern.compile("\\s+ -> (\\S+) +.*"); + private static Pattern pattern = Pattern.compile("\\s+ -> (\\S+) +(.*)"); // Use the linePattern to break the given String into lines, applying // the pattern to each line to see if we have a match - private static String[] findDeps(String out) { - List result = new ArrayList<>(); + private static Map findDeps(String out) { + Map result = new HashMap<>(); Matcher lm = linePattern.matcher(out); // Line matcher Matcher pm = null; // Pattern matcher int lines = 0; @@ -129,19 +167,41 @@ else pm.reset(cs); if (pm.find()) - result.add(pm.group(1)); + result.put(pm.group(1), pm.group(2).trim()); if (lm.end() == out.length()) break; } - return result.toArray(new String[0]); + return result; + } + + void checkResult(String label, String[] expect, Collection found) { + List list = Arrays.asList(expect); + if (!isEqual(list, found)) + error("Unexpected " + label + " found: '" + found + "', expected: '" + list + "'"); } - void checkEqual(String label, String[] expect, String[] found) { - Set s1 = new HashSet<>(Arrays.asList(expect)); - Set s2 = new HashSet<>(Arrays.asList(found)); + void checkResult(String label, String[] expect, String[] profiles, Map result) { + if (expect.length != profiles.length) + error("Invalid expected names and profiles"); - if (!s1.equals(s2)) - error("Unexpected " + label + " found: '" + s2 + "', expected: '" + s1 + "'"); + // check the dependencies + checkResult(label, expect, result.keySet()); + // check profile information + checkResult(label, profiles, result.values()); + for (int i=0; i < expect.length; i++) { + String profile = result.get(expect[i]); + if (!profile.equals(profiles[i])) + error("Unexpected profile: '" + profile + "', expected: '" + profiles[i] + "'"); + } + } + + boolean isEqual(List expected, Collection found) { + if (expected.size() != found.size()) + return false; + + List list = new ArrayList<>(found); + list.removeAll(expected); + return list.isEmpty(); } void error(String msg) { diff -r 35cef52b0023 -r cfb65ca92082 test/tools/jdeps/p/Foo.java --- a/test/tools/jdeps/p/Foo.java Thu Mar 28 10:55:14 2013 -0700 +++ b/test/tools/jdeps/p/Foo.java Mon Apr 01 21:42:15 2013 -0700 @@ -31,5 +31,7 @@ } public Foo() { + // compact3 + java.lang.management.ManagementFactory.getRuntimeMXBean(); } } diff -r 35cef52b0023 -r cfb65ca92082 test/tools/jdeps/profiles.properties --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/jdeps/profiles.properties Mon Apr 01 21:42:15 2013 -0700 @@ -0,0 +1,263 @@ +# This properties file is used for testing a JDK development build. +# No need to keep this properties file up to date as long as it covers +# the APIs used by the jdeps regression test. +profile.1.name = compact1 +profile.1.packages = \ + java.io \ + java.lang \ + java.lang.annotation \ + java.lang.invoke \ + java.lang.ref \ + java.lang.reflect \ + java.math \ + java.net \ + java.nio \ + java.nio.channels \ + java.nio.channels.spi \ + java.nio.charset \ + java.nio.charset.spi \ + java.nio.file \ + java.nio.file.attribute \ + java.nio.file.spi \ + java.security \ + java.security.cert \ + java.security.interfaces \ + java.security.spec \ + java.text \ + java.text.spi \ + java.util \ + java.util.concurrent \ + java.util.concurrent.atomic \ + java.util.concurrent.locks \ + java.util.jar \ + java.util.logging \ + java.util.regex \ + java.util.spi \ + java.util.zip \ + javax.crypto \ + javax.crypto.interfaces \ + javax.crypto.spec \ + javax.security.auth \ + javax.security.auth.callback \ + javax.security.auth.login \ + javax.security.auth.spi \ + javax.security.auth.x500 \ + javax.net \ + javax.net.ssl \ + javax.security.cert \ + \ + com.sun.net.ssl \ + com.sun.nio.file \ + com.sun.nio.sctp \ + com.sun.security.auth \ + com.sun.security.auth.login + +profile.2.name = compact2 +profile.2.packages = \ + java.sql \ + javax.sql \ + javax.xml \ + javax.xml.datatype \ + javax.xml.namespace \ + javax.xml.parsers \ + javax.xml.stream \ + javax.xml.stream.events \ + javax.xml.stream.util \ + javax.xml.transform \ + javax.xml.transform.dom \ + javax.xml.transform.sax \ + javax.xml.transform.stax \ + javax.xml.transform.stream \ + javax.xml.validation \ + javax.xml.xpath \ + org.w3c.dom \ + org.w3c.dom.bootstrap \ + org.w3c.dom.events \ + org.w3c.dom.ls \ + org.xml.sax \ + org.xml.sax.ext \ + org.xml.sax.helpers \ + java.rmi \ + java.rmi.activation \ + java.rmi.dgc \ + java.rmi.registry \ + java.rmi.server \ + javax.rmi.ssl \ + javax.transaction \ + javax.transaction.xa \ + \ + com.sun.net.httpserver \ + com.sun.net.httpserver.spi + +profile.3.name = compact3 +profile.3.packages = \ + java.lang.instrument \ + java.lang.management \ + java.security.acl \ + java.util.prefs \ + javax.management \ + javax.management.loading \ + javax.management.modelmbean \ + javax.management.monitor \ + javax.management.openmbean \ + javax.management.relation \ + javax.management.remote \ + javax.management.remote.rmi \ + javax.management.timer \ + javax.naming \ + javax.naming.directory \ + javax.naming.event \ + javax.naming.ldap \ + javax.naming.spi \ + javax.sql.rowset \ + javax.sql.rowset.serial \ + javax.sql.rowset.spi \ + javax.security.auth.kerberos \ + javax.security.sasl \ + javax.script \ + javax.smartcardio \ + javax.xml.crypto \ + javax.xml.crypto.dom \ + javax.xml.crypto.dsig \ + javax.xml.crypto.dsig.dom \ + javax.xml.crypto.dsig.keyinfo \ + javax.xml.crypto.dsig.spec \ + javax.annotation.processing \ + javax.lang.model \ + javax.lang.model.element \ + javax.lang.model.type \ + javax.lang.model.util \ + javax.tools \ + javax.tools.annotation \ + org.ietf.jgss \ + \ + com.sun.management \ + com.sun.security.auth.callback \ + com.sun.security.auth.module \ + com.sun.security.jgss + +profile.4.name = Full JRE +profile.4.packages = \ + java.applet \ + java.awt \ + java.awt.color \ + java.awt.datatransfer \ + java.awt.dnd \ + java.awt.dnd.peer \ + java.awt.event \ + java.awt.font \ + java.awt.geom \ + java.awt.im \ + java.awt.im.spi \ + java.awt.image \ + java.awt.image.renderable \ + java.awt.peer \ + java.awt.print \ + java.beans \ + java.beans.beancontext \ + javax.accessibility \ + javax.imageio \ + javax.imageio.event \ + javax.imageio.metadata \ + javax.imageio.plugins.bmp \ + javax.imageio.plugins.jpeg \ + javax.imageio.spi \ + javax.imageio.stream \ + javax.print \ + javax.print.attribute \ + javax.print.attribute.standard \ + javax.print.event \ + javax.sound.midi \ + javax.sound.midi.spi \ + javax.sound.sampled \ + javax.sound.sampled.spi \ + javax.swing \ + javax.swing.border \ + javax.swing.colorchooser \ + javax.swing.event \ + javax.swing.filechooser \ + javax.swing.plaf \ + javax.swing.plaf.basic \ + javax.swing.plaf.metal \ + javax.swing.plaf.multi \ + javax.swing.plaf.nimbus \ + javax.swing.plaf.synth \ + javax.swing.table \ + javax.swing.text \ + javax.swing.text.html \ + javax.swing.text.html.parser \ + javax.swing.text.rtf \ + javax.swing.tree \ + javax.swing.undo \ + javax.activation \ + javax.jws \ + javax.jws.soap \ + javax.rmi \ + javax.rmi.CORBA \ + javax.xml.bind \ + javax.xml.bind.annotation \ + javax.xml.bind.annotation.adapters \ + javax.xml.bind.attachment \ + javax.xml.bind.helpers \ + javax.xml.bind.util \ + javax.xml.soap \ + javax.xml.ws \ + javax.xml.ws.handler \ + javax.xml.ws.handler.soap \ + javax.xml.ws.http \ + javax.xml.ws.soap \ + javax.xml.ws.spi \ + javax.xml.ws.spi.http \ + javax.xml.ws.wsaddressing \ + javax.annotation \ + org.omg.CORBA \ + org.omg.CORBA.DynAnyPackage \ + org.omg.CORBA.ORBPackage \ + org.omg.CORBA.TypeCodePackage \ + org.omg.CORBA.portable \ + org.omg.CORBA_2_3 \ + org.omg.CORBA_2_3.portable \ + org.omg.CosNaming \ + org.omg.CosNaming.NamingContextExtPackage \ + org.omg.CosNaming.NamingContextPackage \ + org.omg.Dynamic \ + org.omg.DynamicAny \ + org.omg.DynamicAny.DynAnyFactoryPackage \ + org.omg.DynamicAny.DynAnyPackage \ + org.omg.IOP \ + org.omg.IOP.CodecFactoryPackage \ + org.omg.IOP.CodecPackage \ + org.omg.Messaging \ + org.omg.PortableInterceptor \ + org.omg.PortableInterceptor.ORBInitInfoPackage \ + org.omg.PortableServer \ + org.omg.PortableServer.CurrentPackage \ + org.omg.PortableServer.POAManagerPackage \ + org.omg.PortableServer.POAPackage \ + org.omg.PortableServer.ServantLocatorPackage \ + org.omg.PortableServer.portable \ + org.omg.SendingContext \ + org.omg.stub.java.rmi \ + org.omg.stub.javax.management.remote.rmi + +# Remaining JDK supported API +profile.5.name = JDK tools +profile.5.packages = \ + com.sun.jdi \ + com.sun.jdi.connect \ + com.sun.jdi.connect.spi \ + com.sun.jdi.event \ + com.sun.jdi.request \ + com.sun.javadoc \ + com.sun.tools.doclets \ + com.sun.tools.doctree \ + com.sun.source.tree \ + com.sun.source.util \ + com.sun.tools.attach \ + com.sun.tools.attach.spi \ + com.sun.tools.jconsole \ + com.sun.tools.javac \ + com.sun.tools.javah \ + com.sun.tools.javap \ + com.sun.tools.javadoc \ + com.sun.servicetag