]> source.dussan.org Git - javassist.git/commitdiff
fixes typos included in PR #272 (Issue #270)
authorchibash <chiba@javassist.org>
Sun, 1 Sep 2019 08:32:52 +0000 (17:32 +0900)
committerchibash <chiba@javassist.org>
Sun, 1 Sep 2019 08:32:52 +0000 (17:32 +0900)
Readme.html
pom.xml
src/main/javassist/CtClass.java
src/main/javassist/bytecode/ConstPool.java

index 92ba667f6491347795b2f7c9388e47745ef75998..c8d0df8c7cc79b3f3ec1a9a8daa8cea86f38e86c 100644 (file)
@@ -281,6 +281,11 @@ see javassist.Dump.
 
 <h2>Changes</h2>
 
+<p>-version 3.26
+<ul>
+   <li>GitHub Issue #270 (PR #272).
+</ul>
+
 <p>-version 3.25 on April 16, 2019
 <ul>
     <li>GitHub Issue #72 (PR #231), #241, #242 (PR #243), PR #244,
diff --git a/pom.xml b/pom.xml
index c7b4bf81b036d8852075f65cdf062d5e4fb13500..cbc25375054b0926cd2fd13c76e13b863cf1ea3a 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -7,7 +7,7 @@
        Javassist (JAVA programming ASSISTant) makes Java bytecode manipulation
     simple.  It is a class library for editing bytecodes in Java.
   </description>
-  <version>3.25.1-GA</version>
+  <version>3.26.0-GA</version>
   <name>Javassist</name>
   <url>http://www.javassist.org/</url>
 
