You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Emmanuel Lecharny (JIRA)" <ji...@apache.org> on 2014/11/13 17:55:33 UTC

[jira] [Issue Comment Deleted] (DIRSERVER-2016) Java 7 vs Java 8 : failure in Java 8

     [ https://issues.apache.org/jira/browse/DIRSERVER-2016?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny updated DIRSERVER-2016:
-----------------------------------------
    Comment: was deleted

(was: Fixed with http://svn.apache.org/r1639354)

> Java 7 vs Java 8 : failure in Java 8
> ------------------------------------
>
>                 Key: DIRSERVER-2016
>                 URL: https://issues.apache.org/jira/browse/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) :
> {code}
>    public boolean first() throws LdapException, CursorException
>    {
>        if ( listSize > 0 )
>        {
>            index = start;
>            return list.get( index ).first();
>        }
>        return false;
>    }
> {code}
> 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
(v6.3.4#6332)