@Override public void validate(DiameterAvp avp) throws AvpNotAllowedException { Dictionary dictionary = DictionarySingleton.getDictionary(); if (dictionary.isConfigured() && dictionary.isEnabled()) { AvpRepresentation rep = dictionary.getAvp(avp.getCode(), avp.getVendorId()); // check for grouped? if (rep != null && rep.isGrouped()) { try { GroupedAvpImpl impl = (GroupedAvpImpl) avp; rep.validate(impl.getGenericData()); } catch (ClassCastException cce) { throw new AvpNotAllowedException("Failed to validate avp, its not grouped!", cce, avp.getCode(), avp.getVendorId()); } } } }