[JAVA-3000] Deprecate Mongo class Created: 29/Sep/18 Updated: 28/Oct/23 Resolved: 04/Oct/18 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | API |
| Affects Version/s: | None |
| Fix Version/s: | 3.9.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Jeffrey Yemin | Assignee: | Jeffrey Yemin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
To simplify the legacy API, the Mongo class should be deprecated. MongoClient, a subclass of Mongo, was added in 2.10 and all Mongo constructors have been deprecated. It's time to deprecate Mongo itself so that it can be removed in the next major release. |
| Comments |
| Comment by Jeffrey Yemin [ 21/Nov/18 ] | |||||||||
|
OK, I think Eclipse is being a bit too strict here. I've opened | |||||||||
| Comment by Ken Kolano [X] [ 21/Nov/18 ] | |||||||||
|
Not clear where it may come out when compiling, but it shows up as a warning with Eclipse's code validation (see attached screenshot). "The method close() from the type Mongo is deprecated"
| |||||||||
| Comment by Jeffrey Yemin [ 20/Nov/18 ] | |||||||||
|
Kolano I'm not seeing this when I compile. Even though the close method is implemented in the Mongo class, the MongoClient class is the one that implements java.io.Closeable. Can you post the compiler warning that you're getting, as well as which version/distribution of javac that you're using to compile? | |||||||||
| Comment by Ken Kolano [X] [ 20/Nov/18 ] | |||||||||
|
This seems to cause the MongoClient objects close() method to be marked as deprecated as well, I believe because it was inherited from Mongo? | |||||||||
| Comment by Githook User [ 04/Oct/18 ] | |||||||||
|
Author: {'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com', 'username': 'jyemin'}Message: Deprecate DB#getMongo method, as Mongo itself is deprecated
| |||||||||
| Comment by Githook User [ 04/Oct/18 ] | |||||||||
|
Author: {'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com', 'username': 'jyemin'}Message: Deprecate com.mongodb.Mongo
|