Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2017-02-04 02:12:45 -0500
committerPascal Rapicault2017-02-06 20:31:03 -0500
commit2bc296e9cbad733f12addfa1b1d14e67c5169a42 (patch)
tree637930305a3ee4fd2f1faf6b784c64ce7e38262b
parentf550024fd4384948b2d71080a63fe5f392ed6570 (diff)
downloadrt.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.java6
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));
}
/*

Back to the top