Control[] reqControls = ( Control[] ) ctx.getRequestControls();
Control[] reqControls = ctx.getRequestControls();
    private boolean isSubentryVisible( LdapContext ctx ) throws NamingException    {        Control[] reqControls = ( Control[] ) ctx.getRequestControls();        if ( reqControls == null || reqControls.length <= 0 )        {            return false;        }        // check all request controls to see if subentry control is present        for ( int ii = 0; ii < reqControls.length; ii++ )        {            // found the subentry request control so we return its value            if ( reqControls[ii].getID().equals( SUBENTRY_CONTROL ) )            {                SubentryRequestControl subentryControl = ( SubentryRequestControl ) reqControls[ii];                return subentryControl.getSubentryVisibility();            }        }        return false;    }