Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8087190

Regression in sun.net.util.IPAddressUtil.isIPv4LiteralAddress(String)

    Details

    • Subcomponent:
    • Resolved In Build:
      b80
    • CPU:
      x86
    • OS:
      os_x
    • Verification:
      Verified

      Backports

        Description

        FULL PRODUCT VERSION :
        java version "1.8.0_45"
        Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
        Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

        ADDITIONAL OS VERSION INFORMATION :
        Darwin teknisk-dhcp288.basefarm.no 14.3.0 Darwin Kernel Version 14.3.0: Mon Mar 23 11:59:05 PDT 2015; root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64

        A DESCRIPTION OF THE PROBLEM :
        After the fix for https://bugs.openjdk.java.net/browse/JDK-8040747, things like

          // just the dot separators of an IPv4 address, no digits
          isIPv4LiteralAddress("...")

        will return true. Prior to the change, even a single missing octet ( isIPv4LiteralAddress(".0.0.0") ) would return false.

        REGRESSION. Last worked in version 7u80

        ADDITIONAL REGRESSION INFORMATION:
        $ /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin/java -version
        java version "1.7.0_80"
        Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
        Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)


        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        $ JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home scala -e 'for (a <- List("...", "0.0.0.", ".0.0.0", "0.0.0.0")) { println(a + "\t: " + sun.net.util.IPAddressUtil.isIPv4LiteralAddress(a)) }'
        ... : true
        0.0.0. : true
        .0.0.0 : true
        0.0.0.0 : true

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        $ JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home scala -e 'for (a <- List("...", "0.0.0.", ".0.0.0", "0.0.0.0")) { println(a + "\t: " + sun.net.util.IPAddressUtil.isIPv4LiteralAddress(a)) }'
        ... : false
        0.0.0. : false
        .0.0.0 : false
        0.0.0.0 : true

        REPRODUCIBILITY :
        This bug can be reproduced always.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  robm Robert Mckenna
                  Reporter:
                  webbuggrp Webbug Group
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: