@Test public void testGetBase() throws MalformedURLException { assertThat(EntityProcessorImpl.getBase(new URL("http: is("http: }
static String getBase(URL url) { StringBuilder buffer = new StringBuilder(); buffer.append(url.getProtocol()); buffer.append(": buffer.append(url.getHost()); if (url.getPort() > 0 && 80 != url.getPort()) { buffer.append(':'); buffer.append(url.getPort()); } if (!isNullOrEmpty(url.getPath()) && url.getPath().contains("/")) { String path = url.getPath(); buffer.append(path.substring(0, path.lastIndexOf("/"))); } buffer.append('/'); return buffer.toString(); }
EntityProcessorImpl implements EntityProcessor { static String getBase(URL url) { StringBuilder buffer = new StringBuilder(); buffer.append(url.getProtocol()); buffer.append(": buffer.append(url.getHost()); if (url.getPort() > 0 && 80 != url.getPort()) { buffer.append(':'); buffer.append(url.getPort()); } if (!isNullOrEmpty(url.getPath()) && url.getPath().contains("/")) { String path = url.getPath(); buffer.append(path.substring(0, path.lastIndexOf("/"))); } buffer.append('/'); return buffer.toString(); } }
EntityProcessorImpl implements EntityProcessor { static String getBase(URL url) { StringBuilder buffer = new StringBuilder(); buffer.append(url.getProtocol()); buffer.append(": buffer.append(url.getHost()); if (url.getPort() > 0 && 80 != url.getPort()) { buffer.append(':'); buffer.append(url.getPort()); } if (!isNullOrEmpty(url.getPath()) && url.getPath().contains("/")) { String path = url.getPath(); buffer.append(path.substring(0, path.lastIndexOf("/"))); } buffer.append('/'); return buffer.toString(); } @Inject protected  EntityProcessorImpl(EntityRecognizer recognizer); }
EntityProcessorImpl implements EntityProcessor { static String getBase(URL url) { StringBuilder buffer = new StringBuilder(); buffer.append(url.getProtocol()); buffer.append(": buffer.append(url.getHost()); if (url.getPort() > 0 && 80 != url.getPort()) { buffer.append(':'); buffer.append(url.getPort()); } if (!isNullOrEmpty(url.getPath()) && url.getPath().contains("/")) { String path = url.getPath(); buffer.append(path.substring(0, path.lastIndexOf("/"))); } buffer.append('/'); return buffer.toString(); } @Inject protected  EntityProcessorImpl(EntityRecognizer recognizer); @Override List<EntityAnnotation> annotateEntities(EntityFormatConfiguration config); }
EntityProcessorImpl implements EntityProcessor { static String getBase(URL url) { StringBuilder buffer = new StringBuilder(); buffer.append(url.getProtocol()); buffer.append(": buffer.append(url.getHost()); if (url.getPort() > 0 && 80 != url.getPort()) { buffer.append(':'); buffer.append(url.getPort()); } if (!isNullOrEmpty(url.getPath()) && url.getPath().contains("/")) { String path = url.getPath(); buffer.append(path.substring(0, path.lastIndexOf("/"))); } buffer.append('/'); return buffer.toString(); } @Inject protected  EntityProcessorImpl(EntityRecognizer recognizer); @Override List<EntityAnnotation> annotateEntities(EntityFormatConfiguration config);  }