Ignore:
Timestamp:
2015-06-21T02:25:56+02:00 (10 years ago)
Author:
Don-vip
Message:

checkstyle: blocks

Location:
trunk/src/org/openstreetmap/josm/tools
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/Diff.java

    r8512 r8513  
    267267                            int k;
    268268
    269                             for (k = 1; xvec[x - k] == yvec[y - k]; k++)
     269                            for (k = 1; xvec[x - k] == yvec[y - k]; k++) {
    270270                                if (k == SNAKE_LIMIT) {
    271271                                    best = v;
     
    273273                                    break;
    274274                                }
     275                            }
    275276                        }
    276277                    }
     
    295296                            int k;
    296297
    297                             for (k = 0; xvec[x + k] == yvec[y + k]; k++)
     298                            for (k = 0; xvec[x + k] == yvec[y + k]; k++) {
    298299                                if (k == SNAKE_LIMIT) {
    299300                                    best = v;
     
    301302                                    break;
    302303                                }
     304                            }
    303305                        }
    304306                    }
     
    723725                        /* Cancel any subrun of MINIMUM or more provisionals
    724726                           within the larger run.  */
    725                         for (j = 0, consec = 0; j < length; j++)
     727                        for (j = 0, consec = 0; j < length; j++) {
    726728                            if (discards[i + j] != 2) {
    727729                                consec = 0;
     
    732734                                discards[i + j] = 0;
    733735                            }
     736                        }
    734737
    735738                        /* Scan from beginning of run
     
    783786            final int end = bufferedLines;
    784787            int j = 0;
    785             for (int i = 0; i < end; ++i)
     788            for (int i = 0; i < end; ++i) {
    786789                if (noDiscards || discards[i] == 0) {
    787790                    undiscarded[j] = equivs[i];
     
    790793                    changedFlag[1+i] = true;
    791794                }
     795            }
    792796            nondiscardedLines = j;
    793797        }
  • trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java

    r8510 r8513  
    442442        } catch (MalformedURLException ex) {
    443443            // shouldn't happen
     444            if (Main.isTraceEnabled()) {
     445                Main.trace(e.getMessage());
     446            }
    444447        }
    445448
     
    602605        } catch (MalformedURLException ex) {
    603606            // shouldn't happen
     607            if (Main.isTraceEnabled()) {
     608                Main.trace(e.getMessage());
     609            }
    604610        }
    605611
  • trunk/src/org/openstreetmap/josm/tools/I18n.java

    r8510 r8513  
    482482        } catch (IOException e) {
    483483            // Ignore
     484            if (Main.isTraceEnabled()) {
     485                Main.trace(e.getMessage());
     486            }
    484487        }
    485488    }
     
    511514        } catch (IOException e) {
    512515            // Ignore exception
     516            if (Main.isTraceEnabled()) {
     517                Main.trace(e.getMessage());
     518            }
    513519        }
    514520        return false;
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java

    r8510 r8513  
    131131    public void initSystemShortcuts() {
    132132        // TODO: Insert system shortcuts here. See Windows and especially OSX to see how to.
    133         for (int i = KeyEvent.VK_F1; i <= KeyEvent.VK_F12; ++i)
     133        for (int i = KeyEvent.VK_F1; i <= KeyEvent.VK_F12; ++i) {
    134134            Shortcut.registerSystemShortcut("screen:toogle"+i, tr("reserved"),
    135135                    i, KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic();
     136        }
    136137        Shortcut.registerSystemShortcut("system:reset", tr("reserved"),
    137138                KeyEvent.VK_DELETE, KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic();
     
    374375                    } catch (IOException e) {
    375376                        // Ignore
     377                        if (Main.isTraceEnabled()) {
     378                            Main.trace(e.getMessage());
     379                        }
    376380                    }
    377381                }
  • trunk/src/org/openstreetmap/josm/tools/TextTagParser.java

    r8510 r8513  
    6262            while (true) {
    6363                skipEmpty();
    64                 if (pos == n) { break; }
     64                if (pos == n) {
     65                    break;
     66                }
    6567                k = parseString("\n\r\t= ");
    66                 if (pos == n) { tags.clear();  break; }
     68                if (pos == n) {
     69                    tags.clear();
     70                    break;
     71                }
    6772                skipSign();
    68                 if (pos == n) { tags.clear();  break; }
     73                if (pos == n) {
     74                    tags.clear();
     75                    break;
     76                }
    6977                v = parseString("\n\r\t ");
    7078                tags.put(k, v);
  • trunk/src/org/openstreetmap/josm/tools/Utils.java

    r8512 r8513  
    13011301    public static boolean hasExtension(String filename, String ... extensions) {
    13021302        String name = filename.toLowerCase(Locale.ENGLISH);
    1303         for (String ext : extensions)
     1303        for (String ext : extensions) {
    13041304            if (name.endsWith("."+ext.toLowerCase(Locale.ENGLISH)))
    13051305                return true;
     1306        }
    13061307        return false;
    13071308    }
  • trunk/src/org/openstreetmap/josm/tools/date/FallbackDateParser.java

    r7299 r8513  
    88import java.util.Date;
    99import java.util.List;
     10
     11import org.openstreetmap.josm.Main;
    1012
    1113/**
     
    101103            } catch (ParseException pe) {
    102104                // Ignore parsing errors and try the next pattern.
     105                if (Main.isTraceEnabled()) {
     106                    Main.trace(pe.getMessage());
     107                }
    103108            }
    104109        }
Note: See TracChangeset for help on using the changeset viewer.