40
40
import java .io .ObjectInputFilter .Config ;
41
41
import java .lang .management .ManagementFactory ;
42
42
import java .util .List ;
43
+ import java .util .Map ;
43
44
import java .util .UUID ;
44
45
import javax .swing .InputMap ;
45
46
import javax .swing .JOptionPane ;
@@ -784,8 +785,23 @@ public void autoResolveConcluded(AutoResolveConcludedEvent autoResolveConcludedE
784
785
true ,
785
786
tracker );
786
787
resolveDialog .setVisible (true );
788
+ // TODO remove these safeties as they're shown to be unnecessary
789
+ if (resolveDialog == null ) {
790
+ throw new IllegalStateException ("resolveDialog is null" );
791
+ }
787
792
if (resolveDialog .wasAborted ()) {
793
+ // TODO remove these safeties as they're shown to be unnecessary
794
+ Map <UUID , ?> peopleStatus = tracker .getPeopleStatus ();
795
+ if (peopleStatus == null ) {
796
+ throw new IllegalStateException ("People status map in tracker is null" );
797
+ }
798
+
788
799
for (UUID personId : tracker .getPeopleStatus ().keySet ()) {
800
+ // TODO remove these safeties as they're shown to be unnecessary
801
+ if (getCampaign () == null ) {
802
+ throw new IllegalStateException ("Campaign instance is null" );
803
+ }
804
+
789
805
Person person = getCampaign ().getPerson (personId );
790
806
791
807
if (person == null ) {
@@ -794,7 +810,13 @@ public void autoResolveConcluded(AutoResolveConcludedEvent autoResolveConcludedE
794
810
" does not exist in the campaign" );
795
811
}
796
812
797
- person .setHits (person .getHitsPrior ());
813
+ Integer priorHits = person .getHitsPrior ();
814
+ // TODO remove these safeties as they're shown to be unnecessary
815
+ if (priorHits == null ) {
816
+ throw new IllegalStateException ("Person's prior hits are not set for person " +
817
+ person .getFullName ());
818
+ }
819
+ person .setHits (priorHits );
798
820
}
799
821
return ;
800
822
}
0 commit comments