Changeset 85db853 for apps


Ignore:
Timestamp:
Mar 28, 2019 5:25:12 PM (20 months ago)
Author:
zab2 <zab2@…>
Branches:
master
Children:
d90fc42
Parents:
440d557
Message:

use curly braces around one-line for and while loops

Location:
apps/i2ptunnel/java/src/net/i2p/i2ptunnel/access
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/access/AccessCounter.java

    r440d557 r85db853  
    3535     */
    3636    boolean purge(long olderThan) {
    37         while(!accesses.isEmpty() && accesses.get(0) < olderThan)
     37        while(!accesses.isEmpty() && accesses.get(0) < olderThan) {
    3838            accesses.remove(0);
     39        }
    3940        return accesses.isEmpty();
    4041    }
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/access/AccessFilter.java

    r440d557 r85db853  
    7676    private void reload() throws IOException {
    7777        synchronized(knownDests) {
    78             for (FilterDefinitionElement element : definition.getElements())
     78            for (FilterDefinitionElement element : definition.getElements()) {
    7979                element.update(knownDests);
     80            }
    8081        }
    8182       
     
    103104                    reader = new BufferedReader(new FileReader(file));
    104105                    String b32;
    105                     while((b32 = reader.readLine()) != null)
     106                    while((b32 = reader.readLine()) != null) {
    106107                        breached.add(b32);
     108                    }
    107109                } finally {
    108110                    if (reader != null) try { reader.close(); } catch (IOException ignored) {}
     
    129131       
    130132        synchronized(knownDests) {
    131             for (DestTracker tracker : knownDests.values())
     133            for (DestTracker tracker : knownDests.values()) {
    132134                tracker.purge(olderThan);
     135            }
    133136        }
    134137
Note: See TracChangeset for help on using the changeset viewer.