Open BenEast opened 7 years ago
@tzuhanjan will this be included?
This PR seems to be missing tests in TestUriDetection.java
:
@Test
public void testTwoUrls() {
runTest("http://user:pass@host.com host.com", UrlDetectorOptions.Default, "http://user:pass@host.com", "host.com");
}
@Test
public void testSlashes() {
runTest("://TEST//:@.", UrlDetectorOptions.Default);
}
--[Issue #12] Fixed StringIndexOutOfBoundsException when given 'http://user:pass@host.com host.com' as input string--
Updated url-detector.processColon to set length to 0 when readUserPass(length) is true.
All unit tests passed after this update.
--[Issue #16] Fixed StringIndexOutOfBoundsException when input string contains the substring "//:@."--
Updated conditional statements in url-detector.processColon() to clear the buffer if it has contents when readUserPass fails, and to set length to 0 otherwise.
This resolved Issue #16 regarding a StringIndexOutOfBoundsException being thrown when provided the input string "://VIVE MARINE LE PEN//:@.".
All unit tests still pass after this update.