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

Avoid provoking NumberFormatException when initializing InetAddrCachePolicy

XMLWordPrintable

    • b11
    • generic
    • generic

        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
                }

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

                Created:
                Updated:
                Resolved: