Browse Source

Tracking ASM master

See gh-27069
pull/27356/head
Juergen Hoeller 4 years ago
parent
commit
164dcef6ae
  1. 12
      spring-core/src/main/java/org/springframework/asm/AnnotationVisitor.java
  2. 3
      spring-core/src/main/java/org/springframework/asm/ByteVector.java
  3. 13
      spring-core/src/main/java/org/springframework/asm/ClassVisitor.java
  4. 15
      spring-core/src/main/java/org/springframework/asm/FieldVisitor.java
  5. 12
      spring-core/src/main/java/org/springframework/asm/MethodVisitor.java

12
spring-core/src/main/java/org/springframework/asm/AnnotationVisitor.java

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

3
spring-core/src/main/java/org/springframework/asm/ByteVector.java

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

13
spring-core/src/main/java/org/springframework/asm/ClassVisitor.java

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

15
spring-core/src/main/java/org/springframework/asm/FieldVisitor.java

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

12
spring-core/src/main/java/org/springframework/asm/MethodVisitor.java

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

Loading…
Cancel
Save