Bug - Fixed r14480 - NPE from Twitch zone

Fluxxdog

Active member
CLI:
Code:
Adding new location: The Roman Forum - adventure.php?snarfblat=414
Unexpected error, debug log printed.
Debug log attached.
 

Attachments

  • DEBUG_20140824.txt
    4.1 KB · Views: 35

psly4mne

Member
I believe it's happening because the new water level check involve reading the minimum stat requirement, and zones from overrides don't have those.
 

Darzil

Developer
r14481 It was because the new area didn't have it set, so didn't find it and returned null. However, we didn't check for null before returning it, and a null can't be type int, hence the failure.
 

Veracity

Developer
Staff member
In particular because the map from adventure to stat goes from String to Integer, the function to fetch from that returns an int, not an Integer, and Java tries to automatically coerce from Integer to int via .intValue(), which doesn't work with a null.

When we create the adventure override, sure, we should set the new maps - but the accessors should also not crash. :)
 
Top