Tracking ASM master

See gh-27069
This commit is contained in:
Juergen Hoeller
2021-09-02 22:19:57 +02:00
parent 310bdbb1b2
commit 164dcef6ae
5 changed files with 27 additions and 28 deletions

View File

@@ -38,8 +38,8 @@ package org.springframework.asm;
public abstract class AnnotationVisitor { public abstract class AnnotationVisitor {
/** /**
* The ASM API version implemented by this visitor. The value of this field must be one of {@link * The ASM API version implemented by this visitor. The value of this field must be one of the
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. * {@code ASM}<i>x</i> values in {@link Opcodes}.
*/ */
protected final int api; protected final int api;
@@ -52,8 +52,8 @@ public abstract class AnnotationVisitor {
/** /**
* Constructs a new {@link AnnotationVisitor}. * Constructs a new {@link AnnotationVisitor}.
* *
* @param api the ASM API version implemented by this visitor. Must be one of {@link * @param api the ASM API version implemented by this visitor. Must be one of the {@code
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. * ASM}<i>x</i> values in {@link Opcodes}.
*/ */
public AnnotationVisitor(final int api) { public AnnotationVisitor(final int api) {
this(api, null); this(api, null);
@@ -62,8 +62,8 @@ public abstract class AnnotationVisitor {
/** /**
* Constructs a new {@link AnnotationVisitor}. * Constructs a new {@link AnnotationVisitor}.
* *
* @param api the ASM API version implemented by this visitor. Must be one of {@link * @param api the ASM API version implemented by this visitor. Must be one of the {@code
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. * ASM}<i>x</i> values in {@link Opcodes}.
* @param annotationVisitor the annotation visitor to which this visitor must delegate method * @param annotationVisitor the annotation visitor to which this visitor must delegate method
* calls. May be {@literal null}. * calls. May be {@literal null}.
*/ */

View File

@@ -352,6 +352,9 @@ public class ByteVector {
* @param size number of additional bytes that this byte vector should be able to receive. * @param size number of additional bytes that this byte vector should be able to receive.
*/ */
private void enlarge(final int size) { private void enlarge(final int size) {
if (length > data.length) {
throw new AssertionError("Internal error");
}
int doubleCapacity = 2 * data.length; int doubleCapacity = 2 * data.length;
int minimalCapacity = length + size; int minimalCapacity = length + size;
byte[] newData = new byte[doubleCapacity > minimalCapacity ? doubleCapacity : minimalCapacity]; byte[] newData = new byte[doubleCapacity > minimalCapacity ? doubleCapacity : minimalCapacity];

View File

@@ -40,8 +40,8 @@ package org.springframework.asm;
public abstract class ClassVisitor { public abstract class ClassVisitor {
/** /**
* The ASM API version implemented by this visitor. The value of this field must be one of {@link * The ASM API version implemented by this visitor. The value of this field must be one of the
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. * {@code ASM}<i>x</i> values in {@link Opcodes}.
*/ */
protected final int api; protected final int api;
@@ -51,8 +51,8 @@ public abstract class ClassVisitor {
/** /**
* Constructs a new {@link ClassVisitor}. * Constructs a new {@link ClassVisitor}.
* *
* @param api the ASM API version implemented by this visitor. Must be one of {@link * @param api the ASM API version implemented by this visitor. Must be one of the {@code
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. * ASM}<i>x</i> values in {@link Opcodes}.
*/ */
public ClassVisitor(final int api) { public ClassVisitor(final int api) {
this(api, null); this(api, null);
@@ -61,9 +61,8 @@ public abstract class ClassVisitor {
/** /**
* Constructs a new {@link ClassVisitor}. * Constructs a new {@link ClassVisitor}.
* *
* @param api the ASM API version implemented by this visitor. Must be one of {@link * @param api the ASM API version implemented by this visitor. Must be one of the {@code
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link * ASM}<i>x</i> values in {@link Opcodes}.
* Opcodes#ASM8} or {@link Opcodes#ASM9}.
* @param classVisitor the class visitor to which this visitor must delegate method calls. May be * @param classVisitor the class visitor to which this visitor must delegate method calls. May be
* null. * null.
*/ */

View File

@@ -37,9 +37,8 @@ package org.springframework.asm;
public abstract class FieldVisitor { public abstract class FieldVisitor {
/** /**
* The ASM API version implemented by this visitor. The value of this field must be one of {@link * The ASM API version implemented by this visitor. The value of this field must be one of the
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link * {@code ASM}<i>x</i> values in {@link Opcodes}.
* Opcodes#ASM8} or {@link Opcodes#ASM9}.
*/ */
protected final int api; protected final int api;
@@ -49,9 +48,8 @@ public abstract class FieldVisitor {
/** /**
* Constructs a new {@link FieldVisitor}. * Constructs a new {@link FieldVisitor}.
* *
* @param api the ASM API version implemented by this visitor. Must be one of {@link * @param api the ASM API version implemented by this visitor. Must be one of the {@code
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7}, {@link * ASM}<i>x</i> values in {@link Opcodes}.
* Opcodes#ASM8} or {@link Opcodes#ASM9}.
*/ */
public FieldVisitor(final int api) { public FieldVisitor(final int api) {
this(api, null); this(api, null);
@@ -60,9 +58,8 @@ public abstract class FieldVisitor {
/** /**
* Constructs a new {@link FieldVisitor}. * Constructs a new {@link FieldVisitor}.
* *
* @param api the ASM API version implemented by this visitor. Must be one of {@link * @param api the ASM API version implemented by this visitor. Must be one of the {@code
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6}, {@link Opcodes#ASM7} or {@link * ASM}<i>x</i> values in {@link Opcodes}.
* Opcodes#ASM8}.
* @param fieldVisitor the field visitor to which this visitor must delegate method calls. May be * @param fieldVisitor the field visitor to which this visitor must delegate method calls. May be
* null. * null.
*/ */

View File

@@ -51,8 +51,8 @@ public abstract class MethodVisitor {
private static final String REQUIRES_ASM5 = "This feature requires ASM5"; private static final String REQUIRES_ASM5 = "This feature requires ASM5";
/** /**
* The ASM API version implemented by this visitor. The value of this field must be one of {@link * The ASM API version implemented by this visitor. The value of this field must be one of the
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. * {@code ASM}<i>x</i> values in {@link Opcodes}.
*/ */
protected final int api; protected final int api;
@@ -64,8 +64,8 @@ public abstract class MethodVisitor {
/** /**
* Constructs a new {@link MethodVisitor}. * Constructs a new {@link MethodVisitor}.
* *
* @param api the ASM API version implemented by this visitor. Must be one of {@link * @param api the ASM API version implemented by this visitor. Must be one of the {@code
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. * ASM}<i>x</i> values in {@link Opcodes}.
*/ */
public MethodVisitor(final int api) { public MethodVisitor(final int api) {
this(api, null); this(api, null);
@@ -74,8 +74,8 @@ public abstract class MethodVisitor {
/** /**
* Constructs a new {@link MethodVisitor}. * Constructs a new {@link MethodVisitor}.
* *
* @param api the ASM API version implemented by this visitor. Must be one of {@link * @param api the ASM API version implemented by this visitor. Must be one of the {@code
* Opcodes#ASM4}, {@link Opcodes#ASM5}, {@link Opcodes#ASM6} or {@link Opcodes#ASM7}. * ASM}<i>x</i> values in {@link Opcodes}.
* @param methodVisitor the method visitor to which this visitor must delegate method calls. May * @param methodVisitor the method visitor to which this visitor must delegate method calls. May
* be null. * be null.
*/ */