Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -386,11 +386,10 @@ private void checkPermittedDN(Set permitted, ASN1Sequence dns)
{
return;
}
Iterator it = permitted.iterator();

while (it.hasNext())
for (Object o : permitted)
{
ASN1Sequence subtree = (ASN1Sequence)it.next();
ASN1Sequence subtree = (ASN1Sequence)o;

if (withinDNSubtree(dns, subtree))
{
Expand All @@ -410,11 +409,9 @@ private void checkExcludedDN(Set excluded, ASN1Sequence dns)
return;
}

Iterator it = excluded.iterator();

while (it.hasNext())
for (Object o : excluded)
{
ASN1Sequence subtree = (ASN1Sequence)it.next();
ASN1Sequence subtree = (ASN1Sequence)o;

if (withinDNSubtree(dns, subtree))
{
Expand All @@ -440,10 +437,9 @@ private Set intersectDN(Set permitted, Set dns)
}
else
{
Iterator _iter = permitted.iterator();
while (_iter.hasNext())
for (Object o : permitted)
{
ASN1Sequence subtree = (ASN1Sequence)_iter.next();
ASN1Sequence subtree = (ASN1Sequence)o;

if (withinDNSubtree(dn, subtree))
{
Expand Down Expand Up @@ -475,10 +471,9 @@ private Set unionDN(Set excluded, ASN1Sequence dn)
{
Set intersect = new HashSet();

Iterator it = excluded.iterator();
while (it.hasNext())
for (Object o : excluded)
{
ASN1Sequence subtree = ASN1Sequence.getInstance(it.next());
ASN1Sequence subtree = ASN1Sequence.getInstance(o);

if (withinDNSubtree(dn, subtree))
{
Expand Down Expand Up @@ -515,10 +510,9 @@ private Set intersectOtherName(Set permitted, Set otherNames)
}
else
{
Iterator it2 = permitted.iterator();
while (it2.hasNext())
for (Object o : permitted)
{
OtherName otName2 = OtherName.getInstance(it2.next());
OtherName otName2 = OtherName.getInstance(o);

intersectOtherName(otName1, otName2, intersect);
}
Expand Down Expand Up @@ -561,10 +555,9 @@ private Set intersectEmail(Set permitted, Set emails)
}
else
{
Iterator it2 = permitted.iterator();
while (it2.hasNext())
for (Object o : permitted)
{
String _permitted = (String)it2.next();
String _permitted = (String)o;

intersectEmail(email, _permitted, intersect);
}
Expand All @@ -588,10 +581,9 @@ private Set unionEmail(Set excluded, String email)
{
Set union = new HashSet();

Iterator it = excluded.iterator();
while (it.hasNext())
for (Object o : excluded)
{
String _excluded = (String)it.next();
String _excluded = (String)o;

unionEmail(_excluded, email, union);
}
Expand Down Expand Up @@ -626,10 +618,9 @@ private Set intersectIP(Set permitted, Set ips)
}
else
{
Iterator it2 = permitted.iterator();
while (it2.hasNext())
for (Object o : permitted)
{
byte[] _permitted = (byte[])it2.next();
byte[] _permitted = (byte[])o;
intersect.addAll(intersectIPRange(_permitted, ip));
}
}
Expand Down Expand Up @@ -663,10 +654,9 @@ private Set unionIP(Set excluded, byte[] ip)
{
Set union = new HashSet();

Iterator it = excluded.iterator();
while (it.hasNext())
for (Object o : excluded)
{
byte[] _excluded = (byte[])it.next();
byte[] _excluded = (byte[])o;
union.addAll(unionIPRange(_excluded, ip));
}

Expand Down Expand Up @@ -823,11 +813,9 @@ private void checkPermittedEmail(Set permitted, String email)
return;
}

Iterator it = permitted.iterator();

while (it.hasNext())
for (Object o : permitted)
{
String str = ((String)it.next());
String str = (String)o;

if (emailIsConstrained(email, str))
{
Expand All @@ -852,11 +840,9 @@ private void checkPermittedOtherName(Set permitted, OtherName name)
return;
}

Iterator it = permitted.iterator();

while (it.hasNext())
for (Object o : permitted)
{
OtherName str = OtherName.getInstance(it.next());
OtherName str = OtherName.getInstance(o);

if (otherNameIsConstrained(name, str))
{
Expand All @@ -876,11 +862,9 @@ private void checkExcludedOtherName(Set excluded, OtherName name)
return;
}

Iterator it = excluded.iterator();

while (it.hasNext())
for (Object o : excluded)
{
OtherName str = OtherName.getInstance(it.next());
OtherName str = OtherName.getInstance(o);

if (otherNameIsConstrained(name, str))
{
Expand All @@ -898,11 +882,9 @@ private void checkExcludedEmail(Set excluded, String email)
return;
}

Iterator it = excluded.iterator();

while (it.hasNext())
for (Object o : excluded)
{
String str = (String)it.next();
String str = (String)o;

if (emailIsConstrained(email, str))
{
Expand All @@ -929,11 +911,9 @@ private void checkPermittedIP(Set permitted, byte[] ip)
return;
}

Iterator it = permitted.iterator();

while (it.hasNext())
for (Object o : permitted)
{
byte[] ipWithSubnet = (byte[])it.next();
byte[] ipWithSubnet = (byte[])o;

if (isIPConstrained(ip, ipWithSubnet))
{
Expand Down Expand Up @@ -965,11 +945,9 @@ private void checkExcludedIP(Set excluded, byte[] ip)
return;
}

Iterator it = excluded.iterator();

while (it.hasNext())
for (Object o : excluded)
{
byte[] ipWithSubnet = (byte[])it.next();
byte[] ipWithSubnet = (byte[])o;

if (isIPConstrained(ip, ipWithSubnet))
{
Expand Down Expand Up @@ -1096,11 +1074,9 @@ private void checkPermittedDNS(Set permitted, String dns)
return;
}

Iterator it = permitted.iterator();

while (it.hasNext())
for (Object o : permitted)
{
String str = ((String)it.next());
String str = (String)o;

// is sub domain
if (withinDomain(dns, str) || dns.equalsIgnoreCase(str))
Expand All @@ -1124,11 +1100,9 @@ private void checkExcludedDNS(Set excluded, String dns)
return;
}

Iterator it = excluded.iterator();

while (it.hasNext())
for (Object o : excluded)
{
String str = ((String)it.next());
String str = (String)o;

// is sub domain or the same
if (withinDomain(dns, str) || dns.equalsIgnoreCase(str))
Expand Down Expand Up @@ -1440,10 +1414,9 @@ private Set intersectDNS(Set permitted, Set dnss)
}
else
{
Iterator _iter = permitted.iterator();
while (_iter.hasNext())
for (Object o : permitted)
{
String _permitted = (String)_iter.next();
String _permitted = (String)o;

if (withinDomain(_permitted, dns))
{
Expand Down Expand Up @@ -1476,10 +1449,9 @@ private Set unionDNS(Set excluded, String dns)
{
Set union = new HashSet();

Iterator _iter = excluded.iterator();
while (_iter.hasNext())
for (Object o : excluded)
{
String _permitted = (String)_iter.next();
String _permitted = (String)o;

if (withinDomain(_permitted, dns))
{
Expand Down Expand Up @@ -1609,11 +1581,9 @@ private void checkExcludedURI(Set excluded, String uri)
return;
}

Iterator it = excluded.iterator();

while (it.hasNext())
for (Object o : excluded)
{
String str = ((String)it.next());
String str = (String)o;

if (isUriConstrained(uri, str))
{
Expand All @@ -1639,10 +1609,9 @@ private Set intersectURI(Set permitted, Set uris)
}
else
{
Iterator _iter = permitted.iterator();
while (_iter.hasNext())
for (Object o : permitted)
{
String _permitted = (String)_iter.next();
String _permitted = (String)o;
intersectURI(_permitted, uri, intersect);
}
}
Expand All @@ -1666,10 +1635,9 @@ private Set unionURI(Set excluded, String uri)
{
Set union = new HashSet();

Iterator _iter = excluded.iterator();
while (_iter.hasNext())
for (Object o : excluded)
{
String _excluded = (String)_iter.next();
String _excluded = (String)o;

unionURI(_excluded, uri, union);
}
Expand Down Expand Up @@ -1779,11 +1747,9 @@ private void checkPermittedURI(Set permitted, String uri)
return;
}

Iterator it = permitted.iterator();

while (it.hasNext())
for (Object o : permitted)
{
String str = ((String)it.next());
String str = (String)o;

if (isUriConstrained(uri, str))
{
Expand Down Expand Up @@ -1935,10 +1901,8 @@ private int hashCollection(Collection coll)
return 0;
}
int hash = 0;
Iterator it1 = coll.iterator();
while (it1.hasNext())
for (Object o : coll)
{
Object o = it1.next();
if (o instanceof byte[])
{
hash += Arrays.hashCode((byte[])o);
Expand All @@ -1965,16 +1929,12 @@ private boolean collectionsAreEqual(Collection coll1, Collection coll2)
{
return false;
}
Iterator it1 = coll1.iterator();

while (it1.hasNext())
for (Object a : coll1)
{
Object a = it1.next();
Iterator it2 = coll2.iterator();
boolean found = false;
while (it2.hasNext())
for (Object b : coll2)
{
Object b = it2.next();
if (equals(a, b))
{
found = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,9 @@ public static void main(String[] args)
SortedSet curveNames = new TreeSet(enumToList(ECNamedCurveTable.getNames()));
curveNames.addAll(enumToList(CustomNamedCurves.getNames()));

Iterator it = curveNames.iterator();
while (it.hasNext())
for (Object curveName : curveNames)
{
discoverEndomorphisms((String)it.next());
discoverEndomorphisms((String)curveName);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ public static void main(String[] args)
SortedSet names = new TreeSet(enumToList(ECNamedCurveTable.getNames()));
names.addAll(enumToList(CustomNamedCurves.getNames()));

Iterator it = names.iterator();
while (it.hasNext())
for (Object o : names)
{
String name = (String)it.next();
String name = (String)o;
X9ECParametersHolder x9 = CustomNamedCurves.getByNameLazy(name);
if (x9 == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ public static void main(String[] args)
SortedSet names = new TreeSet(enumToList(ECNamedCurveTable.getNames()));
names.addAll(enumToList(CustomNamedCurves.getNames()));

Iterator it = names.iterator();
while (it.hasNext())
for (Object o : names)
{
String name = (String)it.next();
String name = (String)o;
X9ECParametersHolder x9 = CustomNamedCurves.getByNameLazy(name);
if (x9 == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,9 @@ public Collection<T> getMatches(Selector<T> selector)
else
{
List<T> col = new ArrayList<T>();
Iterator<T> iter = _local.iterator();

while (iter.hasNext())
for (T obj : _local)
{
T obj = iter.next();

if (selector.match(obj))
{
col.add(obj);
Expand Down
Loading