mirror of https://github.com/apache/poi.git
Make file-handlers for integration-test public to be able to use them in poi-mass-testing
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1894478 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a34768d3f8
commit
c7e4307ac4
|
@ -31,7 +31,7 @@ import org.apache.poi.hdgf.streams.TrailerStream;
|
|||
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class HDGFFileHandler extends POIFSFileHandler {
|
||||
public class HDGFFileHandler extends POIFSFileHandler {
|
||||
@Override
|
||||
public void handleFile(InputStream stream, String path) throws IOException {
|
||||
POIFSFileSystem poifs = new POIFSFileSystem(stream);
|
||||
|
|
|
@ -32,7 +32,7 @@ import org.apache.poi.poifs.filesystem.FileMagic;
|
|||
import org.apache.poi.util.LittleEndian;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class HMEFFileHandler extends AbstractFileHandler {
|
||||
public class HMEFFileHandler extends AbstractFileHandler {
|
||||
|
||||
@Override
|
||||
public void handleExtracting(File file) throws Exception {
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.apache.poi.hpbf.extractor.PublisherTextExtractor;
|
|||
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class HPBFFileHandler extends POIFSFileHandler {
|
||||
public class HPBFFileHandler extends POIFSFileHandler {
|
||||
@Override
|
||||
public void handleFile(InputStream stream, String path) throws Exception {
|
||||
HPBFDocument pub = new HPBFDocument(new POIFSFileSystem(stream));
|
||||
|
|
|
@ -45,7 +45,7 @@ import org.apache.poi.poifs.filesystem.POIFSFileSystem;
|
|||
import org.apache.poi.util.TempFile;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class HPSFFileHandler extends POIFSFileHandler {
|
||||
public class HPSFFileHandler extends POIFSFileHandler {
|
||||
private static final String NL = System.getProperty("line.separator");
|
||||
|
||||
private static final ThreadLocal<File> copyOutput = ThreadLocal.withInitial(HPSFFileHandler::getTempFile);
|
||||
|
|
|
@ -29,7 +29,7 @@ import org.apache.poi.hslf.usermodel.HSLFSlideShow;
|
|||
import org.apache.poi.hslf.usermodel.HSLFSlideShowImpl;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class HSLFFileHandler extends SlideShowHandler {
|
||||
public class HSLFFileHandler extends SlideShowHandler {
|
||||
|
||||
private static final Logger LOGGER = LogManager.getLogger(HSLFFileHandler.class);
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.apache.poi.hsmf.datatypes.AttachmentChunks;
|
|||
import org.apache.poi.hsmf.datatypes.DirectoryChunk;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class HSMFFileHandler extends POIFSFileHandler {
|
||||
public class HSMFFileHandler extends POIFSFileHandler {
|
||||
@Override
|
||||
public void handleFile(InputStream stream, String path) throws Exception {
|
||||
MAPIMessage mapi = new MAPIMessage(stream);
|
||||
|
|
|
@ -36,7 +36,7 @@ import org.apache.poi.ss.usermodel.Sheet;
|
|||
import org.apache.commons.io.output.NullPrintStream;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class HSSFFileHandler extends SpreadsheetHandler {
|
||||
public class HSSFFileHandler extends SpreadsheetHandler {
|
||||
private final POIFSFileHandler delegate = new POIFSFileHandler();
|
||||
@Override
|
||||
public void handleFile(InputStream stream, String path) throws Exception {
|
||||
|
|
|
@ -30,7 +30,7 @@ import org.apache.poi.hwpf.model.PicturesTable;
|
|||
import org.apache.poi.hwpf.usermodel.Picture;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class HWPFFileHandler extends POIFSFileHandler {
|
||||
public class HWPFFileHandler extends POIFSFileHandler {
|
||||
@Override
|
||||
public void handleFile(InputStream stream, String path) throws Exception {
|
||||
HWPFDocument doc = new HWPFDocument(stream);
|
||||
|
|
|
@ -31,7 +31,7 @@ import org.apache.poi.openxml4j.opc.PackagePart;
|
|||
import org.apache.poi.xwpf.usermodel.XWPFRelation;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class OPCFileHandler extends AbstractFileHandler {
|
||||
public class OPCFileHandler extends AbstractFileHandler {
|
||||
private static final Set<String> EXPECTED_FAILURES = StressTestUtils.unmodifiableHashSet(
|
||||
"document/truncated62886.docx"
|
||||
);
|
||||
|
|
|
@ -29,7 +29,7 @@ import org.apache.poi.hpsf.extractor.HPSFPropertiesExtractor;
|
|||
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class POIFSFileHandler extends AbstractFileHandler {
|
||||
public class POIFSFileHandler extends AbstractFileHandler {
|
||||
|
||||
@Override
|
||||
public void handleFile(InputStream stream, String path) throws Exception {
|
||||
|
|
|
@ -23,7 +23,7 @@ import org.apache.poi.openxml4j.opc.PackageAccess;
|
|||
import org.apache.poi.xdgf.usermodel.XmlVisioDocument;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class XDGFFileHandler extends AbstractFileHandler {
|
||||
public class XDGFFileHandler extends AbstractFileHandler {
|
||||
@Override
|
||||
public void handleFile(InputStream stream, String path) throws Exception {
|
||||
// ignore password protected files
|
||||
|
|
|
@ -30,7 +30,7 @@ import org.apache.poi.xslf.usermodel.XMLSlideShow;
|
|||
import org.apache.poi.xslf.usermodel.XSLFSlideShow;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class XSLFFileHandler extends SlideShowHandler {
|
||||
public class XSLFFileHandler extends SlideShowHandler {
|
||||
@Override
|
||||
public void handleFile(InputStream stream, String path) throws Exception {
|
||||
try (XMLSlideShow slide = new XMLSlideShow(stream);
|
||||
|
|
|
@ -30,7 +30,7 @@ import org.apache.poi.xssf.extractor.XSSFBEventBasedExcelExtractor;
|
|||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class XSSFBFileHandler extends AbstractFileHandler {
|
||||
public class XSSFBFileHandler extends AbstractFileHandler {
|
||||
|
||||
static {
|
||||
//add expected failures here:
|
||||
|
|
|
@ -61,7 +61,7 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|||
import org.junit.jupiter.api.Test;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
class XSSFFileHandler extends SpreadsheetHandler {
|
||||
public class XSSFFileHandler extends SpreadsheetHandler {
|
||||
@Override
|
||||
public void handleFile(InputStream stream, String path) throws Exception {
|
||||
// ignore password protected files if password is unknown
|
||||
|
|
|
@ -26,7 +26,7 @@ import org.apache.poi.ooxml.POIXMLException;
|
|||
import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class XWPFFileHandler extends AbstractFileHandler {
|
||||
public class XWPFFileHandler extends AbstractFileHandler {
|
||||
private static final Set<String> EXPECTED_FAILURES = StressTestUtils.unmodifiableHashSet(
|
||||
"document/truncated62886.docx", "document/ExternalEntityInText.docx"
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue