Skip to content

Commit db7b99a

Browse files
committedSep 25, 2013
Unit tests fix. Upgrade instruction was updated.
1 parent 113a23b commit db7b99a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed
 

‎core/src/main/java/com/orientechnologies/orient/core/serialization/compression/impl/OGZIPCompression.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,18 @@ public class OGZIPCompression implements OCompression {
3737
@Override
3838
public byte[] compress(final byte[] content) {
3939
try {
40+
final byte[] result;
4041
final OMemoryStream memoryOutputStream = new OMemoryStream();
4142
final GZIPOutputStream gzipOutputStream = new GZIPOutputStream(memoryOutputStream);
4243
try {
4344
gzipOutputStream.write(content);
4445
gzipOutputStream.finish();
46+
result = memoryOutputStream.toByteArray();
4547
} finally {
4648
gzipOutputStream.close();
4749
}
48-
return memoryOutputStream.toByteArray();
50+
51+
return result;
4952
} catch (IOException ioe) {
5053
throw new IllegalStateException("Exception during data compression.", ioe);
5154
}

‎upgrade.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ References:
9191

9292
4) now always in the console import the old database in the new one:
9393

94-
orientdb> import database /temp/db.json.gzip
94+
orientdb> import database /temp/db.json.gzip -preserveClusterIDs=true
9595
orientdb> quit
9696

9797

0 commit comments

Comments
 (0)
Please sign in to comment.