MongoClientOptions.maxConnectionIdleTime and maxConnectionLifeTime can accept 0 values

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Trivial - P5
    • 3.5.0
    • Affects Version/s: None
    • Component/s: Documentation
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

              Assignee:
              Ross Lawley
              Reporter:
              Yonatan Graber
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: