linkedin / URL-Detector

A Java library to detect and normalize URLs in text
783 stars 186 forks source link

Fixing null pointer exception when url doesn't have scheme #29

Open iniyai opened 4 years ago

iniyai commented 4 years ago

When a url's scheme is empty, "SCHEME_PORT_MAP.get(getScheme());" returns null. Comparing a null Integer with a primitive integer causes a null pointer exception. This pull requests attempts to solve this null pointer exception.