<commit_before>package com.sap.core.odata.api.exception;


/**
 * Base exception class for all exceptions in <code>OData</code> library which contains a message which will be displayed to 
 * a possible client and therefore needs support for internationalization.
 * For support of internationalization and translated message all {@link ODataHttpException} and sub classes contains 
 * a {@link MessageReference} object which can be mapped to a related key and message in the resource bundles.
 */
public abstract class ODataMessageException extends ODataException {

  /** Message reference for exception which is used for internationalization */
  protected final MessageReference messageReference;

  /**   */
  private static final long serialVersionUID = 42L;

  /** Reference to common message for a {@link ODataHttpException} */
  public static final MessageReference COMMON = createMessageReference(ODataHttpException.class, "COMMON");

  /**
   * Create {@link ODataHttpException} with given {@link MessageReference}.
   * 
   * @param messageReference
   *        references the message text (and additional values) of this {@link ODataHttpException}
   */
  public ODataMessageException(MessageReference messageReference) {
    this(messageReference, null);
  }

  /**
   * Create {@link ODataHttpException} with given {@link MessageReference} and cause {@link Throwable} which caused
   * this {@link ODataHttpException}.
   * 
   * @param messageReference
   *        references the message text (and additional values) of this {@link ODataHttpException}
   * @param cause
   *        exception which caused this {@link ODataHttpException}
   */
  public ODataMessageException(MessageReference messageReference, Throwable cause) {
    super(cause);
    this.messageReference = messageReference;
  }

  /**
   * Convenience method for creation of {@link MessageReference} objects.
   * 
   * @param clazz
   *        Exception class for message reference
   * @param messageReferenceKey
   *        Unique (in exception class) key for message reference.
   * @return created context instance
   */
  public static final MessageReference createMessageReference(Class<? extends ODataMessageException> clazz, String messageReferenceKey) {
    return MessageReference.create(clazz, messageReferenceKey);
  }
  <commit_msg>Reduced visibility of method.<commit_after>package com.sap.core.odata.api.exception;


/**
 * Base exception class for all exceptions in <code>OData</code> library which contains a message which will be displayed to 
 * a possible client and therefore needs support for internationalization.
 * For support of internationalization and translated message all {@link ODataHttpException} and sub classes contains 
 * a {@link MessageReference} object which can be mapped to a related key and message in the resource bundles.
 */
public abstract class ODataMessageException extends ODataException {

  /** Message reference for exception which is used for internationalization */
  protected final MessageReference messageReference;

  /**   */
  private static final long serialVersionUID = 42L;

  /** Reference to common message for a {@link ODataHttpException} */
  public static final MessageReference COMMON = createMessageReference(ODataHttpException.class, "COMMON");

  /**
   * Create {@link ODataHttpException} with given {@link MessageReference}.
   * 
   * @param messageReference
   *        references the message text (and additional values) of this {@link ODataHttpException}
   */
  public ODataMessageException(MessageReference messageReference) {
    this(messageReference, null);
  }

  /**
   * Create {@link ODataHttpException} with given {@link MessageReference} and cause {@link Throwable} which caused
   * this {@link ODataHttpException}.
   * 
   * @param messageReference
   *        references the message text (and additional values) of this {@link ODataHttpException}
   * @param cause
   *        exception which caused this {@link ODataHttpException}
   */
  public ODataMessageException(MessageReference messageReference, Throwable cause) {
    super(cause);
    this.messageReference = messageReference;
  }

  /**
   * Convenience method for creation of {@link MessageReference} objects.
   * 
   * @param clazz
   *        Exception class for message reference
   * @param messageReferenceKey
   *        Unique (in exception class) key for message reference.
   * @return created context instance
   */
  protected static final MessageReference createMessageReference(Class<? extends ODataMessageException> clazz, String messageReferenceKey) {
    return MessageReference.create(clazz, messageReferenceKey);
  }
  
{'fraction_non_alphanumeric': 0.07373370378285958, 'fraction_numerical': 0.0008548835221201111, 'mean_word_length': 4.125958378970427, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6206424', 'n_tokens_mistral': 1131, 'n_tokens_neox': 1102, 'n_words': 429}