Changeset 18212 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2021-09-12T02:15:34+02:00 (3 years ago)
Author:
Don-vip
Message:

fix coverity 1437552 (infinite loop)

File:
1 edited

Legend:

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

    r16913 r18212  
    5656    private static void clean() {
    5757        boolean running = true;
    58         try {
    59             while (running) {
     58        while (running) {
     59            try {
    6060                Reference<? extends Object> ref = GLOBAL_QUEUE.remove();
    6161                if (ref instanceof ListenableWeakReference) {
    6262                    ((ListenableWeakReference<?>) ref).onDereference();
    6363                }
     64            } catch (InterruptedException e) {
     65                running = false;
     66                BugReport.intercept(e).warn();
     67                Thread.currentThread().interrupt();
    6468            }
    65         } catch (InterruptedException e) {
    66             running = false;
    67             BugReport.intercept(e).warn();
    68             Thread.currentThread().interrupt();
    6969        }
    7070    }
Note: See TracChangeset for help on using the changeset viewer.