summaryrefslogtreecommitdiff
path: root/gentools/src/org/apache/qpid/gentools/AmqpConstantSet.java
diff options
context:
space:
mode:
Diffstat (limited to 'gentools/src/org/apache/qpid/gentools/AmqpConstantSet.java')
-rw-r--r--gentools/src/org/apache/qpid/gentools/AmqpConstantSet.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/gentools/src/org/apache/qpid/gentools/AmqpConstantSet.java b/gentools/src/org/apache/qpid/gentools/AmqpConstantSet.java
index 93e2d5a7ee..732ef46635 100644
--- a/gentools/src/org/apache/qpid/gentools/AmqpConstantSet.java
+++ b/gentools/src/org/apache/qpid/gentools/AmqpConstantSet.java
@@ -71,10 +71,8 @@ public class AmqpConstantSet extends TreeSet<AmqpConstant> implements Printable,
thisConstant.versionSet.add(version);
// Now, find the value in the map
boolean foundValue = false;
- Iterator<String> vItr = thisConstant.keySet().iterator();
- while (vItr.hasNext() && !foundValue)
+ for (String thisValue : thisConstant.keySet())
{
- String thisValue = vItr.next();
if (value.compareTo(thisValue) == 0)
{
foundValue = true;
@@ -105,10 +103,9 @@ public class AmqpConstantSet extends TreeSet<AmqpConstant> implements Printable,
public void print(PrintStream out, int marginSize, int tabSize)
{
out.println(Utils.createSpaces(marginSize) + "Constants: ");
- Iterator<AmqpConstant> cItr = iterator();
- while (cItr.hasNext())
+ for (AmqpConstant thisAmqpConstant : this)
{
- cItr.next().print(out, marginSize, tabSize);
+ thisAmqpConstant.print(out, marginSize, tabSize);
}
}