index 21ac299e6dd650fc39824d01bb8975e213ebc930..09cf4b3e7b879bc9d603655ef162750ad32e4d69 100644 (file)
@@ -69,7 +69,7 @@ public abstract class CtClass {
     /**
      * The version number of this release.
      */
-    public static final String version = "3.25.0-GA";
+    public static final String version = "3.26.0-GA";
 
     /**
      * Prints the version number and the copyright notice.
index a7537c498ee28f4b221752c739aa116c9c8a5427..028aad084e5b8f31d01c8e70c254e8a6c43425a5 100644 (file)
@@ -721,99 +721,99 @@ public final class ConstPool
         return mtinfo.descriptor;
     }
 
-  /**
-   * Reads the <code>bootstrap_method_attr_index</code> field of the
-   * <code>CONSTANT_InvokeDynamic_info</code> structure
-   * at the given index.
-   *
-   * @since 3.17
-   */
-  public int getInvokeDynamicBootstrap(int index)
-  {
-    InvokeDynamicInfo iv = (InvokeDynamicInfo)getItem(index);
-    return iv.bootstrap;
-  }
-
-  /**
-   * Reads the <code>name_and_type_index</code> field of the
-   * <code>CONSTANT_InvokeDynamic_info</code> structure
-   * at the given index.
-   *
-   * @since 3.17
-   */
-  public int getInvokeDynamicNameAndType(int index)
-  {
-    InvokeDynamicInfo iv = (InvokeDynamicInfo)getItem(index);
-    return iv.nameAndType;
-  }
-
-  /**
-   * Reads the <code>descriptor_index</code> field of the
-   * <code>CONSTANT_NameAndType_info</code> structure
-   * indirectly specified by the given index.
-   *
-   * @param index     an index to a <code>CONSTANT_InvokeDynamic_info</code>.
-   * @return  the descriptor of the method.
-   * @since 3.17
-   */
-  public String getInvokeDynamicType(int index)
-  {
-    InvokeDynamicInfo iv = (InvokeDynamicInfo)getItem(index);
-    if (iv == null)
-      return null;
-    NameAndTypeInfo n = (NameAndTypeInfo)getItem(iv.nameAndType);
-    if(n == null)
-      return null;
-    return getUtf8Info(n.typeDescriptor);
-  }
-
-  /**
-   * Reads the <code>bootstrap_method_attr_index</code> field of the
-   * <code>CONSTANT_Dynamic_info</code> structure
-   * at the given index.
-   *
-   * @since 3.17
-   */
-  public int getDynamicBootstrap(int index)
-  {
-    DynamicInfo iv = (DynamicInfo)getItem(index);
-    return iv.bootstrap;
-  }
-
-  /**
-   * Reads the <code>name_and_type_index</code> field of the
-   * <code>CONSTANT_Dynamic_info</code> structure
-   * at the given index.
-   *
-   * @since 3.17
-   */
-  public int getDynamicNameAndType(int index)
-  {
-    DynamicInfo iv = (DynamicInfo)getItem(index);
-    return iv.nameAndType;
-  }
-
-  /**
-   * Reads the <code>descriptor_index</code> field of the
-   * <code>CONSTANT_NameAndType_info</code> structure
-   * indirectly specified by the given index.
-   *
-   * @param index     an index to a <code>CONSTANT_Dynamic_info</code>.
-   * @return  the descriptor of the method.
-   * @since 3.17
-   */
-  public String getDynamicType(int index)
-  {
-    DynamicInfo iv = (DynamicInfo)getItem(index);
-    if (iv == null)
-      return null;
-    NameAndTypeInfo n = (NameAndTypeInfo)getItem(iv.nameAndType);
-    if(n == null)
-      return null;
-    return getUtf8Info(n.typeDescriptor);
-  }
-
-  /**
+    /**
+     * Reads the <code>bootstrap_method_attr_index</code> field of the
+     * <code>CONSTANT_InvokeDynamic_info</code> structure
+     * at the given index.
+     *
+     * @since 3.17
+     */
+    public int getInvokeDynamicBootstrap(int index)
+    {
+        InvokeDynamicInfo iv = (InvokeDynamicInfo)getItem(index);
+        return iv.bootstrap;
+    }
+
+    /**
+     * Reads the <code>name_and_type_index</code> field of the
+     * <code>CONSTANT_InvokeDynamic_info</code> structure
+     * at the given index.
+     *
+     * @since 3.17
+     */
+    public int getInvokeDynamicNameAndType(int index)
+    {
+        InvokeDynamicInfo iv = (InvokeDynamicInfo)getItem(index);
+        return iv.nameAndType;
+    }
+
+    /**
+     * Reads the <code>descriptor_index</code> field of the
+     * <code>CONSTANT_NameAndType_info</code> structure
+     * indirectly specified by the given index.
+     *
+     * @param index     an index to a <code>CONSTANT_InvokeDynamic_info</code>.
+     * @return  the descriptor of the bootstrap method.
+     * @since 3.17
+     */
+    public String getInvokeDynamicType(int index)
+    {
+        InvokeDynamicInfo iv = (InvokeDynamicInfo)getItem(index);
+        if (iv == null)
+            return null;
+        NameAndTypeInfo n = (NameAndTypeInfo)getItem(iv.nameAndType);
+        if(n == null)
+            return null;
+        return getUtf8Info(n.typeDescriptor);
+    }
+
+    /**
+     * Reads the <code>bootstrap_method_attr_index</code> field of the
+     * <code>CONSTANT_Dynamic_info</code> structure
+     * at the given index.
+     *
+     * @since 3.26
+     */
+    public int getDynamicBootstrap(int index)
+    {
+        DynamicInfo iv = (DynamicInfo)getItem(index);
+        return iv.bootstrap;
+    }
+
+    /**
+     * Reads the <code>name_and_type_index</code> field of the
+     * <code>CONSTANT_Dynamic_info</code> structure
+     * at the given index.
+     *
+     * @since 3.26
+     */
+    public int getDynamicNameAndType(int index)
+    {
+        DynamicInfo iv = (DynamicInfo)getItem(index);
+        return iv.nameAndType;
+    }
+
+    /**
+     * Reads the <code>descriptor_index</code> field of the
+     * <code>CONSTANT_NameAndType_info</code> structure
+     * indirectly specified by the given index.
+     *
+     * @param index     an index to a <code>CONSTANT_Dynamic_info</code>.
+     * @return  the descriptor of the bootstrap method.
+     * @since 3.26
+     */
+    public String getDynamicType(int index)
+    {
+        DynamicInfo iv = (DynamicInfo)getItem(index);
+        if (iv == null)
+            return null;
+        NameAndTypeInfo n = (NameAndTypeInfo)getItem(iv.nameAndType);
+        if(n == null)
+            return null;
+        return getUtf8Info(n.typeDescriptor);
+    }
+
+    /**
      * Reads the <code>name_index</code> field of the
      * <code>CONSTANT_Module_info</code> structure at the given index.
      *
@@ -1247,18 +1247,18 @@ public final class ConstPool
     }
 
     /**
-   * Adds a new <code>CONSTANT_Dynamic_info</code> structure.
-   *
-   * @param bootstrap   <code>bootstrap_method_attr_index</code>.
-   * @param nameAndType <code>name_and_type_index</code>.
-   * @return the index of the added entry.
-   * @since 3.17
-   */
-  public int addDynamicInfo(int bootstrap, int nameAndType) {
-    return addItem(new DynamicInfo(bootstrap, nameAndType, numOfItems));
-  }
+     * Adds a new <code>CONSTANT_Dynamic_info</code> structure.
+     *
+     * @param bootstrap   <code>bootstrap_method_attr_index</code>.
+     * @param nameAndType <code>name_and_type_index</code>.
+     * @return the index of the added entry.
+     * @since 3.26
+     */
+    public int addDynamicInfo(int bootstrap, int nameAndType) {
+        return addItem(new DynamicInfo(bootstrap, nameAndType, numOfItems));
+    }
 
-  /**
+    /**
      * Adds a new <code>CONSTANT_Module_info</code>
      * @param nameIndex         the index of the Utf8 entry.
      * @return          the index of the added entry.
@@ -2390,64 +2390,59 @@ class InvokeDynamicInfo extends ConstInfo
 
 class DynamicInfo extends ConstInfo {
 
-  static final int tag = 17;
-  int bootstrap, nameAndType;
-
-  public DynamicInfo(int bootstrapMethod,
-      int ntIndex, int index) {
-    super(index);
-    bootstrap = bootstrapMethod;
-    nameAndType = ntIndex;
-  }
-
-  public DynamicInfo(DataInputStream in, int index)
-      throws IOException {
-    super(index);
-    bootstrap = in.readUnsignedShort();
-    nameAndType = in.readUnsignedShort();
-  }
-
-  @Override
-  public int hashCode() {
-    return (bootstrap << 16) ^ nameAndType;
-  }
-
-  @Override
-  public boolean equals(Object obj) {
-    if (obj instanceof DynamicInfo) {
-      DynamicInfo iv = (DynamicInfo) obj;
-      return iv.bootstrap == bootstrap
-          && iv.nameAndType == nameAndType;
-    }
-    return false;
-  }
-
-  @Override
-  public int getTag() {
-    return tag;
-  }
-
-  @Override
-  public int copy(ConstPool src, ConstPool dest,
-      Map<String, String> map) {
-    return dest.addDynamicInfo(bootstrap,
-        src.getItem(nameAndType).copy(src, dest, map));
-  }
-
-  @Override
-  public void write(DataOutputStream out) throws IOException {
-    out.writeByte(tag);
-    out.writeShort(bootstrap);
-    out.writeShort(nameAndType);
-  }
-
-  @Override
-  public void print(PrintWriter out) {
-    out.print("Dynamic #");
-    out.print(bootstrap);
-    out.print(", name&type #");
-    out.println(nameAndType);
-  }
+    static final int tag = 17;
+    int bootstrap, nameAndType;
+
+    public DynamicInfo(int bootstrapMethod, int ntIndex, int index) {
+        super(index);
+        bootstrap = bootstrapMethod;
+        nameAndType = ntIndex;
+    }
+
+    public DynamicInfo(DataInputStream in, int index) throws IOException {
+        super(index);
+        bootstrap = in.readUnsignedShort();
+        nameAndType = in.readUnsignedShort();
+    }
+
+    @Override
+    public int hashCode() {
+        return (bootstrap << 16) ^ nameAndType;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (obj instanceof DynamicInfo) {
+            DynamicInfo iv = (DynamicInfo)obj;
+            return iv.bootstrap == bootstrap && iv.nameAndType == nameAndType;
+        }
+        return false;
+    }
+
+    @Override
+    public int getTag() {
+        return tag;
+    }
+
+    @Override
+    public int copy(ConstPool src, ConstPool dest, Map<String, String> map) {
+        return dest.addDynamicInfo(bootstrap, src.getItem(nameAndType).copy(src, dest, map));
+    }
+
+    @Override
+    public void write(DataOutputStream out) throws IOException {
+        out.writeByte(tag);
+        out.writeShort(bootstrap);
+        out.writeShort(nameAndType);
+    }
+
+    @Override
+    public void print(PrintWriter out) {
+        out.print("Dynamic #");
+        out.print(bootstrap);
+        out.print(", name&type #");
+        out.println(nameAndType);
+    }
 }
 
 class ModuleInfo extends ConstInfo