From 474b2fbb0ad5920d8e546bd07de36fff0ed92870 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Thu, 3 Mar 2011 14:07:21 +0100 Subject: [PATCH] remove 'replaced with app default' flag which is no longer meaningful --- .../impl/CheckForUpdateResult.java | 24 +------------------ .../ide/updates/UpdateStrategyTest.java | 2 -- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/CheckForUpdateResult.java b/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/CheckForUpdateResult.java index 5a29a58b7d3c..5e45e6d68dc6 100644 --- a/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/CheckForUpdateResult.java +++ b/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/CheckForUpdateResult.java @@ -23,9 +23,6 @@ import java.util.Collection; import java.util.List; public class CheckForUpdateResult { - - private final boolean replacedWithAppDef; - @NotNull private final UpdateChannel selected; @@ -47,11 +44,10 @@ public class CheckForUpdateResult { private final Exception error; - public CheckForUpdateResult(boolean replacedWithAppDef, @NotNull UpdateChannel selected, + public CheckForUpdateResult(@NotNull UpdateChannel selected, @Nullable BuildInfo newBuildInSelectedChannel, @Nullable Collection newChannels, List allChannelsIds, @Nullable UpdateChannel channelToPropose) { - this.replacedWithAppDef = replacedWithAppDef; this.newBuildInSelectedChannel = newBuildInSelectedChannel; this.selected = selected; this.newChannels = newChannels; @@ -62,7 +58,6 @@ public class CheckForUpdateResult { } public CheckForUpdateResult(UpdateStrategy.State state, Exception e) { - this.replacedWithAppDef = false; this.newBuildInSelectedChannel = null; this.newChannels = null; this.allChannelsIds = null; @@ -76,23 +71,6 @@ public class CheckForUpdateResult { this(state,null); } - - /** - * @return true - if we need to override user channel selection, for example: - * - user has no preferences defined (old settings config) - * - user selection has no sense any more, e.g. user selected IDEA 9.x eap, then he/she upgraded his IDEA to version 10.x, - * it means that we need to override his channel with new one (should we ask him or just override the channel silently? - * if we could select the channel with correct type - we could do it silently, if user setting pointed to eap - we could pick new eap chanel - * also we could show an notification (not modal)) - */ - private boolean isReplacedWithAddDefault() { - return replacedWithAppDef; - } - - public boolean isReplacedWithAppDef() { - return replacedWithAppDef; - } - @Nullable public BuildInfo getNewBuildInSelectedChannel() { return newBuildInSelectedChannel; diff --git a/platform/platform-impl/testSrc/com/intellij/ide/updates/UpdateStrategyTest.java b/platform/platform-impl/testSrc/com/intellij/ide/updates/UpdateStrategyTest.java index b946c9c1401f..6e2882e2ac1a 100644 --- a/platform/platform-impl/testSrc/com/intellij/ide/updates/UpdateStrategyTest.java +++ b/platform/platform-impl/testSrc/com/intellij/ide/updates/UpdateStrategyTest.java @@ -32,7 +32,6 @@ public class UpdateStrategyTest extends TestCase { final CheckForUpdateResult result1 = strategy.checkForUpdates(); Assert.assertEquals(UpdateStrategy.State.LOADED, result1.getState()); - Assert.assertTrue(result1.isReplacedWithAppDef()); Assert.assertNull(result1.getNewBuildInSelectedChannel()); /* @@ -59,7 +58,6 @@ public class UpdateStrategyTest extends TestCase { final CheckForUpdateResult result = strategy.checkForUpdates(); Assert.assertEquals(UpdateStrategy.State.LOADED, result.getState()); - Assert.assertFalse(result.isReplacedWithAppDef()); final BuildInfo update = result.getNewBuildInSelectedChannel(); Assert.assertNotNull(update); Assert.assertEquals("95.627", update.getNumber().toString());