0 Replies Latest reply on Jun 10, 2011 11:30 AM by toaster99b

    npe in automationmanager.scorechild


      In the 4.1.0 flex sdk it appears that ScoreChild in AutomationManager will throw a null pointer exception when trying to set the previousVersionClassNames if the automationclass does not implement IAutomationClass2. 


      When the className2previousClassName entry for the automation class being scored is null, ScoreChild attemps to populate it using the previousVersionClassNames property if the class implements IAutomationClass2.  If the class does not support IAutomationClass2, the previousVersionClassNames is left null but then looped over which refers to previousVersionClassNames.length and generates the exception.


      ScoreChild should either handle the null previousVersionClassNames or throw a clearer error about requiring IAutomationClass2 support rather than the ubiquitous and unhelpful "Cannot access a property or method of a null object reference" as this is difficult to diagnose.