summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-12-14 23:54:10 (EST)
committerEike Stepper2007-12-14 23:54:10 (EST)
commitecfb0e67bcbfdb294dbf05e25a71fb9a5cf0cb4f (patch)
tree1535e5a1b7ffb0b2470f2da4154dd777fdfd20a6
parentb8d98f6914fd664b748b558d70b25317ab8235a1 (diff)
downloadcdo-ecfb0e67bcbfdb294dbf05e25a71fb9a5cf0cb4f.zip
cdo-ecfb0e67bcbfdb294dbf05e25a71fb9a5cf0cb4f.tar.gz
cdo-ecfb0e67bcbfdb294dbf05e25a71fb9a5cf0cb4f.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java1
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/lifecycle/Lifecycle.java8
2 files changed, 9 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java
index dfc5ae2..cfb6dda 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java
@@ -149,6 +149,7 @@ public class CDOSessionImpl extends Container<CDOView> implements CDOSession
public void setDisableLegacyObjects(boolean disableLegacyObjects)
{
+ checkInactive();
this.disableLegacyObjects = disableLegacyObjects;
}
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/lifecycle/Lifecycle.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/lifecycle/Lifecycle.java
index 2958832..e98be9a 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/lifecycle/Lifecycle.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/lifecycle/Lifecycle.java
@@ -145,6 +145,14 @@ public class Lifecycle extends Notifier implements ILifecycle.Introspection
}
}
+ protected final void checkInactive()
+ {
+ if (lifecycleState != ILifecycleState.INACTIVE)
+ {
+ throw new IllegalStateException("Not inactive: " + this);
+ }
+ }
+
protected final void deferredActivate()
{
lifecycleState = ILifecycleState.ACTIVE;