Ignore:
Timestamp:
2013-09-27T19:50:29+02:00 (11 years ago)
Author:
Don-vip
Message:

Sonar/FindBugs - Bad practice - Method may fail to close stream

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java

    r6248 r6268  
    134134        String line;
    135135        StringBuilder ba = new StringBuilder();
    136         while ((line = br.readLine()) != null) {
    137             ba.append(line);
    138             ba.append("\n");
     136        try {
     137            while ((line = br.readLine()) != null) {
     138                ba.append(line);
     139                ba.append("\n");
     140            }
     141        } finally {
     142            br.close();
    139143        }
    140144        String incomingData = ba.toString();
Note: See TracChangeset for help on using the changeset viewer.