Skip to content
Permalink
Browse files
Use String.replace() instead of replaceAll() when we don't need a Regex.
  • Loading branch information
garydgregory committed Feb 28, 2021
1 parent 1d79adc commit 5b1b9d3d36e91b2843df427f4dab55a80d1db863
Showing 2 changed files with 2 additions and 2 deletions.
@@ -139,6 +139,6 @@ public DataSource resolve(final String resourceLocation, final boolean isLenient
*/
private String getResourceName(final String resourceLocation)
{
return (getClassPathBase() + resourceLocation).replaceAll("//", "/");
return (getClassPathBase() + resourceLocation).replace("//", "/");
}
}
@@ -127,6 +127,6 @@ protected URL createUrl(final String resourceLocation) throws MalformedURLExcept
return new URL(resourceLocation);
}

return new URL(getBaseUrl(), resourceLocation.replaceAll("&", "&"));
return new URL(getBaseUrl(), resourceLocation.replace("&", "&"));
}
}

0 comments on commit 5b1b9d3

Please sign in to comment.