summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-12-29 11:45:39 (EST)
committerEike Stepper2007-12-29 11:45:39 (EST)
commitec3ee7b4e2488560500631522d08edc411fb9ab1 (patch)
treeb35cc4ed049e88ceaa718f3c685dc54fbdf99242
parent2a2bdcfb73a16e2c3fe9fa4c9dd75687474f57f0 (diff)
downloadcdo-ec3ee7b4e2488560500631522d08edc411fb9ab1.zip
cdo-ec3ee7b4e2488560500631522d08edc411fb9ab1.tar.gz
cdo-ec3ee7b4e2488560500631522d08edc411fb9ab1.tar.bz2
[213782] Transaction DeadLock
https://bugs.eclipse.org/bugs/show_bug.cgi?id=213782
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ReloadObjectsAction.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java1
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java5
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/SessionManager.java1
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/BuddiesDragListener.java2
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsPane.java1
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/MessageImpl.java1
-rw-r--r--plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/cache/SensitiveProtoTest.java1
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/internal/ui/views/Net4jIntrospectorView.java4
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/StructuredContentProvider.java1
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/dnd/DNDDropAdapter.java1
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/dnd/DNDTransfer.java1
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/prefs/OMPreferenceStore.java6
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ContainerItemProvider.java2
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/collection/HistoryElement.java1
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/ContainerEvent.java2
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/ContainerEventAdapter.java1
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/LifecycleEventConverter.java1
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/ManagedContainer.java1
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/SingleDeltaContainerEvent.java2
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/delegate/AbstractDelegator.java2
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/delegate/ContainerCollection.java3
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/delegate/ContainerMap.java1
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/pref/Preferences.java8
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/registry/DelegatingRegistry.java1
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/registry/Registry.java2
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/ObjectUtil.java1
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/ref/ReferenceValueMap.java2
28 files changed, 52 insertions, 5 deletions
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ReloadObjectsAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ReloadObjectsAction.java
index 386d7e7..dc057c1 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ReloadObjectsAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ReloadObjectsAction.java
@@ -45,7 +45,7 @@ public class ReloadObjectsAction extends EditingDomainAction
objects.clear();
if (selection != null)
{
- for (Iterator<Object> it = selection.iterator(); it.hasNext();)
+ for (Iterator<?> it = selection.iterator(); it.hasNext();)
{
Object object = it.next();
if (object instanceof InternalCDOObject)
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java
index b04f05f..1f925c0 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/editor/CDOEditor.java
@@ -1950,6 +1950,7 @@ public class CDOEditor extends MultiPageEditorPart implements IEditingDomainProv
}
}
+ @SuppressWarnings("unchecked")
@Override
protected void doRun() throws Exception
{
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java
index a802698..48c0ea9 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java
@@ -59,6 +59,7 @@ public final class CDOStateMachine extends FiniteStateMachine<CDOState, CDOEvent
private CDOEvent lastTracedEvent;
+ @SuppressWarnings("unchecked")
private CDOStateMachine()
{
super(CDOState.class, CDOEvent.class);
@@ -370,7 +371,7 @@ public final class CDOStateMachine extends FiniteStateMachine<CDOState, CDOEvent
* @author Eike Stepper
*/
private final class CommitTransition implements
- ITransition<CDOState, CDOEvent, InternalCDOObject, CommitTransactionResult>
+ ITransition<CDOState, CDOEvent, InternalCDOObject, CommitTransactionResult>
{
public void execute(InternalCDOObject object, CDOState state, CDOEvent event, CommitTransactionResult data)
{
@@ -539,7 +540,7 @@ public final class CDOStateMachine extends FiniteStateMachine<CDOState, CDOEvent
* @author Eike Stepper
*/
private final class LoadResourceTransition implements
- ITransition<CDOState, CDOEvent, InternalCDOObject, ResourceAndView>
+ ITransition<CDOState, CDOEvent, InternalCDOObject, ResourceAndView>
{
public void execute(InternalCDOObject object, CDOState state, CDOEvent event, ResourceAndView data)
{
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/SessionManager.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/SessionManager.java
index ad549e0..9dc74ed 100644
--- a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/SessionManager.java
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/SessionManager.java
@@ -190,6 +190,7 @@ public class SessionManager extends Lifecycle implements ISessionManager, IListe
}
}
+ @SuppressWarnings("unchecked")
public void notifyEvent(IEvent event)
{
if (event.getSource() == session)
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/BuddiesDragListener.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/BuddiesDragListener.java
index 0057bbd..75d1b50 100644
--- a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/BuddiesDragListener.java
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/BuddiesDragListener.java
@@ -39,7 +39,7 @@ public class BuddiesDragListener extends DNDDragListener<IBuddy[]>
protected IBuddy[] getObject(IStructuredSelection selection)
{
Collection<IBuddy> buddies = new ArrayList<IBuddy>();
- for (Iterator<Object> it = selection.iterator(); it.hasNext();)
+ for (Iterator<?> it = selection.iterator(); it.hasNext();)
{
Object element = it.next();
if (element instanceof IBuddy)
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsPane.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsPane.java
index b90e645..3fe9964 100644
--- a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsPane.java
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsPane.java
@@ -167,6 +167,7 @@ public class CollaborationsPane extends Composite implements IListener
}
}
+ @SuppressWarnings("unchecked")
public void notifyEvent(IEvent event)
{
if (session == null)
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/MessageImpl.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/MessageImpl.java
index e930d57..e207505 100644
--- a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/MessageImpl.java
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/MessageImpl.java
@@ -394,6 +394,7 @@ public class MessageImpl implements Message, Comparable<MessageImpl>
return 0;
}
+ @SuppressWarnings("unchecked")
public void populate(Message source) throws JMSException
{
setJMSMessageID(source.getJMSMessageID());
diff --git a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/cache/SensitiveProtoTest.java b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/cache/SensitiveProtoTest.java
index 7169043..183f79d 100644
--- a/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/cache/SensitiveProtoTest.java
+++ b/plugins/org.eclipse.net4j.tests/src/org/eclipse/net4j/util/tests/cache/SensitiveProtoTest.java
@@ -22,6 +22,7 @@ import java.util.concurrent.ConcurrentMap;
*/
public class SensitiveProtoTest extends AbstractOMTest
{
+ @SuppressWarnings("unchecked")
public void testSensitiveCacheWithEvictionPolicy() throws Exception
{
ConcurrentMap<Integer, KeyedAndValuedWeakReference<Integer, String>> map //
diff --git a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/internal/ui/views/Net4jIntrospectorView.java b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/internal/ui/views/Net4jIntrospectorView.java
index 216b150..85b79f0 100644
--- a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/internal/ui/views/Net4jIntrospectorView.java
+++ b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/internal/ui/views/Net4jIntrospectorView.java
@@ -240,6 +240,7 @@ public class Net4jIntrospectorView extends ViewPart implements ISelectionListene
}
}
+ @SuppressWarnings("unchecked")
public void doubleClick(DoubleClickEvent event)
{
ISelection sel = event.getSelection();
@@ -507,6 +508,7 @@ public class Net4jIntrospectorView extends ViewPart implements ISelectionListene
*/
class ObjectLabelProvider extends AbstractLabelProvider
{
+ @SuppressWarnings("unchecked")
public String getColumnText(Object obj, int index)
{
if (obj instanceof Pair)
@@ -551,7 +553,7 @@ public class Net4jIntrospectorView extends ViewPart implements ISelectionListene
if (element instanceof Iterable)
{
List<Object> result = new ArrayList<Object>();
- for (Object object : (Iterable<Object>)element)
+ for (Object object : (Iterable<?>)element)
{
result.add(object);
}
diff --git a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/StructuredContentProvider.java b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/StructuredContentProvider.java
index 0ef3e86..b878039 100644
--- a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/StructuredContentProvider.java
+++ b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/StructuredContentProvider.java
@@ -51,6 +51,7 @@ public abstract class StructuredContentProvider<INPUT> implements IStructuredCon
return viewer;
}
+ @SuppressWarnings("unchecked")
public void inputChanged(Viewer viewer, Object oldInput, Object newInput)
{
this.viewer = (StructuredViewer)viewer;
diff --git a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/dnd/DNDDropAdapter.java b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/dnd/DNDDropAdapter.java
index 54586b1..62bd828 100644
--- a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/dnd/DNDDropAdapter.java
+++ b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/dnd/DNDDropAdapter.java
@@ -67,6 +67,7 @@ public abstract class DNDDropAdapter<TYPE> extends ViewerDropAdapter
return location;
}
+ @SuppressWarnings("unchecked")
@Override
public boolean performDrop(Object data)
{
diff --git a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/dnd/DNDTransfer.java b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/dnd/DNDTransfer.java
index 38b7935..fa2aae1 100644
--- a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/dnd/DNDTransfer.java
+++ b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/dnd/DNDTransfer.java
@@ -48,6 +48,7 @@ public abstract class DNDTransfer<TYPE> extends ByteArrayTransfer
return new String[] { typeName };
}
+ @SuppressWarnings("unchecked")
@Override
protected void javaToNative(Object object, TransferData transferData)
{
diff --git a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/prefs/OMPreferenceStore.java b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/prefs/OMPreferenceStore.java
index 736540e..7024bb2 100644
--- a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/prefs/OMPreferenceStore.java
+++ b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/prefs/OMPreferenceStore.java
@@ -211,36 +211,42 @@ public class OMPreferenceStore implements IPreferenceStore
throw new UnsupportedOperationException();
}
+ @SuppressWarnings("unchecked")
public void setValue(String name, boolean value)
{
OMPreference<Boolean> pref = (OMPreference<Boolean>)getPreference(name);
pref.setValue(value);
}
+ @SuppressWarnings("unchecked")
public void setValue(String name, double value)
{
OMPreference<Double> pref = (OMPreference<Double>)getPreference(name);
pref.setValue(value);
}
+ @SuppressWarnings("unchecked")
public void setValue(String name, float value)
{
OMPreference<Float> pref = (OMPreference<Float>)getPreference(name);
pref.setValue(value);
}
+ @SuppressWarnings("unchecked")
public void setValue(String name, int value)
{
OMPreference<Integer> pref = (OMPreference<Integer>)getPreference(name);
pref.setValue(value);
}
+ @SuppressWarnings("unchecked")
public void setValue(String name, long value)
{
OMPreference<Long> pref = (OMPreference<Long>)getPreference(name);
pref.setValue(value);
}
+ @SuppressWarnings("unchecked")
public void setValue(String name, String value)
{
OMPreference<String> pref = (OMPreference<String>)getPreference(name);
diff --git a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ContainerItemProvider.java b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ContainerItemProvider.java
index c5a201f..ddd3ae9 100644
--- a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ContainerItemProvider.java
+++ b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ContainerItemProvider.java
@@ -194,6 +194,7 @@ public class ContainerItemProvider<CONTAINER extends IContainer<Object>> extends
return new LeafNode(parent, element);
}
+ @SuppressWarnings("unchecked")
protected ContainerNode createContaineNode(Node parent, Object element)
{
return new ContainerNode(parent, (IContainer<Object>)element);
@@ -380,6 +381,7 @@ public class ContainerItemProvider<CONTAINER extends IContainer<Object>> extends
return children;
}
+ @SuppressWarnings("unchecked")
public IContainer<Object> getContainer()
{
return (IContainer<Object>)getElement();
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/collection/HistoryElement.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/collection/HistoryElement.java
index 791aa9f..d1759e4 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/collection/HistoryElement.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/collection/HistoryElement.java
@@ -44,6 +44,7 @@ public class HistoryElement<T> implements IHistoryElement<T>
return data.toString();
}
+ @SuppressWarnings("unchecked")
@Override
public boolean equals(Object obj)
{
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/ContainerEvent.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/ContainerEvent.java
index 5a010b0..af80c3f 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/ContainerEvent.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/ContainerEvent.java
@@ -43,6 +43,7 @@ public class ContainerEvent<E> extends Event implements IContainerEvent<E>
this.deltas = deltas;
}
+ @SuppressWarnings("unchecked")
public IContainer<E> getContainer()
{
return (IContainer<E>)getSource();
@@ -53,6 +54,7 @@ public class ContainerEvent<E> extends Event implements IContainerEvent<E>
return deltas.isEmpty();
}
+ @SuppressWarnings("unchecked")
public IContainerDelta<E>[] getDeltas()
{
return deltas.toArray(new IContainerDelta[deltas.size()]);
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/ContainerEventAdapter.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/ContainerEventAdapter.java
index faf6560..cb2b42e 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/ContainerEventAdapter.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/ContainerEventAdapter.java
@@ -25,6 +25,7 @@ public class ContainerEventAdapter<E> implements IListener
{
}
+ @SuppressWarnings("unchecked")
public final void notifyEvent(IEvent event)
{
if (event instanceof IContainerEvent)
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/LifecycleEventConverter.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/LifecycleEventConverter.java
index 57baa4d..0ae34b5 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/LifecycleEventConverter.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/LifecycleEventConverter.java
@@ -68,6 +68,7 @@ public class LifecycleEventConverter<E> implements IListener
fireContainerEvent(e, IContainerDelta.Kind.REMOVED);
}
+ @SuppressWarnings("unchecked")
protected void fireContainerEvent(ILifecycleEvent e, IContainerDelta.Kind kind)
{
E element = (E)e.getLifecycle();
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/ManagedContainer.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/ManagedContainer.java
index 8a61c05..a83ab17 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/ManagedContainer.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/ManagedContainer.java
@@ -362,6 +362,7 @@ public class ManagedContainer extends Lifecycle implements IManagedContainer
}
}
+ @SuppressWarnings("unchecked")
@Override
public void fireEvent(IEvent event)
{
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/SingleDeltaContainerEvent.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/SingleDeltaContainerEvent.java
index d2035f9..0d8127a 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/SingleDeltaContainerEvent.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/SingleDeltaContainerEvent.java
@@ -29,12 +29,14 @@ public class SingleDeltaContainerEvent<E> extends Event implements IContainerEve
private IContainerDelta<E>[] deltas;
+ @SuppressWarnings("unchecked")
public SingleDeltaContainerEvent(IContainer<E> container, E element, Kind kind)
{
super(container);
deltas = new IContainerDelta[] { new ContainerDelta<E>(element, kind) };
}
+ @SuppressWarnings("unchecked")
public IContainer<E> getContainer()
{
return (IContainer<E>)getSource();
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/delegate/AbstractDelegator.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/delegate/AbstractDelegator.java
index 6d061d3..7be676a 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/delegate/AbstractDelegator.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/delegate/AbstractDelegator.java
@@ -34,11 +34,13 @@ public abstract class AbstractDelegator<E> extends Notifier implements IContaine
fireEvent(new SingleDeltaContainerEvent<E>(this, o, IContainerDelta.Kind.ADDED));
}
+ @SuppressWarnings("unchecked")
protected void fireRemovedEvent(Object o)
{
fireEvent(new SingleDeltaContainerEvent<E>(this, (E)o, IContainerDelta.Kind.REMOVED));
}
+ @SuppressWarnings("unchecked")
protected ContainerEvent<E> createEvent(Collection<? super E> c, Kind kind)
{
ContainerEvent<E> event = new ContainerEvent<E>(this);
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/delegate/ContainerCollection.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/delegate/ContainerCollection.java
index 99deb70d..20559fb 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/delegate/ContainerCollection.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/delegate/ContainerCollection.java
@@ -34,6 +34,7 @@ public class ContainerCollection<E> extends AbstractDelegator<E> implements ICon
return delegate;
}
+ @SuppressWarnings("unchecked")
public E[] getElements()
{
return (E[])toArray();
@@ -101,6 +102,7 @@ public class ContainerCollection<E> extends AbstractDelegator<E> implements ICon
/**
* @category WRITE
*/
+ @SuppressWarnings("unchecked")
public boolean removeAll(Collection<?> c)
{
ContainerEvent<E> event = new ContainerEvent<E>(this);
@@ -119,6 +121,7 @@ public class ContainerCollection<E> extends AbstractDelegator<E> implements ICon
/**
* @category WRITE
*/
+ @SuppressWarnings("unchecked")
public boolean retainAll(Collection<?> c)
{
ContainerEvent<E> event = new ContainerEvent<E>(this);
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/delegate/ContainerMap.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/delegate/ContainerMap.java
index 83afa63..735e4e4 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/delegate/ContainerMap.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/delegate/ContainerMap.java
@@ -140,6 +140,7 @@ public class ContainerMap<K, V> extends AbstractDelegator<Map.Entry<K, V>> imple
/**
* @category READ
*/
+ @SuppressWarnings("unchecked")
public Map.Entry<K, V>[] getElements()
{
return (Entry<K, V>[])getDelegate().entrySet().toArray();
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/pref/Preferences.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/pref/Preferences.java
index 39df096..ab8910c 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/pref/Preferences.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/pref/Preferences.java
@@ -213,41 +213,49 @@ public class Preferences extends Notifier implements OMPreferences
return prefs.get(name);
}
+ @SuppressWarnings("unchecked")
public OMPreference<Boolean> getBoolean(String name)
{
return (OMPreference<Boolean>)get(name);
}
+ @SuppressWarnings("unchecked")
public OMPreference<Integer> getInteger(String name)
{
return (OMPreference<Integer>)get(name);
}
+ @SuppressWarnings("unchecked")
public OMPreference<Long> getLong(String name)
{
return (OMPreference<Long>)get(name);
}
+ @SuppressWarnings("unchecked")
public OMPreference<Float> getFloat(String name)
{
return (OMPreference<Float>)get(name);
}
+ @SuppressWarnings("unchecked")
public OMPreference<Double> getDouble(String name)
{
return (OMPreference<Double>)get(name);
}
+ @SuppressWarnings("unchecked")
public OMPreference<String> getString(String name)
{
return (OMPreference<String>)get(name);
}
+ @SuppressWarnings("unchecked")
public OMPreference<String[]> getArray(String name)
{
return (OMPreference<String[]>)get(name);
}
+ @SuppressWarnings("unchecked")
public OMPreference<byte[]> getBytes(String name)
{
return (OMPreference<byte[]>)get(name);
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/registry/DelegatingRegistry.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/registry/DelegatingRegistry.java
index 20776e4..46b7f91 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/registry/DelegatingRegistry.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/registry/DelegatingRegistry.java
@@ -95,6 +95,7 @@ public abstract class DelegatingRegistry<K, V> extends Registry<K, V>
return old;
}
+ @SuppressWarnings("unchecked")
@Override
protected V deregister(Object key)
{
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/registry/Registry.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/registry/Registry.java
index 32fee6a..9b692dc 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/registry/Registry.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/registry/Registry.java
@@ -135,6 +135,7 @@ public abstract class Registry<K, V> extends Container<Map.Entry<K, V>> implemen
}
}
+ @SuppressWarnings("unchecked")
public Entry<K, V>[] getElements()
{
return entrySet().toArray(new Entry[size()]);
@@ -189,6 +190,7 @@ public abstract class Registry<K, V> extends Container<Map.Entry<K, V>> implemen
return oldValue;
}
+ @SuppressWarnings("unchecked")
protected V deregister(Object key)
{
V value = getMap().remove(key);
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/ObjectUtil.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/ObjectUtil.java
index 26651f5..85fe87c 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/ObjectUtil.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/ObjectUtil.java
@@ -46,6 +46,7 @@ public final class ObjectUtil
return (int)(num >> 32) ^ (int)(num & 0xffffffff);
}
+ @SuppressWarnings("unchecked")
public static <T> T[] appendtoArray(T[] array, T... elements)
{
T[] result = (T[])Array.newInstance(array.getClass().getComponentType(), array.length + elements.length);
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/ref/ReferenceValueMap.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/ref/ReferenceValueMap.java
index 895eea6..ae1c7ef 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/ref/ReferenceValueMap.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/ref/ReferenceValueMap.java
@@ -219,6 +219,7 @@ public abstract class ReferenceValueMap<K, V> extends AbstractMap<K, V> implemen
return new ReferenceQueue<V>();
}
+ @SuppressWarnings("unchecked")
protected void purgeQueue()
{
if (queue != null)
@@ -372,6 +373,7 @@ public abstract class ReferenceValueMap<K, V> extends AbstractMap<K, V> implemen
return a;
}
+ @SuppressWarnings("unchecked")
@Override
public <T> T[] toArray(T[] a)
{