Changeset 12276 in josm


Ignore:
Timestamp:
2017-05-30T10:23:33+02:00 (2 years ago)
Author:
Don-vip
Message:

sonar - squid:S2189 - Loops should not be infinite

File:
1 edited

Legend:

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

    r12192 r12276  
    5656
    5757    private static void clean() {
     58        boolean running = true;
    5859        try {
    59             while (true) {
     60            while (running) {
    6061                Reference<? extends Object> ref = GLOBAL_QUEUE.remove();
    6162                if (ref instanceof ListenableWeakReference) {
     
    6465            }
    6566        } catch (InterruptedException e) {
     67            running = false;
    6668            BugReport.intercept(e).warn();
    6769            Thread.currentThread().interrupt();
Note: See TracChangeset for help on using the changeset viewer.