This code looks the same as what we have now, except that your version is searching for clazz in the Map twice - once in the containsKey call and once in the get call below. Is there are reason to do this?