<commit_before>package io.latent.storm.rabbitmq;

import java.util.Map;

import backtype.storm.task.OutputCollector;
import backtype.storm.tuple.Tuple;

/**
 * This abstract implementation of the {@link TupleToMessage} allows developers
 * to simply write the method converting the input {@link Tuple} to a
 * {@link Message} object for posting to RabbitMQ.
 *
 */
public abstract class AbstractTupleToMessage implements TupleToMessage {

  /**
   * Serial version UID.
   */
  private static final long serialVersionUID = 1L;

  /**
   * {@link OutputCollector} object for emitting {@link Tuple}s.
   */
  protected OutputCollector collector;

  /**
   * {@inheritDoc}
   */
  @Override
  public void prepare(@SuppressWarnings("rawtypes") Map stormConfig, OutputCollector collector) {
    this.collector = collector;
  }

  /**
   * {@inheritDoc}
   */
  @Override
  public String[] getOutputFields() {<commit_msg>make the outputCollector transient as RabbitMQBolt holds a non-transient instance field with an instance of this class implementation<commit_after>package io.latent.storm.rabbitmq;

import java.util.Map;

import backtype.storm.task.OutputCollector;
import backtype.storm.tuple.Tuple;

/**
 * This abstract implementation of the {@link TupleToMessage} allows developers
 * to simply write the method converting the input {@link Tuple} to a
 * {@link Message} object for posting to RabbitMQ.
 *
 */
public abstract class AbstractTupleToMessage implements TupleToMessage {

  /**
   * Serial version UID.
   */
  private static final long serialVersionUID = 1L;

  /**
   * {@link OutputCollector} object for emitting {@link Tuple}s.
   */
  protected transient OutputCollector collector;

  /**
   * {@inheritDoc}
   */
  @Override
  public void prepare(@SuppressWarnings("rawtypes") Map stormConfig, OutputCollector collector) {
    this.collector = collector;
  }

  /**
   * {@inheritDoc}
   */
  @Override
  public String[] getOutputFields() {
{'fraction_non_alphanumeric': 0.10153061224489796, 'fraction_numerical': 0.0010204081632653062, 'mean_word_length': 3.9771573604060912, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6961125', 'n_tokens_mistral': 573, 'n_tokens_neox': 546, 'n_words': 172}