@@ -71,8 +71,9 @@ public class MongoClient extends Mongo {
71
71
/**
72
72
* Creates an instance based on a (single) mongodb node (localhost, default port).
73
73
*
74
- * @throws UnknownHostException
75
- * @throws MongoException
74
+ * @throws UnknownHostException This exception is no longer thrown, but leaving in throws clause so as not to break source
75
+ * compatibility. The exception will be removed from the declaration in the next major release of the
76
+ * driver.
76
77
*/
77
78
public MongoClient () throws UnknownHostException {
78
79
this (new ServerAddress ());
@@ -82,8 +83,9 @@ public MongoClient() throws UnknownHostException {
82
83
* Creates a Mongo instance based on a (single) mongodb node.
83
84
*
84
85
* @param host server to connect to in format host[:port]
85
- * @throws UnknownHostException if the database host cannot be resolved
86
- * @throws MongoException
86
+ * @throws UnknownHostException This exception is no longer thrown, but leaving in throws clause so as not to break source
87
+ * compatibility. The exception will be removed from the declaration in the next major release of the
88
+ * driver.
87
89
*/
88
90
public MongoClient (String host ) throws UnknownHostException {
89
91
this (new ServerAddress (host ));
@@ -94,8 +96,9 @@ public MongoClient(String host) throws UnknownHostException {
94
96
*
95
97
* @param host server to connect to in format host[:port]
96
98
* @param options default query options
97
- * @throws UnknownHostException if the database host cannot be resolved
98
- * @throws MongoException
99
+ * @throws UnknownHostException This exception is no longer thrown, but leaving in throws clause so as not to break source
100
+ * compatibility. The exception will be removed from the declaration in the next major release of the
101
+ * driver.
99
102
*/
100
103
public MongoClient (String host , MongoClientOptions options ) throws UnknownHostException {
101
104
this (new ServerAddress (host ), options );
@@ -106,8 +109,9 @@ public MongoClient(String host, MongoClientOptions options) throws UnknownHostEx
106
109
*
107
110
* @param host the database's host address
108
111
* @param port the port on which the database is running
109
- * @throws UnknownHostException if the database host cannot be resolved
110
- * @throws MongoException
112
+ * @throws UnknownHostException This exception is no longer thrown, but leaving in throws clause so as not to break source
113
+ * compatibility. The exception will be removed from the declaration in the next major release of the
114
+ * driver.
111
115
*/
112
116
public MongoClient (String host , int port ) throws UnknownHostException {
113
117
this (new ServerAddress (host , port ));
@@ -117,7 +121,6 @@ public MongoClient(String host, int port) throws UnknownHostException {
117
121
* Creates a Mongo instance based on a (single) mongodb node
118
122
*
119
123
* @param addr the database address
120
- * @throws MongoException
121
124
* @see com.mongodb.ServerAddress
122
125
*/
123
126
public MongoClient (ServerAddress addr ) {
@@ -129,7 +132,6 @@ public MongoClient(ServerAddress addr) {
129
132
*
130
133
* @param addr the database address
131
134
* @param credentialsList the list of credentials used to authenticate all connections
132
- * @throws MongoException
133
135
* @see com.mongodb.ServerAddress
134
136
* @since 2.11.0
135
137
*/
@@ -142,7 +144,6 @@ public MongoClient(ServerAddress addr, List<MongoCredential> credentialsList) {
142
144
*
143
145
* @param addr the database address
144
146
* @param options default options
145
- * @throws MongoException
146
147
* @see com.mongodb.ServerAddress
147
148
*/
148
149
public MongoClient (ServerAddress addr , MongoClientOptions options ) {
@@ -155,7 +156,6 @@ public MongoClient(ServerAddress addr, MongoClientOptions options) {
155
156
* @param addr the database address
156
157
* @param credentialsList the list of credentials used to authenticate all connections
157
158
* @param options default options
158
- * @throws MongoException
159
159
* @see com.mongodb.ServerAddress
160
160
* @since 2.11.0
161
161
*/
@@ -175,7 +175,6 @@ public MongoClient(ServerAddress addr, List<MongoCredential> credentialsList, Mo
175
175
*
176
176
* @param seeds Put as many servers as you can in the list and the system will figure out the rest. This can either be a list of mongod
177
177
* servers in the same replica set or a list of mongos servers in the same sharded cluster.
178
- * @throws MongoException
179
178
* @see com.mongodb.ServerAddress
180
179
*/
181
180
public MongoClient (List <ServerAddress > seeds ) {
@@ -193,7 +192,6 @@ public MongoClient(List<ServerAddress> seeds) {
193
192
* @param seeds Put as many servers as you can in the list and the system will figure out the rest. This can either be a list
194
193
* of mongod servers in the same replica set or a list of mongos servers in the same sharded cluster. \
195
194
* @param credentialsList the list of credentials used to authenticate all connections
196
- * @throws MongoException
197
195
* @see com.mongodb.ServerAddress
198
196
* @since 2.11.0
199
197
*/
@@ -212,7 +210,6 @@ public MongoClient(List<ServerAddress> seeds, List<MongoCredential> credentialsL
212
210
* @param seeds Put as many servers as you can in the list and the system will figure out the rest. This can either be a list of
213
211
* mongod servers in the same replica set or a list of mongos servers in the same sharded cluster.
214
212
* @param options default options
215
- * @throws MongoException
216
213
* @see com.mongodb.ServerAddress
217
214
*/
218
215
public MongoClient (List <ServerAddress > seeds , MongoClientOptions options ) {
@@ -231,7 +228,6 @@ public MongoClient(List<ServerAddress> seeds, MongoClientOptions options) {
231
228
* of mongod servers in the same replica set or a list of mongos servers in the same sharded cluster.
232
229
* @param credentialsList the list of credentials used to authenticate all connections
233
230
* @param options default options
234
- * @throws MongoException
235
231
* @see com.mongodb.ServerAddress
236
232
* @since 2.11.0
237
233
*/
@@ -246,8 +242,9 @@ public MongoClient(List<ServerAddress> seeds, List<MongoCredential> credentialsL
246
242
* nodes.
247
243
*
248
244
* @param uri the URI
249
- * @throws MongoException
250
- * @throws UnknownHostException
245
+ * @throws UnknownHostException This exception is no longer thrown, but leaving in throws clause so as not to break source
246
+ * compatibility. The exception will be removed from the declaration in the next major release of the
247
+ * driver.
251
248
* @see MongoURI
252
249
* @dochub connections
253
250
*/
0 commit comments