Uploaded image for project: 'Directory ApacheDS'
  1. Directory ApacheDS
  2. DIRSERVER-2016

Java 7 vs Java 8 : failure in Java 8

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 2.0.0-M17
    • 2.0.0-M18
    • None
    • None

    Description

      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...

      Attachments

        Activity

          People

            Unassigned Unassigned
            elecharny Emmanuel L├ęcharny
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: