New answers tagged

1 vote

System NullPointerException on get from map

You may want to use the Safe Navigation Operator to avoid an extra null check. Also, see my talk on using containsKey and get efficiently. It's better to: Map<String,Map<String,Integer>> ...
sfdcfox's user avatar
  • 481k
1 vote
Accepted

System NullPointerException on get from map

Check whether the map is instantiated or not and if it is instantiated, you can use the containsKey method. Map<String,Map<String,Integer>> mapSoldAppStatus = reportPageController....
S1th's user avatar
  • 69
0 votes

Test class for batch with another class called in it: Batch has 100%, but called class only 24% coverage

Sorry for bothering you, it was a after Inset trigger that I was unaware of which was updating a field value, so problem was solved after updating field value after insert.
Pratik Bokade's user avatar

Top 50 recent answers are included