diff options
author | Andrey Loskutov | 2017-02-04 07:12:45 +0000 |
---|---|---|
committer | Pascal Rapicault | 2017-02-07 01:31:03 +0000 |
commit | 2bc296e9cbad733f12addfa1b1d14e67c5169a42 (patch) | |
tree | 637930305a3ee4fd2f1faf6b784c64ce7e38262b | |
parent | f550024fd4384948b2d71080a63fe5f392ed6570 (diff) | |
download | rt.equinox.p2-2bc296e9cbad733f12addfa1b1d14e67c5169a42.tar.gz rt.equinox.p2-2bc296e9cbad733f12addfa1b1d14e67c5169a42.tar.xz rt.equinox.p2-2bc296e9cbad733f12addfa1b1d14e67c5169a42.zip |
Bug 508593 - NPE in AutomaticUpdater.sameProfile
Change-Id: I7c2b836c81d65761bc35583828d2bef6f86972b1
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
-rw-r--r-- | bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java index 77ebd59e5..b18c09590 100644 --- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java +++ b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java @@ -70,19 +70,19 @@ public class AutomaticUpdater implements IUpdateListener { } boolean sameProfile(String another) { - if (another.equals(IProfileRegistry.SELF)) { + if (IProfileRegistry.SELF.equals(another)) { IProfile profile = getProfileRegistry().getProfile(another); if (profile != null) { another = profile.getProfileId(); } } - if (profileId.equals(IProfileRegistry.SELF)) { + if (IProfileRegistry.SELF.equals(profileId)) { IProfile profile = getProfileRegistry().getProfile(profileId); if (profile != null) { profileId = profile.getProfileId(); } } - return profileId.equals(another); + return (profileId == another) || (profileId != null && profileId.equals(another)); } /* |