diff src/org/tmatesoft/hg/repo/HgStatusCollector.java @ 221:04735ce6bed2

NPE when one of the flags is non-null
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 19 May 2011 04:45:52 +0200
parents 047b1dec7a04
children 373e07cd3991
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgStatusCollector.java	Thu May 19 04:14:45 2011 +0200
+++ b/src/org/tmatesoft/hg/repo/HgStatusCollector.java	Thu May 19 04:45:52 2011 +0200
@@ -224,7 +224,7 @@
 				Nodeid nidR2 = r2.nodeid(fname);
 				String flagsR1 = r1.flags(fname);
 				String flagsR2 = r2.flags(fname);
-				if (nidR1.equals(nidR2) && ((flagsR2 == null && flagsR1 == null) || flagsR2.equals(flagsR1))) {
+				if (nidR1.equals(nidR2) && ((flagsR2 == null && flagsR1 == null) || (flagsR2 != null && flagsR2.equals(flagsR1)))) {
 					inspector.clean(pp.path(fname));
 				} else {
 					inspector.modified(pp.path(fname));