Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-6407

[java6][classlib]NetworkInterface constructor different from trunk, will throw NPE if network interface has no address

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 6.0M1
    • 6.0M1
    • Classlib
    • None
    • Patch Available
    • Novice

    Description

      NetworkInterface of java6 branch is different from NetworkInterface of trunk.

      In their constructors, trunk simply assign the addresses to the "addresses" field, but in java6 branch it assign addresses one by one which ignore the situation that passed in addresses may be null.

      Merge trunk to java6, or add a if(addresses != null) will solve the NPE error.

      Attachments

        1. Harmony6407.diff
          0.7 kB
          Ray Chen

        Activity

          People

            tony.wu Tony Wu
            chleicdl Ray Chen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: