[JAVA-247] authenticate method declares throw MongoException but doesn't actually throw it Created: 03/Jan/11 Updated: 17/Mar/11 Resolved: 15/Feb/11 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | API |
| Affects Version/s: | 2.4 |
| Fix Version/s: | 2.5 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Koen Serry | Assignee: | Antoine Girbal |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Description |
|
The current signature in DB is like however the only things thrown by the method are NPE & IllegalStateException. It is confusing to suppose the failure to authenticate could throw an exception while in fact it only returns a boolean |
| Comments |
| Comment by auto [ 15/Feb/11 ] |
|
Author: {u'login': u'agirbal', u'name': u'agirbal', u'email': u'antoine@10gen.com'}Message: |
| Comment by Antoine Girbal [ 15/Feb/11 ] |
|
agreed with reporter that the existing authenticate() behavior is not consistent with rest of driver. /**
|
| Comment by Antoine Girbal [ 04/Feb/11 ] |
|
it is actually possible that MongoException is thrown in the _doauth() call. |