@Test public void testEqualsObjectForNonNullHost() { try { assertTrue(servletWithParent.equals(servletWithParent)); } catch (IllegalStateException e) { failOnUnexpectedException(e); } }
@Override public boolean equals(Object obj) { assertHostState(); if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof Servlet)) { return false; } Servlet other = (Servlet) obj; if (contextRoot == null) { if (other.contextRoot != null) { return false; } } else if (!contextRoot.equals(other.contextRoot)) { return false; } if (host == null) { if (other.host != null) { return false; } } else if (!host.equals(other.host)) { return false; } if (name == null) { if (other.name != null) { return false; } } else if (!name.equals(other.name)) { return false; } if (port != other.port) { return false; } return true; }
Servlet { @Override public boolean equals(Object obj) { assertHostState(); if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof Servlet)) { return false; } Servlet other = (Servlet) obj; if (contextRoot == null) { if (other.contextRoot != null) { return false; } } else if (!contextRoot.equals(other.contextRoot)) { return false; } if (host == null) { if (other.host != null) { return false; } } else if (!host.equals(other.host)) { return false; } if (name == null) { if (other.name != null) { return false; } } else if (!name.equals(other.name)) { return false; } if (port != other.port) { return false; } return true; } }
Servlet { @Override public boolean equals(Object obj) { assertHostState(); if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof Servlet)) { return false; } Servlet other = (Servlet) obj; if (contextRoot == null) { if (other.contextRoot != null) { return false; } } else if (!contextRoot.equals(other.contextRoot)) { return false; } if (host == null) { if (other.host != null) { return false; } } else if (!host.equals(other.host)) { return false; } if (name == null) { if (other.name != null) { return false; } } else if (!name.equals(other.name)) { return false; } if (port != other.port) { return false; } return true; } Servlet(String name, String contextRoot); }
Servlet { @Override public boolean equals(Object obj) { assertHostState(); if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof Servlet)) { return false; } Servlet other = (Servlet) obj; if (contextRoot == null) { if (other.contextRoot != null) { return false; } } else if (!contextRoot.equals(other.contextRoot)) { return false; } if (host == null) { if (other.host != null) { return false; } } else if (!host.equals(other.host)) { return false; } if (name == null) { if (other.name != null) { return false; } } else if (!name.equals(other.name)) { return false; } if (port != other.port) { return false; } return true; } Servlet(String name, String contextRoot); String getName(); String getContextRoot(); URI getBaseURI(); URI getFullURI(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
Servlet { @Override public boolean equals(Object obj) { assertHostState(); if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof Servlet)) { return false; } Servlet other = (Servlet) obj; if (contextRoot == null) { if (other.contextRoot != null) { return false; } } else if (!contextRoot.equals(other.contextRoot)) { return false; } if (host == null) { if (other.host != null) { return false; } } else if (!host.equals(other.host)) { return false; } if (name == null) { if (other.name != null) { return false; } } else if (!name.equals(other.name)) { return false; } if (port != other.port) { return false; } return true; } Servlet(String name, String contextRoot); String getName(); String getContextRoot(); URI getBaseURI(); URI getFullURI(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }