From 4abb4e9cc5c82fb71fd3a6f3ff39c8a609d8b762 Mon Sep 17 00:00:00 2001 From: Oliver Burn Date: Thu, 30 Sep 2010 15:55:30 +1000 Subject: [PATCH] Clean up based on NetBeans warnings --- .../com/puppycrawl/tools/checkstyle/api/FastStack.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/api/FastStack.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/api/FastStack.java index 192360300..0d01cef36 100755 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/api/FastStack.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/api/FastStack.java @@ -48,7 +48,7 @@ public class FastStack implements Iterable */ public boolean isEmpty() { - return mEntries.size() == 0; + return mEntries.isEmpty(); } /** @@ -67,7 +67,7 @@ public class FastStack implements Iterable */ public E peek() { - if (mEntries.size() == 0) { + if (mEntries.isEmpty()) { throw new IllegalStateException("FastStack is empty"); } return mEntries.get(mEntries.size() - 1); @@ -80,7 +80,7 @@ public class FastStack implements Iterable */ public E pop() { - if (mEntries.size() == 0) { + if (mEntries.isEmpty()) { throw new IllegalStateException("FastStack is empty"); } return mEntries.remove(mEntries.size() - 1); @@ -120,7 +120,7 @@ public class FastStack implements Iterable } /** - * Returns an interator that goes from the oldest element to the newest. + * Returns an iterator that goes from the oldest element to the newest. * @return an iterator */ public Iterator iterator()