WW-4688 Excludes "java.ext.dirs" when scanning for actions

This commit is contained in:
Lukasz Lenart
2016-09-14 08:17:24 +02:00
parent 7605c1641c
commit ac10fa9cf5
2 changed files with 14 additions and 2 deletions
@@ -138,6 +138,16 @@ public class UrlSet {
return excludePaths(System.getProperty("java.endorsed.dirs", ""));
}
/**
* Calls excludePaths(System.getProperty("java.ext.dirs"))
*
* @return url set
* @throws MalformedURLException in case if incorrect URL
*/
public UrlSet excludeUserExtensionsDir() throws MalformedURLException {
return excludePaths(System.getProperty("java.ext.dirs", ""));
}
public UrlSet excludeJavaHome() throws MalformedURLException {
String path = System.getProperty("java.home");
if (path != null) {
@@ -443,8 +443,10 @@ public class PackageBasedActionConfigBuilder implements ActionConfigBuilder {
});
urlSet = urlSet.excludeJavaExtDirs();
urlSet = urlSet.excludeJavaEndorsedDirs();
urlSet = urlSet.excludeJavaExtDirs()
.excludeJavaEndorsedDirs()
.excludeUserExtensionsDir();
try {
urlSet = urlSet.excludeJavaHome();
} catch (NullPointerException e) {