From ed256dc2e83bd97a068a02e84a89f15b6b9ad989 Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Thu, 8 Apr 2010 11:35:42 +0000 Subject: [PATCH] o Added generics git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@931889 13f79535-47bb-0310-9956-ffa450edef68 --- .../maven/artifact/versioning/VersionRange.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java index d469a70624..8738ee49e6 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java @@ -50,7 +50,7 @@ public class VersionRange return recommendedVersion; } - public List getRestrictions() + public List getRestrictions() { return restrictions; } @@ -312,10 +312,10 @@ public class VersionRange private List intersection( List r1, List r2 ) { List restrictions = new ArrayList( r1.size() + r2.size() ); - Iterator i1 = r1.iterator(); - Iterator i2 = r2.iterator(); - Restriction res1 = (Restriction) i1.next(); - Restriction res2 = (Restriction) i2.next(); + Iterator i1 = r1.iterator(); + Iterator i2 = r2.iterator(); + Restriction res1 = i1.next(); + Restriction res2 = i2.next(); boolean done = false; while ( !done ) @@ -505,9 +505,9 @@ public class VersionRange else { StringBuilder buf = new StringBuilder(); - for ( Iterator i = restrictions.iterator(); i.hasNext(); ) + for ( Iterator i = restrictions.iterator(); i.hasNext(); ) { - Restriction r = (Restriction) i.next(); + Restriction r = i.next(); buf.append( r.toString() );