Changeset 30702


Ignore:
Timestamp:
2016-08-12T19:52:01+12:00 (8 years ago)
Author:
ak19
Message:

Minor general improvements that I didn't want to commit with the previous, major commit (which was to do with the new ConfigFileEditor).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/util/Utility.java

    r30701 r30702  
    9393        System.err.println("*** Exception occurred: " + e.getMessage());
    9494    } finally {
    95         try {
    96         if(fin != null) {
    97             fin.close();
    98             fin = null;
    99         }
    100         } catch(IOException ioe) {
    101         fin = null;
    102        
    103         }
     95        closeResource(fin);     
    10496    }
    10597
     
    583575        System.err.println("Exception occurred: " + e.getMessage());
    584576    } finally {
    585         try {
    586         if(fin != null) {
    587             fin.close();
    588             fin = null;
    589         }
    590         if(fout != null) {
    591             fout.close();
    592             fout = null;
    593         }
    594         } catch(IOException ioe) {
    595         fin = null;
    596         fout = null;
    597         }
     577        closeResource(fin);
     578        closeResource(fout);       
    598579       
    599580    }
    600         return oldValue;
     581    return oldValue;
    601582    }
    602583
     
    614595        System.err.println("Exception closing resource: " + e.getMessage());
    615596        e.printStackTrace();
     597        resourceHandle = null;
    616598    }
    617599    }
Note: See TracChangeset for help on using the changeset viewer.