summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2012-08-30 02:29:21 +0200
committerJose <jose@zeroc.com>2012-08-30 02:29:21 +0200
commit59f7dc2cff82f159ee8c8ab85267f0e224f3b9f7 (patch)
tree5d287d48584c61694889958da4c5d8318eb6fa54
parentMinor fixes (diff)
downloadice-59f7dc2cff82f159ee8c8ab85267f0e224f3b9f7.tar.bz2
ice-59f7dc2cff82f159ee8c8ab85267f0e224f3b9f7.tar.xz
ice-59f7dc2cff82f159ee8c8ab85267f0e224f3b9f7.zip
FIX Java 7 warnings
-rw-r--r--java/src/IceGridGUI/Application/AdapterEditor.java8
-rw-r--r--java/src/IceGridGUI/Application/ApplicationEditor.java4
-rw-r--r--java/src/IceGridGUI/Application/DbEnvEditor.java2
-rw-r--r--java/src/IceGridGUI/Application/ListTreeNode.java6
-rw-r--r--java/src/IceGridGUI/Application/ParameterValuesField.java4
-rw-r--r--java/src/IceGridGUI/Application/ParametersField.java2
-rw-r--r--java/src/IceGridGUI/Application/ReplicaGroupEditor.java4
-rw-r--r--java/src/IceGridGUI/Application/ServerInstance.java4
-rw-r--r--java/src/IceGridGUI/Application/ServerInstanceEditor.java2
-rw-r--r--java/src/IceGridGUI/Application/ServerInstancePropertySetEditor.java4
-rw-r--r--java/src/IceGridGUI/Application/ServerSubEditor.java6
-rw-r--r--java/src/IceGridGUI/Application/ServiceInstanceEditor.java2
-rw-r--r--java/src/IceGridGUI/LiveDeployment/ObjectDialog.java2
-rw-r--r--java/src/IceGridGUI/SessionKeeper.java6
14 files changed, 28 insertions, 28 deletions
diff --git a/java/src/IceGridGUI/Application/AdapterEditor.java b/java/src/IceGridGUI/Application/AdapterEditor.java
index 09fe22952b9..57af6662444 100644
--- a/java/src/IceGridGUI/Application/AdapterEditor.java
+++ b/java/src/IceGridGUI/Application/AdapterEditor.java
@@ -343,7 +343,7 @@ class AdapterEditor extends CommunicatorChildEditor
private void refreshId()
{
Object id = _id.getSelectedItem();
- _id.setModel(new DefaultComboBoxModel(new Object[]{DEFAULT_ADAPTER_ID}));
+ _id.setModel(new DefaultComboBoxModel<Object>(new Object[]{DEFAULT_ADAPTER_ID}));
_id.setSelectedItem(id);
}
@@ -603,14 +603,14 @@ class AdapterEditor extends CommunicatorChildEditor
private JTextField _name = new JTextField(20);
private JTextArea _description = new JTextArea(3, 20);
- private JComboBox _id = new JComboBox(new Object[] {DEFAULT_ADAPTER_ID});
- private JComboBox _replicaGroupId = new JComboBox();
+ private JComboBox<Object> _id = new JComboBox<Object>(new Object[] {DEFAULT_ADAPTER_ID});
+ private JComboBox<Object> _replicaGroupId = new JComboBox<Object>();
private JButton _replicaGroupButton;
private JTextField _priority = new JTextField(20);
private JTextField _endpoints = new JTextField(20);
- private JComboBox _publishedEndpoints = new JComboBox(new Object[]{PUBLISH_ACTUAL});
+ private JComboBox<Object> _publishedEndpoints = new JComboBox<Object>(new Object[]{PUBLISH_ACTUAL});
private JTextField _currentStatus = new JTextField(20);
private JTextField _currentEndpoints = new JTextField(20);
diff --git a/java/src/IceGridGUI/Application/ApplicationEditor.java b/java/src/IceGridGUI/Application/ApplicationEditor.java
index 5cfcd174be4..4b97f7f6569 100644
--- a/java/src/IceGridGUI/Application/ApplicationEditor.java
+++ b/java/src/IceGridGUI/Application/ApplicationEditor.java
@@ -100,7 +100,7 @@ class ApplicationEditor extends Editor
//
// Distrib
//
- _distrib = new JComboBox(new Object[]{NO_DISTRIB, DEFAULT_DISTRIB});
+ _distrib = new JComboBox<Object>(new Object[]{NO_DISTRIB, DEFAULT_DISTRIB});
_distrib.setEditable(true);
_distrib.setToolTipText("The proxy to the IcePatch2 server holding your files");
@@ -253,6 +253,6 @@ class ApplicationEditor extends Editor
private JTextField _name = new JTextField(20);
private JTextArea _description = new JTextArea(3, 20);
private SimpleMapField _variables;
- private JComboBox _distrib;
+ private JComboBox<Object> _distrib;
private ListTextField _distribDirs = new ListTextField(20);
}
diff --git a/java/src/IceGridGUI/Application/DbEnvEditor.java b/java/src/IceGridGUI/Application/DbEnvEditor.java
index 9ba2eacf4a4..cf864506b3d 100644
--- a/java/src/IceGridGUI/Application/DbEnvEditor.java
+++ b/java/src/IceGridGUI/Application/DbEnvEditor.java
@@ -183,7 +183,7 @@ class DbEnvEditor extends CommunicatorChildEditor
private JTextField _name = new JTextField(20);
private JTextArea _description = new JTextArea(3, 20);
- private JComboBox _dbHome = new JComboBox(new Object[]{NO_DB_HOME});
+ private JComboBox<Object> _dbHome = new JComboBox<Object>(new Object[]{NO_DB_HOME});
private PropertiesField _properties;
static private final Object NO_DB_HOME = new Object()
diff --git a/java/src/IceGridGUI/Application/ListTreeNode.java b/java/src/IceGridGUI/Application/ListTreeNode.java
index 21a0970b390..7a1ca1251c8 100644
--- a/java/src/IceGridGUI/Application/ListTreeNode.java
+++ b/java/src/IceGridGUI/Application/ListTreeNode.java
@@ -154,12 +154,12 @@ abstract class ListTreeNode extends TreeNode
return _editable;
}
- javax.swing.ComboBoxModel createComboBoxModel()
+ javax.swing.ComboBoxModel<Object> createComboBoxModel()
{
return new ComboBoxModel();
}
- javax.swing.ComboBoxModel createComboBoxModel(Object item)
+ javax.swing.ComboBoxModel<Object> createComboBoxModel(Object item)
{
return new ComboBoxModel(item);
}
@@ -167,7 +167,7 @@ abstract class ListTreeNode extends TreeNode
//
// Adapts ListTreeNode to a ComboBoxModel
//
- class ComboBoxModel extends javax.swing.AbstractListModel implements javax.swing.ComboBoxModel
+ class ComboBoxModel extends javax.swing.AbstractListModel<Object> implements javax.swing.ComboBoxModel<Object>
{
public Object getElementAt(int index)
{
diff --git a/java/src/IceGridGUI/Application/ParameterValuesField.java b/java/src/IceGridGUI/Application/ParameterValuesField.java
index 4cf54ac9051..81485a52b0e 100644
--- a/java/src/IceGridGUI/Application/ParameterValuesField.java
+++ b/java/src/IceGridGUI/Application/ParameterValuesField.java
@@ -162,9 +162,9 @@ public class ParameterValuesField extends JTable
private static final String _notSet = "Not set";
- private JComboBox _useDefaultCombo = new JComboBox(new Object[]{_useDefault});
+ private JComboBox<String> _useDefaultCombo = new JComboBox<String>(new String[]{_useDefault});
- private JComboBox _notSetCombo = new JComboBox(new Object[]{_notSet});
+ private JComboBox<String> _notSetCombo = new JComboBox<String>(new String[]{_notSet});
private TableCellEditor _useDefaultEditor = new DefaultCellEditor(_useDefaultCombo);
private TableCellEditor _notSetEditor = new DefaultCellEditor(_notSetCombo);
diff --git a/java/src/IceGridGUI/Application/ParametersField.java b/java/src/IceGridGUI/Application/ParametersField.java
index 8c32de3c763..f122a3582b1 100644
--- a/java/src/IceGridGUI/Application/ParametersField.java
+++ b/java/src/IceGridGUI/Application/ParametersField.java
@@ -42,7 +42,7 @@ public class ParametersField extends JTable
_columnNames.add("Name");
_columnNames.add("Default value");
- JComboBox comboBox = new JComboBox(new Object[]{_noDefault});
+ JComboBox<String> comboBox = new JComboBox<String>(new String[]{_noDefault});
comboBox.setEditable(true);
_cellEditor = new DefaultCellEditor(comboBox);
diff --git a/java/src/IceGridGUI/Application/ReplicaGroupEditor.java b/java/src/IceGridGUI/Application/ReplicaGroupEditor.java
index 1cec0f6f2e6..b5a4ecee570 100644
--- a/java/src/IceGridGUI/Application/ReplicaGroupEditor.java
+++ b/java/src/IceGridGUI/Application/ReplicaGroupEditor.java
@@ -448,12 +448,12 @@ class ReplicaGroupEditor extends Editor
private JTextField _id = new JTextField(20);
private JTextArea _description = new JTextArea(3, 20);
- private JComboBox _loadBalancing = new JComboBox(new Object[] {ADAPTIVE, ORDERED, RANDOM, ROUND_ROBIN});
+ private JComboBox<String> _loadBalancing = new JComboBox<String>(new String[] {ADAPTIVE, ORDERED, RANDOM, ROUND_ROBIN});
private JTextField _nReplicas = new JTextField(20);
private JLabel _loadSampleLabel;
- private JComboBox _loadSample = new JComboBox(new Object[] {"1", "5", "15"});
+ private JComboBox<String> _loadSample = new JComboBox<String>(new String[] {"1", "5", "15"});
private SimpleMapField _objects;
private java.util.LinkedList<ObjectDescriptor> _objectList;
diff --git a/java/src/IceGridGUI/Application/ServerInstance.java b/java/src/IceGridGUI/Application/ServerInstance.java
index 16ac89f58dc..5dc56a6df96 100644
--- a/java/src/IceGridGUI/Application/ServerInstance.java
+++ b/java/src/IceGridGUI/Application/ServerInstance.java
@@ -437,7 +437,7 @@ class ServerInstance extends ListTreeNode implements Server, PropertySetParent
return _editable;
}
- Object[] getServiceNames()
+ String[] getServiceNames()
{
assert _isIceBox;
@@ -447,7 +447,7 @@ class ServerInstance extends ListTreeNode implements Server, PropertySetParent
Communicator.ChildList services = getRoot().findServerTemplate(_descriptor.template).getServices();
- Object[] result = new Object[services.size()];
+ String[] result = new String[services.size()];
int i = 0;
java.util.Iterator p = services.iterator();
diff --git a/java/src/IceGridGUI/Application/ServerInstanceEditor.java b/java/src/IceGridGUI/Application/ServerInstanceEditor.java
index 5e686d4c123..bdd27c7d21c 100644
--- a/java/src/IceGridGUI/Application/ServerInstanceEditor.java
+++ b/java/src/IceGridGUI/Application/ServerInstanceEditor.java
@@ -215,7 +215,7 @@ class ServerInstanceEditor extends AbstractServerEditor
}
}
- private JComboBox _template = new JComboBox();
+ private JComboBox<Object> _template = new JComboBox<Object>();
private JButton _templateButton;
private ParameterValuesField _parameters;
diff --git a/java/src/IceGridGUI/Application/ServerInstancePropertySetEditor.java b/java/src/IceGridGUI/Application/ServerInstancePropertySetEditor.java
index f4367175789..2c21e8c15fb 100644
--- a/java/src/IceGridGUI/Application/ServerInstancePropertySetEditor.java
+++ b/java/src/IceGridGUI/Application/ServerInstancePropertySetEditor.java
@@ -57,11 +57,11 @@ class ServerInstancePropertySetEditor extends PropertySetEditor
_id.setEnabled(true);
_id.setEditable(true);
- _id.setModel(new DefaultComboBoxModel(s.getServiceNames()));
+ _id.setModel(new DefaultComboBoxModel<String>(s.getServiceNames()));
_id.setSelectedItem(Utils.substitute(unsubstitutedId, resolver));
_id.setEditable(resolver == null);
_id.setEnabled(resolver == null);
}
- private JComboBox _id = new JComboBox();
+ private JComboBox<String> _id = new JComboBox<String>();
}
diff --git a/java/src/IceGridGUI/Application/ServerSubEditor.java b/java/src/IceGridGUI/Application/ServerSubEditor.java
index 040c5e6cb25..7984c76324c 100644
--- a/java/src/IceGridGUI/Application/ServerSubEditor.java
+++ b/java/src/IceGridGUI/Application/ServerSubEditor.java
@@ -65,7 +65,7 @@ class ServerSubEditor extends CommunicatorSubEditor
_envs = new SimpleMapField(mainEditor, true, "Name", "Value");
- _activation = new JComboBox(new Object[]{ALWAYS, MANUAL, ON_DEMAND, SESSION});
+ _activation = new JComboBox<String>(new String[]{ALWAYS, MANUAL, ON_DEMAND, SESSION});
_activation.setToolTipText("<html>always: IceGrid starts and keeps the server up all the time<br>"
+ "manual: you start the server yourself<br>"
+ "on-demand: IceGrid starts the server when a client needs it<br>"
@@ -109,7 +109,7 @@ class ServerSubEditor extends CommunicatorSubEditor
_applicationDistrib = new JCheckBox(appDistrib);
- _distrib = new JComboBox(new Object[]{NO_DISTRIB, DEFAULT_DISTRIB});
+ _distrib = new JComboBox<Object>(new Object[]{NO_DISTRIB, DEFAULT_DISTRIB});
_distrib.setToolTipText("The proxy to the IcePatch2 server holding your files");
JTextField distribTextField = (JTextField)_distrib.getEditor().getEditorComponent();
@@ -370,7 +370,7 @@ class ServerSubEditor extends CommunicatorSubEditor
private JTextField _user = new JTextField(20);
private SimpleMapField _envs;
- private JComboBox _activation;
+ private JComboBox<String> _activation;
private JTextField _activationTimeout = new JTextField(20);
private JTextField _deactivationTimeout = new JTextField(20);
private JCheckBox _allocatable;
diff --git a/java/src/IceGridGUI/Application/ServiceInstanceEditor.java b/java/src/IceGridGUI/Application/ServiceInstanceEditor.java
index ae6065aad4a..a16419ab25a 100644
--- a/java/src/IceGridGUI/Application/ServiceInstanceEditor.java
+++ b/java/src/IceGridGUI/Application/ServiceInstanceEditor.java
@@ -224,7 +224,7 @@ class ServiceInstanceEditor extends CommunicatorChildEditor
}
}
- private JComboBox _template = new JComboBox();
+ private JComboBox<Object> _template = new JComboBox<Object>();
private JButton _templateButton;
private ParameterValuesField _parameters;
private ListTextField _propertySets = new ListTextField(20);
diff --git a/java/src/IceGridGUI/LiveDeployment/ObjectDialog.java b/java/src/IceGridGUI/LiveDeployment/ObjectDialog.java
index 96a5c74d73a..1232a2afca9 100644
--- a/java/src/IceGridGUI/LiveDeployment/ObjectDialog.java
+++ b/java/src/IceGridGUI/LiveDeployment/ObjectDialog.java
@@ -163,7 +163,7 @@ class ObjectDialog extends JDialog
private JTextArea _proxy = new JTextArea(3, 40);
private JTextField _type = new JTextField(40);
- private JComboBox _typeCombo = new JComboBox(new Object[]{QUERY_OBJECT});
+ private JComboBox<Object> _typeCombo = new JComboBox<Object>(new Object[]{QUERY_OBJECT});
private JFrame _mainFrame;
static private final Object QUERY_OBJECT = new Object()
diff --git a/java/src/IceGridGUI/SessionKeeper.java b/java/src/IceGridGUI/SessionKeeper.java
index 8164a3ef170..c8ba79984d6 100644
--- a/java/src/IceGridGUI/SessionKeeper.java
+++ b/java/src/IceGridGUI/SessionKeeper.java
@@ -1057,7 +1057,7 @@ class SessionKeeper
catch(java.io.IOException e)
{}
}
- _alias.setModel(new DefaultComboBoxModel(aliasVector));
+ _alias.setModel(new DefaultComboBoxModel<String>(aliasVector));
if(selectedAlias != null)
{
_alias.setSelectedItem(selectedAlias);
@@ -1071,7 +1071,7 @@ class SessionKeeper
private void clearAlias()
{
- _alias.setModel(new DefaultComboBoxModel());
+ _alias.setModel(new DefaultComboBoxModel<String>());
}
private void selectRegistryUseSSL(boolean selected)
@@ -1174,7 +1174,7 @@ class SessionKeeper
private JPasswordField _advancedKeyPassword = new JPasswordField(_keyPassword.getDocument(), null, 30);
private JPasswordField _keystorePassword = new JPasswordField(30);
- private JComboBox _alias = new JComboBox();
+ private JComboBox<String> _alias = new JComboBox<String>();
private JTextField _truststore = new JTextField(30);
private JPasswordField _truststorePassword = new JPasswordField(30);