Avoid NullPointerException while removing a features repository with location changed locally
@@ -423,7 +423,11 @@ public class FeaturesServiceImpl implements FeaturesService, Deployer.DeployCall
for (String r : state.repositories) {
if (!uri.toString().equals(r)) {
Repository rep = repositories.getRepository(r);
+ if (rep != null) {
repos.addAll(repositories.getRepositoryClosure(rep));
+ } else {
+ throw new IllegalArgumentException("Repository URI " + uri + " seems to have changed, can't remove repository");
+ }
}
}
for (Repository rep : repos) {
