summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2008-01-07 08:28:24 (EST)
committerEike Stepper2008-01-07 08:28:24 (EST)
commit2606d5523d628c65b43c4da78b3d5d66892da8e5 (patch)
tree48d6c3754b39e10f80608f3dd62ad93a9df6fcef
parent4efdf306b803c3f53792313f72ced32129a75ca3 (diff)
downloadcdo-2606d5523d628c65b43c4da78b3d5d66892da8e5.zip
cdo-2606d5523d628c65b43c4da78b3d5d66892da8e5.tar.gz
cdo-2606d5523d628c65b43c4da78b3d5d66892da8e5.tar.bz2
[214478] Change the checked exception on ILifecycle.activate() to unchecked
https://bugs.eclipse.org/bugs/show_bug.cgi?id=214478
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOUtil.java9
-rw-r--r--plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/BuddyAdmin.java6
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/ClientSession.java4
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/Self.java2
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/CollaborationInitiatedIndication.java3
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/OpenSessionRequest.java3
-rw-r--r--plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMAcceptor.java3
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/concurrent/QueueWorkerWorkSerializer.java3
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/lifecycle/LifecycleUtil.java1
9 files changed, 15 insertions, 19 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOUtil.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOUtil.java
index 28d5b2a..c2cb137 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOUtil.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOUtil.java
@@ -32,7 +32,6 @@ import org.eclipse.net4j.connector.IConnector;
import org.eclipse.net4j.signal.failover.IFailOverStrategy;
import org.eclipse.net4j.util.StringUtil;
import org.eclipse.net4j.util.container.IManagedContainer;
-import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.util.EList;
@@ -136,18 +135,18 @@ public final class CDOUtil
public static CDOSession openSession(IConnector connector, String repositoryName, boolean disableLegacyObjects,
EPackage.Registry delegate, IFailOverStrategy failOverStrategy) throws ConnectorException
- {
+ {
CDOSessionImpl session = new CDOSessionImpl(delegate);
session.setFailOverStrategy(failOverStrategy);
session.setConnector(connector);
session.setRepositoryName(repositoryName);
session.setDisableLegacyObjects(disableLegacyObjects);
- LifecycleUtil.activate(session);
+ session.activate();
return session;
- }
+ }
public static CDOSession openSession(IConnector connector, String repositoryName, boolean disableLegacyObjects)
- throws ConnectorException
+ throws ConnectorException
{
return openSession(connector, repositoryName, disableLegacyObjects, null, null);
}
diff --git a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/BuddyAdmin.java b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/BuddyAdmin.java
index 4325999..5eaf3ca 100644
--- a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/BuddyAdmin.java
+++ b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/BuddyAdmin.java
@@ -61,7 +61,7 @@ public class BuddyAdmin extends CollaborationContainer implements IBuddyAdmin, I
public BuddyAdmin()
{
- LifecycleUtil.activate(this);
+ activate();
}
public Map<String, IAccount> getAccounts()
@@ -128,7 +128,7 @@ public class BuddyAdmin extends CollaborationContainer implements IBuddyAdmin, I
}
ServerBuddy buddy = new ServerBuddy(account, facilityTypes);
- LifecycleUtil.activate(buddy);
+ buddy.activate();
buddy.addListener(this);
ServerSession session = new ServerSession(channel, buddy);
@@ -151,7 +151,7 @@ public class BuddyAdmin extends CollaborationContainer implements IBuddyAdmin, I
}
Collaboration collaboration = new Collaboration(collaborationID);
- LifecycleUtil.activate(collaboration);
+ collaboration.activate();
Membership.create(initiator, collaboration);
Set<IBuddy> buddies = new HashSet<IBuddy>();
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/ClientSession.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/ClientSession.java
index 65e9eb3..1de04b6 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/ClientSession.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/ClientSession.java
@@ -57,7 +57,7 @@ public class ClientSession extends BuddyContainer implements IBuddySession, ILis
public void setSelf(IAccount account, Set<String> facilityTypes)
{
self = new Self(this, account, facilityTypes);
- LifecycleUtil.activate(self);
+ self.activate();
self.addListener(this);
}
@@ -108,7 +108,7 @@ public class ClientSession extends BuddyContainer implements IBuddySession, ILis
public void buddyAdded(String userID)
{
ClientBuddy buddy = new ClientBuddy(this, userID);
- LifecycleUtil.activate(buddy);
+ buddy.activate();
addBuddy(buddy);
}
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/Self.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/Self.java
index 8116f87..ee56e89 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/Self.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/Self.java
@@ -64,7 +64,7 @@ public class Self extends Buddy
long id = new InitiateCollaborationRequest(channel, buddies).send(ProtocolConstants.TIMEOUT);
BuddyCollaboration collaboration = new BuddyCollaboration(session, id);
- LifecycleUtil.activate(collaboration);
+ collaboration.activate();
Membership.create(this, collaboration);
List<IMembership> memberships = new ArrayList<IMembership>();
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/CollaborationInitiatedIndication.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/CollaborationInitiatedIndication.java
index d8dbe17..ffc97e9 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/CollaborationInitiatedIndication.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/CollaborationInitiatedIndication.java
@@ -19,7 +19,6 @@ import org.eclipse.net4j.internal.buddies.BuddyCollaboration;
import org.eclipse.net4j.internal.buddies.Self;
import org.eclipse.net4j.signal.Indication;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
-import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
import java.io.IOException;
import java.util.Set;
@@ -53,7 +52,7 @@ public class CollaborationInitiatedIndication extends Indication
if (collaboration == null)
{
collaboration = new BuddyCollaboration(session, collaborationID);
- LifecycleUtil.activate(collaboration);
+ collaboration.activate();
Membership.create(self, collaboration);
for (IBuddy buddy : buddies)
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/OpenSessionRequest.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/OpenSessionRequest.java
index bb98534..a83ae62 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/OpenSessionRequest.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/OpenSessionRequest.java
@@ -19,7 +19,6 @@ import org.eclipse.net4j.internal.buddies.ClientSession;
import org.eclipse.net4j.signal.RequestWithConfirmation;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
-import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
import java.io.IOException;
import java.util.Set;
@@ -80,7 +79,7 @@ public class OpenSessionRequest extends RequestWithConfirmation<IBuddySession>
session.buddyAdded(in.readString());
}
- LifecycleUtil.activate(session);
+ session.activate();
return session;
}
}
diff --git a/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMAcceptor.java b/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMAcceptor.java
index 2a0f677..49f2bf1 100644
--- a/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMAcceptor.java
+++ b/plugins/org.eclipse.net4j.jvm/src/org/eclipse/net4j/internal/jvm/JVMAcceptor.java
@@ -12,7 +12,6 @@ package org.eclipse.net4j.internal.jvm;
import org.eclipse.net4j.jvm.IJVMAcceptor;
import org.eclipse.net4j.util.StringUtil;
-import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
import org.eclipse.internal.net4j.acceptor.Acceptor;
@@ -47,7 +46,7 @@ public class JVMAcceptor extends Acceptor implements IJVMAcceptor
connector.setReceiveExecutor(client.getReceiveExecutor());
connector.setProtocolFactoryRegistry(client.getProtocolFactoryRegistry());
connector.setProtocolPostProcessors(client.getProtocolPostProcessors());
- LifecycleUtil.activate(connector);
+ connector.activate();
addConnector(connector);
return connector;
}
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/concurrent/QueueWorkerWorkSerializer.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/concurrent/QueueWorkerWorkSerializer.java
index ce33a71..6a1c2b6 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/concurrent/QueueWorkerWorkSerializer.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/concurrent/QueueWorkerWorkSerializer.java
@@ -12,7 +12,6 @@ package org.eclipse.net4j.internal.util.concurrent;
import org.eclipse.net4j.internal.util.lifecycle.QueueWorker;
import org.eclipse.net4j.util.concurrent.IWorkSerializer;
-import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
/**
* @author Eike Stepper
@@ -21,7 +20,7 @@ public class QueueWorkerWorkSerializer extends QueueWorker<Runnable> implements
{
public QueueWorkerWorkSerializer()
{
- LifecycleUtil.activate(this);
+ activate();
}
public void dispose()
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/lifecycle/LifecycleUtil.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/lifecycle/LifecycleUtil.java
index e27de48..c50ae42 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/lifecycle/LifecycleUtil.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/lifecycle/LifecycleUtil.java
@@ -157,6 +157,7 @@ public final class LifecycleUtil
}
else if (object != null && useAnnotation)
{
+ // TODO Handle evtl. return value (exception)
invokeAnnotation(object, Deactivator.class);
}