Browse Source

Fix suspicious get call + javadoc.

pull/348/head
Greg Holmes 9 years ago
parent
commit
3221cb36a6

+ 1
- 1
ui_swing/src/com/dmdirc/addons/ui_swing/dialogs/prefs/URLConfigPanel.java View File

@@ -234,7 +234,7 @@ public class URLConfigPanel extends JPanel implements
234 234
         if (e == null || !e.getValueIsAdjusting()) {
235 235
             setVisible(false);
236 236
             if (selectedRow != -1 && selectedRow < model.getRowCount()) {
237
-                final URLProtocolPanel panel = details.get(model.getValueAt(selectedRow, 0));
237
+                final URLProtocolPanel panel = details.get(model.getValue(selectedRow).getUri());
238 238
                 model.getValue(selectedRow).setHandler(panel.getSelection());
239 239
             }
240 240
             if (table.getSelectedRow() == -1) {

+ 4
- 1
ui_swing/src/com/dmdirc/addons/ui_swing/dialogs/prefs/URLHandlerHolder.java View File

@@ -22,10 +22,13 @@
22 22
 
23 23
 package com.dmdirc.addons.ui_swing.dialogs.prefs;
24 24
 
25
+import com.dmdirc.ui.core.util.URLHandler;
26
+
25 27
 import java.net.URI;
26 28
 
27 29
 /**
28
- *
30
+ * Wrapper to hold the constituents of a {@link URLHandler} used to render an editable version in
31
+ * the UI.
29 32
  */
30 33
 public class URLHandlerHolder {
31 34
 

Loading…
Cancel
Save