Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Kaegi2010-05-11 20:12:32 +0000
committerSimon Kaegi2010-05-11 20:12:32 +0000
commitd3a3baad5402a4c16afa40542956b4bee1e6a3ee (patch)
tree7954748961260678ae0fb938678d341a01d5b706
parent8abbbe53a3650c33dc8fb0c60f252d17aedcb50d (diff)
downloadrt.equinox.p2-d3a3baad5402a4c16afa40542956b4bee1e6a3ee.tar.gz
rt.equinox.p2-d3a3baad5402a4c16afa40542956b4bee1e6a3ee.tar.xz
rt.equinox.p2-d3a3baad5402a4c16afa40542956b4bee1e6a3ee.zip
Bug 288280 - [engine] profile not current error should log both the current and expected profile timestamps
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Messages.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/messages.properties3
3 files changed, 5 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Messages.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Messages.java
index 44f489e43..94b91b9c9 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Messages.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Messages.java
@@ -80,6 +80,7 @@ public class Messages extends NLS {
public static String Profile_Duplicate_Root_Profile_Id;
public static String profile_lock_not_reentrant;
public static String profile_not_current;
+ public static String profile_changed;
public static String profile_not_registered;
public static String Profile_Null_Profile_Id;
public static String Profile_Parent_Not_Found;
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java
index 08a3d7b9b..57aabb9e5 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java
@@ -734,12 +734,12 @@ public class SimpleProfileRegistry implements IProfileRegistry, IAgentService {
if (profile.isChanged()) {
if (DebugHelper.DEBUG_PROFILE_REGISTRY)
DebugHelper.debug(PROFILE_REGISTRY, "Profile is marked as changed."); //$NON-NLS-1$
- throw new IllegalStateException(NLS.bind(Messages.profile_not_current, profile.getProfileId()));
+ throw new IllegalStateException(NLS.bind(Messages.profile_changed, profile.getProfileId()));
}
if (!checkTimestamps(profile, internalProfile)) {
if (DebugHelper.DEBUG_PROFILE_REGISTRY)
DebugHelper.debug(PROFILE_REGISTRY, "Unexpected timestamp difference in profile."); //$NON-NLS-1$
- throw new IllegalStateException(NLS.bind(Messages.profile_not_current, profile.getProfileId()));
+ throw new IllegalStateException(NLS.bind(Messages.profile_not_current, new String[] {profile.getProfileId(), Long.toString(internalProfile.getTimestamp()), Long.toString(profile.getTimestamp())}));
}
isCurrent = true;
} finally {
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/messages.properties b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/messages.properties
index 187342857..13784b3cb 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/messages.properties
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/messages.properties
@@ -42,7 +42,8 @@ SimpleProfileRegistry_Profile_not_locked_due_to_exception=Profile not locked due
SimpleProfileRegistry_Bad_profile_location=Bad profile location: {0}
SimpleProfileRegistry_CannotRemoveCurrentSnapshot=Cannot remove the current profile timestamp
profile_does_not_exist=Profile to be updated does not exist: {0}.
-profile_not_current=Profile {0} is not current.
+profile_not_current=Profile {0} is not current. Expected timestamp {1} but was {2}.
+profile_changed=Profile {0} is marked as changed.
profile_not_registered=Profile {0} not registered.
reg_dir_not_available=Registry Directory not available: {0}.
thread_not_owner=Thread not lock owner.

Back to the top