if (exceptAttr != null) {
affirm((exceptAttr.getExceptions().size()
== new HashSet(exceptAttr.getExceptions()).size()),
"Exception attribute contains duplicate exceptions.");
final ExceptionsAttribute foundExceptAttr
= method.exceptionsAttribute();
if (foundExceptAttr == null) {
// add the exception attribute
final AttributeVector methodAttrs = method.attributes();
affirm(methodAttrs != null);
methodAttrs.addElement(exceptAttr);
} else {
// add those exceptions not already present
final List foundEx = foundExceptAttr.getExceptions();
final List newEx = exceptAttr.getExceptions();
newEx.removeAll(foundEx);
foundEx.addAll(newEx);
}
}