Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-2481

MongoClientOptions.maxConnectionIdleTime and maxConnectionLifeTime can accept 0 values

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Trivial - P5 Trivial - P5
    • 3.5.0
    • None
    • Documentation
    • None

    Description

      The setters MongoClientOptions.maxConnectionIdleTime and MongoClientOptions.maxConnectionLifeTime accept any Integer values, while the Javadoc clearly says:

      /**
       * Sets the maximum life time for a pooled connection.
       *
       * @param maxConnectionLifeTime the maximum life time, in milliseconds, which must be > 0
       * @return {@code this}
       * @throws IllegalArgumentException if {@code maxConnectionLifeTime <= 0}
       * @see com.mongodb.MongoClientOptions#getMaxConnectionIdleTime()
       * @since 2.12
       */
      

      Either the javadoc is wrong, or the driver is wrong.

      Attachments

        Activity

          People

            ross@mongodb.com Ross Lawley
            yonatang Yonatan Graber
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: