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/10 12:36:56 UTC

svn commit: r1695013 - /commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/verifier/structurals/OperandStack.java

Author: sebb
Date: Mon Aug 10 10:36:56 2015
New Revision: 1695013

URL: http://svn.apache.org/r1695013
Log:
Avoid unchecked warning

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

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=1695013&r1=1695012&r2=1695013&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 Mon Aug 10 10:36:56 2015
@@ -65,7 +65,9 @@ public class OperandStack{
     @Override
     protected Object clone(){
         OperandStack newstack = new OperandStack(this.maxStack);
-        newstack.stack = (ArrayList<Type>) this.stack.clone();
+        @SuppressWarnings("unchecked") // OK because this.stack is the same type
+        final ArrayList<Type> clone = (ArrayList<Type>) this.stack.clone();
+        newstack.stack = clone;
         return newstack;
     }