blob: 50d1083693825460b383d9b42a9fec24518da66d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.container.xml.providers;
import com.yahoo.container.di.componentgraph.Provider;
import javax.xml.stream.XMLOutputFactory;
/**
* @author Einar M R Rosenvinge
* @deprecated Do not use!
*/
@Deprecated // TODO: Remove on Vespa 8
public class XMLOutputFactoryProvider implements Provider<XMLOutputFactory> {
public static final String FACTORY_CLASS = "com.sun.xml.internal.stream.XMLOutputFactoryImpl";
@Override
public XMLOutputFactory get() {
System.setProperty("javax.xml.stream.XMLOutputFactory", FACTORY_CLASS);
// NOTE: In case the newFactory(String, ClassLoader) is used, XMLOutputFactory treats the string as system
// property name. Also, the given class loader is ignored if the property is set!
return XMLOutputFactory.newFactory();
}
@Override
public void deconstruct() { }
}
|