while ( iterator.hasNext() )
while ( ldifIterator.hasNext() )
    public int execute()    {        Name rdn;        InputStream in = null;        try        {            in = getLdifStream();            LdifIterator iterator = new LdifIterator( in );            LdifParser ldifParser = new LdifParserImpl();            while ( iterator.hasNext() )            {                String ldif = ( String ) iterator.next();                Attributes attributes = new LockableAttributesImpl();                ldifParser.parse( attributes, ldif );                String dn = ( String ) attributes.remove( "dn" ).get();                boolean filterAccepted = applyFilters( dn, attributes );                if ( !filterAccepted )                {                    continue;                }                rdn = getRelativeName( ctx, dn );                try                {                    ctx.lookup( rdn );                    log.info( "Found {}, will not create.", rdn );                }                catch ( Exception e )                {                    ctx.createSubcontext( rdn, attributes );                    count++;                    log.info( "Created {}.", rdn );                }            }        }        catch ( FileNotFoundException fnfe )        {            log.error( "LDIF file does not exist." );        }        catch ( Exception ioe )        {            log.error( "Failed to import LDIF into backing store.", ioe );        }        finally        {            if ( in != null )            {                try                {                    in.close();                }                catch ( Exception e )                {                    log.error( "failed to close stream", e );                }            }        }        return count;    }