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:40:22 UTC

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

Author: sebb
Date: Mon Aug 10 10:40:22 2015
New Revision: 1695015

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

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

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/verifier/structurals/ControlFlowGraph.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/verifier/structurals/ControlFlowGraph.java?rev=1695015&r1=1695014&r2=1695015&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/verifier/structurals/ControlFlowGraph.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/commons/bcel6/verifier/structurals/ControlFlowGraph.java Mon Aug 10 10:40:22 2015
@@ -159,7 +159,9 @@ public class ControlFlowGraph{
          */
         public boolean execute(Frame inFrame, ArrayList<InstructionContext> execPreds, InstConstraintVisitor icv, ExecutionVisitor ev){
 
-            executionPredecessors = (List<InstructionContext>) execPreds.clone();
+            @SuppressWarnings("unchecked") // OK because execPreds is compatible type
+            final List<InstructionContext> clone = (List<InstructionContext>) execPreds.clone();
+            executionPredecessors = clone;
 
             //sanity check
             if ( (lastExecutionJSR() == null) && (subroutines.subroutineOf(getInstruction()) != subroutines.getTopLevel() ) ){