remove some deprecated methods

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1825807 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2018-03-04 11:47:21 +00:00
parent d720ad82b6
commit 3716f4a556
3 changed files with 2 additions and 35 deletions

View File

@ -98,26 +98,6 @@ public class POIXMLTypeLoader {
return options == null ? DEFAULT_XML_OPTIONS : options; return options == null ? DEFAULT_XML_OPTIONS : options;
} }
/**
* Sets the {@link ClassLoader} which is used, when XmlBeans are dynamically instantiated -
* opposed to being loaded by the factory class which is accompanied by each generated XmlBeans interface.
* <p>
* This is especially necessary in a context which doesn't guarantee that the current (thread) context
* classloader has access to all XmlBeans schema definitions (*.xsb) - which is typically in OSGI the case.
* <p>
* The classloader will be only set for the current thread in a {@link ThreadLocal}. Although the
* ThreadLocal is implemented via a {@link WeakReference}, it's good style to {@code null} the classloader
* when the user code is finalized.
*
* @param cl the classloader to be used when XmlBeans classes and definitions are looked up
* @deprecated in POI 3.17 - setting a classloader from the outside is now obsolete,
* the classloader of the SchemaType will be used
*/
@Deprecated
@Removal(version="4.0")
public static void setClassLoader(ClassLoader cl) {
}
private static SchemaTypeLoader getTypeLoader(SchemaType type) { private static SchemaTypeLoader getTypeLoader(SchemaType type) {
SchemaTypeLoader tl = typeLoader.get(); SchemaTypeLoader tl = typeLoader.get();
if (tl == null) { if (tl == null) {

View File

@ -71,8 +71,7 @@ public class XSLFTable extends XSLFGraphicFrame implements Iterable<XSLFTableRow
String errStr = String errStr =
"Schemas (*.xsb) for CTTable can't be loaded - usually this happens when OSGI " + "Schemas (*.xsb) for CTTable can't be loaded - usually this happens when OSGI " +
"loading is used and the thread context classloader has no reference to " + "loading is used and the thread context classloader has no reference to " +
"the xmlbeans classes - use POIXMLTypeLoader.setClassLoader() to set the loader, " + "the xmlbeans classes"
"e.g. with CTTable.class.getClassLoader()"
; ;
throw new IllegalStateException(errStr); throw new IllegalStateException(errStr);
} }

View File

@ -301,17 +301,6 @@ public final class XSSFChart extends XDDFChart implements Chart, ChartAxisFactor
return new XSSFRichTextString(text.toString()); return new XSSFRichTextString(text.toString());
} }
/**
* Sets the title text as a static string.
* @param newTitle to use
* @deprecated POI 3.16, use {@link #setTitleText(String)} instead.
*/
@Deprecated
@Removal(version = "4.0")
public void setTitle(String newTitle) {
}
/** /**
* Sets the title text as a static string. * Sets the title text as a static string.
* *
@ -342,8 +331,7 @@ public final class XSSFChart extends XDDFChart implements Chart, ChartAxisFactor
rich = tx.getRich(); rich = tx.getRich();
} else { } else {
rich = tx.addNewRich(); rich = tx.addNewRich();
rich.addNewBodyPr(); // body properties must exist (but can be rich.addNewBodyPr(); // body properties must exist (but can be empty)
// empty)
} }
CTTextParagraph para; CTTextParagraph para;