@Test public void testFixVarnishNCSALoggingBug() throws MalformedURLException { URL url = new URL("http: ProjectInfo info = new ProjectInfo(url.getHost()); assertEquals("wikipedia.org", info.getProjectDomain()); assertEquals("M", info.getSiteVersion()); assertEquals("fr", info.getLanguage()); }
private String fixVarnishNCSALoggingBug(final String hostname) { if (hostname != null && hostname.endsWith("http")) { return hostname.substring(0, hostname.length() - 4); } else { return hostname; } }
ProjectInfo { private String fixVarnishNCSALoggingBug(final String hostname) { if (hostname != null && hostname.endsWith("http")) { return hostname.substring(0, hostname.length() - 4); } else { return hostname; } } }
ProjectInfo { private String fixVarnishNCSALoggingBug(final String hostname) { if (hostname != null && hostname.endsWith("http")) { return hostname.substring(0, hostname.length() - 4); } else { return hostname; } } ProjectInfo(String hostname); }
ProjectInfo { private String fixVarnishNCSALoggingBug(final String hostname) { if (hostname != null && hostname.endsWith("http")) { return hostname.substring(0, hostname.length() - 4); } else { return hostname; } } ProjectInfo(String hostname); final String getHostname(); final String getLanguage(); final String getSiteVersion(); final String getProjectDomain(); }
ProjectInfo { private String fixVarnishNCSALoggingBug(final String hostname) { if (hostname != null && hostname.endsWith("http")) { return hostname.substring(0, hostname.length() - 4); } else { return hostname; } } ProjectInfo(String hostname); final String getHostname(); final String getLanguage(); final String getSiteVersion(); final String getProjectDomain();  }