aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.test/tst')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ObjectIdSerializerTest.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ObjectIdSerializerTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ObjectIdSerializerTest.java
index 24bc40eee8..d98b792d75 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ObjectIdSerializerTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ObjectIdSerializerTest.java
@@ -79,10 +79,18 @@ public class ObjectIdSerializerTest {
throws Exception {
File file = File.createTempFile("ObjectIdSerializerTest_", "");
try (OutputStream out = new FileOutputStream(file)) {
- ObjectIdSerializer.write(out, objectId);
+ if (objectId == null) {
+ ObjectIdSerializer.write(out, objectId);
+ } else {
+ ObjectIdSerializer.writeWithoutMarker(out, objectId);
+ }
}
try (InputStream in = new FileInputStream(file)) {
- return ObjectIdSerializer.read(in);
+ if (objectId == null) {
+ return ObjectIdSerializer.read(in);
+ } else {
+ return ObjectIdSerializer.readWithoutMarker(in);
+ }
}
}
}