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

networkaddress.cache.ttl is not a system property

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 23
    • 23
    • core-libs
    • b10

      Many users are setting networkaddress.cache.ttl as a system property [1]. This has no effect - this is a security property, and is only read from java.security file.

      The property is listed on the list of system properties [2], along with networkaddress.cache.stale.ttl and networkaddress.cache.negative.ttl, which are only used as security properties as well.

      Other than that, our documents mention that this is a security property [3] [4], and not a system property, but it's not easy to find information on how security properties can be set. We could probably add a link to the Security class documentation [5], which at least mentions the java.security file.

      [1] https://mail.openjdk.org/pipermail/net-dev/2024-January/022653.html
      [2] https://docs.oracle.com/en/java/javase/21/docs/api/system-properties.html
      [3] https://docs.oracle.com/en/java/javase/20/docs/api/java.base/java/net/InetAddress.html#inetaddress-caching-heading
      [4] https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/net/doc-files/net-properties.html#networkaddress.cache.ttl
      [5] https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/security/Security.html

            djelinski Daniel Jelinski
            djelinski Daniel Jelinski
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: