Ignore:
Timestamp:
2016-12-13T02:16:07+01:00 (7 years ago)
Author:
Don-vip
Message:

sonar - squid:S1066 - Collapsible "if" statements should be merged

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagCellRenderer.java

    r11374 r11386  
    101101
    102102        switch(vColIndex) {
    103         case 0: renderTagName((TagModel) value); break;
    104         case 1: renderTagValue((TagModel) value); break;
    105 
    106         default: throw new JosmRuntimeException("unexpected index in switch statement");
     103            case 0: renderTagName((TagModel) value); break;
     104            case 1: renderTagValue((TagModel) value); break;
     105            default: throw new JosmRuntimeException("unexpected index in switch statement");
    107106        }
    108         if (hasFocus && isSelected) {
    109             if (table.getSelectedColumnCount() == 1 && table.getSelectedRowCount() == 1) {
    110                 if (table.getEditorComponent() != null) {
    111                     table.getEditorComponent().requestFocusInWindow();
    112                 }
    113             }
     107        if (hasFocus && isSelected && table.getSelectedColumnCount() == 1 && table.getSelectedRowCount() == 1
     108                && table.getEditorComponent() != null) {
     109            table.getEditorComponent().requestFocusInWindow();
    114110        }
    115111        return this;
Note: See TracChangeset for help on using the changeset viewer.