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

Create a ServerAddress with default host

    • Type: Icon: New Feature New Feature
    • Resolution: Won't Fix
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: API
    • Labels:
      None

      Hello,

      Add a constructor that creates a ServerAddress with default host (127.0.0.1)

         /**
           * Creates a ServerAddress with default host
           *
           * @param port mongod port
           */
          public ServerAddress(final int port) { this(defaultHost(), port); }
      

      Usage :

      new ServerAddress(27018);
      

      Farès

            Assignee:
            Unassigned Unassigned
            Reporter:
            fares.hassak@gmail.com Farès Hassak
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: