EA-96535 - NPE: UseDistributionWithSourcesNotificationProvider.showUseDistributionWithSourcesTip

This commit is contained in:
Vladislav.Soroka
2017-02-15 12:40:47 +03:00
parent 20c985bb4d
commit ea307a2761
@@ -157,7 +157,7 @@ public class UseDistributionWithSourcesNotificationProvider extends EditorNotifi
String distributionUri = wrapperConfiguration.getDistribution().toString();
try {
String host = new URI(distributionUri).getHost();
return host.endsWith("gradle.org") && !GRADLE_SRC_DISTRIBUTION_PATTERN.matcher(distributionUri).matches();
return host != null && host.endsWith("gradle.org") && !GRADLE_SRC_DISTRIBUTION_PATTERN.matcher(distributionUri).matches();
}
catch (URISyntaxException ignore) {
}