changeset 57389:dda082a3bd93

Merge
author jjg
date Wed, 11 Dec 2019 15:34:19 -0800
parents d94a119b4413 241659594595
children ef6ede568b9b
files src/jdk.incubator.jpackage/macosx/classes/jdk/incubator/jpackage/internal/resources/background_dmg.png
diffstat 27 files changed, 583 insertions(+), 65 deletions(-) [+]
line wrap: on
line diff
--- a/make/CompileJavaModules.gmk	Wed Dec 11 15:33:17 2019 -0800
+++ b/make/CompileJavaModules.gmk	Wed Dec 11 15:34:19 2019 -0800
@@ -381,7 +381,7 @@
 ################################################################################
 
 jdk.incubator.jpackage_COPY += .gif .png .txt .spec .script .prerm .preinst .postrm .postinst .list .sh \
-    .desktop .copyright .control .plist .template .icns .scpt .entitlements .wxs .wxl .wxi .ico .bmp
+    .desktop .copyright .control .plist .template .icns .scpt .entitlements .wxs .wxl .wxi .ico .bmp .tiff
 
 jdk.incubator.jpackage_CLEAN += .properties
 
--- a/make/lib/Lib-jdk.incubator.jpackage.gmk	Wed Dec 11 15:33:17 2019 -0800
+++ b/make/lib/Lib-jdk.incubator.jpackage.gmk	Wed Dec 11 15:34:19 2019 -0800
@@ -34,7 +34,7 @@
     SYMBOLS_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libapplauncher, \
     TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
     OPTIMIZATION := LOW, \
-    CFLAGS := $(CXXFLAGS_JDKLIB), \
+    CFLAGS := $(CXXFLAGS_JDKLIB) $(X_CFLAGS), \
     CFLAGS_windows := -EHsc -DUNICODE -D_UNICODE, \
     LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
--- a/src/hotspot/share/classfile/classLoader.cpp	Wed Dec 11 15:33:17 2019 -0800
+++ b/src/hotspot/share/classfile/classLoader.cpp	Wed Dec 11 15:34:19 2019 -0800
@@ -1042,7 +1042,7 @@
   assert(fullq_class_name != NULL, "just checking");
 
   // Get package name from fully qualified class name.
-  ResourceMark rm;
+  ResourceMark rm(THREAD);
   const char *cp = package_from_name(fullq_class_name);
   if (cp != NULL) {
     PackageEntryTable* pkg_entry_tbl = ClassLoaderData::the_null_class_loader_data()->packages();
--- a/src/hotspot/share/classfile/javaClasses.cpp	Wed Dec 11 15:33:17 2019 -0800
+++ b/src/hotspot/share/classfile/javaClasses.cpp	Wed Dec 11 15:34:19 2019 -0800
@@ -1317,9 +1317,11 @@
 
   set_mirror_module_field(k, mirror, module, THREAD);
 
-  ResourceMark rm;
-  log_trace(cds, heap, mirror)(
-    "Restored %s archived mirror " PTR_FORMAT, k->external_name(), p2i(mirror()));
+  if (log_is_enabled(Trace, cds, heap, mirror)) {
+    ResourceMark rm(THREAD);
+    log_trace(cds, heap, mirror)(
+        "Restored %s archived mirror " PTR_FORMAT, k->external_name(), p2i(mirror()));
+  }
 
   return true;
 }
--- a/src/hotspot/share/classfile/systemDictionary.cpp	Wed Dec 11 15:33:17 2019 -0800
+++ b/src/hotspot/share/classfile/systemDictionary.cpp	Wed Dec 11 15:34:19 2019 -0800
@@ -448,7 +448,7 @@
   JavaValue result(T_VOID);
   LogTarget(Debug, protectiondomain) lt;
   if (lt.is_enabled()) {
-    ResourceMark rm;
+    ResourceMark rm(THREAD);
     // Print out trace information
     LogStream ls(lt);
     ls.print_cr("Checking package access");
@@ -1176,7 +1176,7 @@
                                                Handle class_loader, TRAPS) {
   assert(!ModuleEntryTable::javabase_moduleEntry()->is_patched(),
          "Cannot use sharing if java.base is patched");
-  ResourceMark rm;
+  ResourceMark rm(THREAD);
   int path_index = ik->shared_classpath_index();
   ClassLoaderData* loader_data = class_loader_data(class_loader);
   if (path_index < 0) {
@@ -1341,7 +1341,7 @@
   // package was loaded.
   if (class_loader.is_null()) {
     int path_index = ik->shared_classpath_index();
-    ResourceMark rm;
+    ResourceMark rm(THREAD);
     ClassLoader::add_package(ik->name()->as_C_string(), path_index, THREAD);
   }
 
@@ -1365,8 +1365,10 @@
       // This class matches with a class saved in an AOT library
       ik->set_has_passed_fingerprint_check(true);
     } else {
-      ResourceMark rm;
-      log_info(class, fingerprint)("%s :  expected = " PTR64_FORMAT " actual = " PTR64_FORMAT, ik->external_name(), aot_fp, cds_fp);
+      if (log_is_enabled(Info, class, fingerprint)) {
+        ResourceMark rm(THREAD);
+        log_info(class, fingerprint)("%s :  expected = " PTR64_FORMAT " actual = " PTR64_FORMAT, ik->external_name(), aot_fp, cds_fp);
+      }
     }
   }
 
@@ -1377,7 +1379,7 @@
 InstanceKlass* SystemDictionary::load_instance_class(Symbol* class_name, Handle class_loader, TRAPS) {
 
   if (class_loader.is_null()) {
-    ResourceMark rm;
+    ResourceMark rm(THREAD);
     PackageEntry* pkg_entry = NULL;
     bool search_only_bootloader_append = false;
     ClassLoaderData *loader_data = class_loader_data(class_loader);
--- a/src/hotspot/share/memory/metaspaceShared.cpp	Wed Dec 11 15:33:17 2019 -0800
+++ b/src/hotspot/share/memory/metaspaceShared.cpp	Wed Dec 11 15:34:19 2019 -0800
@@ -1774,7 +1774,7 @@
 // file.
 void MetaspaceShared::preload_and_dump(TRAPS) {
   { TraceTime timer("Dump Shared Spaces", TRACETIME_LOG(Info, startuptime));
-    ResourceMark rm;
+    ResourceMark rm(THREAD);
     char class_list_path_str[JVM_MAXPATHLEN];
     // Preload classes to be shared.
     const char* class_list_path;
@@ -1865,7 +1865,7 @@
     }
     if (klass != NULL) {
       if (log_is_enabled(Trace, cds)) {
-        ResourceMark rm;
+        ResourceMark rm(THREAD);
         log_trace(cds)("Shared spaces preloaded: %s", klass->external_name());
       }
 
@@ -1904,7 +1904,7 @@
     }
     ik->link_class(THREAD);
     if (HAS_PENDING_EXCEPTION) {
-      ResourceMark rm;
+      ResourceMark rm(THREAD);
       log_warning(cds)("Preload Warning: Verification failed for %s",
                     ik->external_name());
       CLEAR_PENDING_EXCEPTION;
--- a/src/hotspot/share/oops/instanceKlass.cpp	Wed Dec 11 15:33:17 2019 -0800
+++ b/src/hotspot/share/oops/instanceKlass.cpp	Wed Dec 11 15:34:19 2019 -0800
@@ -1319,7 +1319,7 @@
   if (array_klasses_acquire() == NULL) {
     if (or_null) return NULL;
 
-    ResourceMark rm;
+    ResourceMark rm(THREAD);
     JavaThread *jt = (JavaThread *)THREAD;
     {
       // Atomic creation of array_klasses
@@ -1368,7 +1368,7 @@
   assert(!is_initialized(), "we cannot initialize twice");
   LogTarget(Info, class, init) lt;
   if (lt.is_enabled()) {
-    ResourceMark rm;
+    ResourceMark rm(THREAD);
     LogStream ls(lt);
     ls.print("%d Initializing ", call_class_initializer_counter++);
     name()->print_value_on(&ls);
@@ -2678,7 +2678,7 @@
     if (name->utf8_length() <= 0) {
       return NULL;
     }
-    ResourceMark rm;
+    ResourceMark rm(THREAD);
     const char* package_name = ClassLoader::package_from_name((const char*) name->as_C_string());
     if (package_name == NULL) {
       return NULL;
@@ -2720,7 +2720,7 @@
     // entry table, it is an indication that the package has not
     // been defined. Consider it defined within the unnamed module.
     if (_package_entry == NULL) {
-      ResourceMark rm;
+      ResourceMark rm(THREAD);
 
       if (!ModuleEntryTable::javabase_defined()) {
         // Before java.base is defined during bootstrapping, define all packages in
@@ -2741,7 +2741,7 @@
     }
 
     if (log_is_enabled(Debug, module)) {
-      ResourceMark rm;
+      ResourceMark rm(THREAD);
       ModuleEntry* m = _package_entry->module();
       log_trace(module)("Setting package: class: %s, package: %s, loader: %s, module: %s",
                         external_name(),
@@ -2750,7 +2750,7 @@
                         (m->is_named() ? m->name()->as_C_string() : UNNAMED_MODULE));
     }
   } else {
-    ResourceMark rm;
+    ResourceMark rm(THREAD);
     log_trace(module)("Setting package: class: %s, package: unnamed, loader: %s, module: %s",
                       external_name(),
                       (loader_data != NULL) ? loader_data->loader_name_and_id() : "NULL",
--- a/src/hotspot/share/oops/klass.cpp	Wed Dec 11 15:33:17 2019 -0800
+++ b/src/hotspot/share/oops/klass.cpp	Wed Dec 11 15:34:19 2019 -0800
@@ -552,7 +552,7 @@
   assert(is_shared(), "must be set");
   JFR_ONLY(RESTORE_ID(this);)
   if (log_is_enabled(Trace, cds, unshareable)) {
-    ResourceMark rm;
+    ResourceMark rm(THREAD);
     log_trace(cds, unshareable)("restore: %s", external_name());
   }
 
@@ -585,7 +585,7 @@
   Handle module_handle(THREAD, ((module_entry != NULL) ? module_entry->module() : (oop)NULL));
 
   if (this->has_raw_archived_mirror()) {
-    ResourceMark rm;
+    ResourceMark rm(THREAD);
     log_debug(cds, mirror)("%s has raw archived mirror", external_name());
     if (HeapShared::open_archive_heap_region_mapped()) {
       bool present = java_lang_Class::restore_archived_mirror(this, loader, module_handle,
--- a/src/hotspot/share/oops/klassVtable.cpp	Wed Dec 11 15:33:17 2019 -0800
+++ b/src/hotspot/share/oops/klassVtable.cpp	Wed Dec 11 15:34:19 2019 -0800
@@ -625,7 +625,7 @@
 
   // search through the super class hierarchy to see if we need
   // a new entry
-  ResourceMark rm;
+  ResourceMark rm(THREAD);
   Symbol* name = target_method()->name();
   Symbol* signature = target_method()->signature();
   const Klass* k = super;
--- a/src/hotspot/share/oops/method.cpp	Wed Dec 11 15:33:17 2019 -0800
+++ b/src/hotspot/share/oops/method.cpp	Wed Dec 11 15:34:19 2019 -0800
@@ -1399,7 +1399,7 @@
 methodHandle Method::make_method_handle_intrinsic(vmIntrinsics::ID iid,
                                                          Symbol* signature,
                                                          TRAPS) {
-  ResourceMark rm;
+  ResourceMark rm(THREAD);
   methodHandle empty;
 
   InstanceKlass* holder = SystemDictionary::MethodHandle_klass();
--- a/src/hotspot/share/runtime/mutex.cpp	Wed Dec 11 15:33:17 2019 -0800
+++ b/src/hotspot/share/runtime/mutex.cpp	Wed Dec 11 15:34:19 2019 -0800
@@ -157,18 +157,18 @@
 }
 
 void Mutex::unlock() {
-  assert_owner(Thread::current());
+  DEBUG_ONLY(assert_owner(Thread::current()));
   set_owner(NULL);
   _lock.unlock();
 }
 
 void Monitor::notify() {
-  assert_owner(Thread::current());
+  DEBUG_ONLY(assert_owner(Thread::current()));
   _lock.notify();
 }
 
 void Monitor::notify_all() {
-  assert_owner(Thread::current());
+  DEBUG_ONLY(assert_owner(Thread::current()));
   _lock.notify_all();
 }
 
--- a/src/java.base/share/conf/security/java.security	Wed Dec 11 15:33:17 2019 -0800
+++ b/src/java.base/share/conf/security/java.security	Wed Dec 11 15:34:19 2019 -0800
@@ -61,6 +61,8 @@
 # List of providers and their preference orders (see above):
 #
 #ifdef solaris
+# Note: The OracleUcrypto provider is deprecated and subject to removal in
+# a future version of the JDK.
 security.provider.tbd=OracleUcrypto
 security.provider.tbd=SunPKCS11 ${java.home}/conf/security/sunpkcs11-solaris.cfg
 #endif
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/SymbolMetadata.java	Wed Dec 11 15:33:17 2019 -0800
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/SymbolMetadata.java	Wed Dec 11 15:34:19 2019 -0800
@@ -31,6 +31,7 @@
 import com.sun.tools.javac.util.Assert;
 import com.sun.tools.javac.util.List;
 import com.sun.tools.javac.util.ListBuffer;
+import com.sun.tools.javac.util.Pair;
 
 /**
  * Container for all annotations (attributes in javac) on a Symbol.
@@ -285,6 +286,22 @@
             init_type_attributes = removeFromTypeCompoundList(init_type_attributes, (TypeCompound)compound);
         } else if (clinit_type_attributes.contains(compound)) {
             clinit_type_attributes = removeFromTypeCompoundList(clinit_type_attributes, (TypeCompound)compound);
+        } else {
+            // slow path, it could be that attributes list contains annotation containers, so we have to dig deeper
+            for (Attribute.Compound attrCompound : attributes) {
+                if (attrCompound.isSynthesized() && !attrCompound.values.isEmpty()) {
+                    Pair<Symbol.MethodSymbol, Attribute> val = attrCompound.values.get(0);
+                    if (val.fst.getSimpleName().contentEquals("value") &&
+                            val.snd instanceof Attribute.Array) {
+                        Attribute.Array arr = (Attribute.Array) val.snd;
+                        if (arr.values.length != 0
+                                && arr.values[0] instanceof Attribute.Compound
+                                && arr.values[0].type == compound.type) {
+                            attributes = removeFromCompoundList(attributes, attrCompound);
+                        }
+                    }
+                }
+            }
         }
     }
 }
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java	Wed Dec 11 15:33:17 2019 -0800
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java	Wed Dec 11 15:34:19 2019 -0800
@@ -835,7 +835,11 @@
                 Attribute.Compound c = new Attribute.Compound(targetContainerType, List.of(p));
                 JCAnnotation annoTree = m.Annotation(c);
 
-                if (!chk.annotationApplicable(annoTree, on)) {
+                boolean isRecordMember = (on.flags_field & Flags.RECORD) != 0 || on.enclClass() != null && on.enclClass().isRecord();
+                /* if it is a record member we will not issue the error now and wait until annotations on records are
+                 * checked at Check::validateAnnotation, which will issue it
+                 */
+                if (!chk.annotationApplicable(annoTree, on) && (!isRecordMember || isRecordMember && (on.flags_field & Flags.GENERATED_MEMBER) == 0)) {
                     log.error(annoTree.pos(),
                               Errors.InvalidRepeatableAnnotationNotApplicable(targetContainerType, on));
                 }
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java	Wed Dec 11 15:33:17 2019 -0800
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java	Wed Dec 11 15:34:19 2019 -0800
@@ -2906,12 +2906,18 @@
                  */
                 ClassSymbol recordClass = (ClassSymbol) s.owner;
                 RecordComponent rc = recordClass.getRecordComponent((VarSymbol)s, false);
-                rc.appendAttributes(s.getRawAttributes().stream().filter(anno ->
-                    Arrays.stream(getTargetNames(anno.type.tsym)).anyMatch(name -> name == names.RECORD_COMPONENT)
-                ).collect(List.collector()));
-                rc.appendUniqueTypeAttributes(s.getRawTypeAttributes());
-                // to get all the type annotations applied to the type
-                rc.type = s.type;
+                SymbolMetadata metadata = rc.getMetadata();
+                if (metadata == null || metadata.isEmpty()) {
+                    /* if not is empty then we have already been here, which is the case if multiple annotations are applied
+                     * to the record component declaration
+                     */
+                    rc.appendAttributes(s.getRawAttributes().stream().filter(anno ->
+                            Arrays.stream(getTargetNames(anno.type.tsym)).anyMatch(name -> name == names.RECORD_COMPONENT)
+                    ).collect(List.collector()));
+                    rc.appendUniqueTypeAttributes(s.getRawTypeAttributes());
+                    // to get all the type annotations applied to the type
+                    rc.type = s.type;
+                }
             }
         }
 
--- a/src/jdk.crypto.ucrypto/solaris/classes/module-info.java	Wed Dec 11 15:33:17 2019 -0800
+++ b/src/jdk.crypto.ucrypto/solaris/classes/module-info.java	Wed Dec 11 15:34:19 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2019, 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
@@ -29,7 +29,10 @@
  * @provides java.security.Provider
  * @moduleGraph
  * @since 9
+ * @deprecated This module is deprecated and subject to removal in a future
+ *    version of the JDK. See JEP 362 for more information.
  */
+@Deprecated(since="14", forRemoval=true)
 module jdk.crypto.ucrypto {
     provides java.security.Provider with com.oracle.security.ucrypto.UcryptoProvider;
 }
--- a/src/jdk.incubator.jpackage/macosx/classes/jdk/incubator/jpackage/internal/MacDmgBundler.java	Wed Dec 11 15:33:17 2019 -0800
+++ b/src/jdk.incubator.jpackage/macosx/classes/jdk/incubator/jpackage/internal/MacDmgBundler.java	Wed Dec 11 15:34:19 2019 -0800
@@ -38,7 +38,7 @@
     private static final ResourceBundle I18N = ResourceBundle.getBundle(
             "jdk.incubator.jpackage.internal.resources.MacResources");
 
-    static final String DEFAULT_BACKGROUND_IMAGE="background_dmg.png";
+    static final String DEFAULT_BACKGROUND_IMAGE="background_dmg.tiff";
     static final String DEFAULT_DMG_SETUP_SCRIPT="DMGsetup.scpt";
     static final String TEMPLATE_BUNDLE_ICON = "java.icns";
 
@@ -112,7 +112,7 @@
     private File getConfig_VolumeBackground(
             Map<String, ? super Object> params) {
         return new File(CONFIG_ROOT.fetchFrom(params),
-                APP_NAME.fetchFrom(params) + "-background.png");
+                APP_NAME.fetchFrom(params) + "-background.tiff");
     }
 
     private File getConfig_VolumeIcon(Map<String, ? super Object> params) {
@@ -304,7 +304,7 @@
             File bgdir = new File(mountedRoot, ".background");
             bgdir.mkdirs();
             IOUtils.copyFile(getConfig_VolumeBackground(params),
-                    new File(bgdir, "background.png"));
+                    new File(bgdir, "background.tiff"));
 
             // Indicate that we want a custom icon
             // NB: attributes of the root directory are ignored
--- a/src/jdk.incubator.jpackage/macosx/classes/jdk/incubator/jpackage/internal/resources/DMGsetup.scpt	Wed Dec 11 15:33:17 2019 -0800
+++ b/src/jdk.incubator.jpackage/macosx/classes/jdk/incubator/jpackage/internal/resources/DMGsetup.scpt	Wed Dec 11 15:34:19 2019 -0800
@@ -11,7 +11,7 @@
     set theViewOptions to the icon view options of container window
     set arrangement of theViewOptions to not arranged
     set icon size of theViewOptions to 128
-    set background picture of theViewOptions to file ".background:background.png"
+    set background picture of theViewOptions to file ".background:background.tiff"
 
     -- Create alias for install location
     make new alias file at container window to DEPLOY_INSTALL_LOCATION with properties {name:"DEPLOY_INSTALL_NAME"}
Binary file src/jdk.incubator.jpackage/macosx/classes/jdk/incubator/jpackage/internal/resources/background_dmg.png has changed
Binary file src/jdk.incubator.jpackage/macosx/classes/jdk/incubator/jpackage/internal/resources/background_dmg.tiff has changed
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TagletWriterImpl.java	Wed Dec 11 15:33:17 2019 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TagletWriterImpl.java	Wed Dec 11 15:34:19 2019 -0800
@@ -479,7 +479,7 @@
                                     si.setHolder(resources.getText("doclet.Overview"));
                                     break;
                                 case DOCFILE:
-                                    si.setHolder(de.getPackageElement().toString());
+                                    si.setHolder(getHolderName(de));
                                     break;
                                 default:
                                     throw new IllegalStateException();
@@ -502,4 +502,17 @@
         }
         return result;
     }
+
+    private String getHolderName(DocletElement de) {
+        PackageElement pe = de.getPackageElement();
+        if (pe.isUnnamed()) {
+            // if package is unnamed use enclosing module only if it is named
+            Element ee = pe.getEnclosingElement();
+            if (ee instanceof ModuleElement && !((ModuleElement)ee).isUnnamed()) {
+                return resources.getText("doclet.module") + " " + utils.getFullyQualifiedName(ee);
+            }
+            return pe.toString(); // "Unnamed package" or similar
+        }
+        return resources.getText("doclet.package") + " " + utils.getFullyQualifiedName(pe);
+    }
 }
--- a/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n.properties	Wed Dec 11 15:33:17 2019 -0800
+++ b/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n.properties	Wed Dec 11 15:34:19 2019 -0800
@@ -488,9 +488,9 @@
 /help\n\t\
      List the jshell tool commands and help subjects\n\n\
 /help <command>\n\t\
-     Display information about the specified command. The slash must be included.\n\t\
-     Only the first few letters of the command are needed -- if more than one\n\t\
-     each will be displayed.  Example:  /help /li\n\n\
+     Display information about the specified command.\n\t\
+     Only the first few letters of the command are needed -- if there is more than\n\t\
+     one match, each will be displayed.  Example:  /help /li\n\n\
 /help <subject>\n\t\
      Display information about the specified help subject. Example: /help intro
 
@@ -529,9 +529,9 @@
 /?\n\t\
      Display list of commands and help subjects\n\
 /? <command>\n\t\
-     Display information about the specified command. The slash must be included.\n\t\
-     Only the first few letters of the command are needed -- if more than one\n\t\
-     match, each will be displayed.  Example:  /? /li\n\
+     Display information about the specified command.\n\t\
+     Only the first few letters of the command are needed -- if there is more than\n\t\
+     one match, each will be displayed.  Example:  /? /li\n\n\
 /? <subject>\n\t\
      Display information about the specified help subject. Example: /? intro
 
--- a/src/jdk.jshell/share/classes/jdk/jshell/Eval.java	Wed Dec 11 15:33:17 2019 -0800
+++ b/src/jdk.jshell/share/classes/jdk/jshell/Eval.java	Wed Dec 11 15:34:19 2019 -0800
@@ -1110,7 +1110,7 @@
                 Snippet sn = outer.wrapLineToSnippet(wln);
                 String file = "#" + sn.id();
                 elems[i] = new StackTraceElement(klass, method, file, line);
-            } else if (r.getFileName().equals("<none>")) {
+            } else if ("<none>".equals(r.getFileName())) {
                 elems[i] = new StackTraceElement(r.getClassName(), r.getMethodName(), null, r.getLineNumber());
             } else {
                 elems[i] = r;
--- a/test/jdk/tools/jpackage/run_tests.sh	Wed Dec 11 15:33:17 2019 -0800
+++ b/test/jdk/tools/jpackage/run_tests.sh	Wed Dec 11 15:34:19 2019 -0800
@@ -8,8 +8,8 @@
 # Fail fast
 set -e; set -o pipefail;
 
-# $JTREG_BUNDLE_URL (Link can be obtained from https://openjdk.java.net/jtreg/ page)
-jtreg_bundle=$JTREG_BUNDLE_URL
+# $JT_BUNDLE_URL (Link can be obtained from https://openjdk.java.net/jtreg/ page)
+jtreg_bundle=$JT_BUNDLE_URL
 workdir=/tmp/jpackage_jtreg_testing
 jtreg_jar=$workdir/jtreg/lib/jtreg.jar
 jpackage_test_selector=test/jdk/tools/jpackage
@@ -181,9 +181,9 @@
   fatal JAVA_HOME variable is set to [$JAVA_HOME] value, but $JAVA_HOME/bin/java not found.
 fi
 
-if [ -z "$JTREG_HOME" ]; then
-  if [ -z "$JTREG_BUNDLE_URL" ]; then
-    fatal 'JTREG_HOME or JTREG_BUNDLE_URL environment variable is not set. Link to JTREG bundle can be found at https://openjdk.java.net/jtreg/'.
+if [ -z "$JT_HOME" ]; then
+  if [ -z "$JT_BUNDLE_URL" ]; then
+    fatal 'JT_HOME or JT_BUNDLE_URL environment variable is not set. Link to JTREG bundle can be found at https://openjdk.java.net/jtreg/'.
   fi
 fi
 
@@ -225,7 +225,7 @@
 installJtreg ()
 {
   # Install jtreg if missing
-  if [ -z "$JTREG_HOME" ]; then
+  if [ -z "$JT_HOME" ]; then
     if [ ! -f "$jtreg_jar" ]; then
       exec_command mkdir -p "$workdir"
       if [[ ${jtreg_bundle: -7} == ".tar.gz" ]]; then
@@ -234,13 +234,13 @@
         if [[ ${jtreg_bundle: -4} == ".zip" ]]; then
           exec_command "(" cd "$workdir" "&&" wget "$jtreg_bundle" "&&" unzip "$(basename $jtreg_bundle)" ";" rm -f "$(basename $jtreg_bundle)" ")"
         else
-          fatal 'Unsupported extension of JREG bundle ['$JTREG_BUNDLE_URL']. Only *.zip or *.tar.gz is supported.'
+          fatal 'Unsupported extension of JREG bundle ['$JT_BUNDLE_URL']. Only *.zip or *.tar.gz is supported.'
         fi
       fi
     fi
   else
-    # use jtreg provided via JTREG_HOME
-    jtreg_jar=$JTREG_HOME/lib/jtreg.jar
+    # use jtreg provided via JT_HOME
+    jtreg_jar=$JT_HOME/lib/jtreg.jar
   fi
 
   echo 'jtreg jar file: '$jtreg_jar
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/jdk/javadoc/doclet/testIndexInDocFiles/TestIndexInDocFiles.java	Wed Dec 11 15:34:19 2019 -0800
@@ -0,0 +1,176 @@
+/*
+ * Copyright (c) 2019, 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 8235414
+ * @summary Module level doc-files show "unnamed package" as holder
+ * @library /tools/lib ../../lib
+ * @modules jdk.javadoc/jdk.javadoc.internal.tool
+ * @build javadoc.tester.* toolbox.ToolBox
+ * @run main TestIndexInDocFiles
+ */
+
+
+import java.io.IOException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
+import toolbox.ToolBox;
+
+import javadoc.tester.JavadocTester;
+
+public class TestIndexInDocFiles extends JavadocTester {
+
+    final ToolBox tb;
+
+    public static void main(String... args) throws Exception {
+        TestIndexInDocFiles tester = new TestIndexInDocFiles();
+        tester.runTests(m -> new Object[] { Paths.get(m.getName()) });
+    }
+
+    TestIndexInDocFiles() {
+        tb = new ToolBox();
+    }
+
+    /**
+     * Test support for index tag and system properties in package level doc-files.
+     * @param base the base directory for scratch files
+     * @throws IOException if an exception occurs
+     */
+    @Test
+    public void testPackageDocFiles(Path base) throws IOException {
+        Path src = base.resolve("src");
+
+        // write the skeletal Java files
+        tb.writeJavaFiles(src,
+                "public class A { }\n",
+                "package p.q; public class C { }\n");
+
+        // write the top level (unnamed package) doc file
+        Path topLevelDocFiles = src.resolve("doc-files");
+        tb.writeFile(topLevelDocFiles.resolve("top-level-file.html"),
+                "<html>\n"
+                + "<head><title>Top level HTML file</title></head>\n"
+                + "<body><h1>Package HTML file</h1>\n"
+                + "{@index top-level-index additional info}\n"
+                + "{@systemProperty top.level.property}\n"
+                + "File content</body>\n"
+                + "</html>\n");
+
+        // write the (named) package level doc file
+        Path pkgDocFiles = src.resolve("p").resolve("q").resolve("doc-files");
+        tb.writeFile(pkgDocFiles.resolve("package-file.html"),
+                "<html>\n"
+                + "<head><title>Package HTML file</title></head>\n"
+                + "<body><h1>Package HTML file</h1>\n"
+                + "{@index package-index additional info}\n"
+                + "{@systemProperty package.property}\n"
+                + "File content</body>\n"
+                + "</html>\n");
+
+        javadoc("-d", base.resolve("out").toString(),
+                "--source-path", src.toString(),
+                src.resolve("A.java").toString(), "p.q");
+        checkExit(Exit.OK);
+
+        checkOutput("doc-files/top-level-file.html", true,
+                "<h1>Package HTML file</h1>\n"
+                + "<a id=\"top-level-index\" class=\"searchTagResult\">top-level-index</a>\n"
+                + "<code><a id=\"top.level.property\" class=\"searchTagResult\">top.level.property</a></code>\n");
+        checkOutput("p/q/doc-files/package-file.html", true,
+                "<h1>Package HTML file</h1>\n"
+                + "<a id=\"package-index\" class=\"searchTagResult\">package-index</a>\n"
+                + "<code><a id=\"package.property\" class=\"searchTagResult\">package.property</a></code>\n");
+        checkOutput("tag-search-index.js", true,
+                "{\"l\":\"package-index\",\"h\":\"package p.q\",\"d\":\"additional info\","
+                + "\"u\":\"p/q/doc-files/package-file.html#package-index\"}",
+                "{\"l\":\"package.property\",\"h\":\"package p.q\",\"d\":\"System Property\","
+                + "\"u\":\"p/q/doc-files/package-file.html#package.property\"}",
+                "{\"l\":\"top-level-index\",\"h\":\"unnamed package\",\"d\":\"additional info\","
+                + "\"u\":\"doc-files/top-level-file.html#top-level-index\"}",
+                "{\"l\":\"top.level.property\",\"h\":\"unnamed package\",\"d\":\"System Property\","
+                + "\"u\":\"doc-files/top-level-file.html#top.level.property\"}");
+    }
+
+    /**
+     * Test support for index tags and system properties in module and package level doc-files.
+     * @param base the base directory for scratch files
+     * @throws IOException if an exception occurs
+     */
+    @Test
+    public void testModuleDocFiles(Path base) throws IOException {
+        Path src = base.resolve("src");
+
+        // write the skeletal Java files
+        tb.writeJavaFiles(src,
+                "module m.n { exports p.q; }\n",
+                "public class A { }\n",
+                "package p.q; public class C { }\n");
+
+        // write the doc files for the module
+        Path mdlDocFiles = src.resolve("doc-files");
+        tb.writeFile(mdlDocFiles.resolve("module-file.html"),
+                "<html>\n"
+                + "<head><title>Module HTML file</title></head>\n"
+                + "<body><h1>Module HTML file</h1>\n"
+                + "{@index module-index additional info}\n"
+                + "{@systemProperty module.property}\n"
+                + "File content</body>\n"
+                + "</html>\n");
+
+        // write the doc files for a package in the module
+        Path pkgDocFiles = src.resolve("p").resolve("q").resolve("doc-files");
+        tb.writeFile(pkgDocFiles.resolve("package-file.html"),
+                "<html>\n"
+                + "<head><title>Package HTML file</title></head>\n"
+                + "<body><h1>Package HTML file</h1>\n"
+                + "{@index package-index additional info}\n"
+                + "{@systemProperty package.property}\n"
+                + "File content</body>\n"
+                + "</html>\n");
+
+        javadoc("-d", base.resolve("out").toString(),
+                "--source-path", src.toString(),
+                "--module", "m.n");
+        checkExit(Exit.OK);
+
+        checkOutput("m.n/doc-files/module-file.html", true,
+                "<h1>Module HTML file</h1>\n"
+                + "<a id=\"module-index\" class=\"searchTagResult\">module-index</a>\n"
+                + "<code><a id=\"module.property\" class=\"searchTagResult\">module.property</a></code>\n");
+        checkOutput("m.n/p/q/doc-files/package-file.html", true,
+                "<h1>Package HTML file</h1>\n"
+                + "<a id=\"package-index\" class=\"searchTagResult\">package-index</a>\n"
+                + "<code><a id=\"package.property\" class=\"searchTagResult\">package.property</a></code>\n");
+        checkOutput("tag-search-index.js", true,
+                "{\"l\":\"module-index\",\"h\":\"module m.n\",\"d\":\"additional info\","
+                + "\"u\":\"m.n/doc-files/module-file.html#module-index\"}",
+                "{\"l\":\"package-index\",\"h\":\"package p.q\",\"d\":\"additional info\","
+                + "\"u\":\"m.n/p/q/doc-files/package-file.html#package-index\"}",
+                "{\"l\":\"module.property\",\"h\":\"module m.n\",\"d\":\"System Property\","
+                + "\"u\":\"m.n/doc-files/module-file.html#module.property\"}",
+                "{\"l\":\"package.property\",\"h\":\"package p.q\",\"d\":\"System Property\","
+                + "\"u\":\"m.n/p/q/doc-files/package-file.html#package.property\"}");
+    }
+}
--- a/test/langtools/jdk/jshell/ExceptionsTest.java	Wed Dec 11 15:33:17 2019 -0800
+++ b/test/langtools/jdk/jshell/ExceptionsTest.java	Wed Dec 11 15:34:19 2019 -0800
@@ -24,8 +24,13 @@
 /*
  * @test
  * @summary Tests for exceptions
- * @bug 8198801 8212167
- * @build KullaTesting TestingInputStream
+ * @bug 8198801 8212167 8210527
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ *          jdk.compiler/com.sun.tools.javac.main
+ *          jdk.jdeps/com.sun.tools.javap
+ * @library /tools/lib
+ * @build toolbox.ToolBox toolbox.JarTask toolbox.JavacTask
+ * @build KullaTesting TestingInputStream Compiler
  * @run testng ExceptionsTest
  */
 
@@ -38,6 +43,9 @@
 import jdk.jshell.SnippetEvent;
 import jdk.jshell.UnresolvedReferenceException;
 
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
 import org.testng.annotations.Test;
 
 import static org.testng.Assert.*;
@@ -45,6 +53,9 @@
 @Test
 public class ExceptionsTest extends KullaTesting {
 
+    private final Compiler compiler = new Compiler();
+    private final Path outDir = Paths.get("test_class_path");
+
     public void throwUncheckedException() {
         String message = "error_message";
         SnippetEvent cr = assertEvalException("throw new RuntimeException(\"" + message + "\");");
@@ -207,6 +218,36 @@
                         newStackTraceElement("", "", cr2.snippet(), 1)));
     }
 
+    // test 8210527
+    public void throwFromWithoutSource() {
+        String message = "show this";
+        SnippetEvent se = assertEvalException("java.lang.reflect.Proxy.newProxyInstance(" +
+                "Thread.currentThread().getContextClassLoader(), new Class[] {}," +
+                "(p, m, a) -> { throw new IllegalStateException(\"" + message + "\"); }).hashCode()");
+        assertExceptionMatch(se,
+                new ExceptionInfo(IllegalStateException.class, message,
+                        newStackTraceElement("", "lambda$do_it$$0", se.snippet(), 1),
+                        new StackTraceElement("com.sun.proxy.$Proxy0", "hashCode", null, -1),
+                        newStackTraceElement("", "", se.snippet(), 1)));
+    }
+
+    // test 8210527
+    public void throwFromNoSource() {
+        Path path = outDir.resolve("fail");
+        compiler.compile(path,
+                "package fail;\n" +
+                        "public class Fail {\n" +
+                        "  static { int x = 1 / 0; }\n" +
+                        "}\n");
+        addToClasspath(compiler.getPath(path));
+        SnippetEvent se = assertEvalException("Class.forName(\"fail.Fail\")");
+        assertExceptionMatch(se,
+                new ExceptionInfo(ExceptionInInitializerError.class, null,
+                        new StackTraceElement("java.lang.Class", "forName0",  "Class.java", -2),
+                        new StackTraceElement("java.lang.Class", "forName", "Class.java", -2),
+                        newStackTraceElement("", "", se.snippet(), 1)));
+    }
+
     // test 8212167
     public void throwLineFormat1() {
         SnippetEvent se = assertEvalException(
@@ -367,17 +408,19 @@
                 for (int i = 0; i < actual.length; ++i) {
                     StackTraceElement actualElement = actual[i];
                     StackTraceElement expectedElement = expected[i];
-                    assertEquals(actualElement.getClassName(), expectedElement.getClassName(), message + " : class names");
+                    assertEquals(actualElement.getClassName(), expectedElement.getClassName(), message + " : class names [" + i + "]");
                     String expectedMethodName = expectedElement.getMethodName();
                     if (expectedMethodName.startsWith("lambda$")) {
                         assertTrue(actualElement.getMethodName().startsWith("lambda$"), message + " : method names");
                     } else {
-                        assertEquals(actualElement.getMethodName(), expectedElement.getMethodName(), message + " : method names");
+                        assertEquals(actualElement.getMethodName(), expectedElement.getMethodName(), message + " : method names [" + i + "]");
                     }
-                    assertEquals(actualElement.getFileName(), expectedElement.getFileName(), message + " : file names");
-                    assertEquals(actualElement.getLineNumber(), expectedElement.getLineNumber(), message + " : line numbers"
-                        + " -- actual: " + actualElement.getLineNumber() + ", expected: " + expectedElement.getLineNumber() +
-                            " -- in: " + actualElement.getClassName());
+                    assertEquals(actualElement.getFileName(), expectedElement.getFileName(), message + " : file names [" + i + "]");
+                    if (expectedElement.getLineNumber() >= 0) {
+                        assertEquals(actualElement.getLineNumber(), expectedElement.getLineNumber(), message + " : line numbers [" + i + "]"
+                                + " -- actual: " + actualElement.getLineNumber() + ", expected: " + expectedElement.getLineNumber() +
+                                " -- in: " + actualElement.getClassName());
+                    }
                 }
             }
         }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/processing/model/element/repeatingAnnotations/RepeatingAnnotationsOnRecords.java	Wed Dec 11 15:34:19 2019 -0800
@@ -0,0 +1,250 @@
+/*
+ * Copyright (c) 2019, 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 8234101
+ * @summary Verify that repeating annotations and its processing works for records
+ * @library /tools/lib /tools/javac/lib
+ * @modules
+ *      jdk.compiler/com.sun.tools.javac.api
+ *      jdk.compiler/com.sun.tools.javac.main
+ *      jdk.compiler/com.sun.tools.javac.code
+ *      jdk.compiler/com.sun.tools.javac.util
+ * @build toolbox.ToolBox toolbox.JavacTask
+ * @build JavacTestingAbstractProcessor
+ * @compile --enable-preview -source ${jdk.version} RepeatingAnnotationsOnRecords.java
+ * @run main/othervm --enable-preview RepeatingAnnotationsOnRecords
+ */
+
+import java.io.*;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.*;
+
+import javax.annotation.processing.*;
+import javax.lang.model.SourceVersion;
+import javax.lang.model.element.*;
+import javax.lang.model.type.TypeKind;
+import javax.lang.model.util.ElementFilter;
+import javax.lang.model.util.ElementScanner14;
+import javax.tools.Diagnostic.Kind;
+import javax.tools.*;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import com.sun.tools.javac.code.Symbol;
+import com.sun.tools.javac.code.Symbol.VarSymbol;
+
+import com.sun.tools.javac.util.Assert;
+import com.sun.tools.javac.util.List;
+
+import toolbox.JavacTask;
+import toolbox.Task;
+import toolbox.Task.Mode;
+import toolbox.Task.OutputKind;
+import toolbox.TestRunner;
+import toolbox.ToolBox;
+
+public class RepeatingAnnotationsOnRecords extends TestRunner {
+    protected ToolBox tb;
+
+    RepeatingAnnotationsOnRecords() {
+        super(System.err);
+        tb = new ToolBox();
+    }
+
+    public static void main(String... args) throws Exception {
+        new RepeatingAnnotationsOnRecords().runTests();
+    }
+
+    protected void runTests() throws Exception {
+        runTests(m -> new Object[] { Paths.get(m.getName()) });
+    }
+
+    Path[] findJavaFiles(Path... paths) throws IOException {
+        return tb.findJavaFiles(paths);
+    }
+
+    static final String SOURCE =
+            """
+            import java.lang.annotation.*;
+            import java.util.*;
+            import javax.annotation.processing.*;
+            import javax.lang.model.element.*;
+
+            @Retention(RetentionPolicy.RUNTIME)
+            @Target({ ElementType.PARAMETER })
+            @interface ParameterContainer { Parameter[] value(); }
+
+            @Retention(RetentionPolicy.RUNTIME)
+            @Target({ ElementType.PARAMETER })
+            @Repeatable(ParameterContainer.class)
+            @interface Parameter {}
+
+            @Retention(RetentionPolicy.RUNTIME)
+            @Target({ ElementType.METHOD })
+            @interface MethodContainer { Method[] value(); }
+
+            @Retention(RetentionPolicy.RUNTIME)
+            @Target({ ElementType.METHOD })
+            @Repeatable(MethodContainer.class)
+            @interface Method {}
+
+            @Retention(RetentionPolicy.RUNTIME)
+            @Target({ ElementType.FIELD })
+            @interface FieldContainer { Field[] value(); }
+
+            @Retention(RetentionPolicy.RUNTIME)
+            @Target({ ElementType.FIELD })
+            @Repeatable(FieldContainer.class)
+            @interface Field {}
+
+            @Retention(RetentionPolicy.RUNTIME)
+            @Target({ ElementType.RECORD_COMPONENT })
+            @interface RecComponentContainer { RecComponent[] value(); }
+
+            @Retention(RetentionPolicy.RUNTIME)
+            @Target({ ElementType.RECORD_COMPONENT })
+            @Repeatable(RecComponentContainer.class)
+            @interface RecComponent {}
+
+            @Retention(RetentionPolicy.RUNTIME)
+            @interface AllContainer { All[] value(); }
+
+            @Retention(RetentionPolicy.RUNTIME)
+            @Repeatable(AllContainer.class)
+            @interface All {}
+
+            @Retention(RetentionPolicy.RUNTIME)
+            @Target({ ElementType.FIELD, ElementType.RECORD_COMPONENT })
+            @interface RecComponentAndFieldContainer { RecComponentAndField[] value(); }
+
+            @Retention(RetentionPolicy.RUNTIME)
+            @Target({ ElementType.FIELD, ElementType.RECORD_COMPONENT })
+            @Repeatable(RecComponentAndFieldContainer.class)
+            @interface RecComponentAndField {}
+
+            record R1(@Parameter @Parameter int i) {}
+
+            record R2(@Method @Method int i) {}
+
+            record R3(@Field @Field int i) {}
+
+            record R4(@All @All int i) {}
+
+            record R5(@RecComponent @RecComponent int i) {}
+
+            record R6(@RecComponentAndField @RecComponentAndField int i) {}
+            """;
+
+    @Test
+    public void testAnnoProcessing(Path base) throws Exception {
+        Path src = base.resolve("src");
+        Path r = src.resolve("Records");
+
+        Path classes = base.resolve("classes");
+
+        Files.createDirectories(classes);
+
+        tb.writeJavaFiles(r, SOURCE);
+
+        for (Mode mode : new Mode[] {Mode.API}) {
+            new JavacTask(tb, mode)
+                    .options("-nowarn",
+                            "-processor", Processor.class.getName(),
+                            "--enable-preview",
+                            "-source", Integer.toString(Runtime.version().feature()))
+                    .files(findJavaFiles(src))
+                    .outdir(classes)
+                    .run()
+                    .writeAll()
+                    .getOutputLines(Task.OutputKind.DIRECT);
+        }
+    }
+
+    @SupportedAnnotationTypes("*")
+    public static final class Processor extends JavacTestingAbstractProcessor {
+        public boolean process(Set<? extends TypeElement> tes, RoundEnvironment renv) {
+            for (TypeElement te : tes) {
+                switch (te.toString()) {
+                    case "ParameterContainer" :
+                        checkElements(te, renv, 1, Set.of(ElementKind.PARAMETER), "Parameter");
+                        break;
+                    case "MethodContainer":
+                        checkElements(te, renv, 1, Set.of(ElementKind.METHOD), "Method");
+                        break;
+                    case "FieldContainer":
+                        checkElements(te, renv, 1, Set.of(ElementKind.FIELD), "Field");
+                        break;
+                    case "AllContainer":
+                        checkElements(te, renv, 4,
+                                Set.of(ElementKind.FIELD,
+                                        ElementKind.METHOD,
+                                        ElementKind.PARAMETER,
+                                        ElementKind.RECORD_COMPONENT), "All");
+                        break;
+                    case "RecComponentContainer":
+                        checkElements(te, renv, 1, Set.of(ElementKind.RECORD_COMPONENT), "RecComponent");
+                        break;
+                    case "RecComponentAndFieldContainer":
+                        checkElements(te, renv, 2, Set.of(ElementKind.RECORD_COMPONENT, ElementKind.FIELD),
+                                "RecComponentAndField");
+                        break;
+                    default:
+                        // ignore, just another annotation like Target, we don't care about
+                }
+            }
+            return true;
+        }
+
+        void checkElements(TypeElement te,
+                           RoundEnvironment renv,
+                           int numberOfElementsAppliedTo,
+                           Set<ElementKind> kinds,
+                           String nameOfRepeatableAnno) {
+            Set<? extends Element> annotatedElements = renv.getElementsAnnotatedWith(te);
+            Assert.check(annotatedElements.size() == numberOfElementsAppliedTo, "for type element " + te + " expected = " + numberOfElementsAppliedTo + " found = " + annotatedElements.size());
+            for (Element e : annotatedElements) {
+                Symbol s = (Symbol) e;
+                Assert.check(kinds.contains(s.getKind()));
+                java.util.List<? extends AnnotationMirror> annoMirrors = e.getAnnotationMirrors();
+                Assert.check(annoMirrors.size() == 1, "there must be only one annotation container");
+                AnnotationMirror annotationMirror = annoMirrors.get(0);
+                Map<? extends ExecutableElement, ? extends AnnotationValue> map = annotationMirror.getElementValues();
+                // as we are dealing with a container that contains two annotations, its value is a list of
+                // contained annotations
+                List<? extends AnnotationMirror> containedAnnotations = (List<? extends AnnotationMirror>) map.values().iterator().next().getValue();
+                Assert.check(containedAnnotations.size() == 2, "there can only be two repeated annotations");
+                for (AnnotationMirror annoMirror : containedAnnotations) {
+                    Assert.check(annoMirror.getAnnotationType().toString().equals(nameOfRepeatableAnno),
+                            "incorrect declared type for contained annotation");
+                }
+            }
+        }
+    }
+}