mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 07:55:47 +01:00
fix possible npe
This commit is contained in:
@@ -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 ---------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user