Skip to content
Browse files

Update DefaultDocument{,Builder}

Add missing braces here and there to for loops and stuff.
  • Loading branch information...
1 parent a0b8b96 commit 9fb6c83999555aafe4b5e64f2df21a3924a5c137 @kohanyirobert committed Nov 24, 2012
View
3 src/main/java/com/github/kohanyirobert/ebson/DefaultDocument.java
@@ -39,8 +39,9 @@ public Object get(Object key) {
@Override
public boolean containsKey(Object key) {
Preconditions.checkNotNull(key, "null key");
- if (!String.class.isInstance(key))
+ if (!String.class.isInstance(key)) {
throw new ClassCastException(String.format("key: '%s' is not a string", key));
+ }
return super.containsKey(key);
}
View
3 src/main/java/com/github/kohanyirobert/ebson/DefaultDocumentBuilder.java
@@ -20,8 +20,9 @@
@Override
public BsonDocument.Builder putAll(Map<String, Object> map) {
Preconditions.checkNotNull(map, "null map");
- for (Entry<String, Object> entry : map.entrySet())
+ for (Entry<String, Object> entry : map.entrySet()) {
put(entry.getKey(), entry.getValue());
+ }
return this;
}

0 comments on commit 9fb6c83

Please sign in to comment.
Something went wrong with that request. Please try again.