Uploaded image for project: 'Commons Net'
  1. Commons Net
  2. NET-428

SubnetUtils throws ArrayIndexOutOfBoundsException for new SubnetUtils( "1.2.3.4/32" ).getInfo().getAllAddresses()

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.1
    • Fix Version/s: 3.1
    • Component/s: None
    • Labels:
      None

      Description

      new SubnetUtils( "1.2.3.4/32" ).getInfo().getAllAddresses() throws

      Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
      $SubnetInfo.getAllAddresses(SubnetUtils.java:166)

      Similarly for /31

      It would make more sense to return an empty array.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sebb@apache.org Sebb
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: