Skip to content

Commit

Permalink
Checkstyle fixes related to recent changes with reusing Writable types.
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Lovett committed May 18, 2015
1 parent e57a046 commit fd1095e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
public class MongoUpdateWritable implements Writable {

private static final Log LOG = LogFactory.getLog(MongoUpdateWritable.class);
private static final BSONEncoder enc = new BasicBSONEncoder();
private final BSONEncoder enc = new BasicBSONEncoder();

private BasicBSONObject query;
private BasicBSONObject modifiers;
Expand Down Expand Up @@ -80,19 +80,19 @@ public boolean isMultiUpdate() {
return multiUpdate;
}

public void setQuery(BasicBSONObject query) {
public void setQuery(final BasicBSONObject query) {
this.query = query;
}

public void setModifiers(BasicBSONObject modifiers) {
public void setModifiers(final BasicBSONObject modifiers) {
this.modifiers = modifiers;
}

public void setUpsert(boolean upsert) {
public void setUpsert(final boolean upsert) {
this.upsert = upsert;
}

public void setMultiUpdate(boolean multiUpdate) {
public void setMultiUpdate(final boolean multiUpdate) {
this.multiUpdate = multiUpdate;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ public String getFrom() {
return from;
}

public void setFrom(String from) {
public void setFrom(final String from) {
this.from = from;
}

public String getTo() {
return to;
}

public void setTo(String to) {
public void setTo(final String to) {
this.to = to;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ public boolean readKeyValue() throws IOException {
// Actually, just read the value as the key is embedded.
try {
currentValue.readFields(in);
Object _id = currentValue.getDoc().get("_id");
currentKey.setDoc(new BasicDBObject("_id", _id));
Object id = currentValue.getDoc().get("_id");
currentKey.setDoc(new BasicDBObject("_id", id));
// If successful we'll have an _id field
return _id != null;
return id != null;
} catch (IndexOutOfBoundsException e) {
// No more data
LOG.info("No more data; no key/value pair read.");
Expand Down

0 comments on commit fd1095e

Please sign in to comment.