@Test(expected = IllegalStateException.class) public void testHashCodeForNullHost() { servlet.hashCode(); }
@Override public int hashCode() { assertHostState(); final int prime = 31; int result = 1; result = prime * result + ((contextRoot == null) ? 0 : contextRoot.hashCode()); result = prime * result + ((host == null) ? 0 : host.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + port; return result; }
Servlet { @Override public int hashCode() { assertHostState(); final int prime = 31; int result = 1; result = prime * result + ((contextRoot == null) ? 0 : contextRoot.hashCode()); result = prime * result + ((host == null) ? 0 : host.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + port; return result; } }
Servlet { @Override public int hashCode() { assertHostState(); final int prime = 31; int result = 1; result = prime * result + ((contextRoot == null) ? 0 : contextRoot.hashCode()); result = prime * result + ((host == null) ? 0 : host.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + port; return result; } Servlet(String name, String contextRoot); }
Servlet { @Override public int hashCode() { assertHostState(); final int prime = 31; int result = 1; result = prime * result + ((contextRoot == null) ? 0 : contextRoot.hashCode()); result = prime * result + ((host == null) ? 0 : host.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + port; return result; } 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 int hashCode() { assertHostState(); final int prime = 31; int result = 1; result = prime * result + ((contextRoot == null) ? 0 : contextRoot.hashCode()); result = prime * result + ((host == null) ? 0 : host.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + port; return result; } Servlet(String name, String contextRoot); String getName(); String getContextRoot(); URI getBaseURI(); URI getFullURI(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }