Ignore:
Timestamp:
2019-03-18T09:47:08+01:00 (5 years ago)
Author:
GerdP
Message:

fix checkstyle issues (indention, empty lines)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanel.java

    r14892 r14899  
    153153        buildTree(true);
    154154    }
     155
    155156    /**
    156157     * Builds the errors tree
     
    171172        int selRow = selPath == null ? -1 : getRowForPath(selPath);
    172173
    173             // Remember the currently expanded rows
    174             Set<Object> oldExpandedRows = new HashSet<>();
    175             if (expandAgain) {
    176                 Enumeration<TreePath> expanded = getExpandedDescendants(new TreePath(getRoot()));
    177                 if (expanded != null) {
    178                     while (expanded.hasMoreElements()) {
    179                         TreePath path = expanded.nextElement();
    180                         DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent();
    181                         Object userObject = node.getUserObject();
    182                         if (userObject instanceof Severity) {
    183                             oldExpandedRows.add(userObject);
    184                         } else if (userObject instanceof String) {
    185                             String msg = (String) userObject;
    186                             int index = msg.lastIndexOf(" (");
    187                             if (index > 0) {
    188                                 msg = msg.substring(0, index);
    189                             }
    190                             oldExpandedRows.add(msg);
     174        // Remember the currently expanded rows
     175        Set<Object> oldExpandedRows = new HashSet<>();
     176        if (expandAgain) {
     177            Enumeration<TreePath> expanded = getExpandedDescendants(new TreePath(getRoot()));
     178            if (expanded != null) {
     179                while (expanded.hasMoreElements()) {
     180                    TreePath path = expanded.nextElement();
     181                    DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent();
     182                    Object userObject = node.getUserObject();
     183                    if (userObject instanceof Severity) {
     184                        oldExpandedRows.add(userObject);
     185                    } else if (userObject instanceof String) {
     186                        String msg = (String) userObject;
     187                        int index = msg.lastIndexOf(" (");
     188                        if (index > 0) {
     189                            msg = msg.substring(0, index);
    191190                        }
     191                        oldExpandedRows.add(msg);
    192192                    }
    193193                }
    194194            }
     195        }
    195196
    196197        Predicate<TestError> filterToUse = e -> !e.isIgnored();
Note: See TracChangeset for help on using the changeset viewer.