<commit_before>package net.ripe.db.whois.api.whois;

import net.ripe.db.whois.api.whois.domain.*;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.namespace.QName;
import javax.xml.stream.XMLOutputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
import java.io.OutputStream;

class StreamingMarshalXml implements StreamingMarshal {
    private static Marshaller marshaller;
    private static XMLOutputFactory xmlOutputFactory;

    public StreamingMarshalXml() {
        try {
//            String wtf = WhoisResources.class.getPackage().getName();

            final JAXBContext context = JAXBContext.newInstance(
                    Attribute.class,
                    Attributes.class,
                    DirectLookup.class,
                    Flag.class,
                    Flags.class,
                    GeolocationAttributes.class,
                    GrsMirror.class,
                    GrsSource.class,
                    GrsSources.class,
                    InverseAttribute.class,
                    InverseAttributes.class,
                    Language.class,
                    Link.class,
                    Location.class,
                    Parameters.class,
                    PrimaryKey.class,<commit_msg>JAXB marshaller is not thread-safe.<commit_after>package net.ripe.db.whois.api.whois;

import net.ripe.db.whois.api.whois.domain.*;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.namespace.QName;
import javax.xml.stream.XMLOutputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
import java.io.OutputStream;

class StreamingMarshalXml implements StreamingMarshal {
    private static Marshaller marshaller;                           // TODO: [ES] jaxb marshaller isn't thread safe
    private static XMLOutputFactory xmlOutputFactory;

    public StreamingMarshalXml() {
        try {
            final JAXBContext context = JAXBContext.newInstance(
                    Attribute.class,
                    Attributes.class,
                    DirectLookup.class,
                    Flag.class,
                    Flags.class,
                    GeolocationAttributes.class,
                    GrsMirror.class,
                    GrsSource.class,
                    GrsSources.class,
                    InverseAttribute.class,
                    InverseAttributes.class,
                    Language.class,
                    Link.class,
                    Location.class,
                    Parameters.class,
                    PrimaryKey.class,
{'fraction_non_alphanumeric': 0.07445671535447096, 'fraction_numerical': 0.0, 'mean_word_length': 1.788480635551142, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 18}, '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': '378535', 'n_tokens_mistral': 745, 'n_tokens_neox': 696, 'n_words': 127}