remove some deprecated code slated for removal in 3.18

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808400 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2017-09-14 22:19:16 +00:00
parent 18e53b3bef
commit 320d9735ca
5 changed files with 4 additions and 78 deletions

View File

@ -18,7 +18,6 @@ package org.apache.poi.xssf.usermodel;
import org.apache.poi.ss.usermodel.BuiltinFormats;
import org.apache.poi.ss.usermodel.DataFormat;
import org.apache.poi.util.Removal;
import org.apache.poi.xssf.model.StylesTable;
/**
@ -71,17 +70,6 @@ public class XSSFDataFormat implements DataFormat {
if(fmt == null) fmt = BuiltinFormats.getBuiltinFormat(index);
return fmt;
}
/**
* get the format string that matches the given format index
* @param index of a format
* @return string represented at index of format or <code>null</code> if there is not a format at that index
*
* @deprecated POI 3.16 beta 1 - use {@link #getFormat(short)} instead
*/
@Removal(version="3.18")
public String getFormat(int index) {
return getFormat((short)index);
}
/**
* Add a number format with a specific ID into the number format style table.

View File

@ -1,46 +0,0 @@
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
package org.apache.poi.xssf.util;
import java.io.InputStream;
import org.apache.poi.util.Internal;
import org.apache.poi.util.Removal;
import org.apache.poi.util.ReplacingInputStream;
/**
* This is a seriously sick fix for the fact that some .xlsx
* files contain raw bits of HTML, without being escaped
* or properly turned into XML.
* The result is that they contain things like &gt;br&lt;,
* which breaks the XML parsing.
* This very sick InputStream wrapper attempts to spot
* these go past, and fix them.
* Only works for UTF-8 and US-ASCII based streams!
* It should only be used where experience shows the problem
* can occur...
*
* @deprecated 3.16-beta2 - use ReplacingInputStream(source, "&gt;br&lt;", "&gt;br/&lt;")
*/
@Deprecated
@Removal(version="3.18")
@Internal
public class EvilUnclosedBRFixingInputStream extends ReplacingInputStream {
public EvilUnclosedBRFixingInputStream(InputStream source) {
super(source, "<br>", "<br/>");
}
}

View File

@ -52,7 +52,6 @@ import org.apache.poi.poifs.filesystem.NPOIFSFileSystem;
import org.apache.poi.util.CodePageUtil;
import org.apache.poi.util.POILogFactory;
import org.apache.poi.util.POILogger;
import org.apache.poi.util.Removal;
/**
* Reads an Outlook MSG File in and provides hooks into its data structure.
@ -536,21 +535,6 @@ public class MAPIMessage extends POIReadOnlyDocument {
return getStringFromChunk(mainChunks.getConversationTopic());
}
/**
* Gets the message class of the parsed Outlook Message.
* (Yes, you can use this to determine if a message is a calendar
* item, note, or actual outlook Message)
* For emails the class will be IPM.Note
*
* @throws ChunkNotFoundException
* @deprecated 3.16 beta 3. Use {@link #getMessageClassEnum()} instead.
*/
@Deprecated
@Removal(version="3.18")
public String getMessageClass() throws ChunkNotFoundException {
return getStringFromChunk(mainChunks.getMessageClass());
}
/**
* Gets the message class of the parsed Outlook Message.
* (Yes, you can use this to determine if a message is a calendar

View File

@ -126,8 +126,8 @@ public final class TestOutlook30FileRead extends TestCase {
* @throws Exception
*/
public void testReadMessageClass() throws Exception {
String obtained = mapiMessage.getMessageClass();
TestCase.assertEquals("IPM.Note", obtained);
MAPIMessage.MESSAGE_CLASS obtained = mapiMessage.getMessageClassEnum();
TestCase.assertEquals(MAPIMessage.MESSAGE_CLASS.NOTE, obtained);
}
/**

View File

@ -130,8 +130,8 @@ public final class TestSimpleFileRead extends TestCase {
* @throws Exception
*/
public void testReadMessageClass() throws Exception {
String obtained = mapiMessage.getMessageClass();
TestCase.assertEquals("IPM.Note", obtained);
MAPIMessage.MESSAGE_CLASS obtained = mapiMessage.getMessageClassEnum();
TestCase.assertEquals(MAPIMessage.MESSAGE_CLASS.NOTE, obtained);
}
/**