Skip to content

Commit

Permalink
selecting error from sys.jobs_log caused
Browse files Browse the repository at this point in the history
a NPE in some rare cases
  • Loading branch information
Philipp Bogensberger committed Jun 24, 2015
1 parent 383d390 commit 60d02ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Changes for Crate
Unreleased
==========

- Fix: selecting error from sys.jobs_log caused a NPE in some cases

- Fix: If a query would fail because a shard starts to relocate during
query time, the query is retried now

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ public Long value() {
.add(new SysJobLogExpression<BytesRef>(ERROR) {
@Override
public BytesRef value() {
if (row.errorMessage() == null) {
String err = row.errorMessage();
if (err == null) {
return null;
}
return new BytesRef(row.errorMessage());
return new BytesRef(err);
}
})
.build();
Expand Down

0 comments on commit 60d02ca

Please sign in to comment.