directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny (JIRA)" <>
Subject [jira] [Created] (DIRSERVER-2016) Java 7 vs Java 8 : failure in Java 8
Date Thu, 13 Nov 2014 08:56:33 GMT
Emmanuel Lecharny created DIRSERVER-2016:

             Summary: Java 7 vs Java 8 : failure in Java 8
                 Key: DIRSERVER-2016
             Project: Directory ApacheDS
          Issue Type: Bug
    Affects Versions: 2.0.0-M17
            Reporter: Emmanuel Lecharny
            Priority: Blocker
             Fix For: 2.0.0-M18

We have a nasty bug when running the tests using Java 8 : all of sudden, we have some faling
tests in core-integ and server-integ.

What happens is that when we do a global search, we go through all the partition, and for
each one of them, we create a cursor. Then in the NamingEnumeration we build around this list
of cursors, we do (CursorList class) :

   public boolean first() throws LdapException, CursorException
       if ( listSize > 0 )
           index = start;

           return list.get( index ).first();

       return false;

Obviously, if the first cursor has no candidate, we will return false, and we won't check
the second list.

So why does it work in Java 7 ? Simple... The partitions is an HashMap, and we get all the
partition from it. In Java 7, we first get System (which returns results) then Schema (which
has no candidate). And it works. In java 8, we get Schema first and System second, so the
first cursor is empty, an the cursor.first() call return false...

This message was sent by Atlassian JIRA

View raw message