Skip to content

Commit

Permalink
Merge branch 'hotfix/v2.1.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
dbolotin committed Dec 6, 2017
2 parents fcd2b73 + 759b4e7 commit fd14dc2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@

MiXCR 2.1.7 ( 6 Dec 2017)
========================

-- Fixes bug leading to IOException if report file not exists. (#295)


MiXCR 2.1.6 (28 Nov 2017)
========================

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

<groupId>com.milaboratory</groupId>
<artifactId>mixcr</artifactId>
<version>2.1.6</version>
<version>2.1.7</version>
<packaging>jar</packaging>
<name>MiXCR</name>

Expand Down
7 changes: 1 addition & 6 deletions src/main/java/com/milaboratory/mixcr/cli/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,21 @@
package com.milaboratory.mixcr.cli;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.milaboratory.mixcr.util.MiXCRVersionInfo;
import com.milaboratory.util.GlobalObjectMappers;
import com.milaboratory.util.TimeUtils;
import gnu.trove.map.hash.TIntObjectHashMap;

import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.channels.FileLock;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public final class Util {
Expand All @@ -66,7 +61,7 @@ static void appendAtomically(String fileName, byte[] content) {
}

static void appendAtomically(File file, byte[] content) {
try (FileChannel channel = FileChannel.open(file.toPath(), StandardOpenOption.WRITE);
try (FileChannel channel = FileChannel.open(file.toPath(), StandardOpenOption.WRITE, StandardOpenOption.CREATE);
FileLock lock = channel.lock()) {
channel.position(channel.size());
channel.write(ByteBuffer.wrap(content));
Expand Down

0 comments on commit fd14dc2

Please sign in to comment.