In general, prefer to declare things as late as possible: I think you can move this all the way to 1030 and just say:

BSONOBj request = builder.obj();