before refactoring extractKeys()
Change extractKey() method to avoid some System.arraycopy() and compatibiltiy with nested pojo types