commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject svn commit: r1149779 - in /commons/proper/bcel/trunk/src: main/java/org/apache/bcel/generic/Select.java test/java/org/apache/bcel/GeneratingAnnotatedClassesTestCase.java
Date Sat, 23 Jul 2011 01:52:53 GMT
Author: dbrosius
Date: Sat Jul 23 01:52:52 2011
New Revision: 1149779

URL: http://svn.apache.org/viewvc?rev=1149779&view=rev
Log:
remove needless casting

Modified:
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/Select.java
    commons/proper/bcel/trunk/src/test/java/org/apache/bcel/GeneratingAnnotatedClassesTestCase.java

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/Select.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/Select.java?rev=1149779&r1=1149778&r2=1149779&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/Select.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/Select.java Sat Jul 23
01:52:52 2011
@@ -195,9 +195,9 @@ public abstract class Select extends Bra
 
     protected Object clone() throws CloneNotSupportedException {
         Select copy = (Select) super.clone();
-        copy.match = (int[]) match.clone();
-        copy.indices = (int[]) indices.clone();
-        copy.targets = (InstructionHandle[]) targets.clone();
+        copy.match = match.clone();
+        copy.indices = indices.clone();
+        copy.targets = targets.clone();
         return copy;
     }
 

Modified: commons/proper/bcel/trunk/src/test/java/org/apache/bcel/GeneratingAnnotatedClassesTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/bcel/GeneratingAnnotatedClassesTestCase.java?rev=1149779&r1=1149778&r2=1149779&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/bcel/GeneratingAnnotatedClassesTestCase.java
(original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/bcel/GeneratingAnnotatedClassesTestCase.java
Sat Jul 23 01:52:52 2011
@@ -253,7 +253,7 @@ public class GeneratingAnnotatedClassesT
 		AnnotationEntryGen a = annotations[0];
 		assertTrue("That annotation should only have one value but has "
 				+ a.getValues().size(), a.getValues().size() == 1);
-		ElementValuePairGen nvp = (ElementValuePairGen) a.getValues().get(0);
+		ElementValuePairGen nvp = a.getValues().get(0);
 		ElementValueGen value = nvp.getValue();
 		assertTrue("Value should be ArrayElementValueGen but is " + value,
 				value instanceof ArrayElementValueGen);
@@ -261,8 +261,7 @@ public class GeneratingAnnotatedClassesT
 		assertTrue("Array value should be size one but is "
 				+ arrayValue.getElementValuesSize(), arrayValue
 				.getElementValuesSize() == 1);
-		ElementValueGen innerValue = (ElementValueGen) arrayValue
-				.getElementValues().get(0);
+		ElementValueGen innerValue = arrayValue.getElementValues().get(0);
 		assertTrue(
 				"Value in the array should be AnnotationElementValueGen but is "
 						+ innerValue,



Mime
View raw message