Skip to content

Commit a032391

Browse files
committed
Fixed code style, removed Deque class as Java 6 alien
1 parent ed480ce commit a032391

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/main/com/mongodb/DefaultDBCallback.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,15 @@
1919
package com.mongodb;
2020

2121
// Bson
22-
import java.util.Deque;
22+
import org.bson.BSONObject;
23+
import org.bson.BasicBSONCallback;
24+
import org.bson.types.ObjectId;
25+
2326
import java.util.LinkedList;
2427
import java.util.List;
2528
import java.util.logging.Level;
2629
import java.util.logging.Logger;
2730

28-
import org.bson.BSONObject;
29-
import org.bson.BasicBSONCallback;
30-
import org.bson.types.ObjectId;
31-
3231
/**
3332
* This class overrides BasicBSONCallback to implement some extra features specific to the Database.
3433
* For example DBRef type.
@@ -69,7 +68,9 @@ public void objectStart(boolean array, String name){
6968
public Object objectDone(){
7069
BSONObject o = (BSONObject)super.objectDone();
7170
String name = null;
72-
if ( _nameStack.size() > 0 ) name = _nameStack.removeLast();
71+
if ( _nameStack.size() > 0 ){
72+
name = _nameStack.removeLast();
73+
}
7374
if ( ! ( o instanceof List ) && name != null &&
7475
o.containsField( "$ref" ) &&
7576
o.containsField( "$id" ) ){
@@ -148,7 +149,7 @@ public void reset(){
148149
super.reset();
149150
}
150151

151-
private Deque<String> _nameStack;
152+
private LinkedList<String> _nameStack;
152153
final DBCollection _collection;
153154
final DB _db;
154155
static final Logger LOGGER = Logger.getLogger( "com.mongo.DECODING" );

0 commit comments

Comments
 (0)