Ignore:
Timestamp:
2013-04-11T19:41:05+02:00 (11 years ago)
Author:
Don-vip
Message:

see #8570 - close more streams

File:
1 edited

Legend:

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

    r5266 r5839  
    469469                return false;
    470470        }
    471         try
    472         {
    473             if(load(en.openStream(), tr.openStream(), false))
    474             {
     471        InputStream enStream = null;
     472        InputStream trStream = null;
     473        try {
     474            enStream = en.openStream();
     475            trStream = tr.openStream();
     476            if (load(enStream, trStream, false)) {
    475477                pluralMode = languages.get(l);
    476478                loadedCode = l;
    477479                return true;
    478480            }
    479         }
    480         catch(IOException e)
    481         {
     481        } catch(IOException e) {
     482            // Ignore exception
     483        } finally {
     484            if (trStream != null) try {trStream.close();} catch(IOException e) {}
     485            if (enStream != null) try {enStream.close();} catch(IOException e) {}
    482486        }
    483487        return false;
Note: See TracChangeset for help on using the changeset viewer.