Fixed the CursorIterator in order it does not generates an exception when no entry are found

git-svn-id: https://svn.apache.org/repos/asf/directory/shared/trunk@1127075 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/CursorIterator.java b/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/CursorIterator.java
index 9d5a21a..ce9558f 100644
--- a/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/CursorIterator.java
+++ b/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/cursor/CursorIterator.java
@@ -52,8 +52,7 @@
         
         try
         {
-            cursor.next();
-            this.available = true;
+            this.available = cursor.next();
         }
         catch ( Exception e )
         {