Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StringIndexOutOfBoundsException on particular string #16

Open
davidtinker opened this issue Mar 17, 2017 · 2 comments
Open

StringIndexOutOfBoundsException on particular string #16

davidtinker opened this issue Mar 17, 2017 · 2 comments

Comments

@davidtinker
Copy link

This string (excluding the double quotes) triggers a StringIndexOutOfBoundsException:
"://VIVE MARINE LE PEN//:@."

java.lang.StringIndexOutOfBoundsException: String index out of range: -1
	at java.lang.AbstractStringBuilder.substring(AbstractStringBuilder.java:908) ~[na:1.8.0_60]
	at java.lang.StringBuilder.substring(StringBuilder.java:76) ~[na:1.8.0_60]
	at java.lang.AbstractStringBuilder.substring(AbstractStringBuilder.java:854) ~[na:1.8.0_60]
	at java.lang.StringBuilder.substring(StringBuilder.java:76) ~[na:1.8.0_60]
	at com.linkedin.urls.detection.UrlDetector.readDefault(UrlDetector.java:191) ~[url-detector-0.1.17.jar!/:na]
	at com.linkedin.urls.detection.UrlDetector.detect(UrlDetector.java:142) ~[url-detector-0.1.17.jar!/:na]
@BenEast
Copy link

BenEast commented Jul 3, 2017

Hi David,

I'm going to look into resolving this issue. I'll submit a pull request when I've duplicated the issue and resolved it.

pgalbraith added a commit to pgalbraith/URL-Detector that referenced this issue Sep 17, 2018
@pgalbraith
Copy link

Until this repo is published again, I have this fix included in a separate published build as io.github.pgalbraith:url-detector:0.1.18

https://github.com/pgalbraith/URL-Detector/releases/tag/url-detector-0.1.18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants