formatAdapter.formats, remove redundant code