Some unnecessary SuppressWarnings removed.
authorValentin Paramonov <valentine.paramonov@gmail.com>
Mon, 18 Nov 2013 13:15:21 +0000 (15:15 +0200)
committerValentin Paramonov <valentine.paramonov@gmail.com>
Mon, 18 Nov 2013 13:15:21 +0000 (15:15 +0200)
24 files changed:
.gitignore
src/java/nebula/org.netxms.nebula.widgets.gallery/src/org/netxms/nebula/jface/galleryviewer/GalleryTreeViewer.java
src/java/nebula/org.netxms.nebula.widgets.gallery/src/org/netxms/nebula/jface/galleryviewer/GalleryViewerRow.java
src/java/nebula/org.netxms.nebula.widgets.gallery/src/org/netxms/nebula/widgets/gallery/DefaultGalleryItemRenderer.java
src/java/nebula/org.netxms.nebula.widgets.gallery/src/org/netxms/nebula/widgets/gallery/Gallery.java
src/java/nebula/org.netxms.nebula.widgets.gallery/src/org/netxms/nebula/widgets/gallery/ListItemRenderer.java
src/java/netxms-eclipse/ActionManager/src/org/netxms/ui/eclipse/actionmanager/ServerActionAdapterFactory.java
src/java/netxms-eclipse/Dashboard/src/org/netxms/ui/eclipse/dashboard/DashboardElementAdapterFactory.java
src/java/netxms-eclipse/DataCollection/src/org/netxms/ui/eclipse/datacollection/DataCollectionAdapterFactory.java
src/java/netxms-eclipse/DataCollection/src/org/netxms/ui/eclipse/datacollection/propertypages/CustomSchedule.java
src/java/netxms-eclipse/DataCollection/src/org/netxms/ui/eclipse/datacollection/propertypages/SummaryTableColumns.java
src/java/netxms-eclipse/DataCollection/src/org/netxms/ui/eclipse/datacollection/propertypages/TableColumns.java
src/java/netxms-eclipse/DataCollection/src/org/netxms/ui/eclipse/datacollection/propertypages/TableThresholds.java
src/java/netxms-eclipse/DataCollection/src/org/netxms/ui/eclipse/datacollection/propertypages/Thresholds.java
src/java/netxms-eclipse/DataCollection/src/org/netxms/ui/eclipse/datacollection/views/DataCollectionEditor.java
src/java/netxms-eclipse/DataCollection/src/org/netxms/ui/eclipse/datacollection/views/helpers/TableLabelProvider.java
src/java/netxms-eclipse/DataCollection/src/org/netxms/ui/eclipse/datacollection/widgets/internal/ThresholdTreeContentProvider.java
src/java/netxms-eclipse/EPP/src/org/netxms/ui/eclipse/epp/dialogs/ActionSelectionDialog.java
src/java/netxms-eclipse/EPP/src/org/netxms/ui/eclipse/epp/propertypages/RuleEvents.java
src/java/netxms-eclipse/EPP/src/org/netxms/ui/eclipse/epp/propertypages/RuleServerActions.java
src/java/netxms-eclipse/EPP/src/org/netxms/ui/eclipse/epp/propertypages/RuleSituation.java
src/java/netxms-eclipse/core/src/org/netxms/ui/eclipse/console/tools/ExtendedPropertyDialog.java
src/server/netxmsd/netxmsd.cpp
webui/webapp/ObjectBrowser/src/org/netxms/ui/eclipse/objectbrowser/widgets/ObjectTree.java

index 3099e48..86910ab 100644 (file)
@@ -183,6 +183,7 @@ target
 /x64
 
 # Eclipse CDT
+.project
 .cproject
 .metadata
 
index 55acf50..a6fd078 100644 (file)
@@ -238,14 +238,13 @@ public class GalleryTreeViewer extends AbstractTreeViewer {
         * org.eclipse.jface.viewers.AbstractTreeViewer#getSelection(org.eclipse
         * .swt.widgets.Control)
         */
