fix possible npe

This commit is contained in:
Sebastian Sdorra
2013-05-06 09:07:10 +02:00
parent 0258cc3680
commit 33eb6a60d7

View File

@@ -393,7 +393,7 @@ public class HgLogChangesetCommand extends AbstractCommand
{ {
Integer rev = in.readDecimal(); Integer rev = in.readDecimal();
if (rev != null && rev >= 0) if ((rev != null) && (rev >= 0))
{ {
changeset.setProperty(propertyKey, String.valueOf(rev)); changeset.setProperty(propertyKey, String.valueOf(rev));
} }
@@ -459,7 +459,7 @@ public class HgLogChangesetCommand extends AbstractCommand
private boolean isNullId(String id) private boolean isNullId(String id)
{ {
return ((id != null) && id.equals("-1:".concat(NULL_ID))) return ((id != null) && id.equals("-1:".concat(NULL_ID)))
|| id.equals(NULL_ID); || NULL_ID.equals(id);
} }
//~--- fields --------------------------------------------------------------- //~--- fields ---------------------------------------------------------------