Skip to content

Commit fc3a805

Browse files
committed
NullPointerexception at org.elasticsearch.action.get.GetResponse.sourceAsString, closes #68
1 parent cd2090b commit fc3a805

File tree

1 file changed

+3
-0
lines changed
  • modules/elasticsearch/src/main/java/org/elasticsearch/action/get

1 file changed

+3
-0
lines changed

modules/elasticsearch/src/main/java/org/elasticsearch/action/get/GetResponse.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ public byte[] source() {
107107
* The source of the document (as a string).
108108
*/
109109
public String sourceAsString() {
110+
if (source == null) {
111+
return null;
112+
}
110113
return Unicode.fromBytes(source);
111114
}
112115

0 commit comments

Comments
 (0)