summaryrefslogtreecommitdiff
path: root/src/io/DataWriter.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/io/DataWriter.java')
-rw-r--r--src/io/DataWriter.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/io/DataWriter.java b/src/io/DataWriter.java
index b4cf4d5..578c3a7 100644
--- a/src/io/DataWriter.java
+++ b/src/io/DataWriter.java
@@ -70,10 +70,11 @@ public class DataWriter implements ResultListener, Closeable {
*/
public void open() throws IOException {
try {
- m_profile.open();
- m_tweet.open();
readIds(m_profileIdSet, m_profile);
readIds(m_tweetIdSet, m_tweet);
+ // open after reading input to prevent simultaneous r/w access
+ m_profile.open();
+ m_tweet.open();
} catch (IOException ex) {
m_profile.close();
m_tweet.close();