Closed kazurayam closed 1 year ago
I have found a fact.
See the following code.
@Test
public void test_URL_constructor_withoutSlash() throws MalformedURLException {
URL baseURL1 = new URL("http://example.com/pages");
URL derived1 = new URL(baseURL1, "p1.html");
assertEquals("http://example.com/p1.html", derived1.toExternalForm());
// the "/" character at the end of baseURL matters
URL baseURL2 = new URL("http://example.com/pages/");
URL derived2 = new URL(baseURL2, "p1.html");
assertEquals("http://example.com/pages/p1.html", derived2.toExternalForm());
}
The "/" character at the end of baseURL matters.
https://github.com/kazurayam/inspectus/blob/0.7.5/src/test/java/com/kazurayam/inspectus/materialize/discovery/SitemapLoaderTest.java has a problem.
Once it was as this, and failed.
So I changed to
and this test now passes.
But, this behavior is not what I really want.
I want
to pass.