git://git.nikiroo.be
/
jvcard.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
jDoc, possible leak on crash, new depth option
[jvcard.git]
/
src
/
be
/
nikiroo
/
jvcard
/
Card.java
diff --git
a/src/be/nikiroo/jvcard/Card.java
b/src/be/nikiroo/jvcard/Card.java
index 0a405bee47d744e6545b3360579343fdc5466806..6d833d81f069028b21442aaa6519272a63f41f38 100644
(file)
--- a/
src/be/nikiroo/jvcard/Card.java
+++ b/
src/be/nikiroo/jvcard/Card.java
@@
-15,7
+15,6
@@
import be.nikiroo.jvcard.parsers.Parser;
* contacts.
*
* @author niki
* contacts.
*
* @author niki
- *
*/
public class Card extends BaseClass<Contact> {
private File file;
*/
public class Card extends BaseClass<Contact> {
private File file;
@@
-97,8
+96,11
@@
public class Card extends BaseClass<Contact> {
return false;
BufferedWriter writer = new BufferedWriter(new FileWriter(file));
return false;
BufferedWriter writer = new BufferedWriter(new FileWriter(file));
- Parser.write(writer, format, this);
- writer.close();
+ try {
+ Parser.write(writer, format, this);
+ } finally {
+ writer.close();
+ }
if (this.file != null
&& file.getCanonicalPath().equals(this.file.getCanonicalPath())) {
if (this.file != null
&& file.getCanonicalPath().equals(this.file.getCanonicalPath())) {