farhanrahman / kyoto

18 stars 7 forks source link

Monitor Finds null Countries #112

Closed Sergeus closed 12 years ago

Sergeus commented 12 years ago

On lines 188-190 of Monitor.java, there is a loop that selects which country is to be monitored. It creates a random index value and then tries to get the country with that index value. At some point, it's generating an index value that's out of range of the country map, so the map's getter is returning null. It passes null to the carbonTarget service which (correctly) throws an exception.