various APIs: don't return null to avoid @Nullable being inferred if IDEA-173618 is fixed

This commit is contained in:
peter
2018-01-08 18:52:37 +01:00
parent 9c671df7d1
commit 831aa13ae4
3 changed files with 3 additions and 7 deletions
@@ -112,9 +112,8 @@ public abstract class NodeRendererImpl implements NodeRenderer{
return cloned;
}
catch (CloneNotSupportedException e) {
LOG.error(e);
throw new RuntimeException(e);
}
return null;
}
@Override
@@ -122,8 +122,7 @@ public class GlobalInspectionContextBase extends UserDataHolderBase implements G
final String[] availableProfileNames = profileManager.getAvailableProfileNames();
if (availableProfileNames.length == 0) {
//can't be
return null;
throw new IllegalStateException("There should be at least one inspection profile");
}
profile = profileManager.getProfile(availableProfileNames[0], true);
}
@@ -60,9 +60,7 @@ public abstract class ProgressManager extends ProgressIndicatorProvider {
public abstract <T> T runProcess(@NotNull Computable<T> process, @Nullable ProgressIndicator progress) throws ProcessCanceledException;
@Override
public ProgressIndicator getProgressIndicator() {
return null;
}
public abstract ProgressIndicator getProgressIndicator();
public static void progress(@NotNull String text) throws ProcessCanceledException {
progress(text, "");