void setFromServerPolicy(HTTPServerPolicy policy) { if (policy.isSetCacheControl()) { headers.put("Cache-Control", createMutableList(policy.getCacheControl()));
/** * Determines if two HTTPServerPolicy objects are equal. REVISIT: Check if * this can be replaced by a generated equals method. * * @param p1 one server policy * @param p2 another server policy * @return true iff the two policies are equal */ public boolean equals(HTTPServerPolicy p1, HTTPServerPolicy p2) { if (p1 == p2) { return true; } boolean result = true; result &= (p1.isHonorKeepAlive() == p2.isHonorKeepAlive()) && (p1.getCacheControl() == null ? p2.getCacheControl() == null : p1.getCacheControl() .equals(p2.getCacheControl())) && StringUtils.equals(p1.getContentEncoding(), p2.getContentEncoding()) && StringUtils.equals(p1.getContentLocation(), p2.getContentLocation()) && StringUtils.equals(p1.getContentType(), p2.getContentType()) && StringUtils.equals(p1.getKeepAliveParameters(), p2.getKeepAliveParameters()); if (!result) { return false; } result &= (p1.getReceiveTimeout() == p2.getReceiveTimeout()) && StringUtils.equals(p1.getRedirectURL(), p2.getRedirectURL()) && StringUtils.equals(p1.getServerType(), p2.getServerType()) && (p1.isSuppressClientReceiveErrors() == p2.isSuppressClientReceiveErrors()) && (p1.isSuppressClientSendErrors() == p2.isSuppressClientSendErrors()); return result; }
|| p1.getCacheControl().equals(p2.getCacheControl());
p.setCacheControl(p1.getCacheControl()); } else if (p2.isSetCacheControl()) { p.setCacheControl(p2.getCacheControl());
void setFromServerPolicy(HTTPServerPolicy policy) { if (policy.isSetCacheControl()) { headers.put("Cache-Control", createMutableList(policy.getCacheControl()));
void setFromServerPolicy(HTTPServerPolicy policy) { if (policy.isSetCacheControl()) { headers.put("Cache-Control", createMutableList(policy.getCacheControl()));
/** * Determines if two HTTPServerPolicy objects are equal. REVISIT: Check if * this can be replaced by a generated equals method. * * @param p1 one server policy * @param p2 another server policy * @return true iff the two policies are equal */ public boolean equals(HTTPServerPolicy p1, HTTPServerPolicy p2) { if (p1 == p2) { return true; } boolean result = true; result &= (p1.isHonorKeepAlive() == p2.isHonorKeepAlive()) && (p1.getCacheControl() == null ? p2.getCacheControl() == null : p1.getCacheControl() .equals(p2.getCacheControl())) && StringUtils.equals(p1.getContentEncoding(), p2.getContentEncoding()) && StringUtils.equals(p1.getContentLocation(), p2.getContentLocation()) && StringUtils.equals(p1.getContentType(), p2.getContentType()) && StringUtils.equals(p1.getKeepAliveParameters(), p2.getKeepAliveParameters()); if (!result) { return false; } result &= (p1.getReceiveTimeout() == p2.getReceiveTimeout()) && StringUtils.equals(p1.getRedirectURL(), p2.getRedirectURL()) && StringUtils.equals(p1.getServerType(), p2.getServerType()) && (p1.isSuppressClientReceiveErrors() == p2.isSuppressClientReceiveErrors()) && (p1.isSuppressClientSendErrors() == p2.isSuppressClientSendErrors()); return result; }
/** * Determines if two HTTPServerPolicy objects are equal. REVISIT: Check if * this can be replaced by a generated equals method. * * @param p1 one server policy * @param p2 another server policy * @return true iff the two policies are equal */ public boolean equals(HTTPServerPolicy p1, HTTPServerPolicy p2) { if (p1 == p2) { return true; } boolean result = true; result &= (p1.isHonorKeepAlive() == p2.isHonorKeepAlive()) && (p1.getCacheControl() == null ? p2.getCacheControl() == null : p1.getCacheControl() .equals(p2.getCacheControl())) && StringUtils.equals(p1.getContentEncoding(), p2.getContentEncoding()) && StringUtils.equals(p1.getContentLocation(), p2.getContentLocation()) && StringUtils.equals(p1.getContentType(), p2.getContentType()) && StringUtils.equals(p1.getKeepAliveParameters(), p2.getKeepAliveParameters()); if (!result) { return false; } result &= (p1.getReceiveTimeout() == p2.getReceiveTimeout()) && StringUtils.equals(p1.getRedirectURL(), p2.getRedirectURL()) && StringUtils.equals(p1.getServerType(), p2.getServerType()) && (p1.isSuppressClientReceiveErrors() == p2.isSuppressClientReceiveErrors()) && (p1.isSuppressClientSendErrors() == p2.isSuppressClientSendErrors()); return result; }
|| p1.getCacheControl().equals(p2.getCacheControl());
|| p1.getCacheControl().equals(p2.getCacheControl());
p.setCacheControl(p1.getCacheControl()); } else if (p2.isSetCacheControl()) { p.setCacheControl(p2.getCacheControl());
p.setCacheControl(p1.getCacheControl()); } else if (p2.isSetCacheControl()) { p.setCacheControl(p2.getCacheControl());