Skip to content
Snippets Groups Projects
Commit d9b1030e authored by Andy Kruth's avatar Andy Kruth
Browse files

[orientdb] fixed null pointers with readallfields

parent 78f78838
No related branches found
No related tags found
No related merge requests found
...@@ -280,19 +280,20 @@ public class OrientDBClient extends DB { ...@@ -280,19 +280,20 @@ public class OrientDBClient extends DB {
int entrycount = 0; int entrycount = 0;
final OIndexCursor entries = dictionary.getIndex().iterateEntriesMajor(startkey, true, true); final OIndexCursor entries = dictionary.getIndex().iterateEntriesMajor(startkey, true, true);
while (entries.hasNext() && entrycount < recordcount) { if (fields != null && !fields.isEmpty()) {
final Entry<Object, OIdentifiable> entry = entries.nextEntry(); while (entries.hasNext() && entrycount < recordcount) {
final ODocument document = entry.getValue().getRecord(); final Entry<Object, OIdentifiable> entry = entries.nextEntry();
final ODocument document = entry.getValue().getRecord();
final HashMap<String, ByteIterator> map = final HashMap<String, ByteIterator> map = new HashMap<String, ByteIterator>();
new HashMap<String, ByteIterator>(); result.add(map);
result.add(map);
for (String field : fields) { for (String field : fields) {
map.put(field, new StringByteIterator((String) document.field(field))); map.put(field, new StringByteIterator((String) document.field(field)));
} }
entrycount++; entrycount++;
}
} }
return Status.OK; return Status.OK;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment