diff src/org/tmatesoft/hg/repo/HgBundle.java @ 274:9fb50c04f03c

Use Nodeid.isNull check instead of NULL.equals
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 25 Aug 2011 03:57:39 +0200
parents 44a34baabea0
children 981f9f50bb6c
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgBundle.java	Thu Aug 25 03:56:27 2011 +0200
+++ b/src/org/tmatesoft/hg/repo/HgBundle.java	Thu Aug 25 03:57:39 2011 +0200
@@ -16,8 +16,6 @@
  */
 package org.tmatesoft.hg.repo;
 
-import static org.tmatesoft.hg.core.Nodeid.NULL;
-
 import java.io.File;
 import java.io.IOException;
 import java.util.LinkedList;
@@ -141,7 +139,7 @@
 				HgChangelog changelog = hgRepo.getChangelog();
 				try {
 					if (prevRevContent == null) { 
-						if (NULL.equals(ge.firstParent()) && NULL.equals(ge.secondParent())) {
+						if (ge.firstParent().isNull() && ge.secondParent().isNull()) {
 							prevRevContent = new ByteArrayDataAccess(new byte[0]);
 						} else {
 							final Nodeid base = ge.firstParent();
@@ -389,18 +387,22 @@
 			dataAccess = rawDataAccess;
 		}
 
+		// non-null
 		public Nodeid node() {
 			return Nodeid.fromBinary(header, 0);
 		}
 
+		// non-null
 		public Nodeid firstParent() {
 			return Nodeid.fromBinary(header, 20);
 		}
 
+		// non-null
 		public Nodeid secondParent() {
 			return Nodeid.fromBinary(header, 40);
 		}
 
+		// non-null
 		public Nodeid cset() { // cs seems to be changeset
 			return Nodeid.fromBinary(header, 60);
 		}