public void testDomainMatchesOnLocalAddresses(){
  assertFalse(HttpCookie.domainMatches("localhost","localhost"));
  assertFalse(HttpCookie.domainMatches("b","b"));
}

public void testDomainMatchesOnLocalAddresses ( ) { assertFalse ( HttpCookie . domainMatches ( "localhost" , "localhost" ) ) ; assertFalse ( HttpCookie . domainMatches ( "b" , "b" ) ) ; }
rfc 2109 and rfc 2965 disagree here . 2109 says two equals strings match only if they are fully - qualified domain names . 2965 says two equal strings always match . we ' re testing for 2109 behavior because it ' s more widely used , it ' s more conservative , and it ' s what the ri does .
