forked from D-Net/dnet-hadoop
added check to fix issue when entry is present but value it is not
This commit is contained in:
parent
b570f011d1
commit
e983d02c1c
|
@ -99,7 +99,9 @@ public class Mapper implements Serializable {
|
|||
.ofNullable(input.getDescription())
|
||||
.ifPresent(value -> {
|
||||
Iterator<Field<String>> it = value.iterator();
|
||||
out.setName(it.next().getValue());
|
||||
if (it.hasNext()) {
|
||||
out.setName(it.next().getValue());
|
||||
}
|
||||
it.forEachRemaining(v -> externals.add(KeyValue.newInstance("description", v.getValue())));
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue