Index: trunk/src/org/openstreetmap/josm/gui/widgets/OsmPrimitiveTypesComboBox.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/OsmPrimitiveTypesComboBox.java	(revision 5452)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/OsmPrimitiveTypesComboBox.java	(revision 5453)
@@ -5,18 +5,25 @@
 
 /**
+ * A Combo box containing OSM primitive types (Node, Way, Relation).
  * @author Matthias Julius
+ * @see OsmPrimitiveType#dataValues
+ * @since 2923
  */
 public class OsmPrimitiveTypesComboBox extends JosmComboBox {
 
+    /**
+     * Constructs a new {@code OsmPrimitiveTypesComboBox}.
+     */
     public OsmPrimitiveTypesComboBox() {
-        super(OsmPrimitiveType.dataValues());
+        super(OsmPrimitiveType.dataValues().toArray());
     }
 
+    /**
+     * Replies the currently selected {@code OsmPrimitiveType}.
+     * @return the currently selected {@code OsmPrimitiveType}.
+     */
     public OsmPrimitiveType getType() {
-        try {
-            return (OsmPrimitiveType)this.getSelectedItem();
-        } catch (Exception e) {
-            return null;
-        }
+        Object selectedItem = this.getSelectedItem();
+        return selectedItem instanceof OsmPrimitiveType ? (OsmPrimitiveType) selectedItem : null;
     }
 }
