maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aherit...@apache.org
Subject [34/50] git commit: Code cleanup -  Remove Redundant Cast(s)
Date Mon, 15 Jul 2013 22:26:32 GMT
Code cleanup -  Remove Redundant Cast(s)


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/456268af
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/456268af
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/456268af

Branch: refs/heads/slf4j-logback
Commit: 456268af61206a14e492c5983d7f045fc7254531
Parents: da48cff
Author: Arnaud Héritier <aheritier@apache.org>
Authored: Tue Jun 11 22:28:48 2013 +0200
Committer: Arnaud Héritier <aheritier@apache.org>
Committed: Tue Jun 11 22:28:48 2013 +0200

----------------------------------------------------------------------
 .../artifact/versioning/VersionRangeTest.java   | 102 +++++++++----------
 .../DefaultLegacyArtifactCollector.java         |   6 +-
 .../metadata/MetadataResolutionResult.java      |   4 +-
 .../transform/TransformationManagerTest.java    |   2 +-
 .../apache/maven/project/ModelUtilsTest.java    |   2 +-
 .../inheritance/t00/ProjectInheritanceTest.java |   2 +-
 .../inheritance/t02/ProjectInheritanceTest.java |   2 +-
 .../resolver/DefaultArtifactCollectorTest.java  |   2 +-
 .../canonical/CanonicalProjectBuilderTest.java  |   4 +-
 9 files changed, 63 insertions(+), 63 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/456268af/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/VersionRangeTest.java
----------------------------------------------------------------------
diff --git a/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/VersionRangeTest.java
b/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/VersionRangeTest.java
index 5845f2a..e155941 100644
--- a/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/VersionRangeTest.java
+++ b/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/VersionRangeTest.java
@@ -57,7 +57,7 @@ public class VersionRangeTest
         VersionRange range = VersionRange.createFromVersionSpec( "(,1.0]" );
         List<Restriction> restrictions = range.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        Restriction restriction = (Restriction) restrictions.get( 0 );
+        Restriction restriction = restrictions.get( 0 );
         assertNull( CHECK_LOWER_BOUND, restriction.getLowerBound() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.0", restriction.getUpperBound().toString() );
@@ -70,7 +70,7 @@ public class VersionRangeTest
         assertEquals( CHECK_VERSION_RECOMMENDATION, "1.0", range.getRecommendedVersion().toString()
);
         restrictions = range.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertNull( CHECK_LOWER_BOUND, restriction.getLowerBound() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertNull( CHECK_UPPER_BOUND, restriction.getUpperBound() );
@@ -81,7 +81,7 @@ public class VersionRangeTest
         range = VersionRange.createFromVersionSpec( "[1.0]" );
         restrictions = range.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.0", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.0", restriction.getUpperBound().toString() );
@@ -93,7 +93,7 @@ public class VersionRangeTest
         range = VersionRange.createFromVersionSpec( "[1.2,1.3]" );
         restrictions = range.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.2", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.3", restriction.getUpperBound().toString() );
@@ -105,7 +105,7 @@ public class VersionRangeTest
         range = VersionRange.createFromVersionSpec( "[1.0,2.0)" );
         restrictions = range.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.0", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "2.0", restriction.getUpperBound().toString() );
@@ -117,7 +117,7 @@ public class VersionRangeTest
         range = VersionRange.createFromVersionSpec( "[1.5,)" );
         restrictions = range.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.5", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertNull( CHECK_UPPER_BOUND, restriction.getUpperBound() );
