0

I am getting below error in a test class when I want to save another class.

System.NullPointerException: Attempt to de-reference a null object at line 32

The problem is that I commented line 32, but was still getting the error on this line. Now even deleted the commented code from test class and left line 32 empty but still getting the same error on this line.

The code which I am saving is no thing to do with this test class. Anyone faced this situation?

  • System.NullPointerException is a runtime error, not a compilation error, how are you getting it from trying to save a class? – IllusiveBrian Dec 23 '15 at 20:44
  • When new class/trigger is saving all/some test classes/methods are also executed. I am getting this error in test class @Namfuak – abdn Dec 23 '15 at 20:48
  • 4
    @crop1645 they're editing directly in production via Force.com IDE. Can't say I recommend that process... – sfdcfox Dec 24 '15 at 0:37
  • 1
    @crop1645 - Tooling API allows modifying / saving classes directly to production. Metadata API block it. – Eric Dec 24 '15 at 1:20
  • 1
    @abdn , Check for correct class on which the line 32 is giving error. Are you absolutely sure you are commenting out correct class line 32? – Kaushik Ray Dec 24 '15 at 8:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.