HashMap actualMappings = new HashMap(len1);
for (int i = 0; i < len1; i++)
{
ExceptionMapping current = em2[i];
String name = current.getExceptionType();
if (actualMappings.containsKey(name))
{
throw new IllegalStateException("Type '" + name + "' registered more than once.");
}
actualMappings.put(name, current);
}
for (int i = 0; i < len1; i++)
{
ExceptionMapping expected = em1[i];
ExceptionMapping actual = (ExceptionMapping)actualMappings.get(expected.getExceptionType());
if (actual == null)
{
throw new IllegalStateException("Mapping not found for '" + expected.getExceptionType() + "'");
}