Uploaded image for project: 'vtn'
  1. vtn
  2. VTN-46

PathMap class handles mapIndex field incorrectly.

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • unspecified
    • None
    • VTN Manager
    • None
    • Operating System: All
      Platform: All

    • 2236

    Description

      mapIndex field in PathMap class keeps an Integer instance which represents
      the path map index. But some methods treat it as int value incorrectly.

      • equals(Object) compares mapIndex values using == operator.
        Naturally mapIndex values need to be compared using equals(Object).
      • hashCode() dereferences mapIndex field without null check.
        So it causes NPE if mapIndex is null.

      This issue was detected by FindBugs.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            yasuda Shigeru Yasuda
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: