code: protected void validateAttributePresentity() throws IllegalStateException {
  		if (!rfc3489CompatibilityMode) {
  			return;
  		}
  
  		for (char i = StunAttribute.MAPPED_ADDRESS; i < StunAttribute.REFLECTED_FROM; i++) {
  			if (getAttributePresentity(i) == M && getAttribute(i) == null) {
  				throw new IllegalStateException("A mandatory attribute (type=" + (int) i + ") is missing!");
  			}
  		}
  	}
docs: Verify that the message has all obligatory attributes and throw an
  exception if this is not the case.
  
  @throws IllegalStateException
  if the message does not have all required attributes.