[JAVA-195] NullPointerException in Mongo.close() if no connections present Created: 21/Oct/10  Updated: 21/Oct/10  Resolved: 21/Oct/10

Status: Closed
Project: Java Driver
Component/s: None
Affects Version/s: 2.2
Fix Version/s: 2.3

Type: Bug Priority: Major - P3
Reporter: Lucas Zamboulis Assignee: Eliot Horowitz (Inactive)
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Fedora Linux hp1 2.6.34.6-54.fc13.x86_64 #1 SMP Sun Sep 5 17:16:27 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux



 Description   

The following code

public static void main(String[] args) {
try

{ Mongo m = new Mongo("192.168.1.16",27017); m.close(); }

catch (Exception e)

{ e.printStackTrace(); }

}

I get the following stacktrace:

java.lang.NullPointerException
at com.mongodb.DBTCPConnector.close(DBTCPConnector.java:352)
at com.mongodb.Mongo.close(Mongo.java:297)
at com.example.MongoError.main(MongoError.java:11)



 Comments   
Comment by Eliot Horowitz (Inactive) [ 21/Oct/10 ]

JAVA-180

Generated at Thu Feb 08 08:51:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.