-       @SuppressWarnings({ "rawtypes", "unchecked" })
        protected Item[] getSelection(Control control) {
                Item[] selection = ((Gallery) control).getSelection();
                if (selection == null) {
                        return new GalleryItem[0];
                }
 
-               List notDisposed = new ArrayList(selection.length);
+               List<Object> notDisposed = new ArrayList<Object>(selection.length);
                for (int i = 0; i < selection.length; i++) {
                        if (!selection[i].isDisposed()) {
                                notDisposed.add(selection[i]);
@@ -481,11 +480,10 @@ public class GalleryTreeViewer extends AbstractTreeViewer {
         *            child index
         * @since 3.3
         */
-       @SuppressWarnings({ "rawtypes", "unchecked" })
        public void remove(final Object parentOrTreePath, final int index) {
                // if (isBusy())
                // return;
-               final List oldSelection = new LinkedList(Arrays
+               final List<Object> oldSelection = new LinkedList<Object>(Arrays
                                .asList(((TreeSelection) getSelection()).getPaths()));
                preservingSelection(new Runnable() {
                        public void run() {
@@ -516,7 +514,7 @@ public class GalleryTreeViewer extends AbstractTreeViewer {
                                }
                                if (removedPath != null) {
                                        boolean removed = false;
-                                       for (Iterator it = oldSelection.iterator(); it.hasNext();) {
+                                       for (Iterator<?> it = oldSelection.iterator(); it.hasNext();) {
                                                TreePath path = (TreePath) it.next();
                                                if (path.startsWith(removedPath, getComparer())) {
                                                        it.remove();
index a6facc1..ef5bcdf 100644 (file)
@@ -221,9 +221,8 @@ public class GalleryViewerRow extends ViewerRow {
         * 
         * @see org.eclipse.jface.viewers.ViewerRow#getTreePath()
         */
-       @SuppressWarnings({ "rawtypes", "unchecked" })
        public TreePath getTreePath() {
-               LinkedList path = new LinkedList();
+               LinkedList<Object> path = new LinkedList<Object>();
                path.add(item.getData());
 
                GalleryItem curItem = item;
index ea1f666..ad29df2 100644 (file)
@@ -55,8 +55,7 @@ public class DefaultGalleryItemRenderer extends AbstractGalleryItemRenderer {
        /**
         * Stores colors used in drop shadows
         */
-       @SuppressWarnings("rawtypes")
-       protected ArrayList dropShadowsColors = new ArrayList();
+       protected ArrayList<Object> dropShadowsColors = new ArrayList<Object>();
 
        // Renderer parameters
        boolean dropShadows = false;
@@ -278,7 +277,6 @@ public class DefaultGalleryItemRenderer extends AbstractGalleryItemRenderer {
 
        }
 
-       @SuppressWarnings("unchecked")
        private void createColors() {
                if (dropShadowsSize > 0) {
                        int step = 125 / dropShadowsSize;
@@ -291,11 +289,10 @@ public class DefaultGalleryItemRenderer extends AbstractGalleryItemRenderer {
                }
        }
 
-       @SuppressWarnings("rawtypes")
        private void freeDropShadowsColors() {
                // Free colors :
                {
-                       Iterator i = this.dropShadowsColors.iterator();
+                       Iterator<?> i = this.dropShadowsColors.iterator();
                        while (i.hasNext()) {
                                Color c = (Color) i.next();
                                if (c != null && !c.isDisposed())
index 2298263..51d38f4 100644 (file)
@@ -1258,7 +1258,6 @@ public class Gallery extends Canvas {
                }
        }
 
-       @SuppressWarnings({ "rawtypes", "unchecked" })
        private int[] getVisibleItems(Rectangle clipping) {
 
                if (items == null)
@@ -1270,7 +1269,7 @@ public class Gallery extends Canvas {
                int end = vertical ? (clipping.y + clipping.height + translate)
                                : (clipping.x + clipping.width + translate);
 
-               ArrayList al = new ArrayList();
+               ArrayList<Object> al = new ArrayList<Object>();
                int index = 0;
                GalleryItem item = null;
                while (index < items.length) {
index 41302bc..65a119a 100644 (file)
@@ -53,9 +53,7 @@ import org.eclipse.swt.widgets.Display;
  */
 
 public class ListItemRenderer extends AbstractGalleryItemRenderer {
-
-       @SuppressWarnings("rawtypes")
-       protected ArrayList dropShadowsColors = new ArrayList();
+       protected ArrayList<Object> dropShadowsColors = new ArrayList<Object>();
 
        boolean dropShadows = false;
 
@@ -267,7 +265,6 @@ public class ListItemRenderer extends AbstractGalleryItemRenderer {
 
        }
 
-       @SuppressWarnings("unchecked")
        private void createColors() {
                if (dropShadowsSize > 0) {
                        int step = 125 / dropShadowsSize;
@@ -280,11 +277,10 @@ public class ListItemRenderer extends AbstractGalleryItemRenderer {
                }
        }
 
-       @SuppressWarnings("rawtypes")
        private void freeDropShadowsColors() {
                // Free colors :
                {
-                       Iterator i = this.dropShadowsColors.iterator();
+                       Iterator<?> i = this.dropShadowsColors.iterator();
                        while (i.hasNext()) {
                                Color c = (Color) i.next();
                                if (c != null && !c.isDisposed())
index 6a77031..8e7eee8 100644 (file)
@@ -29,8 +29,7 @@ import org.netxms.client.ServerAction;
  */
 public class ServerActionAdapterFactory implements IAdapterFactory
 {
-       @SuppressWarnings("rawtypes")
-       private static final Class[] supportedClasses = 
+       private static final Class<?>[] supportedClasses = 
        {
                IWorkbenchAdapter.class
        };
@@ -91,9 +90,8 @@ public class ServerActionAdapterFactory implements IAdapterFactory
        /* (non-Javadoc)
         * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
         */
-       @SuppressWarnings("rawtypes")
        @Override
-       public Class[] getAdapterList()
+       public Class<?>[] getAdapterList()
        {
                return supportedClasses;
        }
index fd9a648..f46ff20 100644 (file)
@@ -48,8 +48,7 @@ import org.netxms.ui.eclipse.dashboard.widgets.internal.WebPageConfig;
  */
 public class DashboardElementAdapterFactory implements IAdapterFactory
 {
-       @SuppressWarnings("rawtypes")
-       private static final Class[] supportedClasses = 
+       private static final Class<?>[] supportedClasses = 
        {
                DashboardElementConfig.class
        };
@@ -57,9 +56,8 @@ public class DashboardElementAdapterFactory implements IAdapterFactory
        /* (non-Javadoc)
         * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
         */
-       @SuppressWarnings("rawtypes")
        @Override
-       public Class[] getAdapterList()
+       public Class<?>[] getAdapterList()
        {
                return supportedClasses;
        }
index cea2fce..261d5df 100644 (file)
@@ -29,8 +29,7 @@ import org.netxms.ui.eclipse.datacollection.api.DataCollectionObjectEditor;
  */
 public class DataCollectionAdapterFactory implements IAdapterFactory
 {
-       @SuppressWarnings("rawtypes")
-       private static final Class[] supportedClasses = 
+       private static final Class<?>[] supportedClasses = 
        {
                IWorkbenchAdapter.class, DataCollectionObjectEditor.class
        };
@@ -91,9 +90,8 @@ public class DataCollectionAdapterFactory implements IAdapterFactory
        /* (non-Javadoc)
         * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
         */
-       @SuppressWarnings("rawtypes")
        @Override
-       public Class[] getAdapterList()
+       public Class<?>[] getAdapterList()
        {
                return supportedClasses;
        }
index 52eba76..7c0f0bf 100644 (file)
@@ -229,11 +229,10 @@ public class CustomSchedule extends PropertyPage
        /**
         * Delete selected schedules
         */
-       @SuppressWarnings("unchecked")
        private void deleteSchedules()
        {
                IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
-               Iterator<String> it = selection.iterator();
+               Iterator<?> it = selection.iterator();
                while(it.hasNext())
                {
                        schedules.remove(it.next());
index e3eb001..61a0d15 100644 (file)
@@ -444,13 +444,12 @@ public class SummaryTableColumns extends PropertyPage
        /**
         * Delete selected columns
         */
-       @SuppressWarnings("unchecked")
        private void deleteColumns()
        {
                final IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
                if (!selection.isEmpty())
                {
-                       Iterator<Threshold> it = selection.iterator();
+                       Iterator<?> it = selection.iterator();
                        while(it.hasNext())
                        {
                                columns.remove(it.next());
index edbda1d..1132b02 100644 (file)
@@ -352,13 +352,12 @@ public class TableColumns extends PropertyPage
        /**
         * Delete selected columns
         */
-       @SuppressWarnings("unchecked")
        private void deleteColumns()
        {
                final IStructuredSelection selection = (IStructuredSelection)columnList.getSelection();
                if (!selection.isEmpty())
                {
-                       Iterator<ColumnDefinition> it = selection.iterator();
+                       Iterator<?> it = selection.iterator();
                        while(it.hasNext())
                        {
                                columns.remove(it.next());
index 1a21b9a..dfe3fdf 100644 (file)
@@ -313,13 +313,12 @@ public class TableThresholds extends PropertyPage
        /**
         * Delete selected thresholds
         */
-       @SuppressWarnings("unchecked")
        private void deleteThresholds()
        {
                final IStructuredSelection selection = (IStructuredSelection)thresholdList.getSelection();
                if (!selection.isEmpty())
                {
-                       Iterator<TableThreshold> it = selection.iterator();
+                       Iterator<?> it = selection.iterator();
                        while(it.hasNext())
                        {
                                thresholds.remove(it.next());
index 4072e89..766e644 100644 (file)
@@ -296,13 +296,12 @@ public class Thresholds extends PropertyPage
        /**
         * Delete selected thresholds
         */
-       @SuppressWarnings("unchecked")
        private void deleteThresholds()
        {
                final IStructuredSelection selection = (IStructuredSelection)thresholdList.getSelection();
                if (!selection.isEmpty())
                {
-                       Iterator<Threshold> it = selection.iterator();
+                       Iterator<?> it = selection.iterator();
                        while(it.hasNext())
                        {
                                thresholds.remove(it.next());
index bb99121..d58b90b 100644 (file)
@@ -177,7 +177,6 @@ public class DataCollectionEditor extends ViewPart
                WidgetHelper.restoreTableViewerSettings(viewer, Activator.getDefault().getDialogSettings(), "DataCollectionEditor"); //$NON-NLS-1$
                
                viewer.addSelectionChangedListener(new ISelectionChangedListener() {
-                       @SuppressWarnings("unchecked")
                        @Override
                        public void selectionChanged(SelectionChangedEvent event)
                        {
@@ -191,12 +190,12 @@ public class DataCollectionEditor extends ViewPart
                                        actionConvert.setEnabled(selection.size() > 0);
                                        actionDuplicate.setEnabled(selection.size() > 0);
                                        
-                                       Iterator<DataCollectionObject> it = selection.iterator();
+                                       Iterator<?> it = selection.iterator();
                                        boolean canActivate = false;
                                        boolean canDisable = false;
                                        while(it.hasNext() && (!canActivate || !canDisable))
                                        {
-                                               DataCollectionObject dci = it.next();
+                                               DataCollectionObject dci = (DataCollectionObject) it.next();
                                                if (dci.getStatus() != DataCollectionObject.ACTIVE)
                                                        canActivate = true;
                                                if (dci.getStatus() != DataCollectionObject.DISABLED)
@@ -715,14 +714,13 @@ public class DataCollectionEditor extends ViewPart
        /**
         * Duplicate selected item(s)
         */
-       @SuppressWarnings("unchecked")
        private void duplicateItems()
        {
                IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
-               Iterator<DataCollectionObject> it = selection.iterator();
+               Iterator<?> it = selection.iterator();
                final long[] dciList = new long[selection.size()];
                for(int i = 0; (i < dciList.length) && it.hasNext(); i++)
-                       dciList[i] = it.next().getId();
+                       dciList[i] = ((DataCollectionObject) it.next()).getId();
                
                new ConsoleJob(Messages.get().DataCollectionEditor_DupJob_Title + object.getObjectName(), this, Activator.PLUGIN_ID, null) {
                        @Override
@@ -751,7 +749,6 @@ public class DataCollectionEditor extends ViewPart
        /**
         * Copy items to another node
         */
-       @SuppressWarnings("unchecked")
        private void copyItems(final boolean doMove)
        {
                final ObjectSelectionDialog dlg = new ObjectSelectionDialog(getSite().getShell(), null, ObjectSelectionDialog.createNodeAndTemplateSelectionFilter(true));
@@ -759,10 +756,10 @@ public class DataCollectionEditor extends ViewPart
                        return;
 
                IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
-               Iterator<DataCollectionObject> it = selection.iterator();
+               Iterator<?> it = selection.iterator();
                final long[] dciList = new long[selection.size()];
                for(int i = 0; (i < dciList.length) && it.hasNext(); i++)
-                       dciList[i] = it.next().getId();
+                       dciList[i] = ((DataCollectionObject) it.next()).getId();
                
                new ConsoleJob(Messages.get().DataCollectionEditor_CopyJob_Title + object.getObjectName(), this, Activator.PLUGIN_ID, null) {
                        @Override
@@ -801,7 +798,6 @@ public class DataCollectionEditor extends ViewPart
        /**
         * Convert selected item(s) to template items
         */
-       @SuppressWarnings("unchecked")
        private void convertToTemplate()
        {
                final ObjectSelectionDialog dlg = new ObjectSelectionDialog(getSite().getShell(), null, ObjectSelectionDialog.createTemplateSelectionFilter());
@@ -814,10 +810,10 @@ public class DataCollectionEditor extends ViewPart
                final Template template = (Template)objects[0];
                
                IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
-               Iterator<DataCollectionObject> it = selection.iterator();
+               Iterator<?> it = selection.iterator();
                final long[] dciList = new long[selection.size()];
                for(int i = 0; (i < dciList.length) && it.hasNext(); i++)
-                       dciList[i] = it.next().getId();
+                       dciList[i] = ((DataCollectionObject) it.next()).getId();
                
                new ConsoleJob(Messages.get().DataCollectionEditor_ConvertJob_TitlePrefix + object.getObjectName() + Messages.get().DataCollectionEditor_ConvertJob_TitleSuffix, this, Activator.PLUGIN_ID, null) {
                        @Override
index fcb2562..9cd20c1 100644 (file)
@@ -45,7 +45,7 @@ public class TableLabelProvider extends LabelProvider implements ITableLabelProv
        @Override
        public String getColumnText(Object element, int columnIndex)
        {
-               List<String> row = (List<String>)element;
+          List<String> row = (List<String>) element;
                
                if (columnIndex >= row.size())
                        return null;
index ab33ac7..9f9bfe5 100644 (file)
@@ -44,11 +44,11 @@ public class ThresholdTreeContentProvider implements ITreeContentProvider
        /* (non-Javadoc)
         * @see org.eclipse.jface.viewers.ITreeContentProvider#getElements(java.lang.Object)
         */
-       @SuppressWarnings("rawtypes")
+       @SuppressWarnings("unchecked")
        @Override
        public Object[] getElements(Object inputElement)
        {
-               return ((List)inputElement).toArray();
+               return ((List<Object>)inputElement).toArray();
        }
 
        /* (non-Javadoc)
index 5dcf9bf..d350480 100644 (file)
@@ -166,7 +166,7 @@ public class ActionSelectionDialog extends Dialog
        /* (non-Javadoc)
         * @see org.eclipse.jface.dialogs.Dialog#okPressed()
         */
-       @SuppressWarnings("unchecked")
+       SuppressWarnings("unchecked")
        @Override
        protected void okPressed()
        {
index 0e59e55..0009eb2 100644 (file)
@@ -185,16 +185,15 @@ public class RuleEvents extends PropertyPage
        /**
         * Delete event from list
         */
-       @SuppressWarnings("unchecked")
        private void deleteEvent()
        {
                IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
-               Iterator<EventTemplate> it = selection.iterator();
+               Iterator<?> it = selection.iterator();
                if (it.hasNext())
                {
                        while(it.hasNext())
                        {
-                               EventTemplate e = it.next();
+                               EventTemplate e = (EventTemplate) it.next();
                                events.remove(e.getCode());
                        }
              viewer.setInput(events.values().toArray());
index 7ea3524..a69cc83 100644 (file)
@@ -175,16 +175,15 @@ public class RuleServerActions extends PropertyPage
        /**
         * Delete event from list
         */
-       @SuppressWarnings("unchecked")
        private void deleteAction()
        {
                IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
-               Iterator<ServerAction> it = selection.iterator();
+               Iterator<?> it = selection.iterator();
                if (it.hasNext())
                {
                        while(it.hasNext())
                        {
-                               ServerAction a = it.next();
+                               ServerAction a = (ServerAction) it.next();
                                actions.remove(a.getId());
                        }
              viewer.setInput(actions.values().toArray());
index d416146..9a5efa6 100644 (file)
@@ -221,13 +221,13 @@ public class RuleSituation extends PropertyPage
        /**
         * Edit selected attribute
         */
-       @SuppressWarnings("unchecked")
        private void editAttribute()
        {
                IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
                if (selection.size() != 1)
                        return;
                
+               @SuppressWarnings("unchecked")
                Entry<String, String> attr = (Entry<String, String>)selection.getFirstElement();
                AttributeEditDialog dlg = new AttributeEditDialog(getShell(), attr.getKey(), attr.getValue());
                if (dlg.open() == Window.OK)
@@ -240,16 +240,16 @@ public class RuleSituation extends PropertyPage
        /**
         * Delete attribute(s) from list
         */
-       @SuppressWarnings("unchecked")
        private void deleteAttribute()
        {
                IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
-               Iterator<Entry<String, String>> it = selection.iterator();
+               Iterator<?> it = selection.iterator();
                if (it.hasNext())
                {
                        while(it.hasNext())
                        {
-                               Entry<String, String> e = it.next();
+                          @SuppressWarnings("unchecked")
+                               Entry<String, String> e = (Entry<String, String>) it.next();
                                attributes.remove(e.getKey());
                        }
              viewer.setInput(attributes.entrySet().toArray());
index 2a503d0..fa2768a 100644 (file)
@@ -55,11 +55,10 @@ public class ExtendedPropertyDialog extends PropertyDialog
        /**
         * Create controls for all pages
         */
-       @SuppressWarnings("rawtypes")
        public void createAllPages()
        {
-               List nodes = getPreferenceManager().getElements(PreferenceManager.POST_ORDER);
-               Iterator i = nodes.iterator();
+               List<?> nodes = getPreferenceManager().getElements(PreferenceManager.POST_ORDER);
+               Iterator<?> i = nodes.iterator();
                while(i.hasNext()) 
                {
                        IPreferenceNode node = (IPreferenceNode)i.next();
@@ -79,7 +78,6 @@ public class ExtendedPropertyDialog extends PropertyDialog
         * @param name
         * @return
         */
-       @SuppressWarnings("rawtypes")
        public static ExtendedPropertyDialog createDialogOn(Shell shell, final String propertyPageId, Object element, String name)
        {
                if (element == null)
@@ -92,7 +90,7 @@ public class ExtendedPropertyDialog extends PropertyDialog
                // fill the manager with contributions from the matching contributors
                PropertyPageContributorManager.getManager().contribute(pageManager, element);
                // testing if there are pages in the manager
-               Iterator pages = pageManager.getElements(PreferenceManager.PRE_ORDER).iterator();
+               Iterator<?> pages = pageManager.getElements(PreferenceManager.PRE_ORDER).iterator();
                if (!pages.hasNext())
                {
                        MessageDialogHelper.openInformation(shell, WorkbenchMessages.PropertyDialog_messageTitle,
index 2fbda05..f970845 100644 (file)
@@ -310,9 +310,9 @@ void ExtractConfigFileFromCommandLine(int argc, char* argv[])
 {
    for(int i = 1; i < argc; i++)
    {
-      if (strcmp(argv[i], "-c") == 0)
+      if (!strcmp(argv[i], "-c"))
       {
-         if (i < argc - 1)
+         if (i < (argc - 1))
          {
 #ifdef UNICODE
             MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, argv[i + 1], -1, g_szConfigFile, MAX_PATH - 1);
index e8900e5..aa88729 100644 (file)
@@ -448,12 +448,11 @@ public class ObjectTree extends Composite
         * 
         * @return ID of selected object or 0 if no objects selected
         */
-       @SuppressWarnings("rawtypes")
        public Long[] getSelectedObjects()
        {
                IStructuredSelection selection = (IStructuredSelection)objectTree.getSelection();
                Set<Long> objects = new HashSet<Long>(selection.size());
-               Iterator it = selection.iterator();
+      Iterator<?> it = selection.iterator();
                while(it.hasNext())
                {
                        objects.add(((AbstractObject)it.next()).getObjectId());
@@ -699,15 +698,14 @@ public class ObjectTree extends Composite
             return true;
          }
 
-         @SuppressWarnings("rawtypes")
-         @Override
+                       @Override
          public boolean validateDrop(Object target, int operation, TransferData transferType)
          {
             if (!LocalSelectionTransfer.getTransfer().isSupportedType(transferType))
                return false;
 
             IStructuredSelection selection = (IStructuredSelection)LocalSelectionTransfer.getTransfer().getSelection();
-            Iterator it = selection.iterator();
+            Iterator<?> it = selection.iterator();
             Object object = it.next();
             SubtreeType subtree = null;
             if ((object instanceof AbstractObject)) {