private static List<Cookie> removeLocalLoadBalancingCookie(final List<Cookie> cookies){
  final String lblCookieName=getlbCookieName();
  final String lblCookieValue=getlbCookieValue();
  final List<Cookie> filteredCookies=new ArrayList<>();
  for (  final Cookie cookie : cookies) {
    if (!Objects.equals(cookie.getName(),lblCookieName) && !Objects.equals(cookie.getValue(),lblCookieValue)) {
      filteredCookies.add(cookie);
    }
  }
  return filteredCookies;
}

private static List < Cookie > removeLocalLoadBalancingCookie ( final List < Cookie > cookies ) { final String lblCookieName = getlbCookieName ( ) ; final String lblCookieValue = getlbCookieValue ( ) ; final List < Cookie > filteredCookies = new ArrayList < > ( ) ; for ( final Cookie cookie : cookies ) { if ( ! Objects . equals ( cookie . getName ( ) , lblCookieName ) && ! Objects . equals ( cookie . getValue ( ) , lblCookieValue ) ) { filteredCookies . add ( cookie ) ; } } return filteredCookies ; }
filter the load balancing cookie if it points to this server to avoid potential infinite redirect loop .
