Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-4619

DeploymentFileData missing NULL check -- NullPointerException guaranteed from DeploymentEngine.buildServiceGroup

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5.1
    • None
    • None

    Description

      The class DeploymentFileData has the following interesting lines of code:

      public class DeploymentFileData {
      ...
      public DeploymentFileData(File file)

      { this.file = file; }

      ...
      public String getName()

      { return file.getName(); // No need to check for null due to constructor check }

      Note the comment, and the lack of any check in the constructor!

      Moreover, in DeploymentEngine, in the buildServiceGroup method, the VERY FIRST LINE (1103) says:

      DeploymentFileData currentDeploymentFile = new DeploymentFileData(null, null);

      in other words, guaranteed NullPointerException if you call this method!

      Attachments

        Activity

          People

            Unassigned Unassigned
            dlindquist Dave Lindquist
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: