commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1695013 - /commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/verifier/structurals/OperandStack.java
Date Mon, 10 Aug 2015 10:36:56 GMT
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;
     }
 



Mime
View raw message