Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-2504

if mbean info description is null -- equals() methods throws null pointer exception

XMLWordPrintable

      The description field in the mbean info object for some of the mbeans is null.

      The mbeaninfo equals() method does not check this field. It just does this...

      if (this.getDescription().equals(other.getDescription()) == false)
      return false;

      Unfortunately, when description equals null, this generates a null pointer exception. There should be a check for null too.

      The comparison should be:

      if ((getDescription() != null) && (getDescription().equals(other.getDescription()) == false))
      return false;
      if ((getDescription() == null) && (other.getDescription() != null))
      return false;

      Henry

              Unassigned Unassigned
              henrywong888 Henry Wong (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: