projects
/
jSite.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use Closer
[jSite.git]
/
src
/
de
/
todesbaum
/
jsite
/
main
/
Configuration.java
diff --git
a/src/de/todesbaum/jsite/main/Configuration.java
b/src/de/todesbaum/jsite/main/Configuration.java
index
f8acc53
..
cf4bca5
100644
(file)
--- a/
src/de/todesbaum/jsite/main/Configuration.java
+++ b/
src/de/todesbaum/jsite/main/Configuration.java
@@
-37,13
+37,13
@@
import java.util.Map.Entry;
import de.todesbaum.jsite.application.FileOption;
import de.todesbaum.jsite.application.Node;
import de.todesbaum.jsite.application.Project;
import de.todesbaum.jsite.application.FileOption;
import de.todesbaum.jsite.application.Node;
import de.todesbaum.jsite.application.Project;
+import de.todesbaum.util.io.Closer;
import de.todesbaum.util.io.StreamCopier;
import de.todesbaum.util.xml.SimpleXML;
import de.todesbaum.util.xml.XML;
/**
import de.todesbaum.util.io.StreamCopier;
import de.todesbaum.util.xml.SimpleXML;
import de.todesbaum.util.xml.XML;
/**
- * @author David Roden <droden@gmail.com>
- * @version $Id$
+ * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
*/
public class Configuration {
*/
public class Configuration {
@@
-99,18
+99,8
@@
public class Configuration {
} catch (FileNotFoundException e) {
} catch (IOException e) {
} finally {
} catch (FileNotFoundException e) {
} catch (IOException e) {
} finally {
- if (fileInputStream != null) {
- try {
- fileInputStream.close();
- } catch (IOException ioe1) {
- }
- }
- if (fileByteOutputStream != null) {
- try {
- fileByteOutputStream.close();
- } catch (IOException ioe1) {
- }
- }
+ Closer.close(fileInputStream);
+ Closer.close(fileByteOutputStream);
}
}
rootNode = new SimpleXML("configuration");
}
}
rootNode = new SimpleXML("configuration");
@@
-134,18
+124,8
@@
public class Configuration {
return true;
} catch (IOException ioe1) {
} finally {
return true;
} catch (IOException ioe1) {
} finally {
- if (configurationInputStream != null) {
- try {
- configurationInputStream.close();
- } catch (IOException ioe1) {
- }
- }
- if (fileOutputStream != null) {
- try {
- fileOutputStream.close();
- } catch (IOException ioe1) {
- }
- }
+ Closer.close(configurationInputStream);
+ Closer.close(fileOutputStream);
}
return false;
}
}
return false;
}