* in the integration tests, mostly text-extraction related at the moment.
*/
public abstract class AbstractFileHandler implements FileHandler {
- public static final Set<String> EXPECTED_EXTRACTOR_FAILURES = new HashSet<>(Arrays.asList(
+ // some FileHandlers extend this list!?!
+ protected static final Set<String> EXPECTED_EXTRACTOR_FAILURES = new HashSet<>(Arrays.asList(
// password protected files without password
// ... currently none ...
import java.io.File;
import java.io.InputStream;
-import java.util.function.Supplier;
+import java.lang.reflect.InvocationTargetException;
@SuppressWarnings("unused")
public enum FileHandlerKnown {
// Because of no-scratchpad handling, we need to resort to reflection here
String n = name().replace("NULL", "Null");
return (FileHandler)Class.forName("org.apache.poi.stress." + n + "FileHandler").getDeclaredConstructor().newInstance();
- } catch (Exception e) {
+ } catch (RuntimeException | ClassNotFoundException | NoSuchMethodException | InstantiationException |
+ IllegalAccessException | InvocationTargetException e) {
return new NullFileHandler();
}
}