@@ -129,13 +129,13 @@ public class VersionRangeTest
         range = VersionRange.createFromVersionSpec( "(,1.0],[1.2,)" );
         restrictions = range.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 2, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertNull( CHECK_LOWER_BOUND, restriction.getLowerBound() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.0", restriction.getUpperBound().toString() );
         assertTrue( CHECK_UPPER_BOUND_INCLUSIVE, restriction.isUpperBoundInclusive() );
         assertNull( CHECK_VERSION_RECOMMENDATION, range.getRecommendedVersion() );
-        restriction = (Restriction) restrictions.get( 1 );
+        restriction = restrictions.get( 1 );
         assertEquals( CHECK_LOWER_BOUND, "1.2", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertNull( CHECK_UPPER_BOUND, restriction.getUpperBound() );
@@ -183,7 +183,7 @@ public class VersionRangeTest
         assertEquals( CHECK_VERSION_RECOMMENDATION, "1.0", mergedRange.getRecommendedVersion().toString()
);
         List<Restriction> restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        Restriction restriction = (Restriction) restrictions.get( 0 );
+        Restriction restriction = restrictions.get( 0 );
         assertNull( CHECK_LOWER_BOUND, restriction.getLowerBound() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertNull( CHECK_UPPER_BOUND, restriction.getUpperBound() );
@@ -193,7 +193,7 @@ public class VersionRangeTest
         assertEquals( CHECK_VERSION_RECOMMENDATION, "1.1", mergedRange.getRecommendedVersion().toString()
);
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertNull( CHECK_LOWER_BOUND, restriction.getLowerBound() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertNull( CHECK_UPPER_BOUND, restriction.getUpperBound() );
@@ -206,7 +206,7 @@ public class VersionRangeTest
         assertEquals( CHECK_VERSION_RECOMMENDATION, "1.1", mergedRange.getRecommendedVersion().toString()
);
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.0", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertNull( CHECK_UPPER_BOUND, restriction.getUpperBound() );
@@ -218,7 +218,7 @@ public class VersionRangeTest
         assertEquals( CHECK_VERSION_RECOMMENDATION, "1.1", mergedRange.getRecommendedVersion().toString()
);
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.1", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertNull( CHECK_UPPER_BOUND, restriction.getUpperBound() );
@@ -230,7 +230,7 @@ public class VersionRangeTest
         assertEquals( CHECK_VERSION_RECOMMENDATION, "1.1", mergedRange.getRecommendedVersion().toString()
);
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.1", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.1", restriction.getLowerBound().toString() );
@@ -242,7 +242,7 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.1", restriction.getLowerBound().toString() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertNull( CHECK_UPPER_BOUND, restriction.getUpperBound() );
@@ -254,7 +254,7 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.2", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertNull( CHECK_UPPER_BOUND, restriction.getUpperBound() );
@@ -266,7 +266,7 @@ public class VersionRangeTest
         assertEquals( CHECK_VERSION_RECOMMENDATION, "1.1", mergedRange.getRecommendedVersion().toString()
);
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertNull( CHECK_LOWER_BOUND, restriction.getLowerBound() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.2", restriction.getUpperBound().toString() );
@@ -278,7 +278,7 @@ public class VersionRangeTest
         assertEquals( CHECK_VERSION_RECOMMENDATION, "1.1", mergedRange.getRecommendedVersion().toString()
);
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertNull( CHECK_LOWER_BOUND, restriction.getLowerBound() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.1", restriction.getUpperBound().toString() );
@@ -290,7 +290,7 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertNull( CHECK_LOWER_BOUND, restriction.getLowerBound() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.1", restriction.getUpperBound().toString() );
@@ -302,7 +302,7 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertNull( CHECK_LOWER_BOUND, restriction.getLowerBound() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.0", restriction.getUpperBound().toString() );
@@ -314,12 +314,12 @@ public class VersionRangeTest
         assertEquals( CHECK_VERSION_RECOMMENDATION, "1.2", mergedRange.getRecommendedVersion().toString()
);
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 2, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertNull( CHECK_LOWER_BOUND, restriction.getLowerBound() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.0", restriction.getUpperBound().toString() );
         assertTrue( CHECK_UPPER_BOUND_INCLUSIVE, restriction.isUpperBoundInclusive() );
-        restriction = (Restriction) restrictions.get( 1 );
+        restriction = restrictions.get( 1 );
         assertEquals( CHECK_LOWER_BOUND, "1.1", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertNull( CHECK_UPPER_BOUND, restriction.getUpperBound() );
@@ -331,12 +331,12 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 2, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertNull( CHECK_LOWER_BOUND, restriction.getLowerBound() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.0", restriction.getUpperBound().toString() );
         assertTrue( CHECK_UPPER_BOUND_INCLUSIVE, restriction.isUpperBoundInclusive() );
-        restriction = (Restriction) restrictions.get( 1 );
+        restriction = restrictions.get( 1 );
         assertEquals( CHECK_LOWER_BOUND, "1.1", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertNull( CHECK_UPPER_BOUND, restriction.getUpperBound() );
@@ -348,12 +348,12 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 2, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertNull( CHECK_LOWER_BOUND, restriction.getLowerBound() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.1", restriction.getUpperBound().toString() );
         assertFalse( CHECK_UPPER_BOUND_INCLUSIVE, restriction.isUpperBoundInclusive() );
-        restriction = (Restriction) restrictions.get( 1 );
+        restriction = restrictions.get( 1 );
         assertEquals( CHECK_LOWER_BOUND, "1.1", restriction.getLowerBound().toString() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertNull( CHECK_UPPER_BOUND, restriction.getUpperBound() );
@@ -365,7 +365,7 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.1", restriction.getLowerBound().toString() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.3", restriction.getUpperBound().toString() );
@@ -377,7 +377,7 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.2", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.3", restriction.getUpperBound().toString() );
@@ -389,7 +389,7 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.2", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.3", restriction.getUpperBound().toString() );
@@ -401,7 +401,7 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.2", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.3", restriction.getUpperBound().toString() );
@@ -413,7 +413,7 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.2", restriction.getLowerBound().toString() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.3", restriction.getUpperBound().toString() );
@@ -425,7 +425,7 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.2", restriction.getLowerBound().toString() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.3", restriction.getUpperBound().toString() );
@@ -437,7 +437,7 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.2", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.3", restriction.getUpperBound().toString() );
@@ -449,7 +449,7 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.1", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.1", restriction.getUpperBound().toString() );
@@ -468,7 +468,7 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.1", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.1", restriction.getUpperBound().toString() );
@@ -480,7 +480,7 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 1, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.4", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.4", restriction.getUpperBound().toString() );
@@ -492,12 +492,12 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 2, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.1", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.2", restriction.getUpperBound().toString() );
         assertTrue( CHECK_UPPER_BOUND_INCLUSIVE, restriction.isUpperBoundInclusive() );
-        restriction = (Restriction) restrictions.get( 1 );
+        restriction = restrictions.get( 1 );
         assertEquals( CHECK_LOWER_BOUND, "1.3", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.4", restriction.getUpperBound().toString() );
@@ -509,12 +509,12 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 2, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.1", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.2", restriction.getUpperBound().toString() );
         assertFalse( CHECK_UPPER_BOUND_INCLUSIVE, restriction.isUpperBoundInclusive() );
-        restriction = (Restriction) restrictions.get( 1 );
+        restriction = restrictions.get( 1 );
         assertEquals( CHECK_LOWER_BOUND, "1.3", restriction.getLowerBound().toString() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.4", restriction.getUpperBound().toString() );
@@ -526,12 +526,12 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 2, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.1", restriction.getLowerBound().toString() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.2", restriction.getUpperBound().toString() );
         assertTrue( CHECK_UPPER_BOUND_INCLUSIVE, restriction.isUpperBoundInclusive() );
-        restriction = (Restriction) restrictions.get( 1 );
+        restriction = restrictions.get( 1 );
         assertEquals( CHECK_LOWER_BOUND, "1.3", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.4", restriction.getUpperBound().toString() );
@@ -543,12 +543,12 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 2, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.1", restriction.getLowerBound().toString() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.2", restriction.getUpperBound().toString() );
         assertFalse( CHECK_UPPER_BOUND_INCLUSIVE, restriction.isUpperBoundInclusive() );
-        restriction = (Restriction) restrictions.get( 1 );
+        restriction = restrictions.get( 1 );
         assertEquals( CHECK_LOWER_BOUND, "1.3", restriction.getLowerBound().toString() );
         assertFalse( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.4", restriction.getUpperBound().toString() );
@@ -581,12 +581,12 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 2, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.1", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.2", restriction.getUpperBound().toString() );
         assertTrue( CHECK_UPPER_BOUND_INCLUSIVE, restriction.isUpperBoundInclusive() );
-        restriction = (Restriction) restrictions.get( 1 );
+        restriction = restrictions.get( 1 );
         assertEquals( CHECK_LOWER_BOUND, "1.3", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.4", restriction.getUpperBound().toString() );
@@ -598,17 +598,17 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 3, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.1", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.2", restriction.getUpperBound().toString() );
         assertTrue( CHECK_UPPER_BOUND_INCLUSIVE, restriction.isUpperBoundInclusive() );
-        restriction = (Restriction) restrictions.get( 1 );
+        restriction = restrictions.get( 1 );
         assertEquals( CHECK_LOWER_BOUND, "1.3", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.4", restriction.getUpperBound().toString() );
         assertTrue( CHECK_UPPER_BOUND_INCLUSIVE, restriction.isUpperBoundInclusive() );
-        restriction = (Restriction) restrictions.get( 2 );
+        restriction = restrictions.get( 2 );
         assertEquals( CHECK_LOWER_BOUND, "1.5", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.5", restriction.getUpperBound().toString() );
@@ -620,17 +620,17 @@ public class VersionRangeTest
         assertNull( CHECK_VERSION_RECOMMENDATION, mergedRange.getRecommendedVersion() );
         restrictions = mergedRange.getRestrictions();
         assertEquals( CHECK_NUM_RESTRICTIONS, 3, restrictions.size() );
-        restriction = (Restriction) restrictions.get( 0 );
+        restriction = restrictions.get( 0 );
         assertEquals( CHECK_LOWER_BOUND, "1.1", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.2", restriction.getUpperBound().toString() );
         assertTrue( CHECK_UPPER_BOUND_INCLUSIVE, restriction.isUpperBoundInclusive() );
-        restriction = (Restriction) restrictions.get( 1 );
+        restriction = restrictions.get( 1 );
         assertEquals( CHECK_LOWER_BOUND, "1.3", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.4", restriction.getUpperBound().toString() );
         assertTrue( CHECK_UPPER_BOUND_INCLUSIVE, restriction.isUpperBoundInclusive() );
-        restriction = (Restriction) restrictions.get( 2 );
+        restriction = restrictions.get( 2 );
         assertEquals( CHECK_LOWER_BOUND, "1.5", restriction.getLowerBound().toString() );
         assertTrue( CHECK_LOWER_BOUND_INCLUSIVE, restriction.isLowerBoundInclusive() );
         assertEquals( CHECK_UPPER_BOUND, "1.6", restriction.getUpperBound().toString() );

http://git-wip-us.apache.org/repos/asf/maven/blob/456268af/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/DefaultLegacyArtifactCollector.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/DefaultLegacyArtifactCollector.java
b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/DefaultLegacyArtifactCollector.java
index d69e812..f734416 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/DefaultLegacyArtifactCollector.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/resolver/DefaultLegacyArtifactCollector.java
@@ -219,7 +219,7 @@ public class DefaultLegacyArtifactCollector
         }
 
         /* remove the originating artifact if it is also in managed versions to avoid being
modified during resolution */
-        Artifact managedOriginatingArtifact = (Artifact) versionMap.get( originatingArtifact.getDependencyConflictId()
);
+        Artifact managedOriginatingArtifact = versionMap.get( originatingArtifact.getDependencyConflictId()
);
 
         if ( managedOriginatingArtifact != null )
         {
@@ -465,7 +465,7 @@ public class DefaultLegacyArtifactCollector
                                     // added to the artifact before we retrive the metadata
                                     // for the artifact; otherwise we may end up with unwanted
                                     // dependencies.
-                                    Artifact ma = (Artifact) managedVersions.get( childKey
);
+                                    Artifact ma = managedVersions.get( childKey );
                                     ArtifactFilter managedExclusionFilter = ma.getDependencyFilter();
                                     if ( null != managedExclusionFilter )
                                     {
@@ -602,7 +602,7 @@ public class DefaultLegacyArtifactCollector
     private void manageArtifact( ResolutionNode node, ManagedVersionMap managedVersions,
                                  List<ResolutionListener> listeners )
     {
-        Artifact artifact = (Artifact) managedVersions.get( node.getKey() );
+        Artifact artifact = managedVersions.get( node.getKey() );
 
         // Before we update the version of the artifact, we need to know
         // whether we are working on a transitive dependency or not. This

http://git-wip-us.apache.org/repos/asf/maven/blob/456268af/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolutionResult.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolutionResult.java
b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolutionResult.java
index 263f906..1d9e9c4 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolutionResult.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataResolutionResult.java
@@ -63,8 +63,8 @@ public class MetadataResolutionResult
     public void initTreeProcessing( PlexusContainer plexus )
         throws ComponentLookupException
     {
-        classpathTransformation = (ClasspathTransformation) plexus.lookup( ClasspathTransformation.class
);
-        conflictResolver = (GraphConflictResolver) plexus.lookup( GraphConflictResolver.class
);
+        classpathTransformation = plexus.lookup( ClasspathTransformation.class );
+        conflictResolver = plexus.lookup( GraphConflictResolver.class );
     }
     //----------------------------------------------------------------------------
     public MetadataGraph getGraph()

http://git-wip-us.apache.org/repos/asf/maven/blob/456268af/maven-compat/src/test/java/org/apache/maven/artifact/transform/TransformationManagerTest.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/test/java/org/apache/maven/artifact/transform/TransformationManagerTest.java
b/maven-compat/src/test/java/org/apache/maven/artifact/transform/TransformationManagerTest.java
index 93b466c..3845092 100644
--- a/maven-compat/src/test/java/org/apache/maven/artifact/transform/TransformationManagerTest.java
+++ b/maven-compat/src/test/java/org/apache/maven/artifact/transform/TransformationManagerTest.java
@@ -30,7 +30,7 @@ public class TransformationManagerTest
     public void testTransformationManager()
         throws Exception
     {
-        ArtifactTransformationManager tm = (ArtifactTransformationManager) lookup( ArtifactTransformationManager.class
);
+        ArtifactTransformationManager tm = lookup( ArtifactTransformationManager.class );
 
         List tms = tm.getArtifactTransformations();
 

http://git-wip-us.apache.org/repos/asf/maven/blob/456268af/maven-compat/src/test/java/org/apache/maven/project/ModelUtilsTest.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/test/java/org/apache/maven/project/ModelUtilsTest.java b/maven-compat/src/test/java/org/apache/maven/project/ModelUtilsTest.java
index 06b2e1d..9c0cbd1 100644
--- a/maven-compat/src/test/java/org/apache/maven/project/ModelUtilsTest.java
+++ b/maven-compat/src/test/java/org/apache/maven/project/ModelUtilsTest.java
@@ -54,7 +54,7 @@ public class ModelUtilsTest
 
         ModelUtils.mergePluginDefinitions( plugin, mgtPlugin, false );
 
-        assertEquals( dep.getVersion(), ((Dependency) plugin.getDependencies().get( 0 ) ).getVersion()
);
+        assertEquals( dep.getVersion(), plugin.getDependencies().get( 0 ).getVersion() );
     }
 
     private Dependency createDependency( String gid,

http://git-wip-us.apache.org/repos/asf/maven/blob/456268af/maven-compat/src/test/java/org/apache/maven/project/inheritance/t00/ProjectInheritanceTest.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t00/ProjectInheritanceTest.java
b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t00/ProjectInheritanceTest.java
index 4b98a23..0ee7980 100644
--- a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t00/ProjectInheritanceTest.java
+++ b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t00/ProjectInheritanceTest.java
@@ -68,7 +68,7 @@ public class ProjectInheritanceTest
         // Value taken from p2
         // ----------------------------------------------------------------------
 
-        assertEquals( "mailing-list", ( (MailingList) p4.getMailingLists().get( 0 ) ).getName()
);
+        assertEquals( "mailing-list", p4.getMailingLists().get( 0 ).getName() );
 
         // ----------------------------------------------------------------------
         // Value taken from p1

http://git-wip-us.apache.org/repos/asf/maven/blob/456268af/maven-compat/src/test/java/org/apache/maven/project/inheritance/t02/ProjectInheritanceTest.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t02/ProjectInheritanceTest.java
b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t02/ProjectInheritanceTest.java
index 43ba71d..2bcf7b5 100644
--- a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t02/ProjectInheritanceTest.java
+++ b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t02/ProjectInheritanceTest.java
@@ -95,7 +95,7 @@ public class ProjectInheritanceTest
         // Value taken from p2
         // ----------------------------------------------------------------------
 
-        assertEquals( "mailing-list", ( (MailingList) project4.getMailingLists().get( 0 )
).getName() );
+        assertEquals( "mailing-list", project4.getMailingLists().get( 0 ).getName() );
 
         // ----------------------------------------------------------------------
         // Value taken from p1

http://git-wip-us.apache.org/repos/asf/maven/blob/456268af/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/DefaultArtifactCollectorTest.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/DefaultArtifactCollectorTest.java
b/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/DefaultArtifactCollectorTest.java
index f8fe1a3..58dd3fa 100644
--- a/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/DefaultArtifactCollectorTest.java
+++ b/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/DefaultArtifactCollectorTest.java
@@ -76,7 +76,7 @@ public class DefaultArtifactCollectorTest
 
         source = new Source();
         artifactFactory = (ArtifactFactory) lookup( ArtifactFactory.ROLE );
-        artifactCollector = (LegacyArtifactCollector) lookup( LegacyArtifactCollector.class
);
+        artifactCollector = lookup( LegacyArtifactCollector.class );
 
         projectArtifact = createArtifactSpec( "project", "1.0", null );
     }

http://git-wip-us.apache.org/repos/asf/maven/blob/456268af/maven-core/src/test/java/org/apache/maven/project/canonical/CanonicalProjectBuilderTest.java
----------------------------------------------------------------------
diff --git a/maven-core/src/test/java/org/apache/maven/project/canonical/CanonicalProjectBuilderTest.java
b/maven-core/src/test/java/org/apache/maven/project/canonical/CanonicalProjectBuilderTest.java
index 5421f94..8b6454d 100644
--- a/maven-core/src/test/java/org/apache/maven/project/canonical/CanonicalProjectBuilderTest.java
+++ b/maven-core/src/test/java/org/apache/maven/project/canonical/CanonicalProjectBuilderTest.java
@@ -86,9 +86,9 @@ public class CanonicalProjectBuilderTest
 
         List<PluginExecution> executions = plugin.getExecutions();
 
-        PluginExecution execution = (PluginExecution) executions.get( 0 );
+        PluginExecution execution = executions.get( 0 );
 
-        String g0 = (String) execution.getGoals().get( 0 );
+        String g0 = execution.getGoals().get( 0 );
 
         assertEquals( "plexus:runtime", g0 );
 


Mime
View raw message