You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2015/08/20 20:13:41 UTC

svn commit: r1696835 - in /commons/proper/bcel/trunk/src: changes/ main/java/org/apache/commons/bcel6/verifier/structurals/

Author: sebb
Date: Thu Aug 20 18:13:40 2015
New Revision: 1696835

URL: http://svn.apache.org/r1696835
Log:
BCEL-211 Some additional clone methods should be public.

Modified:
    commons/proper/bcel/trunk/src/changes/changes.xml
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/verifier/structurals/Frame.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/verifier/structurals/LocalVariables.java
    commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/verifier/structurals/OperandStack.java

Modified: commons/proper/bcel/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/changes/changes.xml?rev=1696835&r1=1696834&r2=1696835&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/changes/changes.xml (original)
+++ commons/proper/bcel/trunk/src/changes/changes.xml Thu Aug 20 18:13:40 2015
@@ -63,6 +63,7 @@ The <action> type attribute can be add,u
 
   <body>
     <release version="6.0" date="TBA" description="Major release with Java 7 and 8 support">
+      <action issue="BCEL-211" type="update">Some additional clone methods should be public.</action>
       <action issue="BCEL-249" type="fix">Check for max Short seems wrong</action>
       <action issue="BCEL-127" type="update">Document that Instruction Factory returns singleton instances</action>
       <action issue="BCEL-198" type="update">better support for clone/copy methods</action>

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/verifier/structurals/Frame.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/verifier/structurals/Frame.java?rev=1696835&r1=1696834&r2=1696835&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/verifier/structurals/Frame.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/verifier/structurals/Frame.java Thu Aug 20 18:13:40 2015
@@ -33,6 +33,8 @@ public class Frame{
      * which instance it is that is not initialized yet. It will be
      * initialized invoking another constructor later.
      * NULL means the instance already *is* initialized.
+     * N.B. Use the getter/setter to access the field as it may
+     * be made private in a later release
      */
     protected static UninitializedObjectType _this;
 
@@ -120,4 +122,18 @@ public class Frame{
         s += stack;
         return s;
     }
+
+    /**
+     * @return the _this
+     */
+    public static UninitializedObjectType get_this() {
+        return _this;
+    }
+
+    /**
+     * @param _this the _this to set
+     */
+    public static void set_this(UninitializedObjectType _this) {
+        Frame._this = _this;
+    }
 }

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/verifier/structurals/LocalVariables.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/verifier/structurals/LocalVariables.java?rev=1696835&r1=1696834&r2=1696835&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/verifier/structurals/LocalVariables.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/verifier/structurals/LocalVariables.java Thu Aug 20 18:13:40 2015
@@ -49,7 +49,7 @@ public class LocalVariables{
      * However, the Type objects in the array are shared.
      */
     @Override
-    protected Object clone(){
+    public Object clone(){
         LocalVariables lvs = new LocalVariables(locals.length);
         for (int i=0; i<locals.length; i++){
             lvs.locals[i] = this.locals[i];

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/verifier/structurals/OperandStack.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/verifier/structurals/OperandStack.java?rev=1696835&r1=1696834&r2=1696835&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/verifier/structurals/OperandStack.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/verifier/structurals/OperandStack.java Thu Aug 20 18:13:40 2015
@@ -62,7 +62,7 @@ public class OperandStack{
      * shared.
      */
     @Override
-    protected Object clone(){
+    public Object clone(){
         OperandStack newstack = new OperandStack(this.maxStack);
         @SuppressWarnings("unchecked") // OK because this.stack is the same type
         final ArrayList<Type> clone = (ArrayList<Type>) this.stack.clone();