<commit_before>package org.commonjava.indy.subsys.honeycomb;

import com.datastax.driver.core.Session;
import org.commonjava.indy.subsys.cassandra.CassandraClient;
import org.commonjava.o11yphant.honeycomb.impl.CassandraConnectionRootSpanFields;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import java.util.Collections;
import java.util.Map;

@ApplicationScoped
public class IndyCassandraConnectionRootSpanFields
                extends CassandraConnectionRootSpanFields
{
    private CassandraClient cassandraClient;

    @Inject
    public IndyCassandraConnectionRootSpanFields( CassandraClient cassandraClient )
    {
        this.cassandraClient = cassandraClient;
    }

    @Override
    protected Map<String, Session> getSessions()
    {
        return Collections.unmodifiableMap( cassandraClient.getSessions() );
    }
}<commit_msg>Fix NPE from IndyCassandraConnectionRootSpanFields constructor<commit_after>package org.commonjava.indy.subsys.honeycomb;

import com.datastax.driver.core.Session;
import org.commonjava.indy.subsys.cassandra.CassandraClient;
import org.commonjava.o11yphant.honeycomb.impl.CassandraConnectionRootSpanFields;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import java.util.Collections;
import java.util.Map;

@ApplicationScoped
public class IndyCassandraConnectionRootSpanFields
                extends CassandraConnectionRootSpanFields
{

    private final Map<String, Session> sessions;

    @Inject
    public IndyCassandraConnectionRootSpanFields( CassandraClient cassandraClient )
    {
        this.sessions = Collections.unmodifiableMap( cassandraClient.getSessions() );
    }

    @Override
    protected Map<String, Session> getSessions()
    {
        return sessions;
    }
}
{'fraction_non_alphanumeric': 0.07413600891861762, 'fraction_numerical': 0.002229654403567447, 'mean_word_length': 4.790322580645161, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '6278318', 'n_tokens_mistral': 529, 'n_tokens_neox': 500, 'n_words': 86}