Fixes Bug #18122 Social Util Library parsing exceptions
This commit is contained in:
parent
8ff98f11b6
commit
dafe9e8599
|
@ -25,7 +25,7 @@
|
||||||
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
|
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
|
|
|
@ -13,11 +13,13 @@ public class SanitizedURL {
|
||||||
protected final URL url;
|
protected final URL url;
|
||||||
|
|
||||||
public SanitizedURL(String urlString) throws MalformedURLException {
|
public SanitizedURL(String urlString) throws MalformedURLException {
|
||||||
if(Objects.isNull(urlString) || urlString.isEmpty()) {
|
if(Objects.isNull(urlString) || urlString.isEmpty() || urlString.length()<2) {
|
||||||
throw new MalformedURLException();
|
throw new MalformedURLException();
|
||||||
}
|
}
|
||||||
|
|
||||||
prefix = urlString.substring(0,1);;
|
|
||||||
|
|
||||||
|
prefix = urlString.substring(0,1);
|
||||||
if(prefix.matches(CHARACTERS_TO_REMOVE)) {
|
if(prefix.matches(CHARACTERS_TO_REMOVE)) {
|
||||||
prefix = urlString.substring(0, 1);
|
prefix = urlString.substring(0, 1);
|
||||||
urlString = urlString.substring(1);
|
urlString = urlString.substring(1);
|
||||||
|
|
Loading…
Reference in New Issue