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

Avoid provoking NumberFormatException when initializing InetAddrCachePolicy

    XMLWordPrintable

Details

    • b11
    • generic
    • generic

    Backports

      Description

        When loading and initializing the class sun.net.InetAddrCachePolicy, NFEs will be thrown and caught when networkaddress.cache.ttl and networkaddress.cache.negative.ttl aren't set (which they typically aren't):

                try {
                    tmp = new Integer(
                      java.security.AccessController.doPrivileged (
                        new PrivilegedAction<String>() {
                          public String run() {
                              return Security.getProperty(cachePolicyProp);
                          }
                      }));
                } catch (NumberFormatException e) {
                    // ignore
                }

        Attachments

          Issue Links

            Activity

              People

                prappo Pavel Rappo
                redestad Claes Redestad
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: