Update ASM to 7.2 (#4279)

Signed-off-by: Jan Supol <jan.supol@oracle.com>
diff --git a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/AnnotationVisitor.java b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/AnnotationVisitor.java
index 545b79f..9bb9e92 100644
--- a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/AnnotationVisitor.java
+++ b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/AnnotationVisitor.java
@@ -43,7 +43,10 @@
    */
   protected final int api;
 
-  /** The annotation visitor to which this visitor must delegate method calls. May be null. */
+  /**
+   * The annotation visitor to which this visitor must delegate method calls. May be {@literal
+   * null}.
+   */
   protected AnnotationVisitor av;
 
   /**
@@ -62,7 +65,7 @@
    * @param api the ASM API version implemented by this visitor. Must be one of {@link
    *     Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}.
    * @param annotationVisitor the annotation visitor to which this visitor must delegate method
-   *     calls. May be null.
+   *     calls. May be {@literal null}.
    */
   public AnnotationVisitor(final int api, final AnnotationVisitor annotationVisitor) {
     if (api != Opcodes.ASM7 && api != Opcodes.ASM6 && api != Opcodes.ASM5 && api != Opcodes.ASM4) {
diff --git a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/AnnotationWriter.java b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/AnnotationWriter.java
index 2cf9f0f..79a13fc 100644
--- a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/AnnotationWriter.java
+++ b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/AnnotationWriter.java
@@ -104,8 +104,8 @@
    *     the visited content must be stored. This ByteVector must already contain all the fields of
    *     the structure except the last one (the element_value_pairs array).
    * @param previousAnnotation the previously visited annotation of the
-   *     Runtime[In]Visible[Type]Annotations attribute to which this annotation belongs, or null in
-   *     other cases (e.g. nested or array annotations).
+   *     Runtime[In]Visible[Type]Annotations attribute to which this annotation belongs, or
+   *     {@literal null} in other cases (e.g. nested or array annotations).
    */
   AnnotationWriter(
       final SymbolTable symbolTable,
@@ -130,8 +130,9 @@
    * @param symbolTable where the constants used in this AnnotationWriter must be stored.
    * @param descriptor the class descriptor of the annotation class.
    * @param previousAnnotation the previously visited annotation of the
-   *     Runtime[In]Visible[Type]Annotations attribute to which this annotation belongs, or null in
-   *     other cases (e.g. nested or array annotations).
+   *     Runtime[In]Visible[Type]Annotations attribute to which this annotation belongs, or
+   *     {@literal null} in other cases (e.g. nested or array annotations).
+   * @return a new {@link AnnotationWriter} for the given annotation descriptor.
    */
   static AnnotationWriter create(
       final SymbolTable symbolTable,
@@ -159,8 +160,9 @@
    *     'typeRef' as a whole.
    * @param descriptor the class descriptor of the annotation class.
    * @param previousAnnotation the previously visited annotation of the
-   *     Runtime[In]Visible[Type]Annotations attribute to which this annotation belongs, or null in
-   *     other cases (e.g. nested or array annotations).
+   *     Runtime[In]Visible[Type]Annotations attribute to which this annotation belongs, or
+   *     {@literal null} in other cases (e.g. nested or array annotations).
+   * @return a new {@link AnnotationWriter} for the given type annotation reference and descriptor.
    */
   static AnnotationWriter create(
       final SymbolTable symbolTable,
@@ -322,7 +324,7 @@
    * and all its <i>predecessors</i> (see {@link #previousAnnotation}. Also adds the attribute name
    * to the constant pool of the class (if not null).
    *
-   * @param attributeName one of "Runtime[In]Visible[Type]Annotations", or null.
+   * @param attributeName one of "Runtime[In]Visible[Type]Annotations", or {@literal null}.
    * @return the size in bytes of a Runtime[In]Visible[Type]Annotations attribute containing this
    *     annotation and all its predecessors. This includes the size of the attribute_name_index and
    *     attribute_length fields.
diff --git a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/ClassReader.java b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/ClassReader.java
index 29e9b7a..84ec8c5 100644
--- a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/ClassReader.java
+++ b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/ClassReader.java
@@ -193,10 +193,10 @@
     this.b = classFileBuffer;
     // Check the class' major_version. This field is after the magic and minor_version fields, which
     // use 4 and 2 bytes respectively.
-    if (checkClassVersion && readShort(classFileOffset + 6) == Opcodes.V14) {
+    if (checkClassVersion && readShort(classFileOffset + 6) == Opcodes.V15) {
       LOGGER.warning("Unsupported class file major version " + readShort(classFileOffset + 6));
     }
-    if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V14) {
+    if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V15) {
       throw new IllegalArgumentException(
           "Unsupported class file major version " + readShort(classFileOffset + 6));
     }
@@ -711,7 +711,8 @@
    *     attribute_name_index and attribute_length fields).
    * @param modulePackagesOffset the offset of the ModulePackages attribute (excluding the
    *     attribute_info's attribute_name_index and attribute_length fields), or 0.
-   * @param moduleMainClass the string corresponding to the ModuleMainClass attribute, or null.
+   * @param moduleMainClass the string corresponding to the ModuleMainClass attribute, or {@literal
+   *     null}.
    */
   private void readModuleAttributes(
       final ClassVisitor classVisitor,
@@ -2599,7 +2600,7 @@
    * -1 if there is no such type_annotation of if it does not have a bytecode offset.
    *
    * @param typeAnnotationOffsets the offset of each 'type_annotation' entry in a
-   *     Runtime[In]VisibleTypeAnnotations attribute, or null.
+   *     Runtime[In]VisibleTypeAnnotations attribute, or {@literal null}.
    * @param typeAnnotationIndex the index a 'type_annotation' entry in typeAnnotationOffsets.
    * @return bytecode offset corresponding to the specified JVMS 'type_annotation' structure, or -1
    *     if there is no such type_annotation of if it does not have a bytecode offset.
diff --git a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/ClassVisitor.java b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/ClassVisitor.java
index 49b5de3..7f97d47 100644
--- a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/ClassVisitor.java
+++ b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/ClassVisitor.java
@@ -44,7 +44,7 @@
    */
   protected final int api;
 
-  /** The class visitor to which this visitor must delegate method calls. May be null. */
+  /** The class visitor to which this visitor must delegate method calls. May be {@literal null}. */
   protected ClassVisitor cv;
 
   /**
diff --git a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/ClassWriter.java b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/ClassWriter.java
index 80f0e7c..5bdf68c 100644
--- a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/ClassWriter.java
+++ b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/ClassWriter.java
@@ -298,7 +298,7 @@
   }
 
   @Override
-  public void visitNestHost(final String nestHost) {
+  public final void visitNestHost(final String nestHost) {
     nestHostClassIndex = symbolTable.addConstantClass(nestHost).index;
   }
 
@@ -344,7 +344,7 @@
   }
 
   @Override
-  public void visitNestMember(final String nestMember) {
+  public final void visitNestMember(final String nestMember) {
     if (nestMemberClasses == null) {
       nestMemberClasses = new ByteVector();
     }
diff --git a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/ConstantDynamic.java b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/ConstantDynamic.java
index 5a98fb9..4cc8209 100644
--- a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/ConstantDynamic.java
+++ b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/ConstantDynamic.java
@@ -142,11 +142,6 @@
     return (firstCharOfDescriptor == 'J' || firstCharOfDescriptor == 'D') ? 2 : 1;
   }
 
-  void accept(final MethodVisitor methodVisitor) {
-    methodVisitor.visitInvokeDynamicInsn(
-        name, descriptor, bootstrapMethod, bootstrapMethodArguments);
-  }
-
   @Override
   public boolean equals(final Object object) {
     if (object == this) {
diff --git a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/FieldVisitor.java b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/FieldVisitor.java
index 0df3e62..64d39d3 100644
--- a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/FieldVisitor.java
+++ b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/FieldVisitor.java
@@ -42,7 +42,7 @@
    */
   protected final int api;
 
-  /** The field visitor to which this visitor must delegate method calls. May be null. */
+  /** The field visitor to which this visitor must delegate method calls. May be {@literal null}. */
   protected FieldVisitor fv;
 
   /**
diff --git a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Frame.java b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Frame.java
index c7ce621..41d9ef4 100644
--- a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Frame.java
+++ b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Frame.java
@@ -89,9 +89,9 @@
  * <p>Output frames can contain abstract types of any kind and with a positive or negative array
  * dimension (and even unassigned types, represented by 0 - which does not correspond to any valid
  * abstract type value). Input frames can only contain CONSTANT_KIND, REFERENCE_KIND or
- * UNINITIALIZED_KIND abstract types of positive or null array dimension. In all cases the type
- * table contains only internal type names (array type descriptors are forbidden - array dimensions
- * must be represented through the DIM field).
+ * UNINITIALIZED_KIND abstract types of positive or {@literal null} array dimension. In all cases
+ * the type table contains only internal type names (array type descriptors are forbidden - array
+ * dimensions must be represented through the DIM field).
  *
  * <p>The LONG and DOUBLE types are always represented by using two slots (LONG + TOP or DOUBLE +
  * TOP), for local variables as well as in the operand stack. This is necessary to be able to
@@ -1253,10 +1253,10 @@
    * @param symbolTable the type table to use to lookup and store type {@link Symbol}.
    * @param sourceType the abstract type with which the abstract type array element must be merged.
    *     This type should be of {@link #CONSTANT_KIND}, {@link #REFERENCE_KIND} or {@link
-   *     #UNINITIALIZED_KIND} kind, with positive or null array dimensions.
+   *     #UNINITIALIZED_KIND} kind, with positive or {@literal null} array dimensions.
    * @param dstTypes an array of abstract types. These types should be of {@link #CONSTANT_KIND},
-   *     {@link #REFERENCE_KIND} or {@link #UNINITIALIZED_KIND} kind, with positive or null array
-   *     dimensions.
+   *     {@link #REFERENCE_KIND} or {@link #UNINITIALIZED_KIND} kind, with positive or {@literal
+   *     null} array dimensions.
    * @param dstIndex the index of the type that must be merged in dstTypes.
    * @return {@literal true} if the type array has been modified by this operation.
    */
diff --git a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Label.java b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Label.java
index 25814e1..a01326c 100644
--- a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Label.java
+++ b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Label.java
@@ -227,7 +227,8 @@
 
   /**
    * The maximum height reached by the output stack, relatively to the top of the input stack, in
-   * the basic block corresponding to this label. This maximum is always positive or null.
+   * the basic block corresponding to this label. This maximum is always positive or {@literal
+   * null}.
    */
   short outputStackMax;
 
@@ -264,12 +265,12 @@
   Edge outgoingEdges;
 
   /**
-   * The next element in the list of labels to which this label belongs, or null if it does not
-   * belong to any list. All lists of labels must end with the {@link #EMPTY_LIST} sentinel, in
-   * order to ensure that this field is null if and only if this label does not belong to a list of
-   * labels. Note that there can be several lists of labels at the same time, but that a label can
-   * belong to at most one list at a time (unless some lists share a common tail, but this is not
-   * used in practice).
+   * The next element in the list of labels to which this label belongs, or {@literal null} if it
+   * does not belong to any list. All lists of labels must end with the {@link #EMPTY_LIST}
+   * sentinel, in order to ensure that this field is null if and only if this label does not belong
+   * to a list of labels. Note that there can be several lists of labels at the same time, but that
+   * a label can belong to at most one list at a time (unless some lists share a common tail, but
+   * this is not used in practice).
    *
    * <p>List of labels are used in {@link MethodWriter#computeAllFrames} and {@link
    * MethodWriter#computeMaxStackAndLocal} to compute stack map frames and the maximum stack size,
diff --git a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/MethodVisitor.java b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/MethodVisitor.java
index b202cf7..e88b6bf 100644
--- a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/MethodVisitor.java
+++ b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/MethodVisitor.java
@@ -56,7 +56,9 @@
    */
   protected final int api;
 
-  /** The method visitor to which this visitor must delegate method calls. May be null. */
+  /**
+   * The method visitor to which this visitor must delegate method calls. May be {@literal null}.
+   */
   protected MethodVisitor mv;
 
   /**
@@ -92,7 +94,7 @@
   /**
    * Visits a parameter of this method.
    *
-   * @param name parameter name or null if none is provided.
+   * @param name parameter name or {@literal null} if none is provided.
    * @param access the parameter's access flags, only {@code ACC_FINAL}, {@code ACC_SYNTHETIC}
    *     or/and {@code ACC_MANDATED} are allowed (see {@link Opcodes}).
    */
diff --git a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/MethodWriter.java b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/MethodWriter.java
index 2cb0354..ecded66 100644
--- a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/MethodWriter.java
+++ b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/MethodWriter.java
@@ -775,6 +775,9 @@
       }
       visitFrameEnd();
     } else {
+      if (symbolTable.getMajorVersion() < Opcodes.V1_6) {
+        throw new IllegalArgumentException("Class versions V1_5 or less must use F_NEW frames.");
+      }
       int offsetDelta;
       if (stackMapTableEntries == null) {
         stackMapTableEntries = new ByteVector();
diff --git a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/ModuleVisitor.java b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/ModuleVisitor.java
index 4a7f8fa..ff5062b 100644
--- a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/ModuleVisitor.java
+++ b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/ModuleVisitor.java
@@ -42,7 +42,9 @@
    */
   protected final int api;
 
-  /** The module visitor to which this visitor must delegate method calls. May be null. */
+  /**
+   * The module visitor to which this visitor must delegate method calls. May be {@literal null}.
+   */
   protected ModuleVisitor mv;
 
   /**
diff --git a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Opcodes.java b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Opcodes.java
index 41353c6..6a1019f 100644
--- a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Opcodes.java
+++ b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Opcodes.java
@@ -270,6 +270,7 @@
   int V12 = 0 << 16 | 56;
   int V13 = 0 << 16 | 57;
   int V14 = 0 << 16 | 58;
+  int V15 = 0 << 16 | 59;
 
   /**
    * Version flag indicating that the class is using 'preview' features.
diff --git a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Type.java b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Type.java
index f8006f5..dbe11cc 100644
--- a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Type.java
+++ b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Type.java
@@ -305,7 +305,8 @@
       }
       if (methodDescriptor.charAt(currentOffset++) == 'L') {
         // Skip the argument descriptor content.
-        currentOffset = methodDescriptor.indexOf(';', currentOffset) + 1;
+        int semiColumnOffset = methodDescriptor.indexOf(';', currentOffset);
+        currentOffset = Math.max(currentOffset, semiColumnOffset + 1);
       }
       ++numArgumentTypes;
     }
@@ -323,7 +324,8 @@
       }
       if (methodDescriptor.charAt(currentOffset++) == 'L') {
         // Skip the argument descriptor content.
-        currentOffset = methodDescriptor.indexOf(';', currentOffset) + 1;
+        int semiColumnOffset = methodDescriptor.indexOf(';', currentOffset);
+        currentOffset = Math.max(currentOffset, semiColumnOffset + 1);
       }
       argumentTypes[currentArgumentTypeIndex++] =
           getTypeInternal(methodDescriptor, currentArgumentTypeOffset, currentOffset);
@@ -393,7 +395,8 @@
       }
       if (methodDescriptor.charAt(currentOffset++) == 'L') {
         // Skip the argument descriptor content.
-        currentOffset = methodDescriptor.indexOf(';', currentOffset) + 1;
+        int semiColumnOffset = methodDescriptor.indexOf(';', currentOffset);
+        currentOffset = Math.max(currentOffset, semiColumnOffset + 1);
       }
     }
     return currentOffset + 1;
@@ -737,7 +740,8 @@
         }
         if (methodDescriptor.charAt(currentOffset++) == 'L') {
           // Skip the argument descriptor content.
-          currentOffset = methodDescriptor.indexOf(';', currentOffset) + 1;
+          int semiColumnOffset = methodDescriptor.indexOf(';', currentOffset);
+          currentOffset = Math.max(currentOffset, semiColumnOffset + 1);
         }
         argumentsSize += 1;
       }
diff --git a/pom.xml b/pom.xml
index 033bb36..871a403 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2055,7 +2055,7 @@
         <jersey.version>${project.version}</jersey.version>
         <!-- asm is now source integrated - keeping this property to see the version -->
         <!-- see core-server/src/main/java/jersey/repackaged/asm/.. -->
-        <asm.version>7.1</asm.version>
+        <asm.version>7.2</asm.version>
         <bnd.plugin.version>2.3.6</bnd.plugin.version>
         <cdi.api.version>1.1</cdi.api.version>
         <commons-lang3.version>3.3.2</commons-lang3.version>