I tried to map elastic data to list. since getSourceAsObjectList() method is deprecated, I made code like this.

```
class activityObj {
    private String name;
    private String oid;
    public String getName()
    {
        return name;
    }
    public void setName( String name)
    {
        this.name = name;
    }
    public String getOid()
    {
        return oid;
    }
    public void setOid( String oid)
    {
        this.oid = oid;
    }
}

List< Hit<activityObj, Void>> hits = result.getHits(activityObj.class);
List< activityObj> list = new ArrayList<activityObj>();

for (SearchResult.Hit<activityObj, Void> hit: hits) {
    activityObj objectSource = hit.source; // null point error
    list.add(objectSource);
    logger.info( "hits : " + objectSource.getName());
}

```

It doesn't work as I expect and looks messy ( it's using two list value to map result). Am I doing wrong?