Mercurial > jhg
diff src/org/tmatesoft/hg/core/HgChangeset.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 | 1792b37650f2 |
children | ee6b467c1a5f |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/core/HgChangeset.java Thu Aug 25 03:56:27 2011 +0200 +++ b/src/org/tmatesoft/hg/core/HgChangeset.java Thu Aug 25 03:57:39 2011 +0200 @@ -16,8 +16,6 @@ */ package org.tmatesoft.hg.core; -import static org.tmatesoft.hg.core.Nodeid.NULL; - import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -140,9 +138,12 @@ public boolean isMerge() { // p1 == -1 and p2 != -1 is legitimate case - return !NULL.equals(getFirstParentRevision()) && !NULL.equals(getSecondParentRevision()); + return !(getFirstParentRevision().isNull() || getSecondParentRevision().isNull()); } + /** + * @return never <code>null</code> + */ public Nodeid getFirstParentRevision() { if (parentHelper != null) { return parentHelper.safeFirstParent(nodeid); @@ -156,6 +157,9 @@ return Nodeid.fromBinary(parent1, 0); } + /** + * @return never <code>null</code> + */ public Nodeid getSecondParentRevision() { if (parentHelper != null) { return parentHelper.safeSecondParent(nodeid);