o Added generics

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@931889 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2010-04-08 11:35:42 +00:00
parent 83237e46af
commit ed256dc2e8
1 changed files with 7 additions and 7 deletions

View File

@ -50,7 +50,7 @@ public class VersionRange
return recommendedVersion; return recommendedVersion;
} }
public List getRestrictions() public List<Restriction> getRestrictions()
{ {
return restrictions; return restrictions;
} }
@ -312,10 +312,10 @@ public class VersionRange
private List<Restriction> intersection( List<Restriction> r1, List<Restriction> r2 ) private List<Restriction> intersection( List<Restriction> r1, List<Restriction> r2 )
{ {
List<Restriction> restrictions = new ArrayList<Restriction>( r1.size() + r2.size() ); List<Restriction> restrictions = new ArrayList<Restriction>( r1.size() + r2.size() );
Iterator i1 = r1.iterator(); Iterator<Restriction> i1 = r1.iterator();
Iterator i2 = r2.iterator(); Iterator<Restriction> i2 = r2.iterator();
Restriction res1 = (Restriction) i1.next(); Restriction res1 = i1.next();
Restriction res2 = (Restriction) i2.next(); Restriction res2 = i2.next();
boolean done = false; boolean done = false;
while ( !done ) while ( !done )
@ -505,9 +505,9 @@ public class VersionRange
else else
{ {
StringBuilder buf = new StringBuilder(); StringBuilder buf = new StringBuilder();
for ( Iterator i = restrictions.iterator(); i.hasNext(); ) for ( Iterator<Restriction> i = restrictions.iterator(); i.hasNext(); )
{ {
Restriction r = (Restriction) i.next(); Restriction r = i.next();
buf.append( r.toString() ); buf.append( r.toString() );