You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ta...@apache.org on 2025/11/19 21:03:08 UTC

(tika) branch spotless created (now 3fd128b3f)

This is an automated email from the ASF dual-hosted git repository.

tallison pushed a change to branch spotless
in repository https://gitbox.apache.org/repos/asf/tika.git


      at 3fd128b3f spotless -- proof of concept

This branch includes the following new commits:

     new 3fd128b3f spotless -- proof of concept

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(tika) 01/01: spotless -- proof of concept

Posted by ta...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tallison pushed a commit to branch spotless
in repository https://gitbox.apache.org/repos/asf/tika.git

commit 3fd128b3fc0eb679a5acd23efaf4f0b2836983fa
Author: tallison <ta...@apache.org>
AuthorDate: Wed Nov 19 16:02:50 2025 -0500

    spotless -- proof of concept
---
 .../main/java/org/apache/tika/cli/AsyncHelper.java |   24 +-
 .../src/main/java/org/apache/tika/cli/TikaCLI.java |  293 ++--
 .../apache/tika/gui/ParsingTransferHandler.java    |   35 +-
 .../src/main/java/org/apache/tika/gui/TikaGUI.java |  172 +-
 .../java/org/apache/tika/cli/AsyncHelperTest.java  |   27 +-
 .../java/org/apache/tika/cli/TikaCLIAsyncTest.java |   75 +-
 .../test/java/org/apache/tika/cli/TikaCLITest.java |  288 ++--
 .../test/java/org/apache/tika/bundle/BundleIT.java |  107 +-
 tika-core/src/main/java/org/apache/tika/Tika.java  |  323 ++--
 .../concurrent/ConfigurableThreadPoolExecutor.java |   26 +-
 .../tika/concurrent/SimpleThreadPoolExecutor.java  |   28 +-
 .../java/org/apache/tika/config/ConfigBase.java    |  151 +-
 .../main/java/org/apache/tika/config/Field.java    |   27 +-
 .../java/org/apache/tika/config/Initializable.java |   40 +-
 .../tika/config/InitializableProblemHandler.java   |   42 +-
 .../org/apache/tika/config/LoadErrorHandler.java   |   48 +-
 .../main/java/org/apache/tika/config/Param.java    |   83 +-
 .../java/org/apache/tika/config/ParamField.java    |   68 +-
 .../java/org/apache/tika/config/ServiceLoader.java |  126 +-
 .../java/org/apache/tika/config/TikaActivator.java |   43 +-
 .../java/org/apache/tika/config/TikaConfig.java    |  406 ++---
 .../apache/tika/config/TikaConfigSerializer.java   |  160 +-
 .../org/apache/tika/config/TikaTaskTimeout.java    |   23 +-
 .../java/org/apache/tika/config/package-info.java  |   22 +-
 .../org/apache/tika/detect/AutoDetectReader.java   |   62 +-
 .../org/apache/tika/detect/CompositeDetector.java  |   34 +-
 .../tika/detect/CompositeEncodingDetector.java     |   46 +-
 .../org/apache/tika/detect/DefaultDetector.java    |   55 +-
 .../tika/detect/DefaultEncodingDetector.java       |   39 +-
 .../apache/tika/detect/DefaultProbDetector.java    |   33 +-
 .../main/java/org/apache/tika/detect/Detector.java |   50 +-
 .../java/org/apache/tika/detect/EmptyDetector.java |   23 +-
 .../org/apache/tika/detect/EncodingDetector.java   |   51 +-
 .../apache/tika/detect/FileCommandDetector.java    |   71 +-
 .../java/org/apache/tika/detect/MagicDetector.java |  128 +-
 .../apache/tika/detect/NNExampleModelDetector.java |   43 +-
 .../org/apache/tika/detect/NNTrainedModel.java     |   27 +-
 .../apache/tika/detect/NNTrainedModelBuilder.java  |   22 +-
 .../java/org/apache/tika/detect/NameDetector.java  |   79 +-
 .../tika/detect/NonDetectingEncodingDetector.java  |   27 +-
 .../org/apache/tika/detect/OverrideDetector.java   |   27 +-
 .../java/org/apache/tika/detect/TextDetector.java  |   71 +-
 .../org/apache/tika/detect/TextStatistics.java     |   51 +-
 .../java/org/apache/tika/detect/TrainedModel.java  |   22 +-
 .../apache/tika/detect/TrainedModelDetector.java   |   26 +-
 .../java/org/apache/tika/detect/TypeDetector.java  |   40 +-
 .../org/apache/tika/detect/XmlRootExtractor.java   |   41 +-
 .../apache/tika/detect/ZeroSizeFileDetector.java   |   23 +-
 .../java/org/apache/tika/detect/package-info.java  |   22 +-
 .../java/org/apache/tika/embedder/Embedder.java    |   88 +-
 .../org/apache/tika/embedder/ExternalEmbedder.java |  175 +-
 .../tika/exception/AccessPermissionException.java  |   27 +-
 .../tika/exception/CorruptedFileException.java     |   26 +-
 .../tika/exception/EncryptedDocumentException.java |   22 +-
 .../tika/exception/FileTooLongException.java       |   31 +-
 .../apache/tika/exception/RuntimeSAXException.java |   22 +-
 .../apache/tika/exception/TikaConfigException.java |   27 +-
 .../org/apache/tika/exception/TikaException.java   |   22 +-
 .../tika/exception/TikaMemoryLimitException.java   |   34 +-
 .../tika/exception/TikaTimeoutException.java       |   22 +-
 .../tika/exception/UnsupportedFormatException.java |   41 +-
 .../tika/exception/WriteLimitReachedException.java |   40 +-
 .../tika/exception/ZeroByteFileException.java      |   34 +-
 .../org/apache/tika/exception/package-info.java    |   22 +-
 .../tika/extractor/BasicEmbeddedBytesSelector.java |   40 +-
 .../apache/tika/extractor/ContainerExtractor.java  |   56 +-
 .../extractor/DefaultEmbeddedStreamTranslator.java |   43 +-
 .../apache/tika/extractor/DocumentSelector.java    |   36 +-
 .../tika/extractor/EmbeddedBytesSelector.java      |   23 +-
 .../EmbeddedDocumentByteStoreExtractorFactory.java |   34 +-
 .../extractor/EmbeddedDocumentBytesHandler.java    |   25 +-
 .../tika/extractor/EmbeddedDocumentExtractor.java  |   38 +-
 .../EmbeddedDocumentExtractorFactory.java          |   23 +-
 .../tika/extractor/EmbeddedDocumentUtil.java       |   92 +-
 .../tika/extractor/EmbeddedResourceHandler.java    |   37 +-
 .../tika/extractor/EmbeddedStreamTranslator.java   |   31 +-
 .../tika/extractor/ParentContentHandler.java       |   26 +-
 .../tika/extractor/ParserContainerExtractor.java   |   61 +-
 .../ParsingEmbeddedDocumentExtractor.java          |   48 +-
 .../ParsingEmbeddedDocumentExtractorFactory.java   |   28 +-
 .../apache/tika/extractor/RUnpackExtractor.java    |   96 +-
 .../tika/extractor/RUnpackExtractorFactory.java    |   50 +-
 .../org/apache/tika/extractor/package-info.java    |   22 +-
 .../org/apache/tika/fork/ClassLoaderProxy.java     |   26 +-
 .../org/apache/tika/fork/ClassLoaderResource.java  |   45 +-
 .../org/apache/tika/fork/ContentHandlerProxy.java  |   29 +-
 .../apache/tika/fork/ContentHandlerResource.java   |   25 +-
 .../main/java/org/apache/tika/fork/ForkClient.java |   94 +-
 .../apache/tika/fork/ForkObjectInputStream.java    |   60 +-
 .../main/java/org/apache/tika/fork/ForkParser.java |  185 +--
 .../main/java/org/apache/tika/fork/ForkProxy.java  |   22 +-
 .../java/org/apache/tika/fork/ForkResource.java    |   22 +-
 .../main/java/org/apache/tika/fork/ForkServer.java |   88 +-
 .../org/apache/tika/fork/InputStreamProxy.java     |   22 +-
 .../org/apache/tika/fork/InputStreamResource.java  |   22 +-
 .../org/apache/tika/fork/MemoryURLConnection.java  |   25 +-
 .../apache/tika/fork/MemoryURLStreamHandler.java   |   25 +-
 .../tika/fork/MemoryURLStreamHandlerFactory.java   |   22 +-
 .../apache/tika/fork/MemoryURLStreamRecord.java    |   22 +-
 .../apache/tika/fork/MetadataContentHandler.java   |   27 +-
 .../org/apache/tika/fork/ParserFactoryFactory.java |   27 +-
 .../fork/RecursiveMetadataContentHandlerProxy.java |   61 +-
 .../RecursiveMetadataContentHandlerResource.java   |   42 +-
 .../java/org/apache/tika/fork/TimeoutLimits.java   |   22 +-
 .../java/org/apache/tika/fork/package-info.java    |   22 +-
 .../org/apache/tika/io/BoundedInputStream.java     |   43 +-
 .../main/java/org/apache/tika/io/EndianUtils.java  |   90 +-
 .../java/org/apache/tika/io/FilenameUtils.java     |  141 +-
 .../src/main/java/org/apache/tika/io/IOUtils.java  |   38 +-
 .../org/apache/tika/io/InputStreamFactory.java     |   41 +-
 .../org/apache/tika/io/LookaheadInputStream.java   |   58 +-
 .../main/java/org/apache/tika/io/TailStream.java   |   99 +-
 .../org/apache/tika/io/TemporaryResources.java     |   92 +-
 .../java/org/apache/tika/io/TikaInputStream.java   |  421 +++--
 .../main/java/org/apache/tika/io/package-info.java |   22 +-
 .../tika/language/detect/LanguageConfidence.java   |   24 +-
 .../tika/language/detect/LanguageDetector.java     |   90 +-
 .../tika/language/detect/LanguageHandler.java      |   31 +-
 .../apache/tika/language/detect/LanguageNames.java |   36 +-
 .../tika/language/detect/LanguageResult.java       |   35 +-
 .../tika/language/detect/LanguageWriter.java       |   33 +-
 .../tika/language/translate/DefaultTranslator.java |   34 +-
 .../tika/language/translate/EmptyTranslator.java   |   27 +-
 .../apache/tika/language/translate/Translator.java |   37 +-
 .../apache/tika/metadata/AccessPermissions.java    |   36 +-
 .../org/apache/tika/metadata/ClimateForcast.java   |   26 +-
 .../org/apache/tika/metadata/CreativeCommons.java  |   22 +-
 .../java/org/apache/tika/metadata/Database.java    |   22 +-
 .../java/org/apache/tika/metadata/DublinCore.java  |  198 ++-
 .../main/java/org/apache/tika/metadata/Epub.java   |   28 +-
 .../org/apache/tika/metadata/ExternalProcess.java  |   67 +-
 .../java/org/apache/tika/metadata/FileSystem.java  |   22 +-
 .../main/java/org/apache/tika/metadata/Font.java   |   25 +-
 .../java/org/apache/tika/metadata/Geographic.java  |   30 +-
 .../main/java/org/apache/tika/metadata/HTML.java   |   30 +-
 .../java/org/apache/tika/metadata/HttpHeaders.java |   26 +-
 .../main/java/org/apache/tika/metadata/IPTC.java   | 1209 +++++++-------
 .../main/java/org/apache/tika/metadata/MAPI.java   |   58 +-
 .../org/apache/tika/metadata/MachineMetadata.java  |   49 +-
 .../java/org/apache/tika/metadata/Message.java     |   70 +-
 .../java/org/apache/tika/metadata/Metadata.java    |  160 +-
 .../main/java/org/apache/tika/metadata/Office.java |  113 +-
 .../apache/tika/metadata/OfficeOpenXMLCore.java    |   58 +-
 .../tika/metadata/OfficeOpenXMLExtended.java       |   78 +-
 .../main/java/org/apache/tika/metadata/PDF.java    |  119 +-
 .../main/java/org/apache/tika/metadata/PST.java    |   22 +-
 .../java/org/apache/tika/metadata/PagedText.java   |   37 +-
 .../java/org/apache/tika/metadata/Photoshop.java   |   86 +-
 .../java/org/apache/tika/metadata/Property.java    |   66 +-
 .../tika/metadata/PropertyTypeException.java       |   36 +-
 .../java/org/apache/tika/metadata/QuattroPro.java  |   41 +-
 .../java/org/apache/tika/metadata/RTFMetadata.java |   47 +-
 .../java/org/apache/tika/metadata/Rendering.java   |   22 +-
 .../main/java/org/apache/tika/metadata/TIFF.java   |   58 +-
 .../apache/tika/metadata/TikaCoreProperties.java   |  277 ++--
 .../org/apache/tika/metadata/TikaMimeKeys.java     |   22 +-
 .../org/apache/tika/metadata/TikaPagedText.java    |   27 +-
 .../main/java/org/apache/tika/metadata/WARC.java   |   24 +-
 .../java/org/apache/tika/metadata/WordPerfect.java |   58 +-
 .../main/java/org/apache/tika/metadata/XMP.java    |   51 +-
 .../main/java/org/apache/tika/metadata/XMPDC.java  |  190 +--
 .../main/java/org/apache/tika/metadata/XMPDM.java  |  257 ++-
 .../main/java/org/apache/tika/metadata/XMPIdq.java |   26 +-
 .../main/java/org/apache/tika/metadata/XMPMM.java  |   65 +-
 .../main/java/org/apache/tika/metadata/XMPPDF.java |   24 +-
 .../java/org/apache/tika/metadata/XMPRights.java   |   38 +-
 .../filter/CaptureGroupMetadataFilter.java         |   46 +-
 .../ClearByAttachmentTypeMetadataFilter.java       |   38 +-
 .../metadata/filter/ClearByMimeMetadataFilter.java |   28 +-
 .../metadata/filter/CompositeMetadataFilter.java   |   26 +-
 .../filter/DateNormalizingMetadataFilter.java      |   48 +-
 .../metadata/filter/DefaultMetadataFilter.java     |   26 +-
 .../filter/ExcludeFieldMetadataFilter.java         |   23 +-
 .../metadata/filter/FieldNameMappingFilter.java    |   33 +-
 .../metadata/filter/GeoPointMetadataFilter.java    |   32 +-
 .../filter/IncludeFieldMetadataFilter.java         |   23 +-
 .../tika/metadata/filter/MetadataFilter.java       |   33 +-
 .../apache/tika/metadata/filter/NoOpFilter.java    |   27 +-
 .../listfilter/CompositeMetadataListFilter.java    |   26 +-
 .../metadata/listfilter/MetadataListFilter.java    |   37 +-
 .../tika/metadata/listfilter/NoOpListFilter.java   |   23 +-
 .../org/apache/tika/metadata/package-info.java     |   22 +-
 .../metadata/writefilter/MetadataWriteFilter.java  |   34 +-
 .../writefilter/MetadataWriteFilterFactory.java    |   22 +-
 .../metadata/writefilter/StandardWriteFilter.java  |  199 ++-
 .../writefilter/StandardWriteFilterFactory.java    |   40 +-
 .../main/java/org/apache/tika/mime/AndClause.java  |   22 +-
 .../src/main/java/org/apache/tika/mime/Clause.java |   26 +-
 .../main/java/org/apache/tika/mime/HexCoDec.java   |   38 +-
 .../src/main/java/org/apache/tika/mime/Magic.java  |   25 +-
 .../main/java/org/apache/tika/mime/MagicMatch.java |   29 +-
 .../main/java/org/apache/tika/mime/MediaType.java  |  102 +-
 .../org/apache/tika/mime/MediaTypeRegistry.java    |   75 +-
 .../main/java/org/apache/tika/mime/MimeType.java   |   75 +-
 .../org/apache/tika/mime/MimeTypeException.java    |   27 +-
 .../main/java/org/apache/tika/mime/MimeTypes.java  |  195 ++-
 .../org/apache/tika/mime/MimeTypesFactory.java     |   99 +-
 .../java/org/apache/tika/mime/MimeTypesReader.java |   81 +-
 .../apache/tika/mime/MimeTypesReaderMetKeys.java   |   22 +-
 .../org/apache/tika/mime/MinShouldMatchClause.java |   28 +-
 .../main/java/org/apache/tika/mime/OrClause.java   |   22 +-
 .../main/java/org/apache/tika/mime/Patterns.java   |   61 +-
 .../mime/ProbabilisticMimeDetectionSelector.java   |   85 +-
 .../java/org/apache/tika/mime/package-info.java    |   22 +-
 .../main/java/org/apache/tika/package-info.java    |   22 +-
 .../parser/AbstractEncodingDetectorParser.java     |   30 +-
 .../tika/parser/AbstractExternalProcessParser.java |   33 +-
 .../org/apache/tika/parser/AbstractParser.java     |   49 +-
 .../org/apache/tika/parser/AutoDetectParser.java   |  124 +-
 .../apache/tika/parser/AutoDetectParserConfig.java |   98 +-
 .../tika/parser/AutoDetectParserFactory.java       |   29 +-
 .../org/apache/tika/parser/CompositeParser.java    |   85 +-
 .../java/org/apache/tika/parser/CryptoParser.java  |   36 +-
 .../java/org/apache/tika/parser/DefaultParser.java |   61 +-
 .../org/apache/tika/parser/DelegatingParser.java   |   58 +-
 .../org/apache/tika/parser/DigestingParser.java    |   67 +-
 .../java/org/apache/tika/parser/EmptyParser.java   |   35 +-
 .../java/org/apache/tika/parser/ErrorParser.java   |   33 +-
 .../java/org/apache/tika/parser/NetworkParser.java |   54 +-
 .../java/org/apache/tika/parser/ParseContext.java  |   45 +-
 .../java/org/apache/tika/parser/ParseRecord.java   |   32 +-
 .../main/java/org/apache/tika/parser/Parser.java   |   57 +-
 .../org/apache/tika/parser/ParserDecorator.java    |   74 +-
 .../java/org/apache/tika/parser/ParserFactory.java |   26 +-
 .../apache/tika/parser/ParserPostProcessor.java    |   40 +-
 .../java/org/apache/tika/parser/ParsingReader.java |  117 +-
 .../org/apache/tika/parser/PasswordProvider.java   |   42 +-
 .../apache/tika/parser/RecursiveParserWrapper.java |  185 ++-
 .../org/apache/tika/parser/RegexCaptureParser.java |   38 +-
 .../org/apache/tika/parser/RenderingParser.java    |   25 +-
 .../org/apache/tika/parser/StatefulParser.java     |   31 +-
 .../tika/parser/digest/CompositeDigester.java      |   23 +-
 .../tika/parser/digest/InputStreamDigester.java    |   89 +-
 .../parser/external/CompositeExternalParser.java   |   30 +-
 .../tika/parser/external/ExternalParser.java       |  144 +-
 .../external/ExternalParsersConfigReader.java      |   50 +-
 .../ExternalParsersConfigReaderMetKeys.java        |   22 +-
 .../parser/external/ExternalParsersFactory.java    |   35 +-
 .../apache/tika/parser/external/package-info.java  |   22 +-
 .../tika/parser/external2/ExternalParser.java      |  116 +-
 .../parser/multiple/AbstractMultipleParser.java    |  125 +-
 .../tika/parser/multiple/FallbackParser.java       |   40 +-
 .../tika/parser/multiple/SupplementingParser.java  |   52 +-
 .../java/org/apache/tika/parser/package-info.java  |   22 +-
 .../apache/tika/renderer/CompositeRenderer.java    |   35 +-
 .../tika/renderer/PageBasedRenderResults.java      |   24 +-
 .../org/apache/tika/renderer/PageRangeRequest.java |   24 +-
 .../org/apache/tika/renderer/RenderRequest.java    |   31 +-
 .../org/apache/tika/renderer/RenderResult.java     |   36 +-
 .../org/apache/tika/renderer/RenderResults.java    |   25 +-
 .../java/org/apache/tika/renderer/Renderer.java    |   46 +-
 .../org/apache/tika/renderer/RenderingState.java   |   27 +-
 .../org/apache/tika/renderer/RenderingTracker.java |   31 +-
 .../sax/AbstractRecursiveParserWrapperHandler.java |   78 +-
 .../tika/sax/BasicContentHandlerFactory.java       |   73 +-
 .../org/apache/tika/sax/BodyContentHandler.java    |   64 +-
 .../java/org/apache/tika/sax/CleanPhoneText.java   |  261 +--
 .../apache/tika/sax/ContentHandlerDecorator.java   |   69 +-
 .../tika/sax/ContentHandlerDecoratorFactory.java   |   28 +-
 .../org/apache/tika/sax/ContentHandlerFactory.java |   23 +-
 .../org/apache/tika/sax/DIFContentHandler.java     |   40 +-
 .../tika/sax/ElementMappingContentHandler.java     |   52 +-
 .../apache/tika/sax/EmbeddedContentHandler.java    |   43 +-
 .../sax/EndDocumentShieldingContentHandler.java    |   29 +-
 .../tika/sax/ExpandedTitleContentHandler.java      |   43 +-
 .../src/main/java/org/apache/tika/sax/Link.java    |   22 +-
 .../main/java/org/apache/tika/sax/LinkBuilder.java |   22 +-
 .../org/apache/tika/sax/LinkContentHandler.java    |   38 +-
 .../org/apache/tika/sax/OfflineContentHandler.java |   29 +-
 .../tika/sax/PhoneExtractingContentHandler.java    |   77 +-
 .../tika/sax/RecursiveParserWrapperHandler.java    |   80 +-
 .../apache/tika/sax/RichTextContentHandler.java    |   33 +-
 .../org/apache/tika/sax/SafeContentHandler.java    |  152 +-
 .../org/apache/tika/sax/SecureContentHandler.java  |   92 +-
 .../org/apache/tika/sax/StandardOrganizations.java |  102 +-
 .../org/apache/tika/sax/StandardReference.java     |   28 +-
 .../sax/StandardsExtractingContentHandler.java     |   73 +-
 .../java/org/apache/tika/sax/StandardsText.java    |   97 +-
 .../apache/tika/sax/StoppingEarlyException.java    |   27 +-
 .../org/apache/tika/sax/TaggedContentHandler.java  |   51 +-
 .../org/apache/tika/sax/TaggedSAXException.java    |   30 +-
 .../org/apache/tika/sax/TeeContentHandler.java     |   28 +-
 .../tika/sax/TextAndAttributeContentHandler.java   |   26 +-
 .../org/apache/tika/sax/TextContentHandler.java    |   34 +-
 .../org/apache/tika/sax/ToHTMLContentHandler.java  |   39 +-
 .../org/apache/tika/sax/ToTextContentHandler.java  |   65 +-
 .../org/apache/tika/sax/ToXMLContentHandler.java   |   63 +-
 .../java/org/apache/tika/sax/WriteLimiter.java     |   23 +-
 .../apache/tika/sax/WriteOutContentHandler.java    |   80 +-
 .../org/apache/tika/sax/XHTMLContentHandler.java   |   87 +-
 .../org/apache/tika/sax/XMPContentHandler.java     |   38 +-
 .../java/org/apache/tika/sax/package-info.java     |   22 +-
 .../apache/tika/sax/xpath/AttributeMatcher.java    |   26 +-
 .../org/apache/tika/sax/xpath/ChildMatcher.java    |   26 +-
 .../apache/tika/sax/xpath/CompositeMatcher.java    |   26 +-
 .../org/apache/tika/sax/xpath/ElementMatcher.java  |   26 +-
 .../java/org/apache/tika/sax/xpath/Matcher.java    |   51 +-
 .../tika/sax/xpath/MatchingContentHandler.java     |   34 +-
 .../tika/sax/xpath/NamedAttributeMatcher.java      |   26 +-
 .../apache/tika/sax/xpath/NamedElementMatcher.java |   27 +-
 .../org/apache/tika/sax/xpath/NodeMatcher.java     |   26 +-
 .../org/apache/tika/sax/xpath/SubtreeMatcher.java  |   26 +-
 .../org/apache/tika/sax/xpath/TextMatcher.java     |   26 +-
 .../org/apache/tika/sax/xpath/XPathParser.java     |   65 +-
 .../org/apache/tika/sax/xpath/package-info.java    |   22 +-
 .../org/apache/tika/utils/AnnotationUtils.java     |   59 +-
 .../java/org/apache/tika/utils/CharsetUtils.java   |   57 +-
 .../java/org/apache/tika/utils/CompareUtils.java   |   29 +-
 .../org/apache/tika/utils/ConcurrentUtils.java     |   27 +-
 .../main/java/org/apache/tika/utils/DateUtils.java |   86 +-
 .../org/apache/tika/utils/DurationFormatUtils.java |   30 +-
 .../java/org/apache/tika/utils/ExceptionUtils.java |   36 +-
 .../org/apache/tika/utils/FileProcessResult.java   |   38 +-
 .../java/org/apache/tika/utils/ParserUtils.java    |   62 +-
 .../java/org/apache/tika/utils/ProcessUtils.java   |   54 +-
 .../java/org/apache/tika/utils/RegexUtils.java     |   39 +-
 .../apache/tika/utils/RereadableInputStream.java   |  121 +-
 .../org/apache/tika/utils/ServiceLoaderUtils.java  |   57 +-
 .../java/org/apache/tika/utils/StreamGobbler.java  |   26 +-
 .../java/org/apache/tika/utils/StringUtils.java    |   69 +-
 .../java/org/apache/tika/utils/SystemUtils.java    |   28 +-
 .../java/org/apache/tika/utils/XMLReaderUtils.java |  452 +++---
 .../java/org/apache/tika/utils/package-info.java   |   22 +-
 .../org/apache/custom/detect/MyCustomDetector.java |   23 +-
 .../org/apache/tika/MultiThreadedTikaTest.java     |  173 +-
 .../apache/tika/ResourceLoggingClassLoader.java    |   28 +-
 .../org/apache/tika/TestRereadableInputStream.java |   88 +-
 .../java/org/apache/tika/TikaDetectionTest.java    |  109 +-
 .../src/test/java/org/apache/tika/TikaIT.java      |   26 +-
 .../src/test/java/org/apache/tika/TikaTest.java    |  213 ++-
 .../org/apache/tika/TypeDetectionBenchmark.java    |   25 +-
 .../apache/tika/config/AbstractTikaConfigTest.java |   33 +-
 .../java/org/apache/tika/config/DummyExecutor.java |   23 +-
 .../java/org/apache/tika/config/DummyParser.java   |   25 +-
 .../org/apache/tika/config/MockConfigTest.java     |   24 +-
 .../java/org/apache/tika/config/ParamTest.java     |   33 +-
 .../tika/config/TikaConfigSerializerTest.java      |   62 +-
 .../org/apache/tika/config/TikaConfigTest.java     |  148 +-
 .../tika/detect/FileCommandDetectorTest.java       |   53 +-
 .../org/apache/tika/detect/MagicDetectorTest.java  |  116 +-
 .../tika/detect/MimeDetectionWithNNTest.java       |   49 +-
 .../org/apache/tika/detect/NameDetectorTest.java   |   50 +-
 .../org/apache/tika/detect/TextDetectorTest.java   |   34 +-
 .../org/apache/tika/detect/TypeDetectorTest.java   |   26 +-
 .../tika/detect/ZeroSizeFileDetectorTest.java      |   28 +-
 .../java/org/apache/tika/fork/ForkParserTest.java  |  167 +-
 .../apache/tika/fork/ForkParserTikaBinTest.java    |  123 +-
 .../java/org/apache/tika/fork/ForkTestParser.java  |   34 +-
 .../tika/fork/UpperCasingContentHandler.java       |   23 +-
 .../fork/unusedpackage/ClassInUnusedPackage.java   |   22 +-
 .../java/org/apache/tika/io/EndianUtilsTest.java   |   55 +-
 .../java/org/apache/tika/io/FilenameUtilsTest.java |   89 +-
 .../apache/tika/io/LookaheadInputStreamTest.java   |   31 +-
 .../java/org/apache/tika/io/TailStreamTest.java    |   57 +-
 .../org/apache/tika/io/TemporaryResourcesTest.java |   28 +-
 .../org/apache/tika/io/TikaInputStreamTest.java    |   60 +-
 .../tika/language/detect/LanguageNamesTest.java    |   22 +-
 .../org/apache/tika/metadata/TestMetadata.java     |   69 +-
 .../tika/metadata/filter/MockUpperCaseFilter.java  |   23 +-
 .../tika/metadata/filter/TestMetadataFilter.java   |   39 +-
 .../listfilter/AttachmentCountingListFilter.java   |   26 +-
 .../listfilter/MetadataListFilterTest.java         |   36 +-
 .../writefilter/StandardWriteFilterTest.java       |  142 +-
 .../org/apache/tika/mime/CustomReaderTest.java     |   29 +-
 .../java/org/apache/tika/mime/MediaTypeTest.java   |   51 +-
 .../org/apache/tika/mime/MimeDetectionTest.java    |  125 +-
 .../org/apache/tika/mime/MimeTypesReaderTest.java  |  152 +-
 .../java/org/apache/tika/mime/PatternsTest.java    |   23 +-
 .../tika/mime/ProbabilisticMimeDetectionTest.java  |  106 +-
 .../ProbabilisticMimeDetectionTestWithTika.java    |  114 +-
 .../org/apache/tika/mime/RFC822DetectionTest.java  |   85 +-
 .../tika/parser/AutoDetectParserConfigTest.java    |   32 +-
 .../apache/tika/parser/CompositeParserTest.java    |   54 +-
 .../tika/parser/DummyInitializableParser.java      |   39 +-
 .../tika/parser/DummyParameterizedParser.java      |   30 +-
 .../java/org/apache/tika/parser/DummyParser.java   |   30 +-
 .../tika/parser/InitializableParserTest.java       |   26 +-
 .../tika/parser/ParameterizedParserTest.java       |   44 +-
 .../apache/tika/parser/ParserDecoratorTest.java    |   45 +-
 .../apache/tika/parser/RegexCaptureParserTest.java |   37 +-
 .../tika/parser/external2/ExternalParserTest.java  |   57 +-
 .../org/apache/tika/parser/mock/MockParser.java    |  110 +-
 .../apache/tika/parser/mock/MockParserFactory.java |   23 +-
 .../apache/tika/parser/mock/MockParserTest.java    |   31 +-
 .../org/apache/tika/parser/mock/VowelParser.java   |   28 +-
 .../tika/parser/multiple/MultipleParserTest.java   |   57 +-
 .../tika/sax/BasicContentHandlerFactoryTest.java   |   87 +-
 .../apache/tika/sax/BodyContentHandlerTest.java    |   37 +-
 .../apache/tika/sax/CustomErrorHandlerTest.java    |   49 +-
 .../apache/tika/sax/LinkContentHandlerTest.java    |   33 +-
 .../tika/sax/NonValidatingContentHandler.java      |   31 +-
 .../apache/tika/sax/OfflineContentHandlerTest.java |   28 +-
 .../tika/sax/RichTextContentHandlerTest.java       |   36 +-
 .../apache/tika/sax/SafeContentHandlerTest.java    |   22 +-
 .../apache/tika/sax/SecureContentHandlerTest.java  |   30 +-
 .../java/org/apache/tika/sax/SerializerTest.java   |   40 +-
 .../apache/tika/sax/XHTMLContentHandlerTest.java   |   44 +-
 .../org/apache/tika/sax/xpath/XPathParserTest.java |   22 +-
 .../org/apache/tika/utils/AnnotationUtilsTest.java |   36 +-
 .../org/apache/tika/utils/CharsetUtilsTest.java    |   22 +-
 .../org/apache/tika/utils/ConcurrentUtilsTest.java |   36 +-
 .../java/org/apache/tika/utils/RegexUtilsTest.java |   38 +-
 .../apache/tika/utils/ServiceLoaderUtilsTest.java  |   39 +-
 .../org/apache/tika/utils/XMLReaderUtilsTest.java  |  153 +-
 .../apache/tika/detect/magika/MagikaDetector.java  |  167 +-
 .../tika/detect/magika/TestMagikaIntegration.java  |   31 +-
 .../tika/detect/magika/TestMagikaJsonParsing.java  |  104 +-
 .../tika/detect/siegfried/SiegfriedDetector.java   |   96 +-
 .../detect/siegfried/TestSiegfriedIntegration.java |   31 +-
 .../detect/siegfried/TestSiegfriedJsonParsing.java |   48 +-
 .../java/org/apache/tika/eval/app/EvalConfig.java  |   31 +-
 .../org/apache/tika/eval/app/EvalFilePaths.java    |   38 +-
 .../org/apache/tika/eval/app/ExtractComparer.java  |  247 +--
 .../tika/eval/app/ExtractComparerRunner.java       |  136 +-
 .../apache/tika/eval/app/ExtractProfileRunner.java |  131 +-
 .../org/apache/tika/eval/app/ExtractProfiler.java  |  152 +-
 .../org/apache/tika/eval/app/ProfilerBase.java     |  286 ++--
 .../org/apache/tika/eval/app/StatusReporter.java   |   41 +-
 .../java/org/apache/tika/eval/app/TikaEvalCLI.java |   29 +-
 .../apache/tika/eval/app/db/AbstractDBBuffer.java  |   26 +-
 .../java/org/apache/tika/eval/app/db/ColInfo.java  |   24 +-
 .../java/org/apache/tika/eval/app/db/Cols.java     |   26 +-
 .../java/org/apache/tika/eval/app/db/DBBuffer.java |   28 +-
 .../java/org/apache/tika/eval/app/db/H2Util.java   |   26 +-
 .../java/org/apache/tika/eval/app/db/JDBCUtil.java |   68 +-
 .../org/apache/tika/eval/app/db/MimeBuffer.java    |   46 +-
 .../org/apache/tika/eval/app/db/TableInfo.java     |   23 +-
 .../java/org/apache/tika/eval/app/io/DBWriter.java |   61 +-
 .../org/apache/tika/eval/app/io/ExtractReader.java |   82 +-
 .../tika/eval/app/io/ExtractReaderException.java   |   35 +-
 .../org/apache/tika/eval/app/io/IDBWriter.java     |   22 +-
 .../org/apache/tika/eval/app/reports/Report.java   |   38 +-
 .../tika/eval/app/reports/ResultsReporter.java     |  115 +-
 .../tika/eval/app/reports/XLSXHREFFormatter.java   |   40 +-
 .../tika/eval/app/reports/XLSXNumFormatter.java    |   31 +-
 .../tika/eval/app/reports/XSLXCellFormatter.java   |   25 +-
 .../eval/app/tools/BatchTopCommonTokenCounter.java |   47 +-
 .../eval/app/tools/CommonTokenOverlapCounter.java  |   26 +-
 .../apache/tika/eval/app/tools/LeipzigHelper.java  |   43 +-
 .../apache/tika/eval/app/tools/LeipzigSampler.java |   25 +-
 .../eval/app/tools/SlowCompositeReaderWrapper.java |  129 +-
 .../tika/eval/app/tools/TopCommonTokenCounter.java |  117 +-
 .../apache/tika/eval/app/tools/TrainTestSplit.java |   47 +-
 .../apache/tika/eval/app/AnalyzerManagerTest.java  |   32 +-
 .../org/apache/tika/eval/app/EvalConfigTest.java   |   22 +-
 .../org/apache/tika/eval/app/MockDBWriter.java     |   33 +-
 .../apache/tika/eval/app/ProfilerBatchTest.java    |   94 +-
 .../apache/tika/eval/app/SimpleComparerTest.java   |  172 +-
 .../org/apache/tika/eval/app/TikaEvalCLITest.java  |  124 +-
 .../tika/eval/app/db/AbstractBufferTest.java       |   44 +-
 .../apache/tika/eval/app/io/ExtractReaderTest.java |   80 +-
 .../tika/eval/app/reports/ResultsReporterTest.java |   30 +-
 .../eval/app/tools/TopCommonTokenCounterTest.java  |   62 +-
 .../tika/eval/core/langid/LanguageIDWrapper.java   |   26 +-
 .../eval/core/metadata/TikaEvalMetadataFilter.java |   40 +-
 .../textstats/BasicTokenCountStatsCalculator.java  |   22 +-
 .../eval/core/textstats/BytesRefCalculator.java    |   22 +-
 .../tika/eval/core/textstats/CommonTokens.java     |   28 +-
 .../core/textstats/CommonTokensBhattacharyya.java  |   28 +-
 .../eval/core/textstats/CommonTokensCosine.java    |   26 +-
 .../eval/core/textstats/CommonTokensHellinger.java |   28 +-
 .../eval/core/textstats/CommonTokensKLDNormed.java |   28 +-
 .../core/textstats/CommonTokensKLDivergence.java   |   28 +-
 .../textstats/CompositeTextStatsCalculator.java    |   56 +-
 .../core/textstats/ContentLengthCalculator.java    |   22 +-
 .../textstats/LanguageAwareTokenCountStats.java    |   23 +-
 .../eval/core/textstats/StringStatsCalculator.java |   22 +-
 .../eval/core/textstats/TextProfileSignature.java  |   35 +-
 .../eval/core/textstats/TextSha256Signature.java   |   23 +-
 .../eval/core/textstats/TextStatsCalculator.java   |   22 +-
 .../core/textstats/TokenCountPriorityQueue.java    |   25 +-
 .../core/textstats/TokenCountStatsCalculator.java  |   22 +-
 .../tika/eval/core/textstats/TokenEntropy.java     |   23 +-
 .../tika/eval/core/textstats/TokenLengths.java     |   24 +-
 .../tika/eval/core/textstats/TopNTokens.java       |   24 +-
 .../eval/core/textstats/UnicodeBlockCounter.java   |   23 +-
 .../core/tokens/AlphaIdeographFilterFactory.java   |   30 +-
 .../eval/core/tokens/AnalyzerDeserializer.java     |  102 +-
 .../tika/eval/core/tokens/AnalyzerManager.java     |   29 +-
 .../tokens/CJKBigramAwareLengthFilterFactory.java  |   51 +-
 .../eval/core/tokens/CommonTokenCountManager.java  |   66 +-
 .../tika/eval/core/tokens/CommonTokenResult.java   |   30 +-
 .../tika/eval/core/tokens/ContrastStatistics.java  |   22 +-
 .../apache/tika/eval/core/tokens/LangModel.java    |   22 +-
 .../tika/eval/core/tokens/TokenContraster.java     |   31 +-
 .../eval/core/tokens/TokenCountPriorityQueue.java  |   24 +-
 .../apache/tika/eval/core/tokens/TokenCounter.java |   50 +-
 .../apache/tika/eval/core/tokens/TokenCounts.java  |   23 +-
 .../apache/tika/eval/core/tokens/TokenIntPair.java |   22 +-
 .../tika/eval/core/tokens/TokenStatistics.java     |   35 +-
 .../tokens/URLEmailNormalizingFilterFactory.java   |   39 +-
 .../tika/eval/core/util/ContentTagParser.java      |   67 +-
 .../apache/tika/eval/core/util/ContentTags.java    |   22 +-
 .../tika/eval/core/util/EvalExceptionUtils.java    |   30 +-
 .../apache/tika/eval/core/langid/LangIdTest.java   |   38 +-
 .../core/metadata/TikaEvalMetadataFilterTest.java  |   41 +-
 .../tika/eval/core/textstats/TextStatsTest.java    |   47 +-
 .../tika/eval/core/tokens/LuceneTokenCounter.java  |  124 +-
 .../tika/eval/core/tokens/TokenCounterTest.java    |   33 +-
 .../apache/tika/eval/core/util/LanguageIdTest.java |   30 +-
 .../apache/tika/eval/core/util/MimeUtilTest.java   |   29 +-
 .../apache/tika/example/AdvancedTypeDetector.java  |   22 +-
 .../apache/tika/example/ContentHandlerExample.java |   51 +-
 .../org/apache/tika/example/CustomMimeInfo.java    |   25 +-
 .../org/apache/tika/example/DescribeMetadata.java  |   24 +-
 .../org/apache/tika/example/DirListParser.java     |   64 +-
 .../apache/tika/example/DisplayMetInstance.java    |   25 +-
 .../apache/tika/example/DumpTikaConfigExample.java |   36 +-
 .../example/EncryptedPrescriptionDetector.java     |   26 +-
 .../tika/example/EncryptedPrescriptionParser.java  |   31 +-
 .../apache/tika/example/ExtractEmbeddedFiles.java  |   53 +-
 .../tika/example/GrabPhoneNumbersExample.java      |   44 +-
 .../org/apache/tika/example/ImportContextImpl.java |   54 +-
 .../tika/example/InterruptableParsingExample.java  |   42 +-
 .../java/org/apache/tika/example/Language.java     |   25 +-
 .../tika/example/LanguageDetectingParser.java      |   30 +-
 .../tika/example/LanguageDetectorExample.java      |   22 +-
 .../org/apache/tika/example/LuceneIndexer.java     |   23 +-
 .../apache/tika/example/LuceneIndexerExtended.java |   26 +-
 .../org/apache/tika/example/MediaTypeExample.java  |   22 +-
 .../tika/example/MetadataAwareLuceneIndexer.java   |   31 +-
 .../java/org/apache/tika/example/MyFirstTika.java  |   49 +-
 .../org/apache/tika/example/ParsingExample.java    |  129 +-
 .../java/org/apache/tika/example/Pharmacy.java     |   22 +-
 .../tika/example/PickBestTextEncodingParser.java   |   57 +-
 .../apache/tika/example/PrescriptionParser.java    |   34 +-
 .../java/org/apache/tika/example/RecentFiles.java  |   51 +-
 .../org/apache/tika/example/RollbackSoftware.java  |   63 +-
 .../apache/tika/example/SimpleTextExtractor.java   |   22 +-
 .../apache/tika/example/SimpleTypeDetector.java    |   22 +-
 .../org/apache/tika/example/SpringExample.java     |   35 +-
 .../tika/example/StandardsExtractionExample.java   |   47 +-
 .../org/apache/tika/example/TIAParsingExample.java |   35 +-
 .../apache/tika/example/TextStatsFromTikaEval.java |   42 +-
 .../tika/example/TranscribeTranslateExample.java   |   66 +-
 .../org/apache/tika/example/TranslatorExample.java |   22 +-
 .../apache/tika/example/TrecDocumentGenerator.java |   34 +-
 .../java/org/apache/tika/example/ZipListFiles.java |   25 +-
 .../tika/example/AdvancedTypeDetectorTest.java     |   22 +-
 .../tika/example/ContentHandlerExampleTest.java    |   41 +-
 .../tika/example/DumpTikaConfigExampleTest.java    |   57 +-
 .../tika/example/ExtractEmbeddedFilesTest.java     |   26 +-
 .../tika/example/LanguageDetectorExampleTest.java  |   22 +-
 .../tika/example/SimpleTextExtractorTest.java      |   36 +-
 .../tika/example/SimpleTypeDetectorTest.java       |   31 +-
 .../apache/tika/example/TestParsingExample.java    |   55 +-
 .../tika/example/TextStatsFromTikaEvalTest.java    |   22 +-
 .../apache/tika/example/TranslatorExampleTest.java |   22 +-
 .../tika/pipes/grpc/ExpiringFetcherStore.java      |   60 +-
 .../org/apache/tika/pipes/grpc/TikaGrpcServer.java |   97 +-
 .../apache/tika/pipes/grpc/TikaGrpcServerImpl.java |  229 +--
 .../tika/pipes/grpc/ExpiringFetcherStoreTest.java  |   52 +-
 ...PipesBiDirectionalStreamingIntegrationTest.java |  135 +-
 .../apache/tika/pipes/grpc/TikaGrpcServerTest.java |  223 ++-
 .../sax/boilerpipe/BoilerpipeContentHandler.java   |   85 +-
 .../tika/pipes/kafka/tests/TikaPipesKafkaTest.java |  105 +-
 .../pipes/opensearch/tests/OpenSearchTest.java     |  379 +++--
 .../opensearch/tests/OpensearchTestClient.java     |   82 +-
 .../tika/pipes/s3/tests/PipeIntegrationTests.java  |   77 +-
 .../tika/pipes/s3/tests/S3PipeIntegrationTest.java |   89 +-
 .../tika/pipes/solr/tests/TikaPipesSolr8Test.java  |   22 +-
 .../pipes/solr/tests/TikaPipesSolr8ZkTest.java     |   30 +-
 .../tika/pipes/solr/tests/TikaPipesSolr9Test.java  |   22 +-
 .../pipes/solr/tests/TikaPipesSolr9ZkTest.java     |   30 +-
 .../pipes/solr/tests/TikaPipesSolrTestBase.java    |  166 +-
 .../org/apache/custom/parser/CustomParserTest.java |   26 +-
 .../org/apache/custom/parser/MyCustomParser.java   |   30 +-
 .../tika/woodstox/WoodstoxXMLReaderUtilsTest.java  |  159 +-
 .../filetypedetector/TikaFileTypeDetector.java     |   25 +-
 .../apache/tika/filetypedetector/package-info.java |   22 +-
 .../filetypedetector/TikaFileTypeDetectorTest.java |   32 +-
 .../langdetect/lingo24/Lingo24LangDetector.java    |   64 +-
 .../lingo24/Lingo24LangDetectorTest.java           |   30 +-
 .../tika/langdetect/mitll/TextLangDetector.java    |   34 +-
 .../langdetect/mitll/TextLangDetectorTest.java     |   30 +-
 .../tika/langdetect/opennlp/OpenNLPDetector.java   |  126 +-
 .../opennlp/ProbingLanguageDetector.java           |  150 +-
 .../metadatafilter/OpenNLPMetadataFilter.java      |   25 +-
 .../langdetect/opennlp/OpenNLPDetectorTest.java    |   33 +-
 .../optimaize/OptimaizeLangDetector.java           |   69 +-
 .../metadatafilter/OptimaizeMetadataFilter.java    |   25 +-
 .../optimaize/OptimaizeLangDetectorTest.java       |  147 +-
 .../tika/langdetect/LanguageDetectorTest.java      |   27 +-
 .../tika/langdetect/tika/LanguageIdentifier.java   |   78 +-
 .../tika/langdetect/tika/LanguageProfile.java      |   45 +-
 .../langdetect/tika/LanguageProfilerBuilder.java   |   84 +-
 .../tika/langdetect/tika/ProfilingWriter.java      |   37 +-
 .../tika/langdetect/tika/TikaLanguageDetector.java |   40 +-
 .../langdetect/tika/LanguageIdentifierTest.java    |   62 +-
 .../tika/langdetect/tika/LanguageProfileTest.java  |   23 +-
 .../tika/LanguageProfilerBuilderTest.java          |   30 +-
 .../tika/langdetect/tika/ProfilingHandler.java     |   37 +-
 .../tika/langdetect/tika/ProfilingWriterTest.java  |   23 +-
 tika-parent/checkstyle.xml                         |   28 +-
 tika-parent/intellij-code-style.xml                |   75 -
 tika-parent/pom.xml                                |   35 +-
 .../apache/tika/parser/envi/EnviHeaderParser.java  |  106 +-
 .../org/apache/tika/parser/gdal/GDALParser.java    |  213 +--
 .../geoinfo/GeographicInformationParser.java       |  194 +--
 .../org/apache/tika/parser/grib/GribParser.java    |   58 +-
 .../java/org/apache/tika/parser/hdf/HDFParser.java |   59 +-
 .../org/apache/tika/parser/isatab/ISATabUtils.java |   69 +-
 .../apache/tika/parser/isatab/ISArchiveParser.java |   52 +-
 .../apache/tika/parser/netcdf/NetCDFParser.java    |   61 +-
 .../tika/parser/envi/EnviHeaderParserTest.java     |   70 +-
 .../apache/tika/parser/gdal/TestGDALParser.java    |   38 +-
 .../geoinfo/GeographicInformationParserTest.java   |   25 +-
 .../apache/tika/parser/grib/GribParserTest.java    |   31 +-
 .../org/apache/tika/parser/hdf/HDFParserTest.java  |   28 +-
 .../tika/parser/isatab/ISArchiveParserTest.java    |   53 +-
 .../tika/parser/netcdf/NetCDFParserTest.java       |   34 +-
 .../parser/scientific/integration/TestParsers.java |   50 +-
 .../apache/tika/parser/geopkg/GeoPkgDBParser.java  |   35 +-
 .../apache/tika/parser/geopkg/GeoPkgParser.java    |   53 +-
 .../tika/parser/geopkg/GeoPkgTableReader.java      |   49 +-
 .../tika/parser/sqlite3/SQLite3DBParser.java       |   69 +-
 .../apache/tika/parser/sqlite3/SQLite3Parser.java  |   58 +-
 .../tika/parser/sqlite3/SQLite3TableReader.java    |   44 +-
 .../tika/parser/sqlite3/SQLite3ParserTest.java     |  206 +--
 .../apache/tika/mime/TestMimeTypesExtended.java    |   30 +-
 .../java/org/apache/tika/parser/ocr/TestOCR.java   |   50 +-
 .../tika/parser/sqlite3/SQLite3ParserTest.java     |  114 +-
 .../parser/ctakes/CTAKESAnnotationProperty.java    |   31 +-
 .../apache/tika/parser/ctakes/CTAKESConfig.java    |   61 +-
 .../tika/parser/ctakes/CTAKESContentHandler.java   |   71 +-
 .../apache/tika/parser/ctakes/CTAKESParser.java    |   50 +-
 .../tika/parser/ctakes/CTAKESSerializer.java       |   26 +-
 .../org/apache/tika/parser/ctakes/CTAKESUtils.java |  138 +-
 .../apache/tika/parser/geo/topic/GeoParser.java    |   36 +-
 .../tika/parser/geo/topic/GeoParserConfig.java     |   23 +-
 .../org/apache/tika/parser/geo/topic/GeoTag.java   |   26 +-
 .../tika/parser/geo/topic/NameEntityExtractor.java |   43 +-
 .../geo/topic/gazetteer/GeoGazetteerClient.java    |   38 +-
 .../tika/parser/geo/topic/gazetteer/Location.java  |   22 +-
 .../tika/parser/journal/GrobidRESTParser.java      |   54 +-
 .../apache/tika/parser/journal/JournalParser.java  |   30 +-
 .../apache/tika/parser/journal/TEIDOMParser.java   |   72 +-
 .../org/apache/tika/parser/ner/NERecogniser.java   |   24 +-
 .../apache/tika/parser/ner/NamedEntityParser.java  |   72 +-
 .../parser/ner/corenlp/CoreNLPNERecogniser.java    |   57 +-
 .../tika/parser/ner/grobid/GrobidNERecogniser.java |   90 +-
 .../tika/parser/ner/mitie/MITIENERecogniser.java   |   65 +-
 .../tika/parser/ner/nltk/NLTKNERecogniser.java     |   41 +-
 .../parser/ner/opennlp/OpenNLPNERecogniser.java    |   96 +-
 .../tika/parser/ner/opennlp/OpenNLPNameFinder.java |   38 +-
 .../tika/parser/ner/regex/RegexNERecogniser.java   |   52 +-
 .../parser/sentiment/SentimentAnalysisParser.java  |   59 +-
 .../tika/parser/geo/topic/GeoParserTest.java       |   69 +-
 .../tika/parser/journal/JournalParserTest.java     |   28 +-
 .../org/apache/tika/parser/journal/TEITest.java    |   75 +-
 .../tika/parser/ner/NamedEntityParserTest.java     |   50 +-
 .../tika/parser/ner/nltk/NLTKNERecogniserTest.java |   30 +-
 .../parser/ner/regex/RegexNERecogniserTest.java    |   32 +-
 .../sentiment/SentimentAnalysisParserTest.java     |   38 +-
 .../parser/transcribe/aws/AmazonTranscribe.java    |  219 ++-
 .../transcribe/aws/AmazonTranscribeTest.java       |  147 +-
 .../apache/tika/detect/apple/BPListDetector.java   |   70 +-
 .../apache/tika/detect/apple/IWorkDetector.java    |   32 +-
 .../tika/parser/apple/AppleSingleFileParser.java   |   70 +-
 .../org/apache/tika/parser/apple/PListParser.java  |   90 +-
 .../tika/parser/iwork/AutoPageNumberUtils.java     |   34 +-
 .../tika/parser/iwork/IWorkPackageParser.java      |   72 +-
 .../tika/parser/iwork/KeynoteContentHandler.java   |   31 +-
 .../tika/parser/iwork/NumbersContentHandler.java   |   32 +-
 .../tika/parser/iwork/PagesContentHandler.java     |   68 +-
 .../parser/iwork/iwana/IWork13PackageParser.java   |  117 +-
 .../parser/iwork/iwana/IWork18PackageParser.java   |   46 +-
 .../tika/detect/apple/IWorkDetectorTest.java       |   29 +-
 .../apache/tika/parser/apple/PListParserTest.java  |   34 +-
 .../tika/parser/iwork/AutoPageNumberUtilsTest.java |   34 +-
 .../apache/tika/parser/iwork/IWorkParserTest.java  |   89 +-
 .../tika/parser/iwork/iwana/IWork13ParserTest.java |   57 +-
 .../org/apache/tika/detect/MatroskaDetector.java   |   47 +-
 .../org/apache/tika/parser/audio/AudioParser.java  |   47 +-
 .../org/apache/tika/parser/audio/MidiParser.java   |   33 +-
 .../org/apache/tika/parser/mp3/AudioFrame.java     |   48 +-
 .../tika/parser/mp3/CompositeTagHandler.java       |   26 +-
 .../java/org/apache/tika/parser/mp3/ID3Tags.java   |  209 +--
 .../org/apache/tika/parser/mp3/ID3v1Handler.java   |   56 +-
 .../org/apache/tika/parser/mp3/ID3v22Handler.java  |   35 +-
 .../org/apache/tika/parser/mp3/ID3v23Handler.java  |   32 +-
 .../org/apache/tika/parser/mp3/ID3v24Handler.java  |   29 +-
 .../org/apache/tika/parser/mp3/ID3v2Frame.java     |  114 +-
 .../org/apache/tika/parser/mp3/LyricsHandler.java  |   65 +-
 .../java/org/apache/tika/parser/mp3/MP3Frame.java  |   25 +-
 .../java/org/apache/tika/parser/mp3/Mp3Parser.java |   50 +-
 .../org/apache/tika/parser/mp3/MpegStream.java     |  127 +-
 .../java/org/apache/tika/parser/mp4/MP4Parser.java |  135 +-
 .../apache/tika/parser/mp4/TikaMp4BoxHandler.java  |   39 +-
 .../tika/parser/mp4/boxes/TikaUserDataBox.java     |  130 +-
 .../org/apache/tika/parser/video/FLVParser.java    |   68 +-
 .../apache/tika/detect/MatroskaDetectorTest.java   |   54 +-
 .../apache/tika/parser/audio/AudioParserTest.java  |   37 +-
 .../apache/tika/parser/audio/MidiParserTest.java   |   26 +-
 .../org/apache/tika/parser/mp3/Mp3ParserTest.java  |   95 +-
 .../org/apache/tika/parser/mp3/MpegStreamTest.java |   34 +-
 .../org/apache/tika/parser/mp4/MP4ParserTest.java  |  231 +--
 .../apache/tika/parser/video/FLVParserTest.java    |   29 +-
 .../org/apache/tika/parser/dgn/DGN8Parser.java     |   33 +-
 .../apache/tika/parser/dwg/AbstractDWGParser.java  |   42 +-
 .../java/org/apache/tika/parser/dwg/DWGParser.java |  105 +-
 .../apache/tika/parser/dwg/DWGParserConfig.java    |   36 +-
 .../tika/parser/dwg/DWGReadFormatRemover.java      |   51 +-
 .../org/apache/tika/parser/dwg/DWGReadParser.java  |  152 +-
 .../org/apache/tika/parser/dwg/JulianDateUtil.java |   29 +-
 .../java/org/apache/tika/parser/prt/PRTParser.java |   64 +-
 .../org/apache/tika/parser/dgn/DGN8ParserTest.java |   28 +-
 .../org/apache/tika/parser/dwg/DWGParserTest.java  |   91 +-
 .../tika/parser/dwg/DWGReadFormatRemoverTest.java  |   42 +-
 .../org/apache/tika/parser/prt/PRTParserTest.java  |   32 +-
 .../org/apache/tika/parser/asm/ClassParser.java    |   32 +-
 .../apache/tika/parser/asm/XHTMLClassVisitor.java  |   57 +-
 .../apache/tika/parser/code/SourceCodeParser.java  |   90 +-
 .../tika/parser/executable/ExecutableParser.java   |   81 +-
 .../executable/UniversalExecutableParser.java      |   89 +-
 .../java/org/apache/tika/parser/mat/MatParser.java |   75 +-
 .../org/apache/tika/parser/sas/SAS7BDATParser.java |   59 +-
 .../apache/tika/parser/asm/ClassParserTest.java    |   43 +-
 .../tika/parser/code/SourceCodeParserTest.java     |   62 +-
 .../parser/executable/ExecutableParserTest.java    |   31 +-
 .../executable/UniversalExecutableParserTest.java  |   32 +-
 .../org/apache/tika/parser/mat/MatParserTest.java  |   26 +-
 .../apache/tika/parser/sas/SAS7BDATParserTest.java |   37 +-
 .../org/apache/tika/parser/crypto/Pkcs7Parser.java |   46 +-
 .../org/apache/tika/parser/crypto/TSDParser.java   |   92 +-
 .../apache/tika/parser/crypto/Pkcs7ParserTest.java |   26 +-
 .../apache/tika/parser/crypto/TSDParserTest.java   |   56 +-
 .../parser/digestutils/BouncyCastleDigester.java   |   35 +-
 .../tika/parser/digestutils/CommonsDigester.java   |   79 +-
 .../parser/digestutils/CommonsDigesterFactory.java |   25 +-
 .../tika/parser/font/AdobeFontMetricParser.java    |   36 +-
 .../apache/tika/parser/font/TrueTypeParser.java    |   34 +-
 .../apache/tika/parser/font/FontParsersTest.java   |   39 +-
 .../org/apache/tika/parser/html/DataURIScheme.java |   34 +-
 .../parser/html/DataURISchemeParseException.java   |   22 +-
 .../apache/tika/parser/html/DataURISchemeUtil.java |   36 +-
 .../apache/tika/parser/html/DefaultHtmlMapper.java |   88 +-
 .../tika/parser/html/HtmlEncodingDetector.java     |   88 +-
 .../org/apache/tika/parser/html/HtmlHandler.java   |  125 +-
 .../org/apache/tika/parser/html/HtmlMapper.java    |   67 +-
 .../tika/parser/html/IdentityHtmlMapper.java       |   25 +-
 .../org/apache/tika/parser/html/JSoupParser.java   |   93 +-
 .../tika/parser/html/XHTMLDowngradeHandler.java    |   48 +-
 .../html/charsetdetector/CharsetAliases.java       |   79 +-
 .../charsetdetector/CharsetDetectionResult.java    |   22 +-
 .../parser/html/charsetdetector/MetaProcessor.java |   29 +-
 .../parser/html/charsetdetector/PreScanner.java    |   62 +-
 .../StandardHtmlEncodingDetector.java              |   53 +-
 .../charsets/ReplacementCharset.java               |   26 +-
 .../charsets/XUserDefinedCharset.java              |   22 +-
 .../tika/parser/html/DataURISchemeParserTest.java  |   28 +-
 .../tika/parser/html/HtmlEncodingDetectorTest.java |   57 +-
 .../apache/tika/parser/html/HtmlParserTest.java    |  623 ++++----
 .../org/apache/tika/parser/html/SrcDocTest.java    |   30 +-
 .../html/StandardHtmlEncodingDetectorTest.java     |  126 +-
 .../tika/parser/image/AbstractImageParser.java     |   57 +-
 .../org/apache/tika/parser/image/BPGParser.java    |   61 +-
 .../org/apache/tika/parser/image/HeifParser.java   |   35 +-
 .../org/apache/tika/parser/image/ICNSParser.java   |   73 +-
 .../org/apache/tika/parser/image/ICNSType.java     |  114 +-
 .../tika/parser/image/ImageMetadataExtractor.java  |  210 +--
 .../org/apache/tika/parser/image/ImageParser.java  |   91 +-
 .../org/apache/tika/parser/image/JXLParser.java    |   34 +-
 .../org/apache/tika/parser/image/JpegParser.java   |   33 +-
 .../apache/tika/parser/image/MetadataFields.java   |   33 +-
 .../org/apache/tika/parser/image/PSDParser.java    |   68 +-
 .../org/apache/tika/parser/image/TiffParser.java   |   33 +-
 .../org/apache/tika/parser/image/WebPParser.java   |   32 +-
 .../apache/tika/parser/image/HeifParserTest.java   |   33 +-
 .../apache/tika/parser/image/ICNSParserTest.java   |   32 +-
 .../parser/image/ImageMetadataExtractorTest.java   |   70 +-
 .../apache/tika/parser/image/ImageParserTest.java  |  276 ++--
 .../java/org/apache/tika/parser/image/JXLTest.java |   27 +-
 .../apache/tika/parser/image/JpegParserTest.java   |   88 +-
 .../apache/tika/parser/image/PSDParserTest.java    |   36 +-
 .../apache/tika/parser/image/WebPParserTest.java   |   41 +-
 .../apache/tika/parser/jdbc/AbstractDBParser.java  |   76 +-
 .../apache/tika/parser/jdbc/JDBCTableReader.java   |   91 +-
 .../tika/parser/mailcommons/MailDateParser.java    |  656 ++++----
 .../apache/tika/parser/mailcommons/MailUtil.java   |   41 +-
 .../parser/mailcommons/MailDateParserTest.java     |  151 +-
 .../tika/parser/mailcommons/MailUtilTest.java      |   31 +-
 .../tika/parser/mail/MailContentHandler.java       |  179 +--
 .../org/apache/tika/parser/mail/RFC822Parser.java  |   70 +-
 .../org/apache/tika/parser/mbox/MboxParser.java    |   58 +-
 .../apache/tika/parser/mail/RFC822ParserTest.java  |  269 ++--
 .../apache/tika/parser/mbox/MboxParserTest.java    |   44 +-
 .../detect/microsoft/POIFSContainerDetector.java   |  189 ++-
 .../detect/microsoft/ooxml/OPCPackageDetector.java |  161 +-
 .../microsoft/MSEmbeddedStreamTranslator.java      |   42 +-
 .../microsoft/PSTEmailStreamTranslator.java        |   38 +-
 .../tika/parser/microsoft/AbstractListManager.java |   99 +-
 .../parser/microsoft/AbstractOfficeParser.java     |   49 +-
 .../parser/microsoft/AbstractPOIFSExtractor.java   |  165 +-
 .../org/apache/tika/parser/microsoft/Cell.java     |   32 +-
 .../tika/parser/microsoft/CellDecorator.java       |   25 +-
 .../apache/tika/parser/microsoft/EMFParser.java    |  163 +-
 .../tika/parser/microsoft/ExcelExtractor.java      |  220 ++-
 .../tika/parser/microsoft/FormattingUtils.java     |   45 +-
 .../tika/parser/microsoft/HSLFExtractor.java       |  178 +--
 .../tika/parser/microsoft/JackcessExtractor.java   |  127 +-
 .../tika/parser/microsoft/JackcessParser.java      |   74 +-
 .../apache/tika/parser/microsoft/LinkedCell.java   |   25 +-
 .../apache/tika/parser/microsoft/ListManager.java  |   79 +-
 .../tika/parser/microsoft/MSOwnerFileParser.java   |   45 +-
 .../apache/tika/parser/microsoft/NumberCell.java   |   26 +-
 .../apache/tika/parser/microsoft/OfficeParser.java |  130 +-
 .../tika/parser/microsoft/OfficeParserConfig.java  |  102 +-
 .../tika/parser/microsoft/OldExcelParser.java      |   47 +-
 .../tika/parser/microsoft/OutlookExtractor.java    |  372 ++---
 .../tika/parser/microsoft/SummaryExtractor.java    |   48 +-
 .../apache/tika/parser/microsoft/TNEFParser.java   |   48 +-
 .../org/apache/tika/parser/microsoft/TextCell.java |   25 +-
 .../parser/microsoft/TikaExcelDataFormatter.java   |   36 +-
 .../parser/microsoft/TikaExcelGeneralFormat.java   |   28 +-
 .../apache/tika/parser/microsoft/WMFParser.java    |   58 +-
 .../tika/parser/microsoft/WordExtractor.java       |  186 ++-
 .../microsoft/activemime/ActiveMimeParser.java     |   54 +-
 .../tika/parser/microsoft/chm/ChmAccessor.java     |   25 +-
 .../tika/parser/microsoft/chm/ChmAssert.java       |   66 +-
 .../tika/parser/microsoft/chm/ChmBlockInfo.java    |   54 +-
 .../tika/parser/microsoft/chm/ChmCommons.java      |   68 +-
 .../tika/parser/microsoft/chm/ChmConstants.java    |   62 +-
 .../microsoft/chm/ChmDirectoryListingSet.java      |  176 +--
 .../tika/parser/microsoft/chm/ChmExtractor.java    |  155 +-
 .../tika/parser/microsoft/chm/ChmItsfHeader.java   |   95 +-
 .../tika/parser/microsoft/chm/ChmItspHeader.java   |  237 ++-
 .../tika/parser/microsoft/chm/ChmLzxBlock.java     |  279 ++--
 .../tika/parser/microsoft/chm/ChmLzxState.java     |  110 +-
 .../parser/microsoft/chm/ChmLzxcControlData.java   |   95 +-
 .../parser/microsoft/chm/ChmLzxcResetTable.java    |   62 +-
 .../tika/parser/microsoft/chm/ChmParser.java       |   51 +-
 .../parser/microsoft/chm/ChmParsingException.java  |   22 +-
 .../tika/parser/microsoft/chm/ChmPmgiHeader.java   |   71 +-
 .../tika/parser/microsoft/chm/ChmPmglHeader.java   |   96 +-
 .../tika/parser/microsoft/chm/ChmSection.java      |   55 +-
 .../tika/parser/microsoft/chm/ChmWrapper.java      |   22 +-
 .../microsoft/chm/DirectoryListingEntry.java       |   53 +-
 .../tika/parser/microsoft/libpst/EmailVisitor.java |   49 +-
 .../tika/parser/microsoft/libpst/LibPstParser.java |  111 +-
 .../microsoft/libpst/LibPstParserConfig.java       |   32 +-
 .../microsoft/msg/ExtendedMetadataExtractor.java   |  122 +-
 .../apache/tika/parser/microsoft/msg/MAPITag.java  |   26 +-
 .../parser/microsoft/msg/TikaNameIdChunks.java     |  124 +-
 .../microsoft/onenote/CheckedFileNodePushBack.java |   26 +-
 .../tika/parser/microsoft/onenote/CompactID.java   |   26 +-
 .../tika/parser/microsoft/onenote/Error.java       |   25 +-
 .../parser/microsoft/onenote/ExtendedGUID.java     |   23 +-
 .../microsoft/onenote/FileChunkReference.java      |   62 +-
 .../microsoft/onenote/FileDataStoreObject.java     |   24 +-
 .../onenote/FileDataStoreObjectReference.java      |   22 +-
 .../tika/parser/microsoft/onenote/FileNode.java    |  133 +-
 .../parser/microsoft/onenote/FileNodeList.java     |   22 +-
 .../microsoft/onenote/FileNodeListHeader.java      |   57 +-
 .../tika/parser/microsoft/onenote/FileNodePtr.java |   28 +-
 .../microsoft/onenote/FileNodePtrBackPush.java     |   22 +-
 .../parser/microsoft/onenote/FileNodeUnion.java    |   44 +-
 .../microsoft/onenote/FndStructureConstants.java   |   25 +-
 .../apache/tika/parser/microsoft/onenote/GUID.java |   31 +-
 .../microsoft/onenote/GlobalIdTableEntry2FNDX.java |   22 +-
 .../microsoft/onenote/GlobalIdTableEntry3FNDX.java |   22 +-
 .../microsoft/onenote/GlobalIdTableEntryFNDX.java  |   22 +-
 .../microsoft/onenote/GlobalIdTableStartFNDX.java  |   22 +-
 .../tika/parser/microsoft/onenote/IndentUtil.java  |   22 +-
 .../tika/parser/microsoft/onenote/Int24.java       |   22 +-
 .../apache/tika/parser/microsoft/onenote/JCID.java |   88 +-
 .../microsoft/onenote/JCIDPropertySetTypeEnum.java |   28 +-
 .../onenote/ObjectDeclarationWithRefCount.java     |   22 +-
 .../onenote/ObjectDeclarationWithRefCountBody.java |   24 +-
 .../onenote/ObjectInfoDependencyOverrideData.java  |   22 +-
 .../onenote/ObjectInfoDependencyOverrides.java     |   22 +-
 .../onenote/ObjectRevisionWithRefCountFNDX.java    |   22 +-
 .../onenote/ObjectSpaceObjectPropSet.java          |   30 +-
 ...ctSpaceObjectStreamOfOIDsOSIDsOrContextIDs.java |   26 +-
 .../microsoft/onenote/ObjectStreamCounters.java    |   22 +-
 .../onenote/OneNoteDirectFileResource.java         |   29 +-
 .../parser/microsoft/onenote/OneNoteDocument.java  |   29 +-
 .../parser/microsoft/onenote/OneNoteHeader.java    |   32 +-
 .../onenote/OneNoteLegacyDumpStrings.java          |   48 +-
 .../parser/microsoft/onenote/OneNoteParser.java    |  165 +-
 .../microsoft/onenote/OneNotePropertyEnum.java     |   24 +-
 .../microsoft/onenote/OneNotePropertyId.java       |   29 +-
 .../tika/parser/microsoft/onenote/OneNotePtr.java  |  450 +++---
 .../microsoft/onenote/OneNoteTreeWalker.java       |  220 ++-
 .../onenote/OneNoteTreeWalkerOptions.java          |   30 +-
 .../parser/microsoft/onenote/PropertyIDType.java   |   22 +-
 .../tika/parser/microsoft/onenote/PropertySet.java |   67 +-
 .../parser/microsoft/onenote/PropertyValue.java    |   45 +-
 .../tika/parser/microsoft/onenote/Revision.java    |   22 +-
 .../parser/microsoft/onenote/RevisionManifest.java |   24 +-
 .../onenote/RevisionManifestListStart.java         |   22 +-
 .../microsoft/onenote/RevisionRoleDeclaration.java |   22 +-
 .../microsoft/onenote/RootObjectReference.java     |   24 +-
 .../microsoft/onenote/RootObjectReferenceBase.java |   22 +-
 .../onenote/fsshttpb/IFSSHTTPBSerializable.java    |   23 +-
 .../onenote/fsshttpb/MSOneStorePackage.java        |  117 +-
 .../onenote/fsshttpb/MSOneStoreParser.java         |  151 +-
 .../exception/DataElementParseErrorException.java  |   22 +-
 .../onenote/fsshttpb/property/ArrayNumber.java     |   28 +-
 .../fsshttpb/property/EightBytesOfData.java        |   31 +-
 .../onenote/fsshttpb/property/FourBytesOfData.java |   31 +-
 .../onenote/fsshttpb/property/IProperty.java       |   27 +-
 .../onenote/fsshttpb/property/NoData.java          |   24 +-
 .../onenote/fsshttpb/property/OneByteOfData.java   |   30 +-
 .../property/PrtArrayOfPropertyValues.java         |   31 +-
 .../PrtFourBytesOfLengthFollowedByData.java        |   35 +-
 .../onenote/fsshttpb/property/TwoBytesOfData.java  |   33 +-
 .../streamobj/CellManifestCurrentRevision.java     |   32 +-
 .../streamobj/CellManifestDataElementData.java     |   31 +-
 .../onenote/fsshttpb/streamobj/DataElement.java    |   90 +-
 .../fsshttpb/streamobj/DataElementData.java        |   27 +-
 .../fsshttpb/streamobj/DataElementHash.java        |   32 +-
 .../fsshttpb/streamobj/DataElementPackage.java     |   34 +-
 .../onenote/fsshttpb/streamobj/DataHashObject.java |   40 +-
 .../onenote/fsshttpb/streamobj/DataSizeObject.java |   33 +-
 .../fsshttpb/streamobj/EncryptionObject.java       |   22 +-
 .../onenote/fsshttpb/streamobj/FileDataObject.java |   22 +-
 .../fsshttpb/streamobj/IntermediateNodeObject.java |   38 +-
 .../onenote/fsshttpb/streamobj/JCIDObject.java     |   29 +-
 .../onenote/fsshttpb/streamobj/LeafNodeObject.java |  125 +-
 .../onenote/fsshttpb/streamobj/NodeObject.java     |   23 +-
 .../fsshttpb/streamobj/ObjectGroupData.java        |   59 +-
 .../streamobj/ObjectGroupDataElementData.java      |   90 +-
 .../streamobj/ObjectGroupDeclarations.java         |   61 +-
 .../fsshttpb/streamobj/ObjectGroupMetadata.java    |   42 +-
 .../streamobj/ObjectGroupMetadataDeclarations.java |   49 +-
 .../ObjectGroupObjectBLOBDataDeclaration.java      |   39 +-
 .../fsshttpb/streamobj/ObjectGroupObjectData.java  |   32 +-
 .../ObjectGroupObjectDataBLOBReference.java        |   33 +-
 .../streamobj/ObjectGroupObjectDeclare.java        |   38 +-
 .../onenote/fsshttpb/streamobj/PropertySet.java    |   28 +-
 .../fsshttpb/streamobj/PropertySetObject.java      |   29 +-
 .../fsshttpb/streamobj/RevisionManifest.java       |   32 +-
 .../streamobj/RevisionManifestDataElementData.java |   56 +-
 .../RevisionManifestObjectGroupReferences.java     |   37 +-
 .../streamobj/RevisionManifestRootDeclare.java     |   32 +-
 .../fsshttpb/streamobj/RevisionStoreObject.java    |   25 +-
 .../streamobj/RevisionStoreObjectGroup.java        |   67 +-
 .../fsshttpb/streamobj/SignatureObject.java        |   36 +-
 .../streamobj/StorageIndexCellMapping.java         |   36 +-
 .../streamobj/StorageIndexDataElementData.java     |   62 +-
 .../streamobj/StorageIndexManifestMapping.java     |   32 +-
 .../streamobj/StorageIndexRevisionMapping.java     |   36 +-
 .../streamobj/StorageManifestDataElementData.java  |   48 +-
 .../streamobj/StorageManifestRootDeclare.java      |   32 +-
 .../streamobj/StorageManifestSchemaGUID.java       |   35 +-
 .../onenote/fsshttpb/streamobj/StreamObject.java   |  178 +--
 .../fsshttpb/streamobj/StreamObjectHeaderEnd.java  |   25 +-
 .../streamobj/StreamObjectHeaderEnd16bit.java      |   55 +-
 .../streamobj/StreamObjectHeaderEnd8bit.java       |   55 +-
 .../streamobj/StreamObjectHeaderStart.java         |   41 +-
 .../streamobj/StreamObjectHeaderStart16bit.java    |   77 +-
 .../streamobj/StreamObjectHeaderStart32bit.java    |   70 +-
 .../streamobj/StreamObjectParseErrorException.java |   36 +-
 .../streamobj/StreamObjectTypeHeaderEnd.java       |   22 +-
 .../streamobj/StreamObjectTypeHeaderStart.java     |   22 +-
 .../fsshttpb/streamobj/basic/AdapterHelper.java    |   27 +-
 .../streamobj/basic/AlternativePackaging.java      |   27 +-
 .../fsshttpb/streamobj/basic/BasicObject.java      |   40 +-
 .../fsshttpb/streamobj/basic/BinaryItem.java       |   30 +-
 .../onenote/fsshttpb/streamobj/basic/CellID.java   |   41 +-
 .../fsshttpb/streamobj/basic/CellIDArray.java      |   35 +-
 .../fsshttpb/streamobj/basic/Compact64bitInt.java  |   34 +-
 .../fsshttpb/streamobj/basic/CompactID.java        |   28 +-
 .../fsshttpb/streamobj/basic/DataElementType.java  |   22 +-
 .../streamobj/basic/DataNodeObjectData.java        |   31 +-
 .../fsshttpb/streamobj/basic/ExGUIDArray.java      |   33 +-
 .../onenote/fsshttpb/streamobj/basic/ExGuid.java   |   33 +-
 .../fsshttpb/streamobj/basic/HeaderCell.java       |   43 +-
 .../onenote/fsshttpb/streamobj/basic/JCID.java     |   28 +-
 .../fsshttpb/streamobj/basic/PropertyID.java       |   28 +-
 .../fsshttpb/streamobj/basic/PropertyType.java     |   48 +-
 .../fsshttpb/streamobj/basic/RequestTypes.java     |   22 +-
 .../fsshttpb/streamobj/basic/SerialNumber.java     |   44 +-
 .../fsshttpb/streamobj/basic/ZipHeader.java        |   29 +-
 .../streamobj/chunking/AbstractChunking.java       |   23 +-
 .../streamobj/chunking/ChunkingFactory.java        |   42 +-
 .../streamobj/chunking/ChunkingMethod.java         |   22 +-
 .../streamobj/chunking/RDCAnalysisChunking.java    |  152 +-
 .../streamobj/chunking/SimpleChunking.java         |   33 +-
 .../streamobj/chunking/ZipFilesChunking.java       |   53 +-
 .../streamobj/space/ObjectSpaceObjectPropSet.java  |   31 +-
 .../space/ObjectSpaceObjectStreamHeader.java       |   32 +-
 .../space/ObjectSpaceObjectStreamOfContextIDs.java |   35 +-
 .../space/ObjectSpaceObjectStreamOfOIDs.java       |   31 +-
 .../space/ObjectSpaceObjectStreamOfOSIDs.java      |   31 +-
 .../microsoft/onenote/fsshttpb/unsigned/UByte.java |   82 +-
 .../onenote/fsshttpb/unsigned/UInteger.java        |   85 +-
 .../microsoft/onenote/fsshttpb/unsigned/ULong.java |   76 +-
 .../microsoft/onenote/fsshttpb/unsigned/UMath.java |   25 +-
 .../onenote/fsshttpb/unsigned/UNumber.java         |   27 +-
 .../onenote/fsshttpb/unsigned/UShort.java          |   62 +-
 .../onenote/fsshttpb/unsigned/Unsigned.java        |   89 +-
 .../microsoft/onenote/fsshttpb/util/Bit.java       |   28 +-
 .../onenote/fsshttpb/util/BitConverter.java        |   57 +-
 .../microsoft/onenote/fsshttpb/util/BitReader.java |   44 +-
 .../microsoft/onenote/fsshttpb/util/BitWriter.java |   35 +-
 .../microsoft/onenote/fsshttpb/util/ByteUtil.java  |   22 +-
 .../onenote/fsshttpb/util/DataElementUtils.java    |  291 ++--
 .../microsoft/onenote/fsshttpb/util/GuidUtil.java  |   22 +-
 .../fsshttpb/util/LittleEndianBitConverter.java    |   63 +-
 .../fsshttpb/util/SequenceNumberGenerator.java     |   23 +-
 .../microsoft/onenote/fsshttpb/util/UuidUtils.java |   22 +-
 .../microsoft/ooxml/AbstractOOXMLExtractor.java    |  237 ++-
 .../microsoft/ooxml/CommentPersonHandler.java      |   37 +-
 .../microsoft/ooxml/EmbeddedPartMetadata.java      |   29 +-
 .../parser/microsoft/ooxml/MetadataExtractor.java  |   76 +-
 .../parser/microsoft/ooxml/OOXMLExtractor.java     |   40 +-
 .../microsoft/ooxml/OOXMLExtractorFactory.java     |  103 +-
 .../tika/parser/microsoft/ooxml/OOXMLParser.java   |  136 +-
 .../microsoft/ooxml/OOXMLTikaBodyPartHandler.java  |   74 +-
 .../ooxml/OOXMLWordAndPowerPointTextHandler.java   |  146 +-
 .../parser/microsoft/ooxml/OPCPackageWrapper.java  |   33 +-
 .../ooxml/POIXMLTextExtractorDecorator.java        |   28 +-
 .../microsoft/ooxml/ParagraphProperties.java       |   22 +-
 .../tika/parser/microsoft/ooxml/RunProperties.java |   27 +-
 .../ooxml/SXSLFPowerPointExtractorDecorator.java   |  177 ++-
 .../ooxml/SXWPFWordExtractorDecorator.java         |  149 +-
 .../ooxml/XSLFPowerPointExtractorDecorator.java    |  122 +-
 .../ooxml/XSSFBExcelExtractorDecorator.java        |   63 +-
 .../ooxml/XSSFExcelExtractorDecorator.java         |  228 ++-
 .../parser/microsoft/ooxml/XWPFListManager.java    |   59 +-
 .../ooxml/XWPFWordExtractorDecorator.java          |  180 +--
 .../microsoft/ooxml/xps/XPSExtractorDecorator.java |   75 +-
 .../microsoft/ooxml/xps/XPSPageContentHandler.java |  180 ++-
 .../microsoft/ooxml/xps/XPSTextExtractor.java      |   28 +-
 .../xslf/XSLFEventBasedPowerPointExtractor.java    |   44 +-
 .../ooxml/xwpf/XWPFEventBasedWordExtractor.java    |  104 +-
 .../microsoft/ooxml/xwpf/XWPFFeatureExtractor.java |   58 +-
 .../microsoft/ooxml/xwpf/XWPFNumberingShim.java    |   23 +-
 .../microsoft/ooxml/xwpf/XWPFStylesShim.java       |   47 +-
 .../ooxml/xwpf/ml2006/AbstractPartHandler.java     |   27 +-
 .../ooxml/xwpf/ml2006/BinaryDataHandler.java       |   35 +-
 .../ooxml/xwpf/ml2006/CorePropertiesHandler.java   |   41 +-
 .../xwpf/ml2006/ExtendedPropertiesHandler.java     |   25 +-
 .../microsoft/ooxml/xwpf/ml2006/PartHandler.java   |   25 +-
 .../microsoft/ooxml/xwpf/ml2006/Relationship.java  |   22 +-
 .../ooxml/xwpf/ml2006/RelationshipsHandler.java    |   46 +-
 .../ooxml/xwpf/ml2006/RelationshipsManager.java    |   25 +-
 .../ooxml/xwpf/ml2006/Word2006MLDocHandler.java    |   93 +-
 .../ooxml/xwpf/ml2006/Word2006MLParser.java        |   44 +-
 .../ml2006/WordAndPowerPointTextPartHandler.java   |   41 +-
 .../parser/microsoft/pst/OutlookPSTParser.java     |   67 +-
 .../parser/microsoft/pst/PSTMailItemParser.java    |  141 +-
 .../tika/parser/microsoft/rtf/GroupState.java      |   44 +-
 .../tika/parser/microsoft/rtf/ListDescriptor.java  |   22 +-
 .../parser/microsoft/rtf/RTFEmbObjHandler.java     |   77 +-
 .../parser/microsoft/rtf/RTFObjDataParser.java     |  109 +-
 .../tika/parser/microsoft/rtf/RTFParser.java       |   44 +-
 .../tika/parser/microsoft/rtf/TextExtractor.java   |  318 ++--
 .../microsoft/xml/AbstractXML2003Parser.java       |   84 +-
 .../parser/microsoft/xml/HyperlinkHandler.java     |   40 +-
 .../parser/microsoft/xml/SpreadsheetMLParser.java  |   48 +-
 .../tika/parser/microsoft/xml/WordMLParser.java    |  110 +-
 .../microsoft/POIFSContainerDetectorTest.java      |   51 +-
 .../AbstractPOIContainerExtractionTest.java        |   43 +-
 .../tika/parser/microsoft/EMFParserTest.java       |   42 +-
 .../tika/parser/microsoft/ExcelParserTest.java     |  114 +-
 .../tika/parser/microsoft/JackcessParserTest.java  |   87 +-
 .../parser/microsoft/MSOwnerFileParserTest.java    |   25 +-
 .../tika/parser/microsoft/OLE2CasingTest.java      |   32 +-
 .../tika/parser/microsoft/OfficeParserTest.java    |   26 +-
 .../tika/parser/microsoft/OldExcelParserTest.java  |   31 +-
 .../tika/parser/microsoft/OutlookParserTest.java   |  135 +-
 .../microsoft/POIContainerExtractionTest.java      |   71 +-
 .../parser/microsoft/PowerPointParserTest.java     |  113 +-
 .../tika/parser/microsoft/ProjectParserTest.java   |   45 +-
 .../tika/parser/microsoft/PublisherParserTest.java |   30 +-
 .../parser/microsoft/SolidworksParserTest.java     |   68 +-
 .../tika/parser/microsoft/TNEFParserTest.java      |   32 +-
 .../tika/parser/microsoft/VisioParserTest.java     |   30 +-
 .../tika/parser/microsoft/WMFParserTest.java       |   31 +-
 .../tika/parser/microsoft/WordParserTest.java      |  181 +--
 .../parser/microsoft/WriteProtectedParserTest.java |   30 +-
 .../microsoft/activemime/ActiveMimeParserTest.java |   35 +-
 .../parser/microsoft/chm/TestChmBlockInfo.java     |   58 +-
 .../parser/microsoft/chm/TestChmExtraction.java    |   86 +-
 .../parser/microsoft/chm/TestChmExtractor.java     |   28 +-
 .../parser/microsoft/chm/TestChmItsfHeader.java    |   24 +-
 .../parser/microsoft/chm/TestChmItspHeader.java    |   33 +-
 .../tika/parser/microsoft/chm/TestChmLzxState.java |   49 +-
 .../microsoft/chm/TestChmLzxcControlData.java      |   49 +-
 .../microsoft/chm/TestChmLzxcResetTable.java       |   51 +-
 .../microsoft/chm/TestDirectoryListingEntry.java   |   24 +-
 .../tika/parser/microsoft/chm/TestParameters.java  |   28 +-
 .../tika/parser/microsoft/chm/TestPmgiHeader.java  |   22 +-
 .../tika/parser/microsoft/chm/TestPmglHeader.java  |   30 +-
 .../parser/microsoft/libpst/TestLibPstParser.java  |   78 +-
 .../microsoft/onenote/OneNoteParserTest.java       |  188 +--
 .../ooxml/OOXMLContainerExtractionTest.java        |  153 +-
 .../parser/microsoft/ooxml/OOXMLParserTest.java    |  468 +++---
 .../parser/microsoft/ooxml/SXSLFExtractorTest.java |  203 ++-
 .../parser/microsoft/ooxml/SXWPFExtractorTest.java |  228 ++-
 .../parser/microsoft/ooxml/TruncatedOOXMLTest.java |   40 +-
 .../parser/microsoft/ooxml/xps/XPSParserTest.java  |   76 +-
 .../ooxml/xwpf/ml2006/Word2006MLParserTest.java    |   80 +-
 .../parser/microsoft/pst/OutlookPSTParserTest.java |   62 +-
 .../tika/parser/microsoft/rtf/RTFParserTest.java   |  115 +-
 .../parser/microsoft/xml/XML2003ParserTest.java    |   37 +-
 .../apache/tika/detect/ole/MiscOLEDetector.java    |   80 +-
 .../java/org/apache/tika/parser/dbf/DBFCell.java   |   61 +-
 .../apache/tika/parser/dbf/DBFColumnHeader.java    |   67 +-
 .../org/apache/tika/parser/dbf/DBFFileHeader.java  |   51 +-
 .../java/org/apache/tika/parser/dbf/DBFParser.java |   49 +-
 .../java/org/apache/tika/parser/dbf/DBFReader.java |   63 +-
 .../java/org/apache/tika/parser/dbf/DBFRow.java    |   27 +-
 .../apache/tika/parser/dif/DIFContentHandler.java  |   40 +-
 .../java/org/apache/tika/parser/dif/DIFParser.java |   40 +-
 .../apache/tika/parser/epub/EpubContentParser.java |   34 +-
 .../org/apache/tika/parser/epub/EpubParser.java    |  169 +-
 .../org/apache/tika/parser/epub/OPFParser.java     |   41 +-
 .../apache/tika/parser/hwp/HwpStreamReader.java    |   29 +-
 .../apache/tika/parser/hwp/HwpTextExtractorV5.java |   74 +-
 .../org/apache/tika/parser/hwp/HwpV5Parser.java    |   32 +-
 .../indesign/ContentAndMetadataExtractor.java      |   48 +-
 .../apache/tika/parser/indesign/IDMLParser.java    |   48 +-
 .../apache/tika/parser/mif/MIFContentHandler.java  |   33 +-
 .../org/apache/tika/parser/mif/MIFExtractor.java   |   36 +-
 .../java/org/apache/tika/parser/mif/MIFParser.java |   43 +-
 .../parser/odf/FlatOpenDocumentMacroHandler.java   |   42 +-
 .../tika/parser/odf/FlatOpenDocumentParser.java    |   67 +-
 .../parser/odf/NSNormalizerContentHandler.java     |   45 +-
 .../tika/parser/odf/OpenDocumentBodyHandler.java   |  143 +-
 .../tika/parser/odf/OpenDocumentContentParser.java |   36 +-
 .../tika/parser/odf/OpenDocumentMacroHandler.java  |   36 +-
 .../parser/odf/OpenDocumentManifestHandler.java    |   42 +-
 .../tika/parser/odf/OpenDocumentMetaParser.java    |   89 +-
 .../apache/tika/parser/odf/OpenDocumentParser.java |  193 +--
 .../tika/parser/wordperfect/QPWTextExtractor.java  |  117 +-
 .../tika/parser/wordperfect/QuattroProParser.java  |   38 +-
 .../tika/parser/wordperfect/WP5Charsets.java       |  334 ++--
 .../wordperfect/WP5DocumentAreaExtractor.java      |   81 +-
 .../tika/parser/wordperfect/WP6Charsets.java       |  839 +++++-----
 .../wordperfect/WP6DocumentAreaExtractor.java      |   85 +-
 .../wordperfect/WPDocumentAreaExtractor.java       |   36 +-
 .../tika/parser/wordperfect/WPInputStream.java     |   38 +-
 .../tika/parser/wordperfect/WPPrefixArea.java      |   36 +-
 .../parser/wordperfect/WPPrefixAreaExtractor.java  |   52 +-
 .../tika/parser/wordperfect/WordPerfectParser.java |   57 +-
 .../org/apache/tika/parser/dbf/DBFParserTest.java  |   83 +-
 .../org/apache/tika/parser/dif/DIFParserTest.java  |   28 +-
 .../apache/tika/parser/epub/EpubParserTest.java    |   71 +-
 .../apache/tika/parser/hwp/HwpV5ParserTest.java    |   31 +-
 .../tika/parser/ibooks/iBooksParserTest.java       |   56 +-
 .../tika/parser/indesign/IDMLParserTest.java       |   31 +-
 .../org/apache/tika/parser/mif/MIFParserTest.java  |   25 +-
 .../org/apache/tika/parser/odf/ODFParserTest.java  |  166 +-
 .../parser/odf/OpenDocumentContentParserTest.java  |   43 +-
 .../tika/parser/wordperfect/QuattroProTest.java    |   29 +-
 .../tika/parser/wordperfect/WPInputStreamTest.java |   41 +-
 .../tika/parser/wordperfect/WordPerfectTest.java   |   32 +-
 .../org/apache/tika/parser/feed/FeedParser.java    |   55 +-
 .../apache/tika/parser/iptc/IptcAnpaParser.java    |  425 ++---
 .../apache/tika/parser/feed/FeedParserTest.java    |   42 +-
 .../apache/tika/parser/ocr/ImagePreprocessor.java  |   49 +-
 .../apache/tika/parser/ocr/TesseractOCRConfig.java |  180 +--
 .../apache/tika/parser/ocr/TesseractOCRParser.java |  328 ++--
 .../apache/tika/parser/ocr/tess4j/ImageDeskew.java |   34 +-
 .../apache/tika/parser/ocr/tess4j/ImageUtil.java   |   38 +-
 .../tika/parser/ocr/TesseractOCRConfigTest.java    |   55 +-
 .../tika/parser/ocr/TesseractOCRParserTest.java    |  130 +-
 .../apache/tika/parser/pdf/AbstractPDF2XHTML.java  |  459 +++---
 .../org/apache/tika/parser/pdf/AccessChecker.java  |   46 +-
 .../java/org/apache/tika/parser/pdf/OCR2XHTML.java |   66 +-
 .../org/apache/tika/parser/pdf/OCRPageCounter.java |   26 +-
 .../java/org/apache/tika/parser/pdf/PDF2XHTML.java |  113 +-
 .../org/apache/tika/parser/pdf/PDFDOMUtil.java     |   40 +-
 .../tika/parser/pdf/PDFEncodedStringDecoder.java   |   64 +-
 .../tika/parser/pdf/PDFMarkedContent2XHTML.java    |  211 ++-
 .../java/org/apache/tika/parser/pdf/PDFParser.java |  384 +++--
 .../apache/tika/parser/pdf/PDFParserConfig.java    |  286 ++--
 .../tika/parser/pdf/PDMetadataExtractor.java       |  167 +-
 .../org/apache/tika/parser/pdf/XFAExtractor.java   |  115 +-
 .../tika/parser/pdf/image/ImageGraphicsEngine.java |  145 +-
 .../pdf/image/ImageGraphicsEngineFactory.java      |   38 +-
 .../pdf/updates/IncrementalUpdateRecord.java       |   22 +-
 .../parser/pdf/updates/IsIncrementalUpdate.java    |   22 +-
 .../tika/parser/pdf/updates/StartXRefOffset.java   |   34 +-
 .../tika/parser/pdf/updates/StartXRefScanner.java  |   82 +-
 .../pdf/xmpschemas/XMPSchemaIllustrator.java       |   25 +-
 .../tika/parser/pdf/xmpschemas/XMPSchemaPDFUA.java |   22 +-
 .../tika/parser/pdf/xmpschemas/XMPSchemaPDFVT.java |   24 +-
 .../tika/parser/pdf/xmpschemas/XMPSchemaPDFX.java  |   26 +-
 .../parser/pdf/xmpschemas/XMPSchemaPDFXId.java     |   22 +-
 .../tika/renderer/pdf/mutool/MuPDFRenderer.java    |   60 +-
 .../renderer/pdf/pdfbox/NoTextPDFRenderer.java     |   35 +-
 .../renderer/pdf/pdfbox/PDDocumentRenderer.java    |   27 +-
 .../tika/renderer/pdf/pdfbox/PDFBoxRenderer.java   |   85 +-
 .../renderer/pdf/pdfbox/PDFRenderingState.java     |   22 +-
 .../renderer/pdf/pdfbox/TextOnlyPDFRenderer.java   |   50 +-
 .../pdf/pdfbox/VectorGraphicsOnlyPDFRenderer.java  |   65 +-
 .../apache/tika/parser/pdf/AccessCheckerTest.java  |   47 +-
 .../apache/tika/parser/pdf/CustomTikaXMPTest.java  |   40 +-
 .../pdf/MyCustomImageGraphicsEngineFactory.java    |   36 +-
 .../tika/parser/pdf/PDFIncrementalUpdatesTest.java |   85 +-
 .../parser/pdf/PDFMarkedContent2XHTMLTest.java     |   38 +-
 .../org/apache/tika/parser/pdf/PDFParserTest.java  |  620 ++++----
 .../apache/tika/parser/pdf/PDFRenderingTest.java   |   44 +-
 .../detect/gzip/GZipSpecializationDetector.java    |   49 +-
 .../apache/tika/parser/pkg/CompressorParser.java   |   78 +-
 .../tika/parser/pkg/CompressorParserOptions.java   |   26 +-
 .../org/apache/tika/parser/pkg/PackageParser.java  |  297 ++--
 .../java/org/apache/tika/parser/pkg/RarParser.java |   46 +-
 .../org/apache/tika/parser/pkg/UnrarParser.java    |   84 +-
 .../apache/tika/parser/pkg/AbstractPkgTest.java    |   34 +-
 .../org/apache/tika/parser/pkg/ArParserTest.java   |   31 +-
 .../apache/tika/parser/pkg/Bzip2ParserTest.java    |   31 +-
 .../apache/tika/parser/pkg/CompressParserTest.java |   33 +-
 .../tika/parser/pkg/CompressorParserTest.java      |   58 +-
 .../org/apache/tika/parser/pkg/GzipParserTest.java |   31 +-
 .../apache/tika/parser/pkg/PackageParserTest.java  |   50 +-
 .../org/apache/tika/parser/pkg/RarParserTest.java  |   37 +-
 .../apache/tika/parser/pkg/Seven7ParserTest.java   |   33 +-
 .../org/apache/tika/parser/pkg/TarParserTest.java  |   33 +-
 .../apache/tika/parser/pkg/UnrarParserTest.java    |   32 +-
 .../org/apache/tika/parser/pkg/ZipParserTest.java  |   74 +-
 .../org/apache/tika/parser/pkg/ZlibParserTest.java |   31 +-
 .../java/org/apache/tika/parser/csv/CSVParams.java |   26 +-
 .../java/org/apache/tika/parser/csv/CSVResult.java |   33 +-
 .../org/apache/tika/parser/csv/CSVSniffer.java     |  122 +-
 .../apache/tika/parser/csv/TextAndCSVConfig.java   |   24 +-
 .../apache/tika/parser/csv/TextAndCSVParser.java   |  155 +-
 .../tika/parser/strings/Latin1StringsParser.java   |   96 +-
 .../apache/tika/parser/strings/StringsConfig.java  |   43 +-
 .../tika/parser/strings/StringsEncoding.java       |   30 +-
 .../apache/tika/parser/strings/StringsParser.java  |   68 +-
 .../org/apache/tika/parser/txt/BOMDetector.java    |   41 +-
 .../apache/tika/parser/txt/CharsetDetector.java    |  259 ++-
 .../org/apache/tika/parser/txt/CharsetMatch.java   |  129 +-
 .../apache/tika/parser/txt/CharsetRecog_2022.java  |   85 +-
 .../apache/tika/parser/txt/CharsetRecog_UTF8.java  |   25 +-
 .../tika/parser/txt/CharsetRecog_Unicode.java      |   36 +-
 .../apache/tika/parser/txt/CharsetRecog_mbcs.java  |  288 ++--
 .../apache/tika/parser/txt/CharsetRecog_sbcs.java  | 1663 ++++++++++----------
 .../apache/tika/parser/txt/CharsetRecognizer.java  |   35 +-
 .../tika/parser/txt/Icu4jEncodingDetector.java     |   39 +-
 .../java/org/apache/tika/parser/txt/TXTParser.java |   46 +-
 .../tika/parser/txt/UniversalEncodingDetector.java |   26 +-
 .../tika/parser/txt/UniversalEncodingListener.java |   42 +-
 .../org/apache/tika/parser/csv/CSVSnifferTest.java |   78 +-
 .../tika/parser/csv/TextAndCSVParserTest.java      |  115 +-
 .../parser/strings/Latin1StringsParserTest.java    |   33 +-
 .../tika/parser/strings/StringsConfigTest.java     |   46 +-
 .../tika/parser/strings/StringsParserTest.java     |   28 +-
 .../apache/tika/parser/txt/BOMDetectorTest.java    |   67 +-
 .../tika/parser/txt/CharsetDetectorTest.java       |   53 +-
 .../org/apache/tika/parser/txt/TXTParserTest.java  |   84 +-
 .../org/apache/tika/parser/http/HttpParser.java    |   51 +-
 .../org/apache/tika/parser/wacz/WACZParser.java    |   72 +-
 .../org/apache/tika/parser/warc/WARCParser.java    |   77 +-
 .../apache/tika/parser/http/HttpParserTest.java    |   28 +-
 .../apache/tika/parser/wacz/WACZParserTest.java    |   28 +-
 .../apache/tika/parser/warc/WARCParserTest.java    |   59 +-
 .../apache/tika/parser/tmx/TMXContentHandler.java  |   49 +-
 .../java/org/apache/tika/parser/tmx/TMXParser.java |   33 +-
 .../tika/parser/xliff/XLIFF12ContentHandler.java   |   29 +-
 .../apache/tika/parser/xliff/XLIFF12Parser.java    |   32 +-
 .../org/apache/tika/parser/xliff/XLZParser.java    |   38 +-
 .../tika/parser/xml/AbstractMetadataHandler.java   |   32 +-
 .../xml/AttributeDependantMetadataHandler.java     |   33 +-
 .../tika/parser/xml/AttributeMetadataHandler.java  |   38 +-
 .../org/apache/tika/parser/xml/DcXMLParser.java    |   57 +-
 .../tika/parser/xml/ElementMetadataHandler.java    |   91 +-
 .../apache/tika/parser/xml/FictionBookParser.java  |   50 +-
 .../apache/tika/parser/xml/MetadataHandler.java    |   37 +-
 .../tika/parser/xml/TextAndAttributeXMLParser.java |   27 +-
 .../java/org/apache/tika/parser/xml/XMLParser.java |   41 +-
 .../org/apache/tika/parser/xml/XMLProfiler.java    |   73 +-
 .../org/apache/tika/parser/tmx/TMXParserTest.java  |   28 +-
 .../tika/parser/xliff/XLIFF12ParserTest.java       |   28 +-
 .../apache/tika/parser/xliff/XLZParserTest.java    |   30 +-
 .../apache/tika/parser/xml/DcXMLParserTest.java    |   36 +-
 .../EmptyAndDuplicateElementsXMLParserTest.java    |   50 +-
 .../tika/parser/xml/FictionBookParserTest.java     |   30 +-
 .../parser/xml/TextAndAttributeXMLParserTest.java  |   30 +-
 .../apache/tika/parser/xmp/JempboxExtractor.java   |   76 +-
 .../tika/parser/xmp/XMPMetadataExtractor.java      |   52 +-
 .../apache/tika/parser/xmp/XMPPacketScanner.java   |   53 +-
 .../tika/parser/xmp/JempboxExtractorTest.java      |   53 +-
 .../tika/detect/zip/CompressorConstants.java       |   23 +-
 .../detect/zip/DefaultZipContainerDetector.java    |  145 +-
 .../DeprecatedStreamingZipContainerDetector.java   |  190 +--
 .../detect/zip/DeprecatedZipContainerDetector.java |   37 +-
 .../detect/zip/FrictionlessPackageDetector.java    |   40 +-
 .../org/apache/tika/detect/zip/IPADetector.java    |   26 +-
 .../org/apache/tika/detect/zip/JarDetector.java    |   32 +-
 .../org/apache/tika/detect/zip/KMZDetector.java    |   26 +-
 .../tika/detect/zip/OpenDocumentDetector.java      |   38 +-
 .../apache/tika/detect/zip/PackageConstants.java   |   23 +-
 .../apache/tika/detect/zip/StarOfficeDetector.java |   66 +-
 .../tika/detect/zip/StreamingDetectContext.java    |   40 +-
 .../detect/zip/StreamingZipContainerDetector.java  |   35 +-
 .../tika/detect/zip/ZipContainerDetector.java      |   44 +-
 .../tika/detect/zip/ZipContainerDetectorBase.java  |   25 +-
 .../org/apache/tika/zip/utils/ZipSalvager.java     |   70 +-
 .../detect/zip/FrictionlessDataDetectionTest.java  |   29 +-
 .../apache/tika/detect/zip/ZipDetectionTest.java   |   54 +-
 .../org/apache/tika/parser/internal/Activator.java |   32 +-
 .../tika/config/TikaConfigSerializerTest.java      |   70 +-
 .../apache/tika/config/TikaDetectorConfigTest.java |   51 +-
 .../tika/config/TikaEncodingDetectorTest.java      |   85 +-
 .../apache/tika/config/TikaParserConfigTest.java   |   36 +-
 .../tika/config/TikaTranslatorConfigTest.java      |   34 +-
 .../tika/detect/TestContainerAwareDetector.java    |  317 ++--
 .../apache/tika/detect/TestDetectorLoading.java    |   32 +-
 .../tika/detect/TestFileCommandDetector.java       |   32 +-
 .../org/apache/tika/detect/TestZipDetector.java    |   72 +-
 .../tika/extractor/EmbeddedDocumentUtilTest.java   |   27 +-
 .../java/org/apache/tika/mime/MimeTypeTest.java    |   22 +-
 .../java/org/apache/tika/mime/MimeTypesTest.java   |   22 +-
 .../java/org/apache/tika/mime/OneOffMimeTest.java  |   40 +-
 .../java/org/apache/tika/mime/TestMimeTypes.java   |  342 ++--
 .../org/apache/tika/ossfuzz/OssFuzzReplicator.java |   27 +-
 .../java/org/apache/tika/ossfuzz/ParserFuzzer.java |   48 +-
 .../tika/parser/AutoDetectParserConfigTest.java    |   98 +-
 .../apache/tika/parser/AutoDetectParserTest.java   |  185 ++-
 .../tika/parser/AutoDetectReaderParserTest.java    |   42 +-
 .../parser/BouncyCastleDigestingParserTest.java    |  117 +-
 .../apache/tika/parser/DigestingParserTest.java    |  151 +-
 .../org/apache/tika/parser/ParsingReaderTest.java  |   28 +-
 .../tika/parser/RecursiveParserWrapperTest.java    |  195 ++-
 .../org/apache/tika/parser/TabularFormatsTest.java |  192 ++-
 .../java/org/apache/tika/parser/TestParsers.java   |   72 +-
 .../apache/tika/parser/TestXMLEntityExpansion.java |   90 +-
 .../java/org/apache/tika/parser/TestXXEInXML.java  |  124 +-
 .../java/org/apache/tika/parser/XMLTestBase.java   |   53 +-
 .../parser/apple/AppleSingleFileParserTest.java    |   32 +-
 .../org/apache/tika/parser/apple/IWorkTest.java    |   26 +-
 .../apache/tika/parser/apple/PListParserTest.java  |   26 +-
 .../apache/tika/parser/crypto/TSDParserTest.java   |   32 +-
 .../parser/fork/ForkParserIntegrationTest.java     |  122 +-
 .../apache/tika/parser/html/HtmlParserTest.java    |   34 +-
 .../apache/tika/parser/image/JpegParserTest.java   |   35 +-
 .../apache/tika/parser/mail/MboxParserTest.java    |   30 +-
 .../apache/tika/parser/mail/RFC822ParserTest.java  |   58 +-
 .../tika/parser/microsoft/EMFParserTest.java       |   36 +-
 .../tika/parser/microsoft/ExcelParserTest.java     |   26 +-
 .../microsoft/POIContainerExtractionTest.java      |   54 +-
 .../parser/microsoft/PowerPointParserTest.java     |   28 +-
 .../tika/parser/microsoft/XML2003ParserTest.java   |   45 +-
 .../parser/microsoft/ooxml/OOXMLParserTest.java    |   71 +-
 .../parser/microsoft/ooxml/SXWPFExtractorTest.java |   63 +-
 .../parser/microsoft/ooxml/TruncatedOOXMLTest.java |   55 +-
 .../tika/parser/microsoft/rtf/RTFParserTest.java   |   82 +-
 .../apache/tika/parser/mock/MockParserTest.java    |   70 +-
 .../tika/parser/ocr/TesseractOCRParserTest.java    |  114 +-
 .../org/apache/tika/parser/odf/ODFParserTest.java  |   77 +-
 .../org/apache/tika/parser/pdf/PDFParserTest.java  |  208 ++-
 .../org/apache/tika/parser/pkg/ArParserTest.java   |   28 +-
 .../apache/tika/parser/pkg/Bzip2ParserTest.java    |   28 +-
 .../pkg/CompositeZipContainerDetectorTest.java     |  140 +-
 .../apache/tika/parser/pkg/CompressParserTest.java |   28 +-
 .../tika/parser/pkg/CompressorParserTest.java      |   30 +-
 .../org/apache/tika/parser/pkg/GzipParserTest.java |   42 +-
 .../apache/tika/parser/pkg/PackageParserTest.java  |   26 +-
 .../org/apache/tika/parser/pkg/RarParserTest.java  |   30 +-
 .../apache/tika/parser/pkg/Seven7ParserTest.java   |   54 +-
 .../org/apache/tika/parser/pkg/TarParserTest.java  |   28 +-
 .../apache/tika/parser/pkg/UnrarParserTest.java    |   42 +-
 .../org/apache/tika/parser/pkg/ZipParserTest.java  |   48 +-
 .../org/apache/tika/parser/pkg/ZlibParserTest.java |   28 +-
 .../tika/parser/xml/FictionBookParserTest.java     |   28 +-
 .../org/apache/tika/sax/BoilerpipeHandlerTest.java |   55 +-
 .../DoublingContentHandlerDecoratorFactory.java    |   32 +-
 .../sax/PhoneExtractingContentHandlerTest.java     |   41 +-
 .../sax/StandardsExtractingContentHandlerTest.java |   30 +-
 .../UpcasingContentHandlerDecoratorFactory.java    |   30 +-
 .../apache/tika/utils/ServiceLoaderUtilsTest.java  |   33 +-
 .../apache/tika/async/cli/SimpleAsyncConfig.java   |   31 +-
 .../org/apache/tika/async/cli/TikaAsyncCLI.java    |  120 +-
 .../tika/async/cli/TikaConfigAsyncWriter.java      |   87 +-
 .../apache/tika/async/cli/AsyncCliParserTest.java  |   49 +-
 .../apache/tika/async/cli/AsyncProcessorTest.java  |   76 +-
 .../apache/tika/async/cli/TikaAsyncCLITest.java    |   34 +-
 .../tika/async/cli/TikaConfigAsyncWriterTest.java  |   51 +-
 .../tika/pipes/emitter/azblob/AZBlobEmitter.java   |  100 +-
 .../pipes/emitter/azblob/TestAZBlobEmitter.java    |   33 +-
 .../apache/tika/pipes/emitter/gcs/GCSEmitter.java  |   85 +-
 .../tika/pipes/emitter/gcs/TestGCSEmitter.java     |   33 +-
 .../tika/pipes/emitter/jdbc/JDBCEmitter.java       |  183 +--
 .../tika/pipes/emitter/jdbc/JDBCEmitterTest.java   |   80 +-
 .../tika/pipes/emitter/kafka/KafkaEmitter.java     |   61 +-
 .../pipes/emitter/opensearch/JsonResponse.java     |   29 +-
 .../pipes/emitter/opensearch/OpenSearchClient.java |  150 +-
 .../emitter/opensearch/OpenSearchEmitter.java      |   87 +-
 .../emitter/opensearch/OpenSearchClientTest.java   |   38 +-
 .../apache/tika/pipes/emitter/s3/S3Emitter.java    |  156 +-
 .../tika/pipes/emitter/solr/SolrEmitter.java       |  117 +-
 .../pipes/emitter/solr/SolrEmitterDevTest.java     |   33 +-
 .../tika/pipes/fetcher/azblob/AZBlobFetcher.java   |   74 +-
 .../fetcher/azblob/config/AZBlobFetcherConfig.java |   22 +-
 .../pipes/fetcher/azblob/TestAZBlobFetcher.java    |   38 +-
 .../apache/tika/pipes/fetcher/gcs/GCSFetcher.java  |   49 +-
 .../pipes/fetcher/gcs/config/GCSFetcherConfig.java |   22 +-
 .../tika/pipes/fetcher/s3/TestGCSFetcher.java      |   34 +-
 .../tika/pipes/fetcher/http/HttpFetcher.java       |  243 ++-
 .../fetcher/http/config/HttpFetcherConfig.java     |   23 +-
 .../pipes/fetcher/http/config/HttpHeaders.java     |   32 +-
 .../tika/pipes/fetcher/http/jwt/JwtCreds.java      |   22 +-
 .../tika/pipes/fetcher/http/jwt/JwtGenerator.java  |   49 +-
 .../pipes/fetcher/http/jwt/JwtPrivateKeyCreds.java |   28 +-
 .../pipes/fetcher/http/jwt/JwtSecretCreds.java     |   23 +-
 .../tika/pipes/fetcher/http/HttpFetcherTest.java   |  108 +-
 .../pipes/fetcher/http/config/HttpHeadersTest.java |   28 +-
 .../pipes/fetcher/http/jwt/JwtGeneratorTest.java   |   39 +-
 .../microsoftgraph/MicrosoftGraphFetcher.java      |   69 +-
 .../config/AadCredentialConfigBase.java            |   22 +-
 .../Client2CertificateCredentialsConfig.java       |   22 +-
 .../config/ClientCertificateCredentialsConfig.java |   25 +-
 .../config/ClientSecretCredentialsConfig.java      |   25 +-
 .../config/MicrosoftGraphFetcherConfig.java        |   29 +-
 .../microsoftgraph/MicrosoftGraphFetcherTest.java  |   63 +-
 .../apache/tika/pipes/fetcher/s3/S3Fetcher.java    |  147 +-
 .../pipes/fetcher/s3/config/S3FetcherConfig.java   |   22 +-
 .../tika/pipes/fetcher/s3/TestS3Fetcher.java       |   30 +-
 .../org/apache/tika/client/HttpClientFactory.java  |  119 +-
 .../org/apache/tika/client/HttpClientUtil.java     |   35 +-
 .../apache/tika/client/TikaClientException.java    |   22 +-
 .../tika/pipes/core/CompositePipesReporter.java    |   31 +-
 .../pipes/core/FailedToStartClientException.java   |   22 +-
 .../org/apache/tika/pipes/core/FetchEmitTuple.java |   51 +-
 .../org/apache/tika/pipes/core/HandlerConfig.java  |   68 +-
 .../tika/pipes/core/LoggingPipesReporter.java      |   22 +-
 .../org/apache/tika/pipes/core/PassbackFilter.java |   23 +-
 .../org/apache/tika/pipes/core/PipesClient.java    |  205 ++-
 .../org/apache/tika/pipes/core/PipesConfig.java    |   33 +-
 .../apache/tika/pipes/core/PipesConfigBase.java    |   56 +-
 .../org/apache/tika/pipes/core/PipesException.java |   22 +-
 .../org/apache/tika/pipes/core/PipesParser.java    |   30 +-
 .../org/apache/tika/pipes/core/PipesReporter.java  |   62 +-
 .../apache/tika/pipes/core/PipesReporterBase.java  |   42 +-
 .../org/apache/tika/pipes/core/PipesResult.java    |   66 +-
 .../org/apache/tika/pipes/core/PipesServer.java    |  290 ++--
 .../apache/tika/pipes/core/async/AsyncConfig.java  |   34 +-
 .../apache/tika/pipes/core/async/AsyncEmitter.java |   49 +-
 .../tika/pipes/core/async/AsyncProcessor.java      |  131 +-
 .../apache/tika/pipes/core/async/AsyncStatus.java  |   40 +-
 .../pipes/core/async/OfferLargerThanQueueSize.java |   25 +-
 .../tika/pipes/core/emitter/AbstractEmitter.java   |   29 +-
 .../apache/tika/pipes/core/emitter/EmitData.java   |   39 +-
 .../apache/tika/pipes/core/emitter/EmitKey.java    |   29 +-
 .../apache/tika/pipes/core/emitter/Emitter.java    |   30 +-
 .../tika/pipes/core/emitter/EmitterManager.java    |   50 +-
 .../tika/pipes/core/emitter/EmptyEmitter.java      |   25 +-
 .../tika/pipes/core/emitter/StreamEmitter.java     |   27 +-
 .../pipes/core/emitter/TikaEmitterException.java   |   22 +-
 .../AbstractEmbeddedDocumentBytesHandler.java      |   71 +-
 .../BasicEmbeddedDocumentBytesHandler.java         |   40 +-
 .../extractor/EmbeddedDocumentBytesConfig.java     |   60 +-
 .../EmittingEmbeddedDocumentBytesHandler.java      |   44 +-
 .../tika/pipes/core/fetcher/AbstractFetcher.java   |   22 +-
 .../tika/pipes/core/fetcher/EmptyFetcher.java      |   26 +-
 .../apache/tika/pipes/core/fetcher/FetchKey.java   |   38 +-
 .../apache/tika/pipes/core/fetcher/Fetcher.java    |   31 +-
 .../tika/pipes/core/fetcher/FetcherManager.java    |   52 +-
 .../pipes/core/fetcher/FetcherStringException.java |   22 +-
 .../tika/pipes/core/fetcher/RangeFetcher.java      |   31 +-
 .../pipes/core/fetcher/config/AbstractConfig.java  |   24 +-
 .../fetcher/config/FetcherConfigContainer.java     |   22 +-
 .../core/pipesiterator/CallablePipesIterator.java  |   78 +-
 .../pipes/core/pipesiterator/PipesIterator.java    |   79 +-
 .../pipes/core/pipesiterator/TotalCountResult.java |   27 +-
 .../pipes/core/pipesiterator/TotalCounter.java     |   40 +-
 .../serialization/FetchEmitTupleDeserializer.java  |   51 +-
 .../serialization/FetchEmitTupleSerializer.java    |   34 +-
 .../pipes/core/serialization/JsonEmitData.java     |   28 +-
 .../core/serialization/JsonFetchEmitTuple.java     |   28 +-
 .../core/serialization/JsonFetchEmitTupleList.java |   30 +-
 .../tika/pipes/emitter/fs/FileSystemEmitter.java   |   55 +-
 .../tika/pipes/fetcher/fs/FileSystemFetcher.java   |   89 +-
 .../fetcher/fs/config/FileSystemFetcherConfig.java |   22 +-
 .../apache/tika/pipes/fetcher/url/UrlFetcher.java  |   44 +-
 .../filelist/FileListPipesIterator.java            |   47 +-
 .../pipesiterator/fs/FileSystemPipesIterator.java  |   59 +-
 .../apache/tika/pipes/core/PassbackFilterTest.java |   75 +-
 .../apache/tika/pipes/core/PipesClientTest.java    |   80 +-
 .../apache/tika/pipes/core/PipesServerTest.java    |  146 +-
 .../tika/pipes/core/TikaPipesConfigTest.java       |   58 +-
 .../pipes/core/async/AsyncChaosMonkeyTest.java     |  138 +-
 .../tika/pipes/core/async/MockDigesterFactory.java |   22 +-
 .../apache/tika/pipes/core/async/MockEmitter.java  |   33 +-
 .../apache/tika/pipes/core/async/MockFetcher.java  |   33 +-
 .../apache/tika/pipes/core/async/MockReporter.java |   23 +-
 .../tika/pipes/core/async/MockReporterTest.java    |   34 +-
 .../tika/pipes/core/emitter/MockEmitter.java       |   27 +-
 .../tika/pipes/core/fetcher/MockFetcher.java       |   32 +-
 .../filelist/FileListPipesIteratorTest.java        |   26 +-
 .../serialization/JsonFetchEmitTupleListTest.java  |   29 +-
 .../core/serialization/JsonFetchEmitTupleTest.java |   63 +-
 .../pipes/fetcher/fs/FileSystemFetcherTest.java    |   27 +-
 .../fs/FileSystemPipesIteratorTest.java            |   31 +-
 .../pipesiterator/azblob/AZBlobPipesIterator.java  |   86 +-
 .../azblob/TestAZBlobPipesIterator.java            |   28 +-
 .../pipes/pipesiterator/csv/CSVPipesIterator.java  |  116 +-
 .../src/test/java/TestCSVPipesIterator.java        |   43 +-
 .../pipes/pipesiterator/gcs/GCSPipesIterator.java  |   56 +-
 .../pipesiterator/gcs/TestGCSPipesIterator.java    |   28 +-
 .../pipesiterator/jdbc/JDBCPipesIterator.java      |  122 +-
 .../pipesiterator/jdbc/TestJDBCPipesIterator.java  |   93 +-
 .../pipesiterator/json/JsonPipesIterator.java      |   31 +-
 .../pipesiterator/json/TestJsonPipesIterator.java  |   88 +-
 .../pipesiterator/kafka/KafkaPipesIterator.java    |   45 +-
 .../kafka/TestKafkaPipesIterator.java              |   34 +-
 .../pipes/pipesiterator/s3/S3PipesIterator.java    |  112 +-
 .../pipesiterator/s3/TestS3PipesIterator.java      |   34 +-
 .../pipesiterator/solr/SolrPipesIterator.java      |   86 +-
 .../reporters/fs/FileSystemStatusReporter.java     |   77 +-
 .../reporters/fs/TestFileSystemStatusReporter.java |   66 +-
 .../pipes/reporters/jdbc/JDBCPipesReporter.java    |  129 +-
 .../reporters/jdbc/TestJDBCPipesReporter.java      |   74 +-
 .../pipes/reporters/opensearch/JsonResponse.java   |   29 +-
 .../reporters/opensearch/OpenSearchClient.java     |   70 +-
 .../opensearch/OpenSearchPipesReporter.java        |   80 +-
 .../apache/tika/serialization/JsonMetadata.java    |   52 +-
 .../tika/serialization/JsonMetadataList.java       |   63 +-
 .../tika/serialization/MetadataDeserializer.java   |   30 +-
 .../tika/serialization/MetadataSerializer.java     |   36 +-
 .../serialization/ParseContextDeserializer.java    |   45 +-
 .../tika/serialization/ParseContextSerializer.java |   29 +-
 .../serialization/PrettyMetadataKeyComparator.java |   25 +-
 .../tika/serialization/TikaJsonDeserializer.java   |  143 +-
 .../tika/serialization/TikaJsonSerializer.java     |  124 +-
 .../serialization/TikaSerializationException.java  |   22 +-
 .../tika/serialization/JsonMetadataListTest.java   |   70 +-
 .../tika/serialization/JsonMetadataTest.java       |   66 +-
 .../TestParseContextSerialization.java             |   38 +-
 .../serialization/TikaJsonSerializationTest.java   |   32 +-
 .../apache/tika/serialization/mocks/ClassA.java    |   32 +-
 .../apache/tika/serialization/mocks/ClassB.java    |   28 +-
 .../apache/tika/serialization/mocks/ClassC.java    |   22 +-
 .../tika/server/client/TikaAsyncHttpClient.java    |   25 +-
 .../org/apache/tika/server/client/TikaClient.java  |   38 +-
 .../apache/tika/server/client/TikaClientCLI.java   |   75 +-
 .../server/client/TikaClientConfigException.java   |   22 +-
 .../tika/server/client/TikaEmitterResult.java      |   27 +-
 .../tika/server/client/TikaPipesHttpClient.java    |   52 +-
 .../tika/server/client/TikaServerClientConfig.java |   37 +-
 .../org/apache/tika/server/client/TestBasic.java   |   39 +-
 .../server/core/CompositeParseContextConfig.java   |   32 +-
 .../server/core/DefaultInputStreamFactory.java     |   31 +-
 .../tika/server/core/FetcherStreamFactory.java     |   82 +-
 .../org/apache/tika/server/core/HTMLHelper.java    |   26 +-
 .../tika/server/core/InputStreamFactory.java       |   35 +-
 .../org/apache/tika/server/core/MetadataList.java  |   23 +-
 .../tika/server/core/ParseContextConfig.java       |   52 +-
 .../server/core/ProduceTypeResourceComparator.java |  120 +-
 .../org/apache/tika/server/core/ServerStatus.java  |   37 +-
 .../tika/server/core/ServerStatusResource.java     |   22 +-
 .../tika/server/core/ServerStatusWatcher.java      |  101 +-
 .../org/apache/tika/server/core/TaskStatus.java    |   25 +-
 .../apache/tika/server/core/TikaLoggingFilter.java |   30 +-
 .../org/apache/tika/server/core/TikaServerCli.java |   63 +-
 .../apache/tika/server/core/TikaServerConfig.java  |  193 ++-
 .../tika/server/core/TikaServerParseException.java |   26 +-
 .../core/TikaServerParseExceptionMapper.java       |   55 +-
 .../apache/tika/server/core/TikaServerProcess.java |  247 +--
 .../tika/server/core/TikaServerWatchDog.java       |  151 +-
 .../org/apache/tika/server/core/TlsConfig.java     |   55 +-
 .../apache/tika/server/core/WatchDogResult.java    |   25 +-
 .../server/core/config/DocumentSelectorConfig.java |   26 +-
 .../server/core/config/PasswordProviderConfig.java |   26 +-
 .../tika/server/core/config/TimeoutConfig.java     |   26 +-
 .../tika/server/core/resource/AsyncRequest.java    |   23 +-
 .../tika/server/core/resource/AsyncResource.java   |  123 +-
 .../server/core/resource/DetectorResource.java     |   47 +-
 .../server/core/resource/LanguageResource.java     |   36 +-
 .../server/core/resource/MetadataResource.java     |   98 +-
 .../tika/server/core/resource/PipesResource.java   |   74 +-
 .../core/resource/RecursiveMetadataResource.java   |  133 +-
 .../tika/server/core/resource/TikaDetectors.java   |   61 +-
 .../tika/server/core/resource/TikaMimeTypes.java   |  253 +--
 .../tika/server/core/resource/TikaParsers.java     |   83 +-
 .../tika/server/core/resource/TikaResource.java    |  339 ++--
 .../server/core/resource/TikaServerResource.java   |   22 +-
 .../server/core/resource/TikaServerStatus.java     |   28 +-
 .../tika/server/core/resource/TikaVersion.java     |   23 +-
 .../tika/server/core/resource/TikaWelcome.java     |   68 +-
 .../server/core/resource/TranslateResource.java    |   77 +-
 .../server/core/resource/UnpackerResource.java     |  161 +-
 .../server/core/writer/CSVMessageBodyWriter.java   |   51 +-
 .../server/core/writer/JSONMessageBodyWriter.java  |   48 +-
 .../tika/server/core/writer/JSONObjWriter.java     |   54 +-
 .../core/writer/MetadataListMessageBodyWriter.java |   48 +-
 .../apache/tika/server/core/writer/TarWriter.java  |   48 +-
 .../server/core/writer/TextMessageBodyWriter.java  |   54 +-
 .../tika/server/core/writer/TikaServerWriter.java  |   26 +-
 .../apache/tika/server/core/writer/ZipWriter.java  |   54 +-
 .../org/apache/tika/server/core/CXFTestBase.java   |   74 +-
 .../tika/server/core/IntegrationTestBase.java      |   67 +-
 .../tika/server/core/LanguageResourceTest.java     |   59 +-
 .../tika/server/core/NullWebClientLogger.java      |   26 +-
 .../server/core/RecursiveMetadataResourceTest.java |  130 +-
 .../apache/tika/server/core/ServerStatusTest.java  |   32 +-
 .../apache/tika/server/core/StackTraceOffTest.java |   84 +-
 .../apache/tika/server/core/StackTraceTest.java    |   83 +-
 .../apache/tika/server/core/TikaMimeTypesTest.java |   55 +-
 .../org/apache/tika/server/core/TikaPipesTest.java |  156 +-
 .../tika/server/core/TikaResourceFetcherTest.java  |   81 +-
 .../core/TikaResourceMetadataFilterTest.java       |   40 +-
 .../tika/server/core/TikaResourceNoStackTest.java  |   51 +-
 .../apache/tika/server/core/TikaResourceTest.java  |  241 ++-
 .../core/TikaServerAsyncIntegrationTest.java       |  115 +-
 .../tika/server/core/TikaServerConfigTest.java     |   83 +-
 .../server/core/TikaServerIntegrationTest.java     |  379 ++---
 .../core/TikaServerPipesIntegrationTest.java       |  180 +--
 .../tika/server/core/TikaServerStatusTest.java     |   59 +-
 .../apache/tika/server/core/TikaVersionTest.java   |   41 +-
 .../apache/tika/server/core/TikaWelcomeTest.java   |   54 +-
 .../tika/server/core/TranslateResourceTest.java    |   48 +-
 .../apache/tika/server/eval/TikaEvalResource.java  |   78 +-
 .../tika/server/eval/TikaEvalResourceTest.java     |   97 +-
 .../server/standard/config/PDFServerConfig.java    |   52 +-
 .../standard/config/TesseractServerConfig.java     |   49 +-
 .../standard/resource/XMPMetadataResource.java     |   47 +-
 .../standard/writer/XMPMessageBodyWriter.java      |   46 +-
 .../tika/server/standard/DetectorResourceTest.java |   61 +-
 .../apache/tika/server/standard/FetcherTest.java   |   46 +-
 .../server/standard/JsonMaxFieldLengthTest.java    |   55 +-
 .../tika/server/standard/MetadataResourceTest.java |  141 +-
 .../server/standard/OpenNLPMetadataFilterTest.java |   73 +-
 .../standard/OptimaizeMetadataFilterTest.java      |   76 +-
 .../standard/RecursiveMetadataFilterTest.java      |   50 +-
 .../standard/RecursiveMetadataResourceTest.java    |  448 ++----
 .../tika/server/standard/TikaDetectorsTest.java    |   80 +-
 .../tika/server/standard/TikaMimeTypesTest.java    |   57 +-
 .../tika/server/standard/TikaParsersTest.java      |   83 +-
 .../apache/tika/server/standard/TikaPipesTest.java |  187 ++-
 .../tika/server/standard/TikaResourceTest.java     |  585 +++----
 .../tika/server/standard/UnpackerResourceTest.java |  192 +--
 .../standard/UnpackerResourceWithConfigTest.java   |  133 +-
 .../translate/impl/AbstractTranslator.java         |   23 +-
 .../language/translate/impl/CachedTranslator.java  |   61 +-
 .../translate/impl/ExternalTranslator.java         |   40 +-
 .../language/translate/impl/GoogleTranslator.java  |   58 +-
 .../translate/impl/JoshuaNetworkTranslator.java    |  132 +-
 .../language/translate/impl/Lingo24Translator.java |   57 +-
 .../language/translate/impl/MarianTranslator.java  |  120 +-
 .../translate/impl/MicrosoftTranslator.java        |   62 +-
 .../language/translate/impl/MosesTranslator.java   |   57 +-
 .../language/translate/impl/RTGTranslator.java     |   57 +-
 .../language/translate/impl/YandexTranslator.java  |   88 +-
 .../translate/impl/CachedTranslatorTest.java       |   40 +-
 .../translate/impl/GoogleTranslatorTest.java       |   30 +-
 .../impl/JoshuaNetworkTranslatorTest.java          |   26 +-
 .../translate/impl/Lingo24TranslatorTest.java      |   31 +-
 .../translate/impl/MarianTranslatorTest.java       |   32 +-
 .../translate/impl/MicrosoftTranslatorTest.java    |   28 +-
 .../translate/impl/MosesTranslatorTest.java        |   24 +-
 .../language/translate/impl/RTGTranslatorTest.java |   23 +-
 .../translate/impl/YandexTranslatorTest.java       |   26 +-
 .../main/java/org/apache/tika/xmp/XMPMetadata.java |   95 +-
 .../apache/tika/xmp/convert/AbstractConverter.java |   68 +-
 .../apache/tika/xmp/convert/GenericConverter.java  |   42 +-
 .../tika/xmp/convert/ITikaToXMPConverter.java      |   23 +-
 .../tika/xmp/convert/MSOfficeBinaryConverter.java  |   53 +-
 .../tika/xmp/convert/MSOfficeXMLConverter.java     |   65 +-
 .../org/apache/tika/xmp/convert/Namespace.java     |   22 +-
 .../tika/xmp/convert/OpenDocumentConverter.java    |   42 +-
 .../org/apache/tika/xmp/convert/RTFConverter.java  |   48 +-
 .../org/apache/tika/xmp/convert/TikaToXMP.java     |   49 +-
 .../java/org/apache/tika/xmp/TikaToXMPTest.java    |   59 +-
 .../java/org/apache/tika/xmp/XMPMetadataTest.java  |   40 +-
 1662 files changed, 50522 insertions(+), 58168 deletions(-)

diff --git a/tika-app/src/main/java/org/apache/tika/cli/AsyncHelper.java b/tika-app/src/main/java/org/apache/tika/cli/AsyncHelper.java
index f8189cf69..d9b9c8749 100644
--- a/tika-app/src/main/java/org/apache/tika/cli/AsyncHelper.java
+++ b/tika-app/src/main/java/org/apache/tika/cli/AsyncHelper.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.cli;
 
@@ -33,7 +31,7 @@ public class AsyncHelper {
                 argList.add("-c");
                 argList.add(c);
             } else if (arg.equals("-a")) {
-                //do nothing
+                // do nothing
             } else {
                 argList.add(args[i]);
             }
diff --git a/tika-app/src/main/java/org/apache/tika/cli/TikaCLI.java b/tika-app/src/main/java/org/apache/tika/cli/TikaCLI.java
index a1db5f8bf..3a9ec7f0e 100644
--- a/tika-app/src/main/java/org/apache/tika/cli/TikaCLI.java
+++ b/tika-app/src/main/java/org/apache/tika/cli/TikaCLI.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.cli;
 
@@ -55,17 +53,10 @@ import javax.xml.transform.TransformerConfigurationException;
 import javax.xml.transform.sax.SAXTransformerFactory;
 import javax.xml.transform.sax.TransformerHandler;
 import javax.xml.transform.stream.StreamResult;
-
 import org.apache.commons.io.FilenameUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.io.input.CloseShieldInputStream;
 import org.apache.logging.log4j.Level;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
 import org.apache.tika.Tika;
 import org.apache.tika.async.cli.TikaAsyncCLI;
 import org.apache.tika.config.TikaConfig;
@@ -109,15 +100,21 @@ import org.apache.tika.serialization.JsonMetadataList;
 import org.apache.tika.utils.StringUtils;
 import org.apache.tika.utils.XMLReaderUtils;
 import org.apache.tika.xmp.XMPMetadata;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
 
 /**
  * Simple command line interface for Apache Tika.
  */
 public class TikaCLI {
     private static final Logger LOG = LoggerFactory.getLogger(TikaCLI.class);
-    private static final Property NORMALIZED_EMBEDDED_NAME = Property.externalText("tk:normalized-embedded-name");
+    private static final Property NORMALIZED_EMBEDDED_NAME =
+                    Property.externalText("tk:normalized-embedded-name");
 
-    private final int MAX_MARK = 20 * 1024 * 1024;//20MB
+    private final int MAX_MARK = 20 * 1024 * 1024;// 20MB
 
     private final OutputType NO_OUTPUT = new OutputType() {
         @Override
@@ -139,46 +136,53 @@ public class TikaCLI {
     private String encoding = null;
     private final OutputType TEXT = new OutputType() {
         @Override
-        protected ContentHandler getContentHandler(OutputStream output, Metadata metadata) throws Exception {
+        protected ContentHandler getContentHandler(OutputStream output, Metadata metadata)
+                        throws Exception {
             return new BodyContentHandler(getOutputWriter(output, encoding));
         }
     };
     private final OutputType TEXT_MAIN = new OutputType() {
         @Override
-        protected ContentHandler getContentHandler(OutputStream output, Metadata metadata) throws Exception {
+        protected ContentHandler getContentHandler(OutputStream output, Metadata metadata)
+                        throws Exception {
             return new BoilerpipeContentHandler(getOutputWriter(output, encoding));
         }
     };
     private final OutputType TEXT_ALL = new OutputType() {
         @Override
-        protected ContentHandler getContentHandler(OutputStream output, Metadata metadata) throws Exception {
+        protected ContentHandler getContentHandler(OutputStream output, Metadata metadata)
+                        throws Exception {
             return new WriteOutContentHandler(getOutputWriter(output, encoding));
         }
     };
     private final OutputType METADATA = new OutputType() {
         @Override
-        protected ContentHandler getContentHandler(OutputStream output, Metadata metadata) throws Exception {
+        protected ContentHandler getContentHandler(OutputStream output, Metadata metadata)
+                        throws Exception {
             final PrintWriter writer = new PrintWriter(getOutputWriter(output, encoding));
             return new NoDocumentMetHandler(metadata, writer);
         }
     };
     private final OutputType JSON = new OutputType() {
         @Override
-        protected ContentHandler getContentHandler(OutputStream output, Metadata metadata) throws Exception {
+        protected ContentHandler getContentHandler(OutputStream output, Metadata metadata)
+                        throws Exception {
             final PrintWriter writer = new PrintWriter(getOutputWriter(output, encoding));
             return new NoDocumentJSONMetHandler(metadata, writer);
         }
     };
     private final OutputType XMP = new OutputType() {
         @Override
-        protected ContentHandler getContentHandler(OutputStream output, final Metadata metadata) throws Exception {
+        protected ContentHandler getContentHandler(OutputStream output, final Metadata metadata)
+                        throws Exception {
             final PrintWriter writer = new PrintWriter(getOutputWriter(output, encoding));
             return new NoDocumentXMPMetaHandler(metadata, writer);
         }
     };
     private final OutputType LANGUAGE = new OutputType() {
         @Override
-        protected ContentHandler getContentHandler(OutputStream output, Metadata metadata) throws Exception {
+        protected ContentHandler getContentHandler(OutputStream output, Metadata metadata)
+                        throws Exception {
             final PrintWriter writer = new PrintWriter(getOutputWriter(output, encoding));
             return new LanguageHandler() {
                 public void endDocument() {
@@ -190,11 +194,10 @@ public class TikaCLI {
     };
     private final OutputType DETECT = new OutputType() {
         @Override
-        public void process(InputStream stream, OutputStream output, Metadata metadata) throws Exception {
+        public void process(InputStream stream, OutputStream output, Metadata metadata)
+                        throws Exception {
             PrintWriter writer = new PrintWriter(getOutputWriter(output, encoding));
-            writer.println(detector
-                    .detect(stream, metadata)
-                    .toString());
+            writer.println(detector.detect(stream, metadata).toString());
             writer.flush();
         }
     };
@@ -208,15 +211,18 @@ public class TikaCLI {
     private boolean prettyPrint;
     private final OutputType XML = new OutputType() {
         @Override
-        protected ContentHandler getContentHandler(OutputStream output, Metadata metadata) throws Exception {
+        protected ContentHandler getContentHandler(OutputStream output, Metadata metadata)
+                        throws Exception {
             return getTransformerHandler(output, "xml", encoding, prettyPrint);
         }
     };
     private OutputType type = XML;
     private final OutputType HTML = new OutputType() {
         @Override
-        protected ContentHandler getContentHandler(OutputStream output, Metadata metadata) throws Exception {
-            return new ExpandedTitleContentHandler(getTransformerHandler(output, "html", encoding, prettyPrint));
+        protected ContentHandler getContentHandler(OutputStream output, Metadata metadata)
+                        throws Exception {
+            return new ExpandedTitleContentHandler(
+                            getTransformerHandler(output, "html", encoding, prettyPrint));
         }
     };
 
@@ -266,7 +272,7 @@ public class TikaCLI {
                 break;
             }
         }
-        if (! StringUtils.isBlank(tikaConfigPath)) {
+        if (!StringUtils.isBlank(tikaConfigPath)) {
             TikaAsyncCLI.main(args);
             return;
         }
@@ -274,7 +280,7 @@ public class TikaCLI {
         try {
             tmpConfig = Files.createTempFile("tika-config-", ".xml");
             Files.copy(TikaCLI.class.getResourceAsStream("/tika-config-default-single-file.xml"),
-                    tmpConfig, StandardCopyOption.REPLACE_EXISTING);
+                            tmpConfig, StandardCopyOption.REPLACE_EXISTING);
             List<String> argList = new ArrayList<>();
             argList.add("-c");
             argList.add(tmpConfig.toAbsolutePath().toString());
@@ -292,14 +298,14 @@ public class TikaCLI {
     /**
      * Returns a output writer with the given encoding.
      *
-     * @param output   output stream
-     * @param encoding output encoding,
-     *                 or <code>null</code> for the platform default
+     * @param output output stream
+     * @param encoding output encoding, or <code>null</code> for the platform default
      * @return output writer
      * @throws UnsupportedEncodingException if the given encoding is not supported
      * @see <a href="https://issues.apache.org/jira/browse/TIKA-277">TIKA-277</a>
      */
-    private static Writer getOutputWriter(OutputStream output, String encoding) throws UnsupportedEncodingException {
+    private static Writer getOutputWriter(OutputStream output, String encoding)
+                    throws UnsupportedEncodingException {
         if (encoding != null) {
             return new OutputStreamWriter(output, encoding);
         } else {
@@ -308,33 +314,26 @@ public class TikaCLI {
     }
 
     /**
-     * Returns a transformer handler that serializes incoming SAX events
-     * to XHTML or HTML (depending the given method) using the given output
-     * encoding.
+     * Returns a transformer handler that serializes incoming SAX events to XHTML or HTML (depending
+     * the given method) using the given output encoding.
      *
-     * @param output   output stream
-     * @param method   "xml" or "html"
-     * @param encoding output encoding,
-     *                 or <code>null</code> for the platform default
+     * @param output output stream
+     * @param method "xml" or "html"
+     * @param encoding output encoding, or <code>null</code> for the platform default
      * @return {@link System#out} transformer handler
      * @throws TransformerConfigurationException if the transformer can not be created
      * @see <a href="https://issues.apache.org/jira/browse/TIKA-277">TIKA-277</a>
      */
-    private static TransformerHandler getTransformerHandler(OutputStream output, String method, String encoding, boolean prettyPrint)
-            throws TransformerConfigurationException, TikaException {
+    private static TransformerHandler getTransformerHandler(OutputStream output, String method,
+                    String encoding, boolean prettyPrint)
+                    throws TransformerConfigurationException, TikaException {
         SAXTransformerFactory factory = XMLReaderUtils.getSAXTransformerFactory();
         TransformerHandler handler = factory.newTransformerHandler();
 
-        handler
-                .getTransformer()
-                .setOutputProperty(OutputKeys.METHOD, method);
-        handler
-                .getTransformer()
-                .setOutputProperty(OutputKeys.INDENT, prettyPrint ? "yes" : "no");
+        handler.getTransformer().setOutputProperty(OutputKeys.METHOD, method);
+        handler.getTransformer().setOutputProperty(OutputKeys.INDENT, prettyPrint ? "yes" : "no");
         if (encoding != null) {
-            handler
-                    .getTransformer()
-                    .setOutputProperty(OutputKeys.ENCODING, encoding);
+            handler.getTransformer().setOutputProperty(OutputKeys.ENCODING, encoding);
         }
         handler.setResult(new StreamResult(output));
         return handler;
@@ -377,7 +376,7 @@ public class TikaCLI {
         } else if (arg.equals("-g") || arg.equals("--gui")) {
             pipeMode = false;
             if (configFilePath != null) {
-                TikaGUI.main(new String[]{configFilePath});
+                TikaGUI.main(new String[] {configFilePath});
             } else {
                 TikaGUI.main(new String[0]);
             }
@@ -390,7 +389,8 @@ public class TikaCLI {
         } else if (arg.equals("--list-parser-detail") || arg.equals("--list-parser-details")) {
             pipeMode = false;
             displayParsers(true, false);
-        } else if (arg.equals("--list-parser-detail-apt") || arg.equals("--list-parser-details-apt")) {
+        } else if (arg.equals("--list-parser-detail-apt")
+                        || arg.equals("--list-parser-details-apt")) {
             pipeMode = false;
             displayParsers(true, true);
         } else if (arg.equals("--list-met-models")) {
@@ -454,8 +454,8 @@ public class TikaCLI {
             type = DETECT;
         } else if (arg.startsWith("--extract-dir=")) {
             String dirPath = arg.substring("--extract-dir=".length());
-            //if the user accidentally doesn't include
-            //a directory, set the directory to the cwd
+            // if the user accidentally doesn't include
+            // a directory, set the directory to the cwd
             if (dirPath.isEmpty()) {
                 dirPath = ".";
             }
@@ -465,8 +465,11 @@ public class TikaCLI {
             context.set(EmbeddedDocumentExtractor.class, new FileEmbeddedDocumentExtractor());
         } else if (arg.equals("-r") || arg.equals("--pretty-print")) {
             prettyPrint = true;
-        } else if (arg.equals("-p") || arg.equals("--port") || arg.equals("-s") || arg.equals("--server")) {
-            throw new IllegalArgumentException("As of Tika 2.0, the server option is no longer supported in tika-app.\n" + "See https://wiki.apache.org/tika/TikaJAXRS for usage.");
+        } else if (arg.equals("-p") || arg.equals("--port") || arg.equals("-s")
+                        || arg.equals("--server")) {
+            throw new IllegalArgumentException(
+                            "As of Tika 2.0, the server option is no longer supported in tika-app.\n"
+                                            + "See https://wiki.apache.org/tika/TikaJAXRS for usage.");
         } else if (arg.startsWith("-c")) {
             networkURI = new URI(arg.substring("-c".length()));
         } else if (arg.startsWith("--client=")) {
@@ -476,16 +479,15 @@ public class TikaCLI {
             configure();
 
             if (arg.equals("-")) {
-                try (InputStream stream = TikaInputStream.get(CloseShieldInputStream.wrap(System.in))) {
+                try (InputStream stream =
+                                TikaInputStream.get(CloseShieldInputStream.wrap(System.in))) {
                     type.process(stream, System.out, new Metadata());
                 }
             } else {
                 URL url;
                 File file = new File(arg);
                 if (file.isFile()) {
-                    url = file
-                            .toURI()
-                            .toURL();
+                    url = file.toURI().toURL();
                 } else {
                     url = new URL(arg);
                 }
@@ -507,13 +509,16 @@ public class TikaCLI {
         configure();
         TikaConfig localConfig = (config == null) ? TikaConfig.getDefaultConfig() : config;
 
-        TikaConfigSerializer.serialize(localConfig, mode, new OutputStreamWriter(System.out, UTF_8), UTF_8);
+        TikaConfigSerializer.serialize(localConfig, mode, new OutputStreamWriter(System.out, UTF_8),
+                        UTF_8);
     }
 
-    private void handleRecursiveJson(URL url, OutputStream output) throws IOException, SAXException, TikaException {
+    private void handleRecursiveJson(URL url, OutputStream output)
+                    throws IOException, SAXException, TikaException {
         Metadata metadata = new Metadata();
         RecursiveParserWrapper wrapper = new RecursiveParserWrapper(parser);
-        RecursiveParserWrapperHandler handler = new RecursiveParserWrapperHandler(getContentHandlerFactory(type), -1, config.getMetadataFilter());
+        RecursiveParserWrapperHandler handler = new RecursiveParserWrapperHandler(
+                        getContentHandlerFactory(type), -1, config.getMetadataFilter());
         try (InputStream input = TikaInputStream.get(url, metadata)) {
             wrapper.parse(input, handler, metadata, context);
         }
@@ -526,7 +531,8 @@ public class TikaCLI {
     }
 
     private ContentHandlerFactory getContentHandlerFactory(OutputType type) {
-        BasicContentHandlerFactory.HANDLER_TYPE handlerType = BasicContentHandlerFactory.HANDLER_TYPE.IGNORE;
+        BasicContentHandlerFactory.HANDLER_TYPE handlerType =
+                        BasicContentHandlerFactory.HANDLER_TYPE.IGNORE;
         if (type.equals(HTML)) {
             handlerType = BasicContentHandlerFactory.HANDLER_TYPE.HTML;
         } else if (type.equals(XML)) {
@@ -571,7 +577,8 @@ public class TikaCLI {
         out.println("    -J  or --jsonRecursive Output metadata and content from all");
         out.println("                           embedded files (choose content type");
         out.println("                           with -x, -h, -t or -m; default is -x)");
-        out.println("    -a  or --async         Run Tika in async mode; must specify details in a" + " tikaConfig file");
+        out.println("    -a  or --async         Run Tika in async mode; must specify details in a"
+                        + " tikaConfig file");
         out.println("    -l  or --language      Output only language");
         out.println("    -d  or --detect        Detect document type");
         out.println("           --digest=X      Include digest X (md2, md5, sha1,");
@@ -670,12 +677,13 @@ public class TikaCLI {
         if (configFilePath != null) {
             config = new TikaConfig(new File(configFilePath));
         } else {
-            String warn = "As a convenience, TikaCLI has turned on several non-default features\n" +
-                    "as specified in tika-app/src/main/resources/tika-config-default-single-file.xml.\n" +
-                    "See: TIKA-2374, TIKA-4017, TIKA-4354 and TIKA-4472).\n" +
-                    "This is not the default behavior in Tika generally or in tika-server.";
+            String warn = "As a convenience, TikaCLI has turned on several non-default features\n"
+                            + "as specified in tika-app/src/main/resources/tika-config-default-single-file.xml.\n"
+                            + "See: TIKA-2374, TIKA-4017, TIKA-4354 and TIKA-4472).\n"
+                            + "This is not the default behavior in Tika generally or in tika-server.";
             LOG.info(warn);
-            try (InputStream is = getClass().getResourceAsStream("/tika-config-default-single-file.xml")) {
+            try (InputStream is = getClass()
+                            .getResourceAsStream("/tika-config-default-single-file.xml")) {
                 config = new TikaConfig(is);
             }
         }
@@ -699,9 +707,7 @@ public class TikaCLI {
         for (Class<?> modelClass : modelClasses) {
             // we don't care about internal Tika met classes
             // if we do, then we can take this conditional out
-            if (!modelClass
-                    .getSimpleName()
-                    .contains("Tika")) {
+            if (!modelClass.getSimpleName().contains("Tika")) {
                 System.out.println(modelClass.getSimpleName());
                 Field[] keyFields = modelClass.getFields();
                 Arrays.sort(keyFields, Comparator.comparing(Field::getName));
@@ -713,11 +719,11 @@ public class TikaCLI {
     }
 
     /*
-     * Displays loaded parsers and their mime types
-     * If a parser is a composite parser, it will list the
-     * sub parsers and their mime-types.
+     * Displays loaded parsers and their mime types If a parser is a composite parser, it will list
+     * the sub parsers and their mime-types.
      */
-    private void displayParsers(boolean includeMimeTypes, boolean aptListFormat) throws TikaException, IOException, SAXException {
+    private void displayParsers(boolean includeMimeTypes, boolean aptListFormat)
+                    throws TikaException, IOException, SAXException {
         configure();
         displayParser(parser, includeMimeTypes, aptListFormat, 3);
     }
@@ -731,17 +737,18 @@ public class TikaCLI {
         }
 
         boolean isComposite = (p instanceof CompositeParser);
-        String name = p
-                .getClass()
-                .getName();
+        String name = p.getClass().getName();
 
         if (apt) {
-            name = name.substring(0, name.lastIndexOf(".") + 1) + "{{{./api/" + name.replace(".", "/") + "}" + name.substring(name.lastIndexOf(".") + 1) + "}}";
+            name = name.substring(0, name.lastIndexOf(".") + 1) + "{{{./api/"
+                            + name.replace(".", "/") + "}"
+                            + name.substring(name.lastIndexOf(".") + 1) + "}}";
         } else if (decorated != null) {
             name += decorated;
         }
-        if ((apt && !isComposite) || !apt) {    // Don't display Composite parsers in the apt output.
-            System.out.println(indent(i) + ((apt) ? "* " : "") + name + (isComposite ? " (Composite Parser):" : ""));
+        if ((apt && !isComposite) || !apt) { // Don't display Composite parsers in the apt output.
+            System.out.println(indent(i) + ((apt) ? "* " : "") + name
+                            + (isComposite ? " (Composite Parser):" : ""));
             if (apt) {
                 System.out.println();
             }
@@ -756,17 +763,18 @@ public class TikaCLI {
         }
 
         if (isComposite) {
-            Parser[] subParsers = sortParsers(invertMediaTypeMap(((CompositeParser) p).getParsers()));
+            Parser[] subParsers =
+                            sortParsers(invertMediaTypeMap(((CompositeParser) p).getParsers()));
             for (Parser sp : subParsers) {
-                displayParser(sp, includeMimeTypes, apt, i + ((apt) ? 0 : 3));  // Don't indent for Composites in apt.
+                displayParser(sp, includeMimeTypes, apt, i + ((apt) ? 0 : 3)); // Don't indent for
+                                                                               // Composites in apt.
             }
         }
     }
 
     /*
-     * Displays loaded detectors and their mime types
-     * If a detector is a composite detector, it will list the
-     *  sub detectors.
+     * Displays loaded detectors and their mime types If a detector is a composite detector, it will
+     * list the sub detectors.
      */
     private void displayDetectors() throws TikaException, IOException, SAXException {
         configure();
@@ -775,9 +783,7 @@ public class TikaCLI {
 
     private void displayDetector(Detector d, int i) {
         boolean isComposite = (d instanceof CompositeDetector);
-        String name = d
-                .getClass()
-                .getName();
+        String name = d.getClass().getName();
         System.out.println(indent(i) + name + (isComposite ? " (Composite Detector):" : ""));
         if (isComposite) {
             List<Detector> subDetectors = ((CompositeDetector) d).getDetectors();
@@ -793,16 +799,10 @@ public class TikaCLI {
 
     private Parser[] sortParsers(Map<Parser, Set<MediaType>> parsers) {
         // Get a nicely sorted list of the parsers
-        Parser[] sortedParsers = parsers
-                .keySet()
-                .toArray(new Parser[0]);
+        Parser[] sortedParsers = parsers.keySet().toArray(new Parser[0]);
         Arrays.sort(sortedParsers, (p1, p2) -> {
-            String name1 = p1
-                    .getClass()
-                    .getName();
-            String name2 = p2
-                    .getClass()
-                    .getName();
+            String name1 = p1.getClass().getName();
+            String name2 = p2.getClass().getName();
             return name1.compareTo(name2);
         });
         return sortedParsers;
@@ -814,9 +814,7 @@ public class TikaCLI {
             if (!parsers.containsKey(e.getValue())) {
                 parsers.put(e.getValue(), new HashSet<>());
             }
-            parsers
-                    .get(e.getValue())
-                    .add(e.getKey());
+            parsers.get(e.getValue()).add(e.getKey());
         }
         return parsers;
     }
@@ -841,21 +839,16 @@ public class TikaCLI {
             Parser p = parsers.get(type);
             if (p != null) {
                 if (p instanceof CompositeParser) {
-                    p = ((CompositeParser) p)
-                            .getParsers()
-                            .get(type);
+                    p = ((CompositeParser) p).getParsers().get(type);
                 }
-                System.out.println("  parser:    " + p
-                        .getClass()
-                        .getName());
+                System.out.println("  parser:    " + p.getClass().getName());
             }
         }
     }
 
     /**
-     * Compares our mime types registry with the File(1) tool's
-     * directory of (uncompiled) Magic entries.
-     * (Well, those with mimetypes anyway)
+     * Compares our mime types registry with the File(1) tool's directory of (uncompiled) Magic
+     * entries. (Well, those with mimetypes anyway)
      *
      * @param magicDir Path to the magic directory
      */
@@ -865,23 +858,24 @@ public class TikaCLI {
 
         // Plausibility check
         File dir = new File(magicDir);
-        if ((new File(dir, "elf")).exists() && (new File(dir, "mime")).exists() && (new File(dir, "vorbis")).exists()) {
+        if ((new File(dir, "elf")).exists() && (new File(dir, "mime")).exists()
+                        && (new File(dir, "vorbis")).exists()) {
             // Looks plausible
         } else {
-            throw new IllegalArgumentException(magicDir + " doesn't seem to hold uncompressed file magic entries");
+            throw new IllegalArgumentException(
+                            magicDir + " doesn't seem to hold uncompressed file magic entries");
         }
 
         // Find all the mimetypes in the directory
         Set<String> fileMimes = new HashSet<>();
         for (File mf : dir.listFiles()) {
             if (mf.isFile()) {
-                try (BufferedReader r = new BufferedReader(new InputStreamReader(new FileInputStream(mf), UTF_8))) {
+                try (BufferedReader r = new BufferedReader(
+                                new InputStreamReader(new FileInputStream(mf), UTF_8))) {
                     String line;
                     while ((line = r.readLine()) != null) {
                         if (line.startsWith("!:mime") || line.startsWith("#!:mime")) {
-                            String mime = line
-                                    .substring(7)
-                                    .trim();
+                            String mime = line.substring(7).trim();
                             fileMimes.add(mime);
                         }
                     }
@@ -925,7 +919,9 @@ public class TikaCLI {
                         } else {
                             // Check the parent next
                             MediaType parent = registry.getSupertype(type.getType());
-                            if (parent == MediaType.APPLICATION_XML || parent == MediaType.TEXT_PLAIN || parent == MediaType.OCTET_STREAM) {
+                            if (parent == MediaType.APPLICATION_XML
+                                            || parent == MediaType.TEXT_PLAIN
+                                            || parent == MediaType.OCTET_STREAM) {
                                 // Stop checking parents if we hit a top level type
                                 parent = null;
                             }
@@ -951,22 +947,23 @@ public class TikaCLI {
         int tikaAliases = 0;
         for (MediaType type : registry.getTypes()) {
             tikaTypes++;
-            tikaAliases += registry
-                    .getAliases(type)
-                    .size();
+            tikaAliases += registry.getAliases(type).size();
         }
 
         // Report
         System.out.println("Tika knows about " + tikaTypes + " unique mime types");
-        System.out.println("Tika knows about " + (tikaTypes + tikaAliases) + " mime types including aliases");
-        System.out.println("The File Magic directory knows about " + fileMimes.size() + " unique mime types");
+        System.out.println("Tika knows about " + (tikaTypes + tikaAliases)
+                        + " mime types including aliases");
+        System.out.println("The File Magic directory knows about " + fileMimes.size()
+                        + " unique mime types");
         System.out.println();
         System.out.println("The following mime types are known to File but not Tika:");
         for (String mime : tikaLacking) {
             System.out.println("  " + mime);
         }
         System.out.println();
-        System.out.println("The following mime types from File have no Tika magic (but their children might):");
+        System.out.println(
+                        "The following mime types from File have no Tika magic (but their children might):");
         for (String mime : tikaNoMagic) {
             System.out.println("  " + mime);
         }
@@ -1050,7 +1047,8 @@ public class TikaCLI {
     }
 
     private class OutputType {
-        public void process(InputStream input, OutputStream output, Metadata metadata) throws Exception {
+        public void process(InputStream input, OutputStream output, Metadata metadata)
+                        throws Exception {
             Parser p = parser;
             if (fork) {
                 p = new ForkParser(TikaCLI.class.getClassLoader(), p);
@@ -1074,7 +1072,8 @@ public class TikaCLI {
             }
         }
 
-        protected ContentHandler getContentHandler(OutputStream output, Metadata metadata) throws Exception {
+        protected ContentHandler getContentHandler(OutputStream output, Metadata metadata)
+                        throws Exception {
             throw new UnsupportedOperationException();
         }
 
@@ -1082,7 +1081,8 @@ public class TikaCLI {
 
     private class FileEmbeddedDocumentExtractor implements EmbeddedDocumentExtractor {
 
-        private final EmbeddedStreamTranslator embeddedStreamTranslator = new DefaultEmbeddedStreamTranslator();
+        private final EmbeddedStreamTranslator embeddedStreamTranslator =
+                        new DefaultEmbeddedStreamTranslator();
         private int count = 0;
 
         public boolean shouldParseEmbedded(Metadata metadata) {
@@ -1090,7 +1090,8 @@ public class TikaCLI {
         }
 
         @Override
-        public void parseEmbedded(TikaInputStream tis, ContentHandler contentHandler, Metadata metadata, boolean outputHtml) throws SAXException, IOException {
+        public void parseEmbedded(TikaInputStream tis, ContentHandler contentHandler,
+                        Metadata metadata, boolean outputHtml) throws SAXException, IOException {
             String contentType = metadata.get(Metadata.CONTENT_TYPE);
             if (StringUtils.isBlank(contentType)) {
                 MediaType mediaType = detector.detect(tis, metadata);
@@ -1105,7 +1106,7 @@ public class TikaCLI {
             String name = metadata.get(NORMALIZED_EMBEDDED_NAME);
 
             Path parent = outputFile.getParent();
-            if (parent != null && ! Files.isDirectory(parent)) {
+            if (parent != null && !Files.isDirectory(parent)) {
                 Files.createDirectories(parent);
             }
             System.out.println("Extracting '" + name + "' (" + contentType + ") to " + outputFile);
@@ -1120,13 +1121,16 @@ public class TikaCLI {
                 //
                 // being a CLI program messages should go to the stderr too
                 //
-                String msg = String.format(Locale.ROOT, "Ignoring unexpected exception trying to save embedded file %s (%s)", name, e.getMessage());
+                String msg = String.format(Locale.ROOT,
+                                "Ignoring unexpected exception trying to save embedded file %s (%s)",
+                                name, e.getMessage());
                 LOG.warn(msg, e);
             }
         }
 
         private Path getOutputFile(Metadata metadata) throws IOException {
-            String normalizedName = org.apache.tika.io.FilenameUtils.getSanitizedEmbeddedFilePath(metadata, ".bin", 50);
+            String normalizedName = org.apache.tika.io.FilenameUtils
+                            .getSanitizedEmbeddedFilePath(metadata, ".bin", 50);
             if (normalizedName == null) {
                 String ext = org.apache.tika.io.FilenameUtils.calculateExtension(metadata, ".bin");
                 normalizedName = "file-" + count++ + ext;
@@ -1134,12 +1138,13 @@ public class TikaCLI {
             metadata.set(NORMALIZED_EMBEDDED_NAME, normalizedName);
 
             Path outputFile = extractDir.resolve(normalizedName);
-            //if file already exists, prepend uuid
+            // if file already exists, prepend uuid
             if (Files.exists(outputFile)) {
                 String fileName = FilenameUtils.getName(normalizedName);
-                outputFile = extractDir.resolve( UUID.randomUUID() + "-" + fileName);
+                outputFile = extractDir.resolve(UUID.randomUUID() + "-" + fileName);
             }
-            if (! outputFile.toAbsolutePath().normalize().startsWith(extractDir.toAbsolutePath().normalize())) {
+            if (!outputFile.toAbsolutePath().normalize()
+                            .startsWith(extractDir.toAbsolutePath().normalize())) {
                 throw new IOException("Path traversal?!: " + outputFile.toAbsolutePath());
             }
             return outputFile;
diff --git a/tika-app/src/main/java/org/apache/tika/gui/ParsingTransferHandler.java b/tika-app/src/main/java/org/apache/tika/gui/ParsingTransferHandler.java
index debc24e5f..05d4e8546 100644
--- a/tika-app/src/main/java/org/apache/tika/gui/ParsingTransferHandler.java
+++ b/tika-app/src/main/java/org/apache/tika/gui/ParsingTransferHandler.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.gui;
 
@@ -47,7 +45,7 @@ class ParsingTransferHandler extends TransferHandler {
             uriListFlavor = new DataFlavor("text/uri-list;class=java.lang.String");
             urlListFlavor = new DataFlavor("text/plain;class=java.lang.String");
         } catch (ClassNotFoundException e) {
-            //swallow
+            // swallow
         }
     }
 
@@ -70,7 +68,7 @@ class ParsingTransferHandler extends TransferHandler {
             try {
                 list.add(new File(new URI(s)));
             } catch (Exception e) {
-                //swallow
+                // swallow
             }
         }
         return list;
@@ -78,7 +76,8 @@ class ParsingTransferHandler extends TransferHandler {
 
     public boolean canImport(JComponent component, DataFlavor[] flavors) {
         for (DataFlavor flavor : flavors) {
-            if (flavor.equals(DataFlavor.javaFileListFlavor) || flavor.equals(uriListFlavor) || flavor.equals(urlListFlavor)) {
+            if (flavor.equals(DataFlavor.javaFileListFlavor) || flavor.equals(uriListFlavor)
+                            || flavor.equals(urlListFlavor)) {
                 return true;
             }
         }
@@ -89,7 +88,8 @@ class ParsingTransferHandler extends TransferHandler {
     public boolean importData(JComponent component, Transferable transferable) {
         try {
             if (transferable.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) {
-                importFiles((List<File>) transferable.getTransferData(DataFlavor.javaFileListFlavor));
+                importFiles((List<File>) transferable
+                                .getTransferData(DataFlavor.javaFileListFlavor));
             } else if (transferable.isDataFlavorSupported(urlListFlavor)) {
                 Object data = transferable.getTransferData(urlListFlavor);
                 tika.openURL(new URL(data.toString()));
@@ -112,7 +112,8 @@ class ParsingTransferHandler extends TransferHandler {
         delegate.exportAsDrag(arg0, arg1, arg2);
     }
 
-    public void exportToClipboard(JComponent arg0, Clipboard arg1, int arg2) throws IllegalStateException {
+    public void exportToClipboard(JComponent arg0, Clipboard arg1, int arg2)
+                    throws IllegalStateException {
         delegate.exportToClipboard(arg0, arg1, arg2);
     }
 
diff --git a/tika-app/src/main/java/org/apache/tika/gui/TikaGUI.java b/tika-app/src/main/java/org/apache/tika/gui/TikaGUI.java
index 1da9cda9c..23ea83e55 100644
--- a/tika-app/src/main/java/org/apache/tika/gui/TikaGUI.java
+++ b/tika-app/src/main/java/org/apache/tika/gui/TikaGUI.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.gui;
 
@@ -63,13 +61,7 @@ import javax.xml.transform.TransformerConfigurationException;
 import javax.xml.transform.sax.SAXTransformerFactory;
 import javax.xml.transform.sax.TransformerHandler;
 import javax.xml.transform.stream.StreamResult;
-
 import org.apache.commons.io.IOUtils;
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.AttributesImpl;
-
 import org.apache.tika.config.TikaConfig;
 import org.apache.tika.exception.TikaException;
 import org.apache.tika.extractor.DocumentSelector;
@@ -92,15 +84,19 @@ import org.apache.tika.sax.XHTMLContentHandler;
 import org.apache.tika.sax.boilerpipe.BoilerpipeContentHandler;
 import org.apache.tika.serialization.JsonMetadataList;
 import org.apache.tika.utils.XMLReaderUtils;
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.AttributesImpl;
 
 /**
- * Simple Swing GUI for Apache Tika. You can drag and drop files on top
- * of the window to have them parsed.
+ * Simple Swing GUI for Apache Tika. You can drag and drop files on top of the window to have them
+ * parsed.
  */
 public class TikaGUI extends JFrame implements ActionListener, HyperlinkListener {
 
-    //maximum length to allow for mark for reparse to get JSON
-    private static final int MAX_MARK = 20 * 1024 * 1024;//20MB
+    // maximum length to allow for mark for reparse to get JSON
+    private static final int MAX_MARK = 20 * 1024 * 1024;// 20MB
 
     /**
      * Serial version UID.
@@ -186,9 +182,8 @@ public class TikaGUI extends JFrame implements ActionListener, HyperlinkListener
     }
 
     /**
-     * Main method. Sets the Swing look and feel to the operating system
-     * settings, and starts the Tika GUI with an {@link AutoDetectParser}
-     * instance as the default parser.
+     * Main method. Sets the Swing look and feel to the operating system settings, and starts the
+     * Tika GUI with an {@link AutoDetectParser} instance as the default parser.
      *
      * @param args ignored
      * @throws Exception if an error occurs
@@ -199,15 +194,17 @@ public class TikaGUI extends JFrame implements ActionListener, HyperlinkListener
             File configFile = new File(args[0]);
             config = new TikaConfig(configFile);
         } else {
-            try (InputStream is = TikaGUI.class.getResourceAsStream("/tika-config-default-single-file.xml")) {
+            try (InputStream is = TikaGUI.class
+                            .getResourceAsStream("/tika-config-default-single-file.xml")) {
                 config = new TikaConfig(is);
             }
         }
         UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
         final TikaConfig finalConfig = config;
-        SwingUtilities.invokeLater(() -> new TikaGUI(
-                new DigestingParser(new AutoDetectParser(finalConfig),
-                        new CommonsDigester(MAX_MARK, CommonsDigester.DigestAlgorithm.MD5, CommonsDigester.DigestAlgorithm.SHA256),
+        SwingUtilities.invokeLater(() -> new TikaGUI(new DigestingParser(
+                        new AutoDetectParser(finalConfig),
+                        new CommonsDigester(MAX_MARK, CommonsDigester.DigestAlgorithm.MD5,
+                                        CommonsDigester.DigestAlgorithm.SHA256),
                         false), finalConfig).setVisible(true));
     }
 
@@ -256,16 +253,15 @@ public class TikaGUI extends JFrame implements ActionListener, HyperlinkListener
                 openFile(chooser.getSelectedFile());
             }
         } else if ("openurl".equals(command)) {
-            Object rv = JOptionPane.showInputDialog(this, "Enter the URL of the resource to be parsed:", "Open URL", JOptionPane.PLAIN_MESSAGE, null, null, "");
-            if (rv != null && rv
-                    .toString()
-                    .length() > 0) {
+            Object rv = JOptionPane.showInputDialog(this,
+                            "Enter the URL of the resource to be parsed:", "Open URL",
+                            JOptionPane.PLAIN_MESSAGE, null, null, "");
+            if (rv != null && rv.toString().length() > 0) {
                 try {
-                    openURL(new URL(rv
-                            .toString()
-                            .trim()));
+                    openURL(new URL(rv.toString().trim()));
                 } catch (MalformedURLException exception) {
-                    JOptionPane.showMessageDialog(this, "The given string is not a valid URL", "Invalid URL", JOptionPane.ERROR_MESSAGE);
+                    JOptionPane.showMessageDialog(this, "The given string is not a valid URL",
+                                    "Invalid URL", JOptionPane.ERROR_MESSAGE);
                 }
             }
         } else if ("html".equals(command)) {
@@ -283,10 +279,8 @@ public class TikaGUI extends JFrame implements ActionListener, HyperlinkListener
         } else if ("about".equals(command)) {
             textDialog("About Apache Tika", TikaGUI.class.getResource("about.html"));
         } else if ("exit".equals(command)) {
-            Toolkit
-                    .getDefaultToolkit()
-                    .getSystemEventQueue()
-                    .postEvent(new WindowEvent(this, WindowEvent.WINDOW_CLOSING));
+            Toolkit.getDefaultToolkit().getSystemEventQueue()
+                            .postEvent(new WindowEvent(this, WindowEvent.WINDOW_CLOSING));
         }
     }
 
@@ -319,8 +313,9 @@ public class TikaGUI extends JFrame implements ActionListener, HyperlinkListener
         StringWriter xmlBuffer = new StringWriter();
         StringBuilder metadataBuffer = new StringBuilder();
 
-        ContentHandler handler =
-                new TeeContentHandler(getHtmlHandler(htmlBuffer), getTextContentHandler(textBuffer), getTextMainContentHandler(textMainBuffer), getXmlContentHandler(xmlBuffer));
+        ContentHandler handler = new TeeContentHandler(getHtmlHandler(htmlBuffer),
+                        getTextContentHandler(textBuffer),
+                        getTextMainContentHandler(textMainBuffer), getXmlContentHandler(xmlBuffer));
 
         context.set(DocumentSelector.class, new ImageDocumentSelector());
 
@@ -373,12 +368,14 @@ public class TikaGUI extends JFrame implements ActionListener, HyperlinkListener
             input.reset();
             isReset = true;
         } catch (IOException e) {
-            setText(json, "Error during stream reset.\n" + "There's a limit of " + MAX_MARK + " bytes for this type of processing in the GUI.\n" +
-                    "Try the app with command line argument of -J.");
+            setText(json, "Error during stream reset.\n" + "There's a limit of " + MAX_MARK
+                            + " bytes for this type of processing in the GUI.\n"
+                            + "Try the app with command line argument of -J.");
         }
         if (isReset) {
             RecursiveParserWrapperHandler recursiveParserWrapperHandler =
-                    new RecursiveParserWrapperHandler(new BasicContentHandlerFactory(BasicContentHandlerFactory.HANDLER_TYPE.BODY, -1), -1);
+                            new RecursiveParserWrapperHandler(new BasicContentHandlerFactory(
+                                            BasicContentHandlerFactory.HANDLER_TYPE.BODY, -1), -1);
             RecursiveParserWrapper wrapper = new RecursiveParserWrapper(parser);
             wrapper.parse(input, recursiveParserWrapperHandler, new Metadata(), new ParseContext());
             StringWriter jsonBuffer = new StringWriter();
@@ -394,10 +391,7 @@ public class TikaGUI extends JFrame implements ActionListener, HyperlinkListener
     private void handleError(String name, Throwable t) {
         StringWriter writer = new StringWriter();
         writer.append("Apache Tika was unable to parse the document\n");
-        writer
-                .append("at ")
-                .append(name)
-                .append(".\n\n");
+        writer.append("at ").append(name).append(".\n\n");
         writer.append("The full exception stack trace is included below:\n\n");
         t.printStackTrace(new PrintWriter(writer));
 
@@ -419,7 +413,8 @@ public class TikaGUI extends JFrame implements ActionListener, HyperlinkListener
             editor.setContentType("text/html");
             editor.setEditable(false);
             editor.setBackground(Color.WHITE);
-            editor.setTransferHandler(new ParsingTransferHandler(editor.getTransferHandler(), this));
+            editor.setTransferHandler(
+                            new ParsingTransferHandler(editor.getTransferHandler(), this));
             panel.add(new JScrollPane(editor), name);
         } catch (IOException e) {
             e.printStackTrace();
@@ -457,7 +452,8 @@ public class TikaGUI extends JFrame implements ActionListener, HyperlinkListener
             try {
                 URL url = e.getURL();
                 try (InputStream stream = url.openStream()) {
-                    JEditorPane editor = new JEditorPane("text/plain", IOUtils.toString(stream, UTF_8));
+                    JEditorPane editor =
+                                    new JEditorPane("text/plain", IOUtils.toString(stream, UTF_8));
                     editor.setEditable(false);
                     editor.setBackground(Color.WHITE);
                     editor.setCaretPosition(0);
@@ -483,36 +479,33 @@ public class TikaGUI extends JFrame implements ActionListener, HyperlinkListener
     }
 
     /**
-     * Creates and returns a content handler that turns XHTML input to
-     * simplified HTML output that can be correctly parsed and displayed
-     * by {@link JEditorPane}.
+     * Creates and returns a content handler that turns XHTML input to simplified HTML output that
+     * can be correctly parsed and displayed by {@link JEditorPane}.
      * <p>
-     * The returned content handler is set to output <code>html</code>
-     * to the given writer. The XHTML namespace is removed from the output
-     * to prevent the serializer from using the &lt;tag/&gt; empty element
-     * syntax that causes extra "&gt;" characters to be displayed.
-     * The &lt;head&gt; tags are dropped to prevent the serializer from
-     * generating a &lt;META&gt; content type tag that makes
-     * {@link JEditorPane} fail thinking that the document character set
+     * The returned content handler is set to output <code>html</code> to the given writer. The
+     * XHTML namespace is removed from the output to prevent the serializer from using the
+     * &lt;tag/&gt; empty element syntax that causes extra "&gt;" characters to be displayed. The
+     * &lt;head&gt; tags are dropped to prevent the serializer from generating a &lt;META&gt;
+     * content type tag that makes {@link JEditorPane} fail thinking that the document character set
      * is inconsistent.
      * <p>
-     * Additionally, it will use ImageSavingParser to re-write embedded:(image)
-     * image links to be file:///(temporary file) so that they can be loaded.
+     * Additionally, it will use ImageSavingParser to re-write embedded:(image) image links to be
+     * file:///(temporary file) so that they can be loaded.
      *
      * @param writer output writer
      * @return HTML content handler
      * @throws TransformerConfigurationException if an error occurs
      */
-    private ContentHandler getHtmlHandler(Writer writer) throws TransformerConfigurationException, TikaException {
+    private ContentHandler getHtmlHandler(Writer writer)
+                    throws TransformerConfigurationException, TikaException {
         SAXTransformerFactory factory = XMLReaderUtils.getSAXTransformerFactory();
         TransformerHandler handler = factory.newTransformerHandler();
-        handler
-                .getTransformer()
-                .setOutputProperty(OutputKeys.METHOD, "html");
+        handler.getTransformer().setOutputProperty(OutputKeys.METHOD, "html");
         handler.setResult(new StreamResult(writer));
         return new ContentHandlerDecorator(handler) {
             @Override
-            public void startElement(String uri, String localName, String name, Attributes atts) throws SAXException {
+            public void startElement(String uri, String localName, String name, Attributes atts)
+                            throws SAXException {
                 if (XHTMLContentHandler.XHTML.equals(uri)) {
                     uri = null;
                 }
@@ -532,13 +525,13 @@ public class TikaGUI extends JFrame implements ActionListener, HyperlinkListener
                                     String filename = src.substring(src.indexOf(':') + 1);
                                     try {
                                         File img = imageParser.requestSave(filename);
-                                        String newSrc = img
-                                                .toURI()
-                                                .toString();
+                                        String newSrc = img.toURI().toString();
                                         newAttrs.setValue(i, newSrc);
                                     } catch (IOException e) {
-                                        System.err.println("Error creating temp image file " + filename);
-                                        // The html viewer will show a broken image too to alert them
+                                        System.err.println("Error creating temp image file "
+                                                        + filename);
+                                        // The html viewer will show a broken image too to alert
+                                        // them
                                     }
                                 }
                             }
@@ -561,12 +554,10 @@ public class TikaGUI extends JFrame implements ActionListener, HyperlinkListener
             }
 
             @Override
-            public void startPrefixMapping(String prefix, String uri) {
-            }
+            public void startPrefixMapping(String prefix, String uri) {}
 
             @Override
-            public void endPrefixMapping(String prefix) {
-            }
+            public void endPrefixMapping(String prefix) {}
         };
     }
 
@@ -578,12 +569,11 @@ public class TikaGUI extends JFrame implements ActionListener, HyperlinkListener
         return new BoilerpipeContentHandler(writer);
     }
 
-    private ContentHandler getXmlContentHandler(Writer writer) throws TransformerConfigurationException, TikaException {
+    private ContentHandler getXmlContentHandler(Writer writer)
+                    throws TransformerConfigurationException, TikaException {
         SAXTransformerFactory factory = XMLReaderUtils.getSAXTransformerFactory();
         TransformerHandler handler = factory.newTransformerHandler();
-        handler
-                .getTransformer()
-                .setOutputProperty(OutputKeys.METHOD, "xml");
+        handler.getTransformer().setOutputProperty(OutputKeys.METHOD, "xml");
         handler.setResult(new StreamResult(writer));
         return handler;
     }
@@ -599,9 +589,8 @@ public class TikaGUI extends JFrame implements ActionListener, HyperlinkListener
     }
 
     /**
-     * A recursive parser that saves certain images into the temporary
-     * directory, and delegates everything else to another downstream
-     * parser.
+     * A recursive parser that saves certain images into the temporary directory, and delegates
+     * everything else to another downstream parser.
      */
     private static class ImageSavingParser implements Parser {
         private Map<String, File> wanted = new HashMap<>();
@@ -612,12 +601,10 @@ public class TikaGUI extends JFrame implements ActionListener, HyperlinkListener
             this.downstreamParser = downstreamParser;
 
             try {
-                File t = Files
-                        .createTempFile("tika", ".test")
-                        .toFile();
+                File t = Files.createTempFile("tika", ".test").toFile();
                 tmpDir = t.getParentFile();
             } catch (IOException e) {
-                //swallow
+                // swallow
             }
         }
 
@@ -629,9 +616,7 @@ public class TikaGUI extends JFrame implements ActionListener, HyperlinkListener
                 embeddedName = embeddedName.substring(splitAt);
             }
 
-            File tmp = Files
-                    .createTempFile("tika-embedded-", suffix)
-                    .toFile();
+            File tmp = Files.createTempFile("tika-embedded-", suffix).toFile();
             wanted.put(embeddedName, tmp);
             return tmp;
         }
@@ -641,7 +626,8 @@ public class TikaGUI extends JFrame implements ActionListener, HyperlinkListener
         }
 
         @Override
-        public void parse(InputStream stream, ContentHandler handler, Metadata metadata, ParseContext context) throws IOException, SAXException, TikaException {
+        public void parse(InputStream stream, ContentHandler handler, Metadata metadata,
+                        ParseContext context) throws IOException, SAXException, TikaException {
             String name = metadata.get(TikaCoreProperties.RESOURCE_NAME_KEY);
             if (name != null && wanted.containsKey(name)) {
                 try (FileOutputStream out = new FileOutputStream(wanted.get(name))) {
diff --git a/tika-app/src/test/java/org/apache/tika/cli/AsyncHelperTest.java b/tika-app/src/test/java/org/apache/tika/cli/AsyncHelperTest.java
index 8b1d79d10..fe911a48f 100644
--- a/tika-app/src/test/java/org/apache/tika/cli/AsyncHelperTest.java
+++ b/tika-app/src/test/java/org/apache/tika/cli/AsyncHelperTest.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.cli;
 
@@ -24,8 +22,9 @@ public class AsyncHelperTest {
 
     @Test
     public void testBasic() throws Exception {
-        String[] args = new String[]{"-a", "--config=blah.xml", "-i", "input.docx", "-o", "output/dir"};
-        String[] expected = new String[]{"-c", "blah.xml", "-i", "input.docx", "-o", "output/dir"};
+        String[] args = new String[] {"-a", "--config=blah.xml", "-i", "input.docx", "-o",
+                        "output/dir"};
+        String[] expected = new String[] {"-c", "blah.xml", "-i", "input.docx", "-o", "output/dir"};
         assertArrayEquals(expected, AsyncHelper.translateArgs(args));
     }
 }
diff --git a/tika-app/src/test/java/org/apache/tika/cli/TikaCLIAsyncTest.java b/tika-app/src/test/java/org/apache/tika/cli/TikaCLIAsyncTest.java
index faacd49a2..4151324b3 100644
--- a/tika-app/src/test/java/org/apache/tika/cli/TikaCLIAsyncTest.java
+++ b/tika-app/src/test/java/org/apache/tika/cli/TikaCLIAsyncTest.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.cli;
 
@@ -26,7 +24,6 @@ import java.io.IOException;
 import java.io.PrintStream;
 import java.nio.file.Files;
 import java.nio.file.Path;
-
 import org.apache.commons.io.FileUtils;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeAll;
@@ -52,21 +49,26 @@ public class TikaCLIAsyncTest {
     @BeforeAll
     public static void setUpClass() throws Exception {
         ASYNC_CONFIG = Files.createTempFile(ASYNC_OUTPUT_DIR, "async-config-", ".xml");
-        String xml = "<properties>" + "<async>" + "<numClients>3</numClients>" + "<tikaConfig>" + ASYNC_CONFIG.toAbsolutePath() + "</tikaConfig>" + "</async>" + "<fetchers>" +
-                "<fetcher class=\"org.apache.tika.pipes.fetcher.fs.FileSystemFetcher\">" + "<name>fsf</name>" + "<basePath>" + TEST_DATA_FILE.getAbsolutePath() +
-                "</basePath>" +
-                "</fetcher>" + "</fetchers>" + "<emitters>" + "<emitter class=\"org.apache.tika.pipes.emitter.fs.FileSystemEmitter\">" + "<name>fse</name>" + "<basePath>" +
-                ASYNC_OUTPUT_DIR.toAbsolutePath() + "</basePath>" + "<prettyPrint>true</prettyPrint>" + "</emitter>" + "</emitters>" +
-                "<pipesIterator class=\"org.apache.tika.pipes.pipesiterator.fs.FileSystemPipesIterator\">" + "<basePath>" + TEST_DATA_FILE.getAbsolutePath() + "</basePath>" +
-                "<fetcherName>fsf</fetcherName>" + "<emitterName>fse</emitterName>" + "</pipesIterator>" + "</properties>";
+        String xml = "<properties>" + "<async>" + "<numClients>3</numClients>" + "<tikaConfig>"
+                        + ASYNC_CONFIG.toAbsolutePath() + "</tikaConfig>" + "</async>"
+                        + "<fetchers>"
+                        + "<fetcher class=\"org.apache.tika.pipes.fetcher.fs.FileSystemFetcher\">"
+                        + "<name>fsf</name>" + "<basePath>" + TEST_DATA_FILE.getAbsolutePath()
+                        + "</basePath>" + "</fetcher>" + "</fetchers>" + "<emitters>"
+                        + "<emitter class=\"org.apache.tika.pipes.emitter.fs.FileSystemEmitter\">"
+                        + "<name>fse</name>" + "<basePath>" + ASYNC_OUTPUT_DIR.toAbsolutePath()
+                        + "</basePath>" + "<prettyPrint>true</prettyPrint>" + "</emitter>"
+                        + "</emitters>"
+                        + "<pipesIterator class=\"org.apache.tika.pipes.pipesiterator.fs.FileSystemPipesIterator\">"
+                        + "<basePath>" + TEST_DATA_FILE.getAbsolutePath() + "</basePath>"
+                        + "<fetcherName>fsf</fetcherName>" + "<emitterName>fse</emitterName>"
+                        + "</pipesIterator>" + "</properties>";
         Files.write(ASYNC_CONFIG, xml.getBytes(UTF_8));
     }
 
     /**
-     * reset resourcePrefix
-     * save original System.out and System.err
-     * clear outContent and errContent if they are not empty
-     * set outContent and errContent as System.out and System.err
+     * reset resourcePrefix save original System.out and System.err clear outContent and errContent
+     * if they are not empty set outContent and errContent as System.out and System.err
      */
     @BeforeEach
     public void setUp() throws Exception {
@@ -85,8 +87,8 @@ public class TikaCLIAsyncTest {
     }
 
     /**
-     * clear outContent and errContent if they are not empty by create a new one.
-     * set outContent and errContent as System.out and System.err
+     * clear outContent and errContent if they are not empty by create a new one. set outContent and
+     * errContent as System.out and System.err
      */
     private void resetContent() throws Exception {
         if (outContent == null || outContent.size() > 0) {
@@ -106,16 +108,10 @@ public class TikaCLIAsyncTest {
         String content = getParamOutContent("-a", "-c", ASYNC_CONFIG.toAbsolutePath().toString());
 
         int json = 0;
-        for (File f : ASYNC_OUTPUT_DIR
-                .toFile()
-                .listFiles()) {
-            if (f
-                    .getName()
-                    .endsWith(".json")) {
-                //check one file for pretty print
-                if (f
-                        .getName()
-                        .equals("coffee.xls.json")) {
+        for (File f : ASYNC_OUTPUT_DIR.toFile().listFiles()) {
+            if (f.getName().endsWith(".json")) {
+                // check one file for pretty print
+                if (f.getName().equals("coffee.xls.json")) {
                     checkForPrettyPrint(f);
                 }
                 json++;
@@ -128,7 +124,8 @@ public class TikaCLIAsyncTest {
         String json = FileUtils.readFileToString(f, UTF_8);
         int previous = json.indexOf("Content-Length");
         assertTrue(previous > -1);
-        for (String k : new String[]{"Content-Type", "dc:creator", "dcterms:created", "dcterms:modified", "X-TIKA:content\""}) {
+        for (String k : new String[] {"Content-Type", "dc:creator", "dcterms:created",
+                        "dcterms:modified", "X-TIKA:content\""}) {
             int i = json.indexOf(k);
             assertTrue(i > -1, "should have found " + k);
             assertTrue(i > previous, "bad order: " + k + " at " + i + " not less than " + previous);
@@ -137,8 +134,8 @@ public class TikaCLIAsyncTest {
     }
 
     /**
-     * reset outContent and errContent if they are not empty
-     * run given params in TikaCLI and return outContent String with UTF-8
+     * reset outContent and errContent if they are not empty run given params in TikaCLI and return
+     * outContent String with UTF-8
      */
     String getParamOutContent(String... params) throws Exception {
         resetContent();
diff --git a/tika-app/src/test/java/org/apache/tika/cli/TikaCLITest.java b/tika-app/src/test/java/org/apache/tika/cli/TikaCLITest.java
index 391fffd61..b44536327 100644
--- a/tika-app/src/test/java/org/apache/tika/cli/TikaCLITest.java
+++ b/tika-app/src/test/java/org/apache/tika/cli/TikaCLITest.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.cli;
 
@@ -37,20 +35,18 @@ import java.nio.file.attribute.BasicFileAttributes;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
-
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.io.TempDir;
-
 import org.apache.tika.exception.TikaException;
 import org.apache.tika.metadata.Metadata;
 import org.apache.tika.metadata.TikaCoreProperties;
 import org.apache.tika.serialization.JsonMetadataList;
 import org.apache.tika.utils.ProcessUtils;
 import org.apache.tika.utils.StringUtils;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
 
 /**
  * Tests the Tika's cli
@@ -75,14 +71,13 @@ public class TikaCLITest {
 
         assertFalse(Files.isDirectory(p), "File " + p.getFileName() + " is a directory!");
 
-        assertTrue(Files.size(p) > 0, "File " + p.getFileName() + " wasn't extracted with " + "contents");
+        assertTrue(Files.size(p) > 0,
+                        "File " + p.getFileName() + " wasn't extracted with " + "contents");
     }
 
     /**
-     * reset resourcePrefix
-     * save original System.out and System.err
-     * clear outContent and errContent if they are not empty
-     * set outContent and errContent as System.out and System.err
+     * reset resourcePrefix save original System.out and System.err clear outContent and errContent
+     * if they are not empty set outContent and errContent as System.out and System.err
      */
     @BeforeEach
     public void setUp() throws Exception {
@@ -102,8 +97,8 @@ public class TikaCLITest {
     }
 
     /**
-     * clear outContent and errContent if they are not empty by create a new one.
-     * set outContent and errContent as System.out and System.err
+     * clear outContent and errContent if they are not empty by create a new one. set outContent and
+     * errContent as System.out and System.err
      */
     private void resetContent() throws Exception {
         if (outContent == null || outContent.size() > 0) {
@@ -118,8 +113,7 @@ public class TikaCLITest {
     }
 
     /**
-     * Tests --list-parser-detail option of the cli
-     * Tests --list-parser-details option of the cli
+     * Tests --list-parser-detail option of the cli Tests --list-parser-details option of the cli
      *
      * @throws Exception
      */
@@ -154,7 +148,8 @@ public class TikaCLITest {
         assertTrue(content.contains("?xml version=\"1.0\" encoding=\"UTF-8\"?"));
 
         content = getParamOutContent("-x", "--digest=sha256", resourcePrefix + "alice.cli.test");
-        assertTrue(content.contains("<meta name=\"X-TIKA:digest:SHA256\" content=\"e90779adbac09c4ee"));
+        assertTrue(content.contains(
+                        "<meta name=\"X-TIKA:digest:SHA256\" content=\"e90779adbac09c4ee"));
 
     }
 
@@ -167,10 +162,12 @@ public class TikaCLITest {
     public void testHTMLOutput() throws Exception {
         String content = getParamOutContent("-h", resourcePrefix + "alice.cli.test");
         assertTrue(content.contains("html xmlns=\"http://www.w3.org/1999/xhtml"));
-        assertTrue(content.contains("<title></title>"), "Expanded <title></title> element should be present");
+        assertTrue(content.contains("<title></title>"),
+                        "Expanded <title></title> element should be present");
 
         content = getParamOutContent("-h", "--digest=sha384", resourcePrefix + "alice.cli.test");
-        assertTrue(content.contains("<meta name=\"X-TIKA:digest:SHA384\" content=\"c69ea023f5da95a026"));
+        assertTrue(content.contains(
+                        "<meta name=\"X-TIKA:digest:SHA384\" content=\"c69ea023f5da95a026"));
     }
 
     /**
@@ -231,8 +228,9 @@ public class TikaCLITest {
      */
     @Test
     public void testJsonMetadataOutput() throws Exception {
-        String json = getParamOutContent("--json", "--digest=MD2", resourcePrefix + "testJsonMultipleInts.html");
-        //TIKA-1310
+        String json = getParamOutContent("--json", "--digest=MD2",
+                        resourcePrefix + "testJsonMultipleInts.html");
+        // TIKA-1310
         assertTrue(json.contains("\"html:fb:admins\":\"1,2,3,4\","));
         assertTrue(json.contains("\"X-TIKA:digest:MD2\":"));
     }
@@ -244,11 +242,13 @@ public class TikaCLITest {
      */
     @Test
     public void testJsonMetadataPrettyPrintOutput() throws Exception {
-        String json = getParamOutContent("--json", "-r", resourcePrefix + "testJsonMultipleInts.html");
+        String json = getParamOutContent("--json", "-r",
+                        resourcePrefix + "testJsonMultipleInts.html");
 
-        assertTrue(json.contains("\"X-TIKA:Parsed-By\" : [ \"org.apache.tika.parser.CompositeParser\", " +
-                "\"org.apache.tika.parser.DefaultParser\", \"org.apache.tika.parser.html.JSoupParser\" ],"));
-        //test pretty-print alphabetic sort of keys
+        assertTrue(json.contains(
+                        "\"X-TIKA:Parsed-By\" : [ \"org.apache.tika.parser.CompositeParser\", "
+                                        + "\"org.apache.tika.parser.DefaultParser\", \"org.apache.tika.parser.html.JSoupParser\" ],"));
+        // test pretty-print alphabetic sort of keys
         int enc = json.indexOf("\"Content-Encoding\"");
         int fb = json.indexOf("fb:admins");
         int title = json.indexOf("\"dc:title\"");
@@ -258,8 +258,7 @@ public class TikaCLITest {
 
     @Test
     public void testDefaultPDFIncrementalUpdateSettings() throws Exception {
-        String json = getParamOutContent("-J",
-                resourcePrefix + "testPDF_incrementalUpdates.pdf");
+        String json = getParamOutContent("-J", resourcePrefix + "testPDF_incrementalUpdates.pdf");
         assertTrue(json.contains("pdf:incrementalUpdateCount\":\"2\""));
         assertTrue(json.contains("embeddedResourceType\":\"VERSION\""));
     }
@@ -281,28 +280,27 @@ public class TikaCLITest {
 
     @Test
     public void testRUnpack() throws Exception {
-        String[] expectedChildren = new String[]{
-                "testPDFPackage.pdf.json",
-                //the first two test that the default single file config is working
-                "testPDFPackage.pdf-embed/00000001-embedded-1",
-                "testPDFPackage.pdf-embed/00000002-image0.jpg",
-                "testPDFPackage.pdf-embed/00000003-PDF1.pdf",
-                "testPDFPackage.pdf-embed/00000004-PDF2.pdf"};
+        String[] expectedChildren = new String[] {"testPDFPackage.pdf.json",
+                        // the first two test that the default single file config is working
+                        "testPDFPackage.pdf-embed/00000001-embedded-1",
+                        "testPDFPackage.pdf-embed/00000002-image0.jpg",
+                        "testPDFPackage.pdf-embed/00000003-PDF1.pdf",
+                        "testPDFPackage.pdf-embed/00000004-PDF2.pdf"};
         testRecursiveUnpack("testPDFPackage.pdf", expectedChildren, 2);
     }
 
     @Test
     public void testPSTRUnpack() throws Exception {
-        String[] expectedChildren = new String[]{"testPST.pst.json",
-                "testPST.pst-embed/00000007-First email.msg",
-                "testPST.pst-embed/00000001-Feature Generators.msg",
-                "testPST.pst-embed/00000008-First email.msg",
-                "testPST.pst-embed/00000004-[jira] [Resolved] (TIKA-1249) Vcard files detection.msg",
-                "testPST.pst-embed/00000003-Feature Generators.msg",
-                "testPST.pst-embed/00000002-putstatic%22.msg",
-                "testPST.pst-embed/00000005-[jira] [Commented] (TIKA-1250) Process loops infintely processing a CHM file.msg",
-                "testPST.pst-embed/00000009-attachment.docx",
-                "testPST.pst-embed/00000006-[WEBINAR] - %22Introducing Couchbase Server 2.5%22.msg"};
+        String[] expectedChildren = new String[] {"testPST.pst.json",
+                        "testPST.pst-embed/00000007-First email.msg",
+                        "testPST.pst-embed/00000001-Feature Generators.msg",
+                        "testPST.pst-embed/00000008-First email.msg",
+                        "testPST.pst-embed/00000004-[jira] [Resolved] (TIKA-1249) Vcard files detection.msg",
+                        "testPST.pst-embed/00000003-Feature Generators.msg",
+                        "testPST.pst-embed/00000002-putstatic%22.msg",
+                        "testPST.pst-embed/00000005-[jira] [Commented] (TIKA-1250) Process loops infintely processing a CHM file.msg",
+                        "testPST.pst-embed/00000009-attachment.docx",
+                        "testPST.pst-embed/00000006-[WEBINAR] - %22Introducing Couchbase Server 2.5%22.msg"};
         testRecursiveUnpack("testPST.pst", expectedChildren, 2);
         try (Reader reader = Files.newBufferedReader(extractDir.resolve("testPST.pst.json"))) {
             List<Metadata> metadataList = JsonMetadataList.fromJson(reader);
@@ -354,56 +352,59 @@ public class TikaCLITest {
      */
     @Test
     public void testListSupportedTypes() throws Exception {
-        String content = getParamOutContent("--list-supported-types", resourcePrefix + "alice.cli.test");
+        String content = getParamOutContent("--list-supported-types",
+                        resourcePrefix + "alice.cli.test");
         assertTrue(content.contains("supertype: application/octet-stream"));
     }
 
     @Test
     public void testExtractSimple() throws Exception {
-        String[] expectedChildren = new String[]{"MBD002B040A.cdx", "file-4.png", "MBD002B0FA6.bin", "MBD00262FE3.txt", "file-0.emf"};
+        String[] expectedChildren = new String[] {"MBD002B040A.cdx", "file-4.png",
+                        "MBD002B0FA6.bin", "MBD00262FE3.txt", "file-0.emf"};
         testExtract("/coffee.xls", expectedChildren, 8);
     }
 
     @Test
     public void testExtractAbsolute() throws Exception {
-        String[] expectedChildren = new String[]{"dangerous/dont/touch.pl",};
+        String[] expectedChildren = new String[] {"dangerous/dont/touch.pl",};
         testExtract("testZip_absolutePath.zip", expectedChildren, 2);
     }
 
     @Test
     public void testExtractRelative() throws Exception {
-        String[] expectedChildren = new String[]{"dangerous/dont/touch.pl",};
+        String[] expectedChildren = new String[] {"dangerous/dont/touch.pl",};
         testExtract("testZip_relative.zip", expectedChildren);
     }
 
     @Test
     public void testExtractOverlapping() throws Exception {
-        //there should be two files, one with a prepended uuid-f1.txt
-        String[] expectedChildren = new String[]{"f1.txt",};
+        // there should be two files, one with a prepended uuid-f1.txt
+        String[] expectedChildren = new String[] {"f1.txt",};
         testExtract("testZip_overlappingNames.zip", expectedChildren, 2);
     }
 
     @Test
     public void testExtract0x00() throws Exception {
-        String[] expectedChildren = new String[]{"dang erous.pl",};
+        String[] expectedChildren = new String[] {"dang erous.pl",};
         testExtract("testZip_zeroByte.zip", expectedChildren);
     }
 
 
-    private void testRecursiveUnpack(String targetFile, String[] expectedChildrenFileNames) throws Exception {
-        testRecursiveUnpack(targetFile, expectedChildrenFileNames, expectedChildrenFileNames.length);
+    private void testRecursiveUnpack(String targetFile, String[] expectedChildrenFileNames)
+                    throws Exception {
+        testRecursiveUnpack(targetFile, expectedChildrenFileNames,
+                        expectedChildrenFileNames.length);
     }
 
-    private void testRecursiveUnpack(String targetFile, String[] expectedChildrenFileNames, int expectedLength) throws Exception {
+    private void testRecursiveUnpack(String targetFile, String[] expectedChildrenFileNames,
+                    int expectedLength) throws Exception {
         Path input = Paths.get(new URI(resourcePrefix + "/" + targetFile));
         String[] params = {"-Z", input.toAbsolutePath().toString(),
-                extractDir.toAbsolutePath().toString()};
+                        extractDir.toAbsolutePath().toString()};
 
         TikaCLI.main(params);
         Set<String> fileNames = getFileNames(extractDir);
-        String[] jsonFile = extractDir
-                .toFile()
-                .list();
+        String[] jsonFile = extractDir.toFile().list();
         assertNotNull(jsonFile);
         assertEquals(expectedLength, jsonFile.length);
 
@@ -416,44 +417,49 @@ public class TikaCLITest {
         final Set<String> names = new HashSet<>();
         Files.walkFileTree(extractDir, new FileVisitor<Path>() {
             @Override
-            public @NotNull FileVisitResult preVisitDirectory(Path path, @NotNull BasicFileAttributes basicFileAttributes) throws IOException {
+            public @NotNull FileVisitResult preVisitDirectory(Path path,
+                            @NotNull BasicFileAttributes basicFileAttributes) throws IOException {
                 return FileVisitResult.CONTINUE;
             }
 
             @Override
-            public @NotNull FileVisitResult visitFile(Path path, @NotNull BasicFileAttributes basicFileAttributes) throws IOException {
+            public @NotNull FileVisitResult visitFile(Path path,
+                            @NotNull BasicFileAttributes basicFileAttributes) throws IOException {
                 names.add(extractDir.relativize(path).toString().replace('\\', '/'));
                 return FileVisitResult.CONTINUE;
             }
 
             @Override
-            public @NotNull FileVisitResult visitFileFailed(Path path, @NotNull IOException e) throws IOException {
+            public @NotNull FileVisitResult visitFileFailed(Path path, @NotNull IOException e)
+                            throws IOException {
                 return FileVisitResult.CONTINUE;
             }
 
             @Override
-            public @NotNull FileVisitResult postVisitDirectory(Path path, @Nullable IOException e) throws IOException {
+            public @NotNull FileVisitResult postVisitDirectory(Path path, @Nullable IOException e)
+                            throws IOException {
                 return FileVisitResult.CONTINUE;
             }
         });
         return names;
     }
 
-    private void testExtract(String targetFile, String[] expectedChildrenFileNames) throws Exception {
+    private void testExtract(String targetFile, String[] expectedChildrenFileNames)
+                    throws Exception {
         testExtract(targetFile, expectedChildrenFileNames, expectedChildrenFileNames.length);
     }
 
-    private void testExtract(String targetFile, String[] expectedChildrenFileNames, int expectedLength) throws Exception {
+    private void testExtract(String targetFile, String[] expectedChildrenFileNames,
+                    int expectedLength) throws Exception {
 
-        String[] params = {"--extract-dir=" + ProcessUtils.escapeCommandLine(extractDir
-                .toAbsolutePath()
-                .toString()), "-z", resourcePrefix + "/" + targetFile};
+        String[] params = {
+                        "--extract-dir=" + ProcessUtils
+                                        .escapeCommandLine(extractDir.toAbsolutePath().toString()),
+                        "-z", resourcePrefix + "/" + targetFile};
 
         TikaCLI.main(params);
 
-        String[] tempFileNames = extractDir
-                .toFile()
-                .list();
+        String[] tempFileNames = extractDir.toFile().list();
         assertNotNull(tempFileNames);
         assertEquals(expectedLength, tempFileNames.length);
         String allFiles = String.join(" : ", tempFileNames);
@@ -465,15 +471,14 @@ public class TikaCLITest {
 
     @Test
     public void testExtractTgz() throws Exception {
-        //TIKA-2564
+        // TIKA-2564
 
-        String[] params = {"--extract-dir=" + extractDir.toAbsolutePath(), "-z", resourcePrefix + "/test-documents.tgz"};
+        String[] params = {"--extract-dir=" + extractDir.toAbsolutePath(), "-z",
+                        resourcePrefix + "/test-documents.tgz"};
 
         TikaCLI.main(params);
 
-        String[] tempFileNames = extractDir
-                .toFile()
-                .list();
+        String[] tempFileNames = extractDir.toFile().list();
         assertNotNull(tempFileNames);
         String allFiles = String.join(" : ", tempFileNames);
 
@@ -497,8 +502,9 @@ public class TikaCLITest {
     public void testZipWithSubdirs() throws Exception {
         new File("subdir/foo.txt").delete();
         new File("subdir").delete();
-        String content = getParamOutContent("-z", "--extract-dir=target", resourcePrefix + "testWithSubdirs.zip");
-        //assertTrue(content.contains("Extracting 'subdir/foo.txt'"));
+        String content = getParamOutContent("-z", "--extract-dir=target",
+                        resourcePrefix + "testWithSubdirs.zip");
+        // assertTrue(content.contains("Extracting 'subdir/foo.txt'"));
         // clean up. TODO: These should be in target.
         assertTrue(new File("target/subdir/foo.txt").delete());
         assertTrue(new File("target/subdir").delete());
@@ -506,19 +512,18 @@ public class TikaCLITest {
 
     @Test
     public void testExtractInlineImages() throws Exception {
-        String[] params = {"--extract-dir=" + extractDir.toAbsolutePath(), "-z", resourcePrefix + "/testPDF_childAttachments.pdf"};
+        String[] params = {"--extract-dir=" + extractDir.toAbsolutePath(), "-z",
+                        resourcePrefix + "/testPDF_childAttachments.pdf"};
 
         TikaCLI.main(params);
 
-        String[] tempFileNames = extractDir
-                .toFile()
-                .list();
+        String[] tempFileNames = extractDir.toFile().list();
         assertNotNull(tempFileNames);
         String allFiles = String.join(" : ", tempFileNames);
 
         Path jpeg = extractDir.resolve("image0.jpg");
-        //tiff isn't extracted without optional image dependency
-//            File tiff = new File(tempFile, "image1.tif");
+        // tiff isn't extracted without optional image dependency
+        // File tiff = new File(tempFile, "image1.tif");
         Path jobOptions = extractDir.resolve("Press Quality(1).joboptions.txt");
         Path doc = extractDir.resolve("Unit10.doc");
 
@@ -529,9 +534,9 @@ public class TikaCLITest {
 
     @Test
     public void testDefaultConfigException() throws Exception {
-        //default xml parser will throw TikaException
-        //this and TestConfig() are broken into separate tests so that
-        //setUp and tearDown() are called each time
+        // default xml parser will throw TikaException
+        // this and TestConfig() are broken into separate tests so that
+        // setUp and tearDown() are called each time
         String[] params = {resourcePrefix + "bad_xml.xml"};
         boolean tikaEx = false;
         try {
@@ -544,84 +549,105 @@ public class TikaCLITest {
 
     @Test
     public void testConfig() throws Exception {
-        String content = getParamOutContent("--config=" + TEST_DATA_FILE.toString() + "/tika-config1.xml", resourcePrefix + "bad_xml.xml");
+        String content = getParamOutContent(
+                        "--config=" + TEST_DATA_FILE.toString() + "/tika-config1.xml",
+                        resourcePrefix + "bad_xml.xml");
         assertTrue(content.contains("apple"));
         assertTrue(content.contains("org.apache.tika.parser.html.JSoupParser"));
     }
 
     @Test
     public void testConfigIgnoreInit() throws Exception {
-        String content = getParamOutContent("--config=" + TEST_DATA_FILE.toString() + "/TIKA-2389-ignore-init-problems.xml", resourcePrefix + "test_recursive_embedded.docx");
+        String content = getParamOutContent(
+                        "--config=" + TEST_DATA_FILE.toString()
+                                        + "/TIKA-2389-ignore-init-problems.xml",
+                        resourcePrefix + "test_recursive_embedded.docx");
         assertTrue(content.contains("embed_1a"));
-        //TODO: add a real unit test that configures logging to a file to test that nothing is
-        //written at the various logging levels
+        // TODO: add a real unit test that configures logging to a file to test that nothing is
+        // written at the various logging levels
     }
 
 
     @Test
     public void testJsonRecursiveMetadataParserMetadataOnly() throws Exception {
-        String content = getParamOutContent("-m", "-J", "-r", resourcePrefix + "test_recursive_embedded.docx");
+        String content = getParamOutContent("-m", "-J", "-r",
+                        resourcePrefix + "test_recursive_embedded.docx");
         assertTrue(content.contains("\"extended-properties:AppVersion\" : \"15.0000\","));
-        assertTrue(content.contains("\"extended-properties:Application\" : \"Microsoft Office Word\","));
+        assertTrue(content.contains(
+                        "\"extended-properties:Application\" : \"Microsoft Office Word\","));
         assertTrue(content.contains("\"X-TIKA:embedded_resource_path\" : \"/embed1.zip\""));
         assertFalse(content.contains("X-TIKA:content"));
     }
 
     @Test
     public void testJsonRecursiveMetadataParserDefault() throws Exception {
-        String content = getParamOutContent("-J", "-r", resourcePrefix + "test_recursive_embedded.docx");
-        assertTrue(content.contains("\"X-TIKA:content\" : \"<html xmlns=\\\"http://www.w3.org/1999/xhtml"));
+        String content = getParamOutContent("-J", "-r",
+                        resourcePrefix + "test_recursive_embedded.docx");
+        assertTrue(content.contains(
+                        "\"X-TIKA:content\" : \"<html xmlns=\\\"http://www.w3.org/1999/xhtml"));
     }
 
     @Test
     public void testJsonRecursiveMetadataParserText() throws Exception {
-        String content = getParamOutContent("-J", "-r", "-t", resourcePrefix + "test_recursive_embedded.docx");
+        String content = getParamOutContent("-J", "-r", "-t",
+                        resourcePrefix + "test_recursive_embedded.docx");
         assertTrue(content.contains("\\n\\nembed_4\\n"));
         assertTrue(content.contains("\\n\\nembed_0"));
     }
 
     @Test
     public void testDigestInJson() throws Exception {
-        String content = getParamOutContent("-J", "-r", "-t", "--digest=md5", resourcePrefix + "test_recursive_embedded.docx");
-        assertTrue(content.contains("\"X-TIKA:digest:MD5\" : \"59f626e09a8c16ab6dbc2800c685f772\","));
-        assertTrue(content.contains("\"X-TIKA:digest:MD5\" : \"f9627095ef86c482e61d99f0cc1cf87d\""));
+        String content = getParamOutContent("-J", "-r", "-t", "--digest=md5",
+                        resourcePrefix + "test_recursive_embedded.docx");
+        assertTrue(content
+                        .contains("\"X-TIKA:digest:MD5\" : \"59f626e09a8c16ab6dbc2800c685f772\","));
+        assertTrue(content
+                        .contains("\"X-TIKA:digest:MD5\" : \"f9627095ef86c482e61d99f0cc1cf87d\""));
     }
 
     @Test
     public void testConfigSerializationStaticAndCurrent() throws Exception {
         String content = getParamOutContent("--dump-static-config");
-        //make sure at least one detector is there
-        assertTrue(content.contains("<detector class=\"org.apache.tika.detect.microsoft.POIFSContainerDetector\"/>"));
-        //make sure Executable is there because follow on tests of custom config
-        //test that it has been turned off.
-        assertTrue(content.contains("<parser class=\"org.apache.tika.parser.executable.ExecutableParser\"/>"));
+        // make sure at least one detector is there
+        assertTrue(content.contains(
+                        "<detector class=\"org.apache.tika.detect.microsoft.POIFSContainerDetector\"/>"));
+        // make sure Executable is there because follow on tests of custom config
+        // test that it has been turned off.
+        assertTrue(content.contains(
+                        "<parser class=\"org.apache.tika.parser.executable.ExecutableParser\"/>"));
 
         content = getParamOutContent("--dump-current-config");
-        //make sure at least one detector is there
-        assertTrue(content.contains("<detector class=\"org.apache.tika.detect.DefaultDetector\"/>"));
-        //and at least one parser
+        // make sure at least one detector is there
+        assertTrue(content
+                        .contains("<detector class=\"org.apache.tika.detect.DefaultDetector\"/>"));
+        // and at least one parser
         assertTrue(content.contains("<parser class=\"org.apache.tika.parser.DefaultParser\"/>"));
     }
 
     @Test
     public void testConfigSerializationCustomMinimal() throws Exception {
-        String content = getParamOutContent("--config=" + TEST_DATA_FILE.toString() + "/tika-config2.xml", "--dump-minimal-config").replaceAll("[\r\n\t ]+", " ");
-
-        String expected =
-                "<parser class=\"org.apache.tika.parser.DefaultParser\">" + " <mime-exclude>application/pdf</mime-exclude>" + " <mime-exclude>image/jpeg</mime-exclude> " +
-                        "</parser> " + "<parser class=\"org.apache.tika.parser.EmptyParser\">" + " <mime>application/pdf</mime> " + "</parser>";
+        String content = getParamOutContent(
+                        "--config=" + TEST_DATA_FILE.toString() + "/tika-config2.xml",
+                        "--dump-minimal-config").replaceAll("[\r\n\t ]+", " ");
+
+        String expected = "<parser class=\"org.apache.tika.parser.DefaultParser\">"
+                        + " <mime-exclude>application/pdf</mime-exclude>"
+                        + " <mime-exclude>image/jpeg</mime-exclude> " + "</parser> "
+                        + "<parser class=\"org.apache.tika.parser.EmptyParser\">"
+                        + " <mime>application/pdf</mime> " + "</parser>";
         assertTrue(content.contains(expected));
     }
 
     @Test
     public void testConfigSerializationCustomStatic() throws Exception {
-        String content = getParamOutContent("--config=" + TEST_DATA_FILE.toString() + "/tika-config2.xml", "--dump-static-config");
+        String content = getParamOutContent(
+                        "--config=" + TEST_DATA_FILE.toString() + "/tika-config2.xml",
+                        "--dump-static-config");
         assertFalse(content.contains("org.apache.tika.parser.executable.Executable"));
     }
 
     /**
-     * Tests --list-detector option of the cli
-     * Tests --list-detectors option of the cli
+     * Tests --list-detector option of the cli Tests --list-detectors option of the cli
      *
      * @throws Exception
      */
@@ -635,8 +661,8 @@ public class TikaCLITest {
     }
 
     /**
-     * Tests --list-parser-detail-apt option of the cli
-     * Tests --list-parser-details-apt option of the cli
+     * Tests --list-parser-detail-apt option of the cli Tests --list-parser-details-apt option of
+     * the cli
      *
      * @throws Exception
      */
@@ -650,8 +676,8 @@ public class TikaCLITest {
     }
 
     /**
-     * reset outContent and errContent if they are not empty
-     * run given params in TikaCLI and return outContent String with UTF-8
+     * reset outContent and errContent if they are not empty run given params in TikaCLI and return
+     * outContent String with UTF-8
      */
     String getParamOutContent(String... params) throws Exception {
         resetContent();
diff --git a/tika-bundles/tika-bundle-standard/src/test/java/org/apache/tika/bundle/BundleIT.java b/tika-bundles/tika-bundle-standard/src/test/java/org/apache/tika/bundle/BundleIT.java
index 58d3f8aae..9fb2dd361 100644
--- a/tika-bundles/tika-bundle-standard/src/test/java/org/apache/tika/bundle/BundleIT.java
+++ b/tika-bundles/tika-bundle-standard/src/test/java/org/apache/tika/bundle/BundleIT.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.bundle;
 
@@ -26,6 +24,7 @@ import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
 import static org.ops4j.pax.exam.CoreOptions.options;
 import static org.ops4j.pax.exam.CoreOptions.systemPackages;
 
+import jakarta.inject.Inject;
 import java.io.ByteArrayInputStream;
 import java.io.File;
 import java.io.FileInputStream;
@@ -41,22 +40,6 @@ import java.util.Set;
 import java.util.jar.Attributes;
 import java.util.jar.JarInputStream;
 import java.util.jar.Manifest;
-import jakarta.inject.Inject;
-
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.ops4j.pax.exam.Configuration;
-import org.ops4j.pax.exam.Option;
-import org.ops4j.pax.exam.junit.PaxExam;
-import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
-import org.ops4j.pax.exam.spi.reactors.PerMethod;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-
 import org.apache.tika.Tika;
 import org.apache.tika.detect.DefaultDetector;
 import org.apache.tika.detect.Detector;
@@ -75,6 +58,19 @@ import org.apache.tika.parser.Parser;
 import org.apache.tika.parser.internal.Activator;
 import org.apache.tika.parser.ocr.TesseractOCRParser;
 import org.apache.tika.sax.BodyContentHandler;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerMethod;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
 
 @RunWith(PaxExam.class)
 @ExamReactorStrategy(PerMethod.class)
@@ -95,16 +91,16 @@ public class BundleIT {
     public Option[] configuration() throws IOException, URISyntaxException, ClassNotFoundException {
         File base = new File(TARGET, "test-bundles");
         return options(systemPackages("javax.xml.bind"),
-                bundle(new File(base, "tika-core.jar").toURI().toURL().toString()),
-                //I couldn't find a way to get the build of bundle to work via imports
-                //for this one
-                mavenBundle("commons-io", "commons-io", "2.11.0"),
-                mavenBundle("org.apache.logging.log4j", "log4j-core", "2.17.1"),
-                mavenBundle("org.apache.logging.log4j", "log4j-api", "2.17.1"),
-                mavenBundle("org.ops4j.pax.logging", "pax-logging-api", "1.8.5"),
-                mavenBundle("org.ops4j.pax.logging", "pax-logging-service", "1.8.5"),
-                junitBundles(),
-                bundle(new File(base, "tika-bundle-standard.jar").toURI().toURL().toString()));
+                        bundle(new File(base, "tika-core.jar").toURI().toURL().toString()),
+                        // I couldn't find a way to get the build of bundle to work via imports
+                        // for this one
+                        mavenBundle("commons-io", "commons-io", "2.11.0"),
+                        mavenBundle("org.apache.logging.log4j", "log4j-core", "2.17.1"),
+                        mavenBundle("org.apache.logging.log4j", "log4j-api", "2.17.1"),
+                        mavenBundle("org.ops4j.pax.logging", "pax-logging-api", "1.8.5"),
+                        mavenBundle("org.ops4j.pax.logging", "pax-logging-service", "1.8.5"),
+                        junitBundles(), bundle(new File(base, "tika-bundle-standard.jar").toURI()
+                                        .toURL().toString()));
     }
 
     @Test
@@ -158,8 +154,7 @@ public class BundleIT {
     @Test
     public void testForkParser() throws Exception {
         try (ForkParser parser = new ForkParser(Activator.class.getClassLoader(), defaultParser)) {
-            String data =
-                    "<!DOCTYPE html>\n<html><body><p>test <span>content</span></p></body></html>";
+            String data = "<!DOCTYPE html>\n<html><body><p>test <span>content</span></p></body></html>";
             InputStream stream = new ByteArrayInputStream(data.getBytes(UTF_8));
             Writer writer = new StringWriter();
             ContentHandler contentHandler = new BodyContentHandler(writer);
@@ -187,11 +182,11 @@ public class BundleIT {
 
     @Test
     public void testBundleDetectors() throws Exception {
-        //For some reason, the detector created by OSGi has a flat
-        //list of detectors, whereas the detector created by the traditional
-        //service loading method has children: DefaultDetector, MimeTypes.
-        //We have to flatten the service loaded DefaultDetector to get equivalence.
-        //Detection behavior should all be the same.
+        // For some reason, the detector created by OSGi has a flat
+        // list of detectors, whereas the detector created by the traditional
+        // service loading method has children: DefaultDetector, MimeTypes.
+        // We have to flatten the service loaded DefaultDetector to get equivalence.
+        // Detection behavior should all be the same.
 
         // Get the classes found within OSGi
         ServiceReference<Detector> detectorRef = bc.getServiceReference(Detector.class);
@@ -204,7 +199,7 @@ public class BundleIT {
 
         // Check we did get a few, just in case...
         assertTrue("Should have several Detector names, found " + osgiDetectors.size(),
-                osgiDetectors.size() > 3);
+                        osgiDetectors.size() > 3);
 
         // Get the raw detectors list from the traditional service loading mechanism
         DefaultDetector detector = new DefaultDetector();
@@ -215,7 +210,7 @@ public class BundleIT {
                     rawDetectors.add(dChild.getClass().getName());
                 }
             } else {
-                //TODO: figure out how to get this loaded correctly from tika-core
+                // TODO: figure out how to get this loaded correctly from tika-core
                 if (!d.getClass().getName().equals("org.apache.tika.detect.OverrideDetector")) {
                     rawDetectors.add(d.getClass().getName());
                 }
@@ -237,7 +232,7 @@ public class BundleIT {
 
         // Check we did get a few, just in case...
         assertTrue("Should have lots Parser names, found " + osgiParsers.size(),
-                osgiParsers.size() > 15);
+                        osgiParsers.size() > 15);
 
         // Get the raw parsers list from the traditional service loading mechanism
         CompositeParser parser = (CompositeParser) defaultParser;
@@ -274,8 +269,8 @@ public class BundleIT {
         ParseContext context = new ParseContext();
         context.set(Parser.class, parser);
 
-        try (InputStream stream = TikaInputStream.get(
-                Paths.get("src/test/resources/test-documents.zip"))) {
+        try (InputStream stream =
+                        TikaInputStream.get(Paths.get("src/test/resources/test-documents.zip"))) {
             parser.parse(stream, handler, new Metadata(), context);
         }
 
@@ -310,8 +305,8 @@ public class BundleIT {
         ParseContext context = new ParseContext();
         context.set(Parser.class, parser);
 
-        try (InputStream stream = TikaInputStream.get(
-                Paths.get("src/test/resources/testPPT.pptx"))) {
+        try (InputStream stream =
+                        TikaInputStream.get(Paths.get("src/test/resources/testPPT.pptx"))) {
             parser.parse(stream, handler, new Metadata(), context);
         }
 
@@ -329,7 +324,7 @@ public class BundleIT {
         ParseContext context = new ParseContext();
         context.set(Parser.class, parser);
         Set<String> needToFix = new HashSet<>();
-        //needToFix.add("testAccess2_encrypted.accdb");
+        // needToFix.add("testAccess2_encrypted.accdb");
         System.out.println(getTestDir());
         for (File f : getTestDir().listFiles()) {
             if (f.isDirectory()) {
@@ -343,15 +338,15 @@ public class BundleIT {
             try (InputStream is = TikaInputStream.get(f.toPath())) {
                 parser.parse(is, handler, metadata, context);
             } catch (EncryptedDocumentException e) {
-                //swallow
+                // swallow
             } catch (SAXException e) {
-                //swallow
+                // swallow
             } catch (TikaException e) {
                 System.err.println("tika Exception " + f.getName());
                 e.printStackTrace();
             }
             System.out.println(
-                    Arrays.asList(metadata.getValues(TikaCoreProperties.TIKA_PARSED_BY)));
+                            Arrays.asList(metadata.getValues(TikaCoreProperties.TIKA_PARSED_BY)));
         }
     }
 
diff --git a/tika-core/src/main/java/org/apache/tika/Tika.java b/tika-core/src/main/java/org/apache/tika/Tika.java
index 5d121e6d0..7c58fd2bd 100644
--- a/tika-core/src/main/java/org/apache/tika/Tika.java
+++ b/tika-core/src/main/java/org/apache/tika/Tika.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika;
 
@@ -24,9 +22,6 @@ import java.io.Reader;
 import java.net.URL;
 import java.nio.file.Path;
 import java.util.Properties;
-
-import org.xml.sax.SAXException;
-
 import org.apache.tika.config.TikaConfig;
 import org.apache.tika.detect.Detector;
 import org.apache.tika.exception.TikaException;
@@ -41,11 +36,12 @@ import org.apache.tika.parser.Parser;
 import org.apache.tika.parser.ParsingReader;
 import org.apache.tika.sax.BodyContentHandler;
 import org.apache.tika.sax.WriteOutContentHandler;
+import org.xml.sax.SAXException;
 
 /**
- * Facade class for accessing Tika functionality. This class hides much of
- * the underlying complexity of the lower level Tika classes and provides
- * simple methods for many common parsing and type detection operations.
+ * Facade class for accessing Tika functionality. This class hides much of the underlying complexity
+ * of the lower level Tika classes and provides simple methods for many common parsing and type
+ * detection operations.
  *
  * @see Parser
  * @see Detector
@@ -69,9 +65,8 @@ public class Tika {
     private final Translator translator;
 
     /**
-     * Maximum length of the strings returned by the parseToString methods.
-     * Used to prevent out of memory problems with huge input documents.
-     * The default setting is 100k characters.
+     * Maximum length of the strings returned by the parseToString methods. Used to prevent out of
+     * memory problems with huge input documents. The default setting is 100k characters.
      */
     private int maxStringLength = 100 * 1000;
 
@@ -80,7 +75,7 @@ public class Tika {
      * Translator.
      *
      * @param detector type detector
-     * @param parser   document parser
+     * @param parser document parser
      * @since Apache Tika 0.8
      */
     public Tika(Detector detector, Parser parser) {
@@ -92,8 +87,8 @@ public class Tika {
     /**
      * Creates a Tika facade using the given detector, parser, and translator instances.
      *
-     * @param detector   type detector
-     * @param parser     document parser
+     * @param detector type detector
+     * @param parser document parser
      * @param translator text translator
      * @since Apache Tika 1.6
      */
@@ -120,8 +115,8 @@ public class Tika {
     }
 
     /**
-     * Creates a Tika facade using the given detector instance, the
-     * default parser configuration, and the default Translator.
+     * Creates a Tika facade using the given detector instance, the default parser configuration,
+     * and the default Translator.
      *
      * @param detector type detector
      * @since Apache Tika 0.8
@@ -132,23 +127,20 @@ public class Tika {
 
 
     /**
-     * Detects the media type of the given document. The type detection is
-     * based on the content of the given document stream and any given
-     * document metadata. The document stream can be <code>null</code>,
-     * in which case only the given document metadata is used for type
-     * detection.
+     * Detects the media type of the given document. The type detection is based on the content of
+     * the given document stream and any given document metadata. The document stream can be
+     * <code>null</code>, in which case only the given document metadata is used for type detection.
      * <p>
-     * If the document stream supports the
-     * {@link InputStream#markSupported() mark feature}, then the stream is
-     * marked and reset to the original position before this method returns.
-     * Only a limited number of bytes are read from the stream.
+     * If the document stream supports the {@link InputStream#markSupported() mark feature}, then
+     * the stream is marked and reset to the original position before this method returns. Only a
+     * limited number of bytes are read from the stream.
      * <p>
      * The given document stream is <em>not</em> closed by this method.
      * <p>
-     * Unlike in the {@link #parse(InputStream, Metadata)} method, the
-     * given document metadata is <em>not</em> modified by this method.
+     * Unlike in the {@link #parse(InputStream, Metadata)} method, the given document metadata is
+     * <em>not</em> modified by this method.
      *
-     * @param stream   the document stream, or <code>null</code>
+     * @param stream the document stream, or <code>null</code>
      * @param metadata document metadata
      * @return detected media type
      * @throws IOException if the stream can not be read
@@ -162,19 +154,17 @@ public class Tika {
     }
 
     /**
-     * Detects the media type of the given document. The type detection is
-     * based on the content of the given document stream and the name of the
-     * document.
+     * Detects the media type of the given document. The type detection is based on the content of
+     * the given document stream and the name of the document.
      * <p>
-     * If the document stream supports the
-     * {@link InputStream#markSupported() mark feature}, then the stream is
-     * marked and reset to the original position before this method returns.
-     * Only a limited number of bytes are read from the stream.
+     * If the document stream supports the {@link InputStream#markSupported() mark feature}, then
+     * the stream is marked and reset to the original position before this method returns. Only a
+     * limited number of bytes are read from the stream.
      * <p>
      * The given document stream is <em>not</em> closed by this method.
      *
      * @param stream the document stream
-     * @param name   document name
+     * @param name document name
      * @return detected media type
      * @throws IOException if the stream can not be read
      * @since Apache Tika 0.9
@@ -186,13 +176,12 @@ public class Tika {
     }
 
     /**
-     * Detects the media type of the given document. The type detection is
-     * based on the content of the given document stream.
+     * Detects the media type of the given document. The type detection is based on the content of
+     * the given document stream.
      * <p>
-     * If the document stream supports the
-     * {@link InputStream#markSupported() mark feature}, then the stream is
-     * marked and reset to the original position before this method returns.
-     * Only a limited number of bytes are read from the stream.
+     * If the document stream supports the {@link InputStream#markSupported() mark feature}, then
+     * the stream is marked and reset to the original position before this method returns. Only a
+     * limited number of bytes are read from the stream.
      * <p>
      * The given document stream is <em>not</em> closed by this method.
      *
@@ -205,16 +194,15 @@ public class Tika {
     }
 
     /**
-     * Detects the media type of the given document. The type detection is
-     * based on the first few bytes of a document and the document name.
+     * Detects the media type of the given document. The type detection is based on the first few
+     * bytes of a document and the document name.
      * <p>
-     * For best results at least a few kilobytes of the document data
-     * are needed. See also the other detect() methods for better
-     * alternatives when you have more than just the document prefix
+     * For best results at least a few kilobytes of the document data are needed. See also the other
+     * detect() methods for better alternatives when you have more than just the document prefix
      * available for type detection.
      *
      * @param prefix first few bytes of the document
-     * @param name   document name
+     * @param name document name
      * @return detected media type
      * @since Apache Tika 0.9
      */
@@ -229,12 +217,11 @@ public class Tika {
     }
 
     /**
-     * Detects the media type of the given document. The type detection is
-     * based on the first few bytes of a document.
+     * Detects the media type of the given document. The type detection is based on the first few
+     * bytes of a document.
      * <p>
-     * For best results at least a few kilobytes of the document data
-     * are needed. See also the other detect() methods for better
-     * alternatives when you have more than just the document prefix
+     * For best results at least a few kilobytes of the document data are needed. See also the other
+     * detect() methods for better alternatives when you have more than just the document prefix
      * available for type detection.
      *
      * @param prefix first few bytes of the document
@@ -252,12 +239,11 @@ public class Tika {
     }
 
     /**
-     * Detects the media type of the file at the given path. The type
-     * detection is based on the document content and a potential known
-     * file extension.
+     * Detects the media type of the file at the given path. The type detection is based on the
+     * document content and a potential known file extension.
      * <p>
-     * Use the {@link #detect(String)} method when you want to detect the
-     * type of the document without actually accessing the file.
+     * Use the {@link #detect(String)} method when you want to detect the type of the document
+     * without actually accessing the file.
      *
      * @param path the path of the file
      * @return detected media type
@@ -271,11 +257,11 @@ public class Tika {
     }
 
     /**
-     * Detects the media type of the given file. The type detection is
-     * based on the document content and a potential known file extension.
+     * Detects the media type of the given file. The type detection is based on the document content
+     * and a potential known file extension.
      * <p>
-     * Use the {@link #detect(String)} method when you want to detect the
-     * type of the document without actually accessing the file.
+     * Use the {@link #detect(String)} method when you want to detect the type of the document
+     * without actually accessing the file.
      *
      * @param file the file
      * @return detected media type
@@ -284,19 +270,18 @@ public class Tika {
      */
     public String detect(File file) throws IOException {
         Metadata metadata = new Metadata();
-        try (@SuppressWarnings("deprecation") InputStream stream = TikaInputStream
-                .get(file, metadata)) {
+        try (@SuppressWarnings("deprecation")
+        InputStream stream = TikaInputStream.get(file, metadata)) {
             return detect(stream, metadata);
         }
     }
 
     /**
-     * Detects the media type of the resource at the given URL. The type
-     * detection is based on the document content and a potential known
-     * file extension included in the URL.
+     * Detects the media type of the resource at the given URL. The type detection is based on the
+     * document content and a potential known file extension included in the URL.
      * <p>
-     * Use the {@link #detect(String)} method when you want to detect the
-     * type of the document without actually accessing the URL.
+     * Use the {@link #detect(String)} method when you want to detect the type of the document
+     * without actually accessing the URL.
      *
      * @param url the URL of the resource
      * @return detected media type
@@ -310,11 +295,11 @@ public class Tika {
     }
 
     /**
-     * Detects the media type of a document with the given file name.
-     * The type detection is based on known file name extensions.
+     * Detects the media type of a document with the given file name. The type detection is based on
+     * known file name extensions.
      * <p>
-     * The given name can also be a URL or a full file path. In such cases
-     * only the file name part of the string is used for type detection.
+     * The given name can also be a URL or a full file path. In such cases only the file name part
+     * of the string is used for type detection.
      *
      * @param name the file name of the document
      * @return detected media type
@@ -330,11 +315,11 @@ public class Tika {
     /**
      * Translate the given text String to and from the given languages.
      *
-     * @param text           The text to translate.
+     * @param text The text to translate.
      * @param sourceLanguage The input text language (for example, "hi").
      * @param targetLanguage The desired output language (for example, "fr").
-     * @return The translated text. If translation is unavailable (client keys not set),  returns
-     * the same text back.
+     * @return The translated text. If translation is unavailable (client keys not set), returns the
+     *         same text back.
      * @see org.apache.tika.language.translate.Translator
      */
     public String translate(String text, String sourceLanguage, String targetLanguage) {
@@ -346,13 +331,13 @@ public class Tika {
     }
 
     /**
-     * Translate the given text String to the given language, attempting to auto-detect the
-     * source language.
+     * Translate the given text String to the given language, attempting to auto-detect the source
+     * language.
      *
-     * @param text           The text to translate.
+     * @param text The text to translate.
      * @param targetLanguage The desired output language (for example, "en").
-     * @return The translated text. If translation is unavailable (client keys not set), returns
-     * the same text back.
+     * @return The translated text. If translation is unavailable (client keys not set), returns the
+     *         same text back.
      * @see org.apache.tika.language.translate.Translator
      */
     public String translate(String text, String targetLanguage) {
@@ -365,16 +350,15 @@ public class Tika {
 
 
     /**
-     * Parses the given document and returns the extracted text content.
-     * Input metadata like a file name or a content type hint can be passed
-     * in the given metadata instance. Metadata information extracted from
-     * the document is returned in that same metadata instance.
+     * Parses the given document and returns the extracted text content. Input metadata like a file
+     * name or a content type hint can be passed in the given metadata instance. Metadata
+     * information extracted from the document is returned in that same metadata instance.
      * <p>
-     * The returned reader will be responsible for closing the given stream.
-     * The stream and any associated resources will be closed at or before
-     * the time when the {@link Reader#close()} method is called.
+     * The returned reader will be responsible for closing the given stream. The stream and any
+     * associated resources will be closed at or before the time when the {@link Reader#close()}
+     * method is called.
      *
-     * @param stream   the document to be parsed
+     * @param stream the document to be parsed
      * @param metadata where document's metadata will be populated
      * @return extracted text content
      * @throws IOException if the document can not be read or parsed
@@ -388,9 +372,9 @@ public class Tika {
     /**
      * Parses the given document and returns the extracted text content.
      * <p>
-     * The returned reader will be responsible for closing the given stream.
-     * The stream and any associated resources will be closed at or before
-     * the time when the {@link Reader#close()} method is called.
+     * The returned reader will be responsible for closing the given stream. The stream and any
+     * associated resources will be closed at or before the time when the {@link Reader#close()}
+     * method is called.
      *
      * @param stream the document to be parsed
      * @return extracted text content
@@ -403,10 +387,10 @@ public class Tika {
     /**
      * Parses the file at the given path and returns the extracted text content.
      * <p>
-     * Metadata information extracted from the document is returned in
-     * the supplied metadata instance.
+     * Metadata information extracted from the document is returned in the supplied metadata
+     * instance.
      *
-     * @param path     the path of the file to be parsed
+     * @param path the path of the file to be parsed
      * @param metadata where document's metadata will be populated
      * @return extracted text content
      * @throws IOException if the file can not be read or parsed
@@ -430,17 +414,18 @@ public class Tika {
     /**
      * Parses the given file and returns the extracted text content.
      * <p>
-     * Metadata information extracted from the document is returned in
-     * the supplied metadata instance.
+     * Metadata information extracted from the document is returned in the supplied metadata
+     * instance.
      *
-     * @param file     the file to be parsed
+     * @param file the file to be parsed
      * @param metadata where document's metadata will be populated
      * @return extracted text content
      * @throws IOException if the file can not be read or parsed
      * @see #parse(Path)
      */
     public Reader parse(File file, Metadata metadata) throws IOException {
-        @SuppressWarnings("deprecation") InputStream stream = TikaInputStream.get(file, metadata);
+        @SuppressWarnings("deprecation")
+        InputStream stream = TikaInputStream.get(file, metadata);
         return parse(stream, metadata);
     }
 
@@ -457,8 +442,7 @@ public class Tika {
     }
 
     /**
-     * Parses the resource at the given URL and returns the extracted
-     * text content.
+     * Parses the resource at the given URL and returns the extracted text content.
      *
      * @param url the URL of the resource to be parsed
      * @return extracted text content
@@ -471,53 +455,48 @@ public class Tika {
     }
 
     /**
-     * Parses the given document and returns the extracted text content.
-     * The given input stream is closed by this method.
+     * Parses the given document and returns the extracted text content. The given input stream is
+     * closed by this method.
      * <p>
-     * To avoid unpredictable excess memory use, the returned string contains
-     * only up to {@link #getMaxStringLength()} first characters extracted
-     * from the input document. Use the {@link #setMaxStringLength(int)}
-     * method to adjust this limitation.
+     * To avoid unpredictable excess memory use, the returned string contains only up to
+     * {@link #getMaxStringLength()} first characters extracted from the input document. Use the
+     * {@link #setMaxStringLength(int)} method to adjust this limitation.
      * <p>
-     * <strong>NOTE:</strong> Unlike most other Tika methods that take an
-     * {@link InputStream}, this method will close the given stream for
-     * you as a convenience. With other methods you are still responsible
-     * for closing the stream or a wrapper instance returned by Tika.
+     * <strong>NOTE:</strong> Unlike most other Tika methods that take an {@link InputStream}, this
+     * method will close the given stream for you as a convenience. With other methods you are still
+     * responsible for closing the stream or a wrapper instance returned by Tika.
      *
-     * @param stream   the document to be parsed
+     * @param stream the document to be parsed
      * @param metadata document metadata
      * @return extracted text content
-     * @throws IOException   if the document can not be read
+     * @throws IOException if the document can not be read
      * @throws TikaException if the document can not be parsed
      */
     public String parseToString(InputStream stream, Metadata metadata)
-            throws IOException, TikaException {
+                    throws IOException, TikaException {
         return parseToString(stream, metadata, maxStringLength);
     }
 
     /**
-     * Parses the given document and returns the extracted text content.
-     * The given input stream is closed by this method. This method lets
-     * you control the maxStringLength per call.
+     * Parses the given document and returns the extracted text content. The given input stream is
+     * closed by this method. This method lets you control the maxStringLength per call.
      * <p>
-     * To avoid unpredictable excess memory use, the returned string contains
-     * only up to maxLength (parameter) first characters extracted
-     * from the input document.
+     * To avoid unpredictable excess memory use, the returned string contains only up to maxLength
+     * (parameter) first characters extracted from the input document.
      * <p>
-     * <strong>NOTE:</strong> Unlike most other Tika methods that take an
-     * {@link InputStream}, this method will close the given stream for
-     * you as a convenience. With other methods you are still responsible
-     * for closing the stream or a wrapper instance returned by Tika.
+     * <strong>NOTE:</strong> Unlike most other Tika methods that take an {@link InputStream}, this
+     * method will close the given stream for you as a convenience. With other methods you are still
+     * responsible for closing the stream or a wrapper instance returned by Tika.
      *
-     * @param stream    the document to be parsed
-     * @param metadata  document metadata
+     * @param stream the document to be parsed
+     * @param metadata document metadata
      * @param maxLength maximum length of the returned string
      * @return extracted text content
-     * @throws IOException   if the document can not be read
+     * @throws IOException if the document can not be read
      * @throws TikaException if the document can not be parsed
      */
     public String parseToString(InputStream stream, Metadata metadata, int maxLength)
-            throws IOException, TikaException {
+                    throws IOException, TikaException {
         WriteOutContentHandler handler = new WriteOutContentHandler(maxLength);
         ParseContext context = new ParseContext();
         context.set(Parser.class, parser);
@@ -533,22 +512,20 @@ public class Tika {
     }
 
     /**
-     * Parses the given document and returns the extracted text content.
-     * The given input stream is closed by this method.
+     * Parses the given document and returns the extracted text content. The given input stream is
+     * closed by this method.
      * <p>
-     * To avoid unpredictable excess memory use, the returned string contains
-     * only up to {@link #getMaxStringLength()} first characters extracted
-     * from the input document. Use the {@link #setMaxStringLength(int)}
-     * method to adjust this limitation.
+     * To avoid unpredictable excess memory use, the returned string contains only up to
+     * {@link #getMaxStringLength()} first characters extracted from the input document. Use the
+     * {@link #setMaxStringLength(int)} method to adjust this limitation.
      * <p>
-     * <strong>NOTE:</strong> Unlike most other Tika methods that take an
-     * {@link InputStream}, this method will close the given stream for
-     * you as a convenience. With other methods you are still responsible
-     * for closing the stream or a wrapper instance returned by Tika.
+     * <strong>NOTE:</strong> Unlike most other Tika methods that take an {@link InputStream}, this
+     * method will close the given stream for you as a convenience. With other methods you are still
+     * responsible for closing the stream or a wrapper instance returned by Tika.
      *
      * @param stream the document to be parsed
      * @return extracted text content
-     * @throws IOException   if the document can not be read
+     * @throws IOException if the document can not be read
      * @throws TikaException if the document can not be parsed
      */
     public String parseToString(InputStream stream) throws IOException, TikaException {
@@ -558,14 +535,13 @@ public class Tika {
     /**
      * Parses the file at the given path and returns the extracted text content.
      * <p>
-     * To avoid unpredictable excess memory use, the returned string contains
-     * only up to {@link #getMaxStringLength()} first characters extracted
-     * from the input document. Use the {@link #setMaxStringLength(int)}
-     * method to adjust this limitation.
+     * To avoid unpredictable excess memory use, the returned string contains only up to
+     * {@link #getMaxStringLength()} first characters extracted from the input document. Use the
+     * {@link #setMaxStringLength(int)} method to adjust this limitation.
      *
      * @param path the path of the file to be parsed
      * @return extracted text content
-     * @throws IOException   if the file can not be read
+     * @throws IOException if the file can not be read
      * @throws TikaException if the file can not be parsed
      */
     public String parseToString(Path path) throws IOException, TikaException {
@@ -577,35 +553,33 @@ public class Tika {
     /**
      * Parses the given file and returns the extracted text content.
      * <p>
-     * To avoid unpredictable excess memory use, the returned string contains
-     * only up to {@link #getMaxStringLength()} first characters extracted
-     * from the input document. Use the {@link #setMaxStringLength(int)}
-     * method to adjust this limitation.
+     * To avoid unpredictable excess memory use, the returned string contains only up to
+     * {@link #getMaxStringLength()} first characters extracted from the input document. Use the
+     * {@link #setMaxStringLength(int)} method to adjust this limitation.
      *
      * @param file the file to be parsed
      * @return extracted text content
-     * @throws IOException   if the file can not be read
+     * @throws IOException if the file can not be read
      * @throws TikaException if the file can not be parsed
      * @see #parseToString(Path)
      */
     public String parseToString(File file) throws IOException, TikaException {
         Metadata metadata = new Metadata();
-        @SuppressWarnings("deprecation") InputStream stream = TikaInputStream.get(file, metadata);
+        @SuppressWarnings("deprecation")
+        InputStream stream = TikaInputStream.get(file, metadata);
         return parseToString(stream, metadata);
     }
 
     /**
-     * Parses the resource at the given URL and returns the extracted
-     * text content.
+     * Parses the resource at the given URL and returns the extracted text content.
      * <p>
-     * To avoid unpredictable excess memory use, the returned string contains
-     * only up to {@link #getMaxStringLength()} first characters extracted
-     * from the input document. Use the {@link #setMaxStringLength(int)}
-     * method to adjust this limitation.
+     * To avoid unpredictable excess memory use, the returned string contains only up to
+     * {@link #getMaxStringLength()} first characters extracted from the input document. Use the
+     * {@link #setMaxStringLength(int)} method to adjust this limitation.
      *
      * @param url the URL of the resource to be parsed
      * @return extracted text content
-     * @throws IOException   if the resource can not be read
+     * @throws IOException if the resource can not be read
      * @throws TikaException if the resource can not be parsed
      */
     public String parseToString(URL url) throws IOException, TikaException {
@@ -615,8 +589,7 @@ public class Tika {
     }
 
     /**
-     * Returns the maximum length of strings returned by the
-     * parseToString methods.
+     * Returns the maximum length of strings returned by the parseToString methods.
      *
      * @return maximum string length, or -1 if the limit has been disabled
      * @since Apache Tika 0.7
@@ -626,11 +599,9 @@ public class Tika {
     }
 
     /**
-     * Sets the maximum length of strings returned by the parseToString
-     * methods.
+     * Sets the maximum length of strings returned by the parseToString methods.
      *
-     * @param maxStringLength maximum string length,
-     *                        or -1 to disable this limit
+     * @param maxStringLength maximum string length, or -1 to disable this limit
      * @since Apache Tika 0.7
      */
     public void setMaxStringLength(int maxStringLength) {
@@ -667,7 +638,7 @@ public class Tika {
         return translator;
     }
 
-    //--------------------------------------------------------------< Object >
+    // --------------------------------------------------------------< Object >
 
     public String toString() {
         return getString();
@@ -676,8 +647,8 @@ public class Tika {
     public static String getString() {
         String version = null;
 
-        try (InputStream stream = Tika.class
-                .getResourceAsStream("/META-INF/maven/org.apache.tika/tika-core/pom.properties")) {
+        try (InputStream stream = Tika.class.getResourceAsStream(
+                        "/META-INF/maven/org.apache.tika/tika-core/pom.properties")) {
             if (stream != null) {
                 Properties properties = new Properties();
                 properties.load(stream);
diff --git a/tika-core/src/main/java/org/apache/tika/concurrent/ConfigurableThreadPoolExecutor.java b/tika-core/src/main/java/org/apache/tika/concurrent/ConfigurableThreadPoolExecutor.java
index 1f7c4a056..943a79827 100644
--- a/tika-core/src/main/java/org/apache/tika/concurrent/ConfigurableThreadPoolExecutor.java
+++ b/tika-core/src/main/java/org/apache/tika/concurrent/ConfigurableThreadPoolExecutor.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.concurrent;
 
@@ -24,9 +22,9 @@ import java.util.concurrent.ExecutorService;
  * @since Apache Tika 1.11
  */
 public interface ConfigurableThreadPoolExecutor extends ExecutorService {
-    
+
     public void setMaximumPoolSize(int threads);
-    
+
     public void setCorePoolSize(int threads);
 
 }
diff --git a/tika-core/src/main/java/org/apache/tika/concurrent/SimpleThreadPoolExecutor.java b/tika-core/src/main/java/org/apache/tika/concurrent/SimpleThreadPoolExecutor.java
index a4385e279..6e83a139c 100644
--- a/tika-core/src/main/java/org/apache/tika/concurrent/SimpleThreadPoolExecutor.java
+++ b/tika-core/src/main/java/org/apache/tika/concurrent/SimpleThreadPoolExecutor.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.concurrent;
 
@@ -25,11 +23,11 @@ import java.util.concurrent.TimeUnit;
  *
  * @since Apache Tika 1.11
  */
-public class SimpleThreadPoolExecutor extends ThreadPoolExecutor implements
-        ConfigurableThreadPoolExecutor {
+public class SimpleThreadPoolExecutor extends ThreadPoolExecutor
+                implements ConfigurableThreadPoolExecutor {
 
     public SimpleThreadPoolExecutor() {
         super(1, 2, 0L, TimeUnit.SECONDS, new LinkedBlockingQueue<>(),
-                r -> new Thread(r, "Tika Executor Thread"));
+                        r -> new Thread(r, "Tika Executor Thread"));
     }
 }
diff --git a/tika-core/src/main/java/org/apache/tika/config/ConfigBase.java b/tika-core/src/main/java/org/apache/tika/config/ConfigBase.java
index 405294fae..f14f147a7 100644
--- a/tika-core/src/main/java/org/apache/tika/config/ConfigBase.java
+++ b/tika-core/src/main/java/org/apache/tika/config/ConfigBase.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.config;
 
@@ -29,23 +27,20 @@ import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
-
+import org.apache.tika.exception.TikaConfigException;
+import org.apache.tika.exception.TikaException;
+import org.apache.tika.utils.XMLReaderUtils;
 import org.w3c.dom.Element;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 import org.xml.sax.SAXException;
 
-import org.apache.tika.exception.TikaConfigException;
-import org.apache.tika.exception.TikaException;
-import org.apache.tika.utils.XMLReaderUtils;
-
 
 public abstract class ConfigBase {
 
-    private static Class[] SUPPORTED_PRIMITIVES =
-            new Class[]{String.class, boolean.class, long.class, int.class, double.class,
-                    float.class};
+    private static Class[] SUPPORTED_PRIMITIVES = new Class[] {String.class, boolean.class,
+                    long.class, int.class, double.class, float.class};
 
     /**
      * Use this to build a single class, where the user specifies the instance class, e.g.
@@ -57,7 +52,7 @@ public abstract class ConfigBase {
      * @throws IOException
      */
     protected static <T> T buildSingle(String itemName, Class<T> itemClass, InputStream is)
-            throws TikaConfigException, IOException {
+                    throws TikaConfigException, IOException {
         Element properties = null;
         try {
             properties = XMLReaderUtils.buildDOM(is).getDocumentElement();
@@ -82,7 +77,7 @@ public abstract class ConfigBase {
      * @throws IOException
      */
     protected static <T> T buildSingle(String itemName, Class<T> itemClass, Element properties,
-                                       T defaultValue) throws TikaConfigException, IOException {
+                    T defaultValue) throws TikaConfigException, IOException {
 
         NodeList children = properties.getChildNodes();
         T toConfigure = null;
@@ -94,7 +89,7 @@ public abstract class ConfigBase {
             if (itemName.equals(child.getLocalName())) {
                 if (toConfigure != null) {
                     throw new TikaConfigException(
-                            "There can only be one " + itemName + " in a config");
+                                    "There can only be one " + itemName + " in a config");
                 }
                 T item = buildClass(child, itemName, itemClass);
                 setParams(item, child, new HashSet<>());
@@ -112,8 +107,8 @@ public abstract class ConfigBase {
 
 
     /**
-     * Use this to build a list of components for a composite item (e.g.
-     * CompositeMetadataFilter, FetcherManager), each with their own configurations
+     * Use this to build a list of components for a composite item (e.g. CompositeMetadataFilter,
+     * FetcherManager), each with their own configurations
      *
      * @param compositeElementName
      * @param itemName
@@ -122,8 +117,8 @@ public abstract class ConfigBase {
      * @throws IOException
      */
     protected static <P, T> P buildComposite(String compositeElementName, Class<P> compositeClass,
-                                             String itemName, Class<T> itemClass, InputStream is)
-            throws TikaConfigException, IOException {
+                    String itemName, Class<T> itemClass, InputStream is)
+                    throws TikaConfigException, IOException {
         Element properties = null;
         try {
             properties = XMLReaderUtils.buildDOM(is).getDocumentElement();
@@ -133,13 +128,12 @@ public abstract class ConfigBase {
             throw new TikaConfigException("problem loading xml to dom", e);
         }
         return buildComposite(compositeElementName, compositeClass, itemName, itemClass,
-                properties);
+                        properties);
     }
 
     protected static <P, T> P buildComposite(String compositeElementName, Class<P> compositeClass,
-                                             String itemName, Class<T> itemClass,
-                                             Element properties)
-            throws TikaConfigException, IOException {
+                    String itemName, Class<T> itemClass, Element properties)
+                    throws TikaConfigException, IOException {
 
         if (!properties.getLocalName().equals("properties")) {
             throw new TikaConfigException("expect properties as root node");
@@ -159,8 +153,8 @@ public abstract class ConfigBase {
                     P composite = (P) constructor.newInstance(components);
                     setParams(composite, child, new HashSet<>(), itemName);
                     return composite;
-                } catch (NoSuchMethodException | InvocationTargetException |
-                         InstantiationException | IllegalAccessException e) {
+                } catch (NoSuchMethodException | InvocationTargetException | InstantiationException
+                                | IllegalAccessException e) {
                     throw new TikaConfigException("can't build composite class", e);
                 }
             }
@@ -169,8 +163,7 @@ public abstract class ConfigBase {
     }
 
     private static <T> List<T> loadComposite(Node composite, String itemName,
-                                             Class<? extends T> itemClass)
-            throws TikaConfigException {
+                    Class<? extends T> itemClass) throws TikaConfigException {
         NodeList children = composite.getChildNodes();
         List<T> items = new ArrayList<>();
         for (int i = 0; i < children.getLength(); i++) {
@@ -188,7 +181,7 @@ public abstract class ConfigBase {
     }
 
     private static <T> T buildClass(Node node, String elementName, Class itemClass)
-            throws TikaConfigException {
+                    throws TikaConfigException {
         String className = itemClass.getName();
         Node classNameNode = node.getAttributes().getNamedItem("class");
 
@@ -198,25 +191,25 @@ public abstract class ConfigBase {
         try {
             Class clazz = Class.forName(className);
             if (!itemClass.isAssignableFrom(clazz)) {
-                throw new TikaConfigException(
-                        elementName + " with class name " + className + " must be of type '" +
-                                itemClass.getName() + "'");
+                throw new TikaConfigException(elementName + " with class name " + className
+                                + " must be of type '" + itemClass.getName() + "'");
             }
             return (T) clazz.getDeclaredConstructor().newInstance();
-        } catch (InstantiationException | IllegalAccessException | ClassNotFoundException |
-                 NoSuchMethodException | InvocationTargetException e) {
-            throw new TikaConfigException("problem loading " + elementName +
-                    " with class " + itemClass.getName(), e);
+        } catch (InstantiationException | IllegalAccessException | ClassNotFoundException
+                        | NoSuchMethodException | InvocationTargetException e) {
+            throw new TikaConfigException(
+                            "problem loading " + elementName + " with class " + itemClass.getName(),
+                            e);
         }
     }
 
     private static void setParams(Object object, Node targetNode, Set<String> settings)
-            throws TikaConfigException {
+                    throws TikaConfigException {
         setParams(object, targetNode, settings, null);
     }
 
     private static void setParams(Object object, Node targetNode, Set<String> settings,
-                                  String exceptNodeName) throws TikaConfigException {
+                    String exceptNodeName) throws TikaConfigException {
         NodeList children = targetNode.getChildNodes();
         List<Node> params = new ArrayList<>();
         for (int i = 0; i < children.getLength(); i++) {
@@ -257,7 +250,7 @@ public abstract class ConfigBase {
                 if (isPrimitive(setterClassPair.itemClass)) {
                     tryToSetPrimitive(object, setterClassPair, param.getTextContent());
                 } else {
-                    //tryToSetPrimitive(object, localName, txt);
+                    // tryToSetPrimitive(object, localName, txt);
                     Object item = buildClass(param, itemName, setterClassPair.itemClass);
                     setParams(setterClassPair.itemClass.cast(item), param, new HashSet<>());
                     try {
@@ -296,19 +289,19 @@ public abstract class ConfigBase {
     }
 
     private static SetterClassPair findSetterClassPair(Object object, String itemName)
-            throws TikaConfigException {
+                    throws TikaConfigException {
 
-        //TODO -- we could do more with info from the node -- is it complex, does it have
-        //a text value, does it have a class, etc...  This works for now.
-        String setter =
-                "set" + itemName.substring(0, 1).toUpperCase(Locale.US) + itemName.substring(1);
+        // TODO -- we could do more with info from the node -- is it complex, does it have
+        // a text value, does it have a class, etc... This works for now.
+        String setter = "set" + itemName.substring(0, 1).toUpperCase(Locale.US)
+                        + itemName.substring(1);
         Class itemClass = null;
         Method setterMethod = null;
         for (Method method : object.getClass().getMethods()) {
             if (setter.equals(method.getName())) {
                 Class<?>[] classes = method.getParameterTypes();
                 if (classes.length == 1) {
-                    //if both setX(String) and setX(Object), prefer setX(String)
+                    // if both setX(String) and setX(Object), prefer setX(String)
                     if (itemClass == null || classes[0].equals(String.class)) {
                         itemClass = classes[0];
                         setterMethod = method;
@@ -319,14 +312,14 @@ public abstract class ConfigBase {
         if (setterMethod != null && itemClass != null) {
             return new SetterClassPair(setterMethod, itemClass);
         }
-        //now try adders
-        String adder =
-                "add" + itemName.substring(0, 1).toUpperCase(Locale.US) + itemName.substring(1);
+        // now try adders
+        String adder = "add" + itemName.substring(0, 1).toUpperCase(Locale.US)
+                        + itemName.substring(1);
         for (Method method : object.getClass().getMethods()) {
             if (adder.equals(method.getName())) {
                 Class<?>[] classes = method.getParameterTypes();
                 if (classes.length == 1) {
-                    //if both setX(String) and setX(Object), prefer setX(String)
+                    // if both setX(String) and setX(Object), prefer setX(String)
                     if (itemClass == null || classes[0].equals(String.class)) {
                         itemClass = classes[0];
                         setterMethod = method;
@@ -335,9 +328,8 @@ public abstract class ConfigBase {
             }
         }
         if (setterMethod == null && itemClass == null) {
-            throw new TikaConfigException(
-                    "Couldn't find setter '" + setter + "' or adder '" + adder + "' for " + itemName +
-                            " of class: " + object.getClass());
+            throw new TikaConfigException("Couldn't find setter '" + setter + "' or adder '" + adder
+                            + "' for " + itemName + " of class: " + object.getClass());
         }
         return new SetterClassPair(setterMethod, itemClass);
     }
@@ -368,8 +360,8 @@ public abstract class ConfigBase {
     private static void tryToSetClassList(Object object, Node node) throws TikaConfigException {
         String name = node.getLocalName();
         try {
-            Class interfaze =
-                    Class.forName(node.getAttributes().getNamedItem("class").getTextContent());
+            Class interfaze = Class
+                            .forName(node.getAttributes().getNamedItem("class").getTextContent());
             List items = new ArrayList<Object>();
             NodeList nodeList = node.getChildNodes();
             for (int i = 0; i < nodeList.getLength(); i++) {
@@ -385,8 +377,8 @@ public abstract class ConfigBase {
             Method m = object.getClass().getMethod(setter, List.class);
             m.invoke(object, items);
 
-        } catch (ClassNotFoundException | InvocationTargetException | NoSuchMethodException |
-                 IllegalAccessException e) {
+        } catch (ClassNotFoundException | InvocationTargetException | NoSuchMethodException
+                        | IllegalAccessException e) {
             throw new TikaConfigException("couldn't build class for " + name, e);
         }
     }
@@ -415,8 +407,8 @@ public abstract class ConfigBase {
 
     private static void tryToSetMap(Object object, Node param) throws TikaConfigException {
         String name = param.getLocalName();
-        //only supports string, string at this point
-        //use LinkedHashMap to keep insertion order!
+        // only supports string, string at this point
+        // use LinkedHashMap to keep insertion order!
         Map<String, String> map = new LinkedHashMap<>();
         NodeList nodeList = param.getChildNodes();
         for (int i = 0; i < nodeList.getLength(); i++) {
@@ -441,12 +433,12 @@ public abstract class ConfigBase {
                     value = m.getNamedItem("v").getTextContent();
                 }
                 if (key == null) {
-                    throw new TikaConfigException(
-                            "must specify a 'key' or 'from' value in a map " + "object : " + param);
+                    throw new TikaConfigException("must specify a 'key' or 'from' value in a map "
+                                    + "object : " + param);
                 }
                 if (value == null) {
-                    throw new TikaConfigException(
-                            "must specify a 'value' or 'to' value in a " + "map object : " + param);
+                    throw new TikaConfigException("must specify a 'value' or 'to' value in a "
+                                    + "map object : " + param);
                 }
                 map.put(key, value);
             }
@@ -467,11 +459,11 @@ public abstract class ConfigBase {
             Node n = nodeList.item(i);
             if (n.getNodeType() == 1) {
                 if (n.hasAttributes()) {
-                    if (n.getAttributes().getNamedItem("from") != null &&
-                            n.getAttributes().getNamedItem("to") != null) {
+                    if (n.getAttributes().getNamedItem("from") != null
+                                    && n.getAttributes().getNamedItem("to") != null) {
                         return true;
-                    } else if (n.getAttributes().getNamedItem("k") != null &&
-                            n.getAttributes().getNamedItem("v") != null) {
+                    } else if (n.getAttributes().getNamedItem("k") != null
+                                    && n.getAttributes().getNamedItem("v") != null) {
                         return true;
                     }
                 }
@@ -481,7 +473,7 @@ public abstract class ConfigBase {
     }
 
     private static void tryToSetPrimitive(Object object, SetterClassPair setterClassPair,
-                                          String value) throws TikaConfigException {
+                    String value) throws TikaConfigException {
         try {
             if (setterClassPair.itemClass == int.class) {
                 setterClassPair.setterMethod.invoke(object, Integer.parseInt(value));
@@ -503,13 +495,12 @@ public abstract class ConfigBase {
 
 
     /**
-     * This should be overridden to do something with the settings
-     * after loading the object.
+     * This should be overridden to do something with the settings after loading the object.
      *
      * @param settings
      */
     protected void handleSettings(Set<String> settings) {
-        //no-op
+        // no-op
     }
 
     /**
@@ -522,7 +513,7 @@ public abstract class ConfigBase {
      * @throws IOException
      */
     protected Set<String> configure(String nodeName, InputStream is)
-            throws TikaConfigException, IOException {
+                    throws TikaConfigException, IOException {
         Set<String> settings = new HashSet<>();
 
         Node properties = null;
@@ -559,8 +550,8 @@ public abstract class ConfigBase {
 
         @Override
         public String toString() {
-            return "SetterClassPair{" + "setterMethod=" + setterMethod + ", itemClass=" +
-                    itemClass + '}';
+            return "SetterClassPair{" + "setterMethod=" + setterMethod + ", itemClass=" + itemClass
+                            + '}';
         }
     }
 }
diff --git a/tika-core/src/main/java/org/apache/tika/config/Field.java b/tika-core/src/main/java/org/apache/tika/config/Field.java
index 403ad6dcd..660effd19 100644
--- a/tika-core/src/main/java/org/apache/tika/config/Field.java
+++ b/tika-core/src/main/java/org/apache/tika/config/Field.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.config;
 
@@ -23,9 +21,8 @@ import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
 /**
- * Field annotation is a contract for binding {@link Param} value from
- * Tika Configuration to an object.
- * services
+ * Field annotation is a contract for binding {@link Param} value from Tika Configuration to an
+ * object. services
  *
  * @since Apache Tika 1.14
  */
diff --git a/tika-core/src/main/java/org/apache/tika/config/Initializable.java b/tika-core/src/main/java/org/apache/tika/config/Initializable.java
index f37bdd909..8bca63f5b 100644
--- a/tika-core/src/main/java/org/apache/tika/config/Initializable.java
+++ b/tika-core/src/main/java/org/apache/tika/config/Initializable.java
@@ -1,34 +1,30 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.config;
 
 import java.util.Map;
-
 import org.apache.tika.exception.TikaConfigException;
 
 /**
- * Components that must do special processing across multiple fields
- * at initialization time should implement this interface.
+ * Components that must do special processing across multiple fields at initialization time should
+ * implement this interface.
  * <p>
- * TikaConfig will call initialize on Initializable classes after
- * setting the parameters for non-statically service loaded classes.
+ * TikaConfig will call initialize on Initializable classes after setting the parameters for
+ * non-statically service loaded classes.
  * <p>
- * TikaConfig will call checkInitialization on all Initializables,
- * whether loaded statically
+ * TikaConfig will call checkInitialization on all Initializables, whether loaded statically
  */
 public interface Initializable {
 
@@ -40,10 +36,8 @@ public interface Initializable {
 
 
     /**
-     * @param problemHandler if there is a problem and no
-     *                       custom initializableProblemHandler has been configured
-     *                       via Initializable parameters,
-     *                       this is called to respond.
+     * @param problemHandler if there is a problem and no custom initializableProblemHandler has
+     *        been configured via Initializable parameters, this is called to respond.
      * @throws TikaConfigException
      */
     void checkInitialization(InitializableProblemHandler problemHandler) throws TikaConfigException;
diff --git a/tika-core/src/main/java/org/apache/tika/config/InitializableProblemHandler.java b/tika-core/src/main/java/org/apache/tika/config/InitializableProblemHandler.java
index fdca6901c..ca8164fd5 100644
--- a/tika-core/src/main/java/org/apache/tika/config/InitializableProblemHandler.java
+++ b/tika-core/src/main/java/org/apache/tika/config/InitializableProblemHandler.java
@@ -1,30 +1,27 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.config;
 
 
-import org.slf4j.LoggerFactory;
-
 import org.apache.tika.exception.TikaConfigException;
+import org.slf4j.LoggerFactory;
 
 
 /**
- * This is to be used to handle potential recoverable problems that
- * might arise during initialization.
+ * This is to be used to handle potential recoverable problems that might arise during
+ * initialization.
  */
 public interface InitializableProblemHandler {
 
@@ -33,8 +30,7 @@ public interface InitializableProblemHandler {
      * Strategy that simply ignores all problems.
      */
     InitializableProblemHandler IGNORE = new InitializableProblemHandler() {
-        public void handleInitializableProblem(String className, String message) {
-        }
+        public void handleInitializableProblem(String className, String message) {}
 
         @Override
         public String toString() {
@@ -42,8 +38,8 @@ public interface InitializableProblemHandler {
         }
     };
     /**
-     * Strategy that logs warnings of all problems using a {@link org.slf4j.Logger}
-     * created using the given class name.
+     * Strategy that logs warnings of all problems using a {@link org.slf4j.Logger} created using
+     * the given class name.
      */
     InitializableProblemHandler INFO = new InitializableProblemHandler() {
         public void handleInitializableProblem(String classname, String message) {
@@ -56,8 +52,8 @@ public interface InitializableProblemHandler {
         }
     };
     /**
-     * Strategy that logs warnings of all problems using a {@link org.slf4j.Logger}
-     * created using the given class name.
+     * Strategy that logs warnings of all problems using a {@link org.slf4j.Logger} created using
+     * the given class name.
      */
     InitializableProblemHandler WARN = new InitializableProblemHandler() {
         public void handleInitializableProblem(String classname, String message) {
@@ -71,7 +67,7 @@ public interface InitializableProblemHandler {
     };
     InitializableProblemHandler THROW = new InitializableProblemHandler() {
         public void handleInitializableProblem(String classname, String message)
-                throws TikaConfigException {
+                        throws TikaConfigException {
             throw new TikaConfigException(message);
         }
 
diff --git a/tika-core/src/main/java/org/apache/tika/config/LoadErrorHandler.java b/tika-core/src/main/java/org/apache/tika/config/LoadErrorHandler.java
index 666c20d23..912806f26 100644
--- a/tika-core/src/main/java/org/apache/tika/config/LoadErrorHandler.java
+++ b/tika-core/src/main/java/org/apache/tika/config/LoadErrorHandler.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.config;
 
@@ -21,9 +19,8 @@ import org.slf4j.LoggerFactory;
 
 
 /**
- * Interface for error handling strategies in service class loading.
- * You can implement this interface for a custom error handling mechanism,
- * or use one of the predefined strategies.
+ * Interface for error handling strategies in service class loading. You can implement this
+ * interface for a custom error handling mechanism, or use one of the predefined strategies.
  *
  * @since Apache Tika 0.9
  */
@@ -33,8 +30,7 @@ public interface LoadErrorHandler {
      * Strategy that simply ignores all problems.
      */
     LoadErrorHandler IGNORE = new LoadErrorHandler() {
-        public void handleLoadError(String classname, Throwable throwable) {
-        }
+        public void handleLoadError(String classname, Throwable throwable) {}
 
         @Override
         public String toString() {
@@ -42,8 +38,8 @@ public interface LoadErrorHandler {
         }
     };
     /**
-     * Strategy that logs warnings of all problems using a {@link org.slf4j.Logger}
-     * created using the given class name.
+     * Strategy that logs warnings of all problems using a {@link org.slf4j.Logger} created using
+     * the given class name.
      */
     LoadErrorHandler WARN = new LoadErrorHandler() {
         public void handleLoadError(String classname, Throwable throwable) {
@@ -56,9 +52,8 @@ public interface LoadErrorHandler {
         }
     };
     /**
-     * Strategy that throws a {@link RuntimeException} with the given
-     * throwable as the root cause, thus interrupting the entire service
-     * loading operation.
+     * Strategy that throws a {@link RuntimeException} with the given throwable as the root cause,
+     * thus interrupting the entire service loading operation.
      */
     LoadErrorHandler THROW = new LoadErrorHandler() {
         public void handleLoadError(String classname, Throwable throwable) {
@@ -72,11 +67,10 @@ public interface LoadErrorHandler {
     };
 
     /**
-     * Handles a problem encountered when trying to load the specified
-     * service class. The implementation can log or otherwise process
-     * the given error information. If the method returns normally, then
-     * the service loader simply skips this class and continues with the
-     * next one.
+     * Handles a problem encountered when trying to load the specified service class. The
+     * implementation can log or otherwise process the given error information. If the method
+     * returns normally, then the service loader simply skips this class and continues with the next
+     * one.
      *
      * @param classname name of the service class
      * @param throwable the encountered problem
diff --git a/tika-core/src/main/java/org/apache/tika/config/Param.java b/tika-core/src/main/java/org/apache/tika/config/Param.java
index 853abb7ec..e0114c8d1 100644
--- a/tika-core/src/main/java/org/apache/tika/config/Param.java
+++ b/tika-core/src/main/java/org/apache/tika/config/Param.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.config;
 
@@ -37,24 +35,21 @@ import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerException;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
-
+import org.apache.tika.exception.TikaConfigException;
+import org.apache.tika.exception.TikaException;
+import org.apache.tika.parser.multiple.AbstractMultipleParser;
+import org.apache.tika.utils.XMLReaderUtils;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 import org.xml.sax.SAXException;
 
-import org.apache.tika.exception.TikaConfigException;
-import org.apache.tika.exception.TikaException;
-import org.apache.tika.parser.multiple.AbstractMultipleParser;
-import org.apache.tika.utils.XMLReaderUtils;
-
 
 /**
  * This is a serializable model class for parameters from configuration file.
  *
- * @param <T> value type. Should be serializable to string and have a constructor
- *            with string param
+ * @param <T> value type. Should be serializable to string and have a constructor with string param
  * @since Apache Tika 1.14
  */
 public class Param<T> implements Serializable {
@@ -87,15 +82,14 @@ public class Param<T> implements Serializable {
         wellKnownMap.put("metadataPolicy", AbstractMultipleParser.MetadataPolicy.class);
     }
 
-    //one of these two is used for serialization
+    // one of these two is used for serialization
     private final List<String> valueStrings = new ArrayList<>();
 
     private Class<T> type;
     private String name;
     private T actualValue;
 
-    public Param() {
-    }
+    public Param() {}
 
     public Param(String name, Class<T> type, T value) {
         this.name = name;
@@ -116,7 +110,7 @@ public class Param<T> implements Serializable {
     }
 
     public static <T> Param<T> load(InputStream stream)
-            throws SAXException, IOException, TikaException {
+                    throws SAXException, IOException, TikaException {
 
         DocumentBuilder db = XMLReaderUtils.getDocumentBuilder();
         Document document = db.parse(stream);
@@ -152,8 +146,8 @@ public class Param<T> implements Serializable {
             String type = typeAttr.getTextContent();
             if ("class".equals(type)) {
                 if (classAttr == null) {
-                    throw new TikaConfigException("must specify a class attribute if " +
-                            "type=\"class\"");
+                    throw new TikaConfigException(
+                                    "must specify a class attribute if " + "type=\"class\"");
                 }
                 ret.setType(clazz);
             } else {
@@ -176,7 +170,7 @@ public class Param<T> implements Serializable {
         } else if (Map.class.isAssignableFrom(ret.type)) {
             loadMap(ret, node);
         } else {
-            //allow the empty string
+            // allow the empty string
             String textContent = "";
             if (value != null) {
                 textContent = value.getTextContent();
@@ -186,12 +180,14 @@ public class Param<T> implements Serializable {
         }
         return ret;
     }
-    private static <T> void loadObject(Param<T> ret, Node root, Class clazz) throws TikaConfigException {
+
+    private static <T> void loadObject(Param<T> ret, Node root, Class clazz)
+                    throws TikaConfigException {
 
         try {
-            ret.actualValue = (T)clazz.getDeclaredConstructor().newInstance();
-        } catch (InstantiationException | IllegalAccessException | NoSuchMethodException |
-                 InvocationTargetException e) {
+            ret.actualValue = (T) clazz.getDeclaredConstructor().newInstance();
+        } catch (InstantiationException | IllegalAccessException | NoSuchMethodException
+                        | InvocationTargetException e) {
             throw new TikaConfigException("can't build class: " + clazz, e);
         }
 
@@ -205,19 +201,20 @@ public class Param<T> implements Serializable {
                         Param param = load(params.item(j));
 
                         Method method = null;
-                        String methodName = "set" +
-                                param.getName().substring(0,1).toUpperCase(Locale.US) +
-                                param.getName().substring(1);
+                        String methodName = "set"
+                                        + param.getName().substring(0, 1).toUpperCase(Locale.US)
+                                        + param.getName().substring(1);
                         try {
                             method = ret.actualValue.getClass().getMethod(methodName,
-                                    param.getType());
+                                            param.getType());
                         } catch (NoSuchMethodException e) {
                             throw new TikaConfigException("can't find method: " + methodName, e);
                         }
                         try {
                             method.invoke(ret.actualValue, param.getValue());
                         } catch (IllegalAccessException | InvocationTargetException e) {
-                            throw new TikaConfigException("can't set param value: " + param.getName(), e);
+                            throw new TikaConfigException(
+                                            "can't set param value: " + param.getName(), e);
                         }
                     }
                 }
@@ -243,10 +240,10 @@ public class Param<T> implements Serializable {
                     key = child.getLocalName();
                     value = child.getTextContent();
                 }
-                if (((Map)ret.actualValue).containsKey(key)) {
+                if (((Map) ret.actualValue).containsKey(key)) {
                     throw new TikaConfigException("Duplicate keys are not allowed: " + key);
                 }
-                ((Map)ret.actualValue).put(key, value);
+                ((Map) ret.actualValue).put(key, value);
             }
             child = child.getNextSibling();
         }
@@ -289,7 +286,7 @@ public class Param<T> implements Serializable {
             return constructor.newInstance(value);
         } catch (NoSuchMethodException e) {
             throw new RuntimeException(type + " doesnt have a constructor that takes String arg",
-                    e);
+                            e);
         } catch (IllegalAccessException | InstantiationException | InvocationTargetException e) {
             throw new RuntimeException(e);
         }
@@ -339,8 +336,8 @@ public class Param<T> implements Serializable {
 
     @Override
     public String toString() {
-        return "Param{" + "name='" + name + '\'' + ", valueStrings='" + valueStrings + '\'' +
-                ", actualValue=" + actualValue + '}';
+        return "Param{" + "name='" + name + '\'' + ", valueStrings='" + valueStrings + '\''
+                        + ", actualValue=" + actualValue + '}';
     }
 
     public void save(OutputStream stream) throws TransformerException, TikaException {
@@ -376,9 +373,9 @@ public class Param<T> implements Serializable {
                 el.appendChild(item);
             }
         } else if (Map.class.isAssignableFrom(actualValue.getClass())) {
-            for (Object key : ((Map)actualValue).keySet()) {
+            for (Object key : ((Map) actualValue).keySet()) {
                 String keyString = (String) key;
-                String valueString = (String)((Map)actualValue).get(keyString);
+                String valueString = (String) ((Map) actualValue).get(keyString);
                 Node item = doc.createElement(keyString);
                 item.setTextContent(valueString);
                 el.appendChild(item);
diff --git a/tika-core/src/main/java/org/apache/tika/config/ParamField.java b/tika-core/src/main/java/org/apache/tika/config/ParamField.java
index 15e977ae6..0978434f3 100644
--- a/tika-core/src/main/java/org/apache/tika/config/ParamField.java
+++ b/tika-core/src/main/java/org/apache/tika/config/ParamField.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.config;
 
@@ -22,12 +20,11 @@ import java.lang.reflect.Method;
 import java.util.HashMap;
 import java.util.Locale;
 import java.util.Map;
-
 import org.apache.tika.exception.TikaConfigException;
 
 /**
- * This class stores metdata for {@link Field} annotation are used to map them
- * to {@link Param} at runtime
+ * This class stores metdata for {@link Field} annotation are used to map them to {@link Param} at
+ * runtime
  *
  * @since Apache Tika 1.14
  */
@@ -35,18 +32,19 @@ public class ParamField {
 
     public static final String DEFAULT = "#default";
 
-    //NOTE: since (primitive type) is NOT AssignableFrom (BoxedType),
+    // NOTE: since (primitive type) is NOT AssignableFrom (BoxedType),
     // we just use boxed type for everything!
     // Example : short.class.isAssignableFrom(Short.class) ? false
-    private static final Map<Class<?>, Class<?>> PRIMITIVE_MAP =
-            new HashMap<Class<?>, Class<?>>() {{
-                    put(int.class, Integer.class);
-                    put(short.class, Short.class);
-                    put(boolean.class, Boolean.class);
-                    put(long.class, Long.class);
-                    put(float.class, Float.class);
-                    put(double.class, Double.class);
-                }};
+    private static final Map<Class<?>, Class<?>> PRIMITIVE_MAP = new HashMap<Class<?>, Class<?>>() {
+        {
+            put(int.class, Integer.class);
+            put(short.class, Short.class);
+            put(boolean.class, Boolean.class);
+            put(long.class, Long.class);
+            put(float.class, Float.class);
+            put(double.class, Double.class);
+        }
+    };
     private final String name;
     private final Class<?> type;
     private final boolean required;
@@ -94,13 +92,13 @@ public class ParamField {
     /**
      * Sets given value to the annotated field of bean
      *
-     * @param bean  bean with annotation for field
+     * @param bean bean with annotation for field
      * @param value value of field
-     * @throws IllegalAccessException    when it occurs
+     * @throws IllegalAccessException when it occurs
      * @throws InvocationTargetException when it occurs
      */
     public void assignValue(Object bean, Object value)
-            throws IllegalAccessException, InvocationTargetException {
+                    throws IllegalAccessException, InvocationTargetException {
         if (field != null) {
             field.set(bean, value);
         } else {
@@ -117,15 +115,15 @@ public class ParamField {
             if (params.length != 1) {
                 String msg = "Invalid setter method. Must have one and only one parameter. ";
                 if (setter.getName().startsWith("get")) {
-                    msg += "Perhaps the annotation is misplaced on " + setter.getName() +
-                            " while a set'X' is expected?";
+                    msg += "Perhaps the annotation is misplaced on " + setter.getName()
+                                    + " while a set'X' is expected?";
                 }
                 throw new TikaConfigException(msg);
             }
             type = params[0];
         }
         if (type.isPrimitive() && PRIMITIVE_MAP.containsKey(type)) {
-            type = PRIMITIVE_MAP.get(type); //primitive types have hard time
+            type = PRIMITIVE_MAP.get(type); // primitive types have hard time
         }
         return type;
     }
@@ -138,8 +136,8 @@ public class ParamField {
             } else {
                 String setterName = setter.getName();
                 if (setterName.startsWith("set") && setterName.length() > 3) {
-                    name = setterName.substring(3, 4).toLowerCase(Locale.ROOT) +
-                            setterName.substring(4);
+                    name = setterName.substring(3, 4).toLowerCase(Locale.ROOT)
+                                    + setterName.substring(4);
                 } else {
                     name = setter.getName();
                 }
@@ -152,7 +150,7 @@ public class ParamField {
 
     @Override
     public String toString() {
-        return "ParamField{" + "name='" + name + '\'' + ", type=" + type + ", required=" +
-                required + '}';
+        return "ParamField{" + "name='" + name + '\'' + ", type=" + type + ", required=" + required
+                        + '}';
     }
 }
diff --git a/tika-core/src/main/java/org/apache/tika/config/ServiceLoader.java b/tika-core/src/main/java/org/apache/tika/config/ServiceLoader.java
index acc53ca88..12b57fbc7 100644
--- a/tika-core/src/main/java/org/apache/tika/config/ServiceLoader.java
+++ b/tika-core/src/main/java/org/apache/tika/config/ServiceLoader.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.config;
 
@@ -33,7 +31,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.regex.Pattern;
-
 import org.apache.tika.exception.TikaConfigException;
 import org.apache.tika.utils.ServiceLoaderUtils;
 
@@ -45,17 +42,16 @@ import org.apache.tika.utils.ServiceLoaderUtils;
 public class ServiceLoader {
 
     /**
-     * The dynamic set of services available in an OSGi environment.
-     * Managed by the {@link TikaActivator} class and used as an additional
-     * source of service instances in the {@link #loadServiceProviders(Class)}
-     * method.
+     * The dynamic set of services available in an OSGi environment. Managed by the
+     * {@link TikaActivator} class and used as an additional source of service instances in the
+     * {@link #loadServiceProviders(Class)} method.
      */
     private static final Map<Object, RankedService> SERVICES = new HashMap<>();
     private static final Pattern COMMENT = Pattern.compile("#.*");
     private static final Pattern WHITESPACE = Pattern.compile("\\s+");
     /**
-     * The default context class loader to use for all threads, or
-     * <code>null</code> to automatically select the context class loader.
+     * The default context class loader to use for all threads, or <code>null</code> to
+     * automatically select the context class loader.
      */
     private static volatile ClassLoader CONTEXT_CLASS_LOADER = null;
     private final ClassLoader loader;
@@ -64,13 +60,14 @@ public class ServiceLoader {
     private final boolean dynamic;
 
     public ServiceLoader(ClassLoader loader, LoadErrorHandler handler,
-                         InitializableProblemHandler initializableProblemHandler, boolean dynamic) {
+                    InitializableProblemHandler initializableProblemHandler, boolean dynamic) {
         this.loader = loader;
         this.handler = handler;
         this.initializableProblemHandler = initializableProblemHandler;
         this.dynamic = dynamic;
 
     }
+
     public ServiceLoader(ClassLoader loader, LoadErrorHandler handler, boolean dynamic) {
         this(loader, handler, InitializableProblemHandler.WARN, dynamic);
     }
@@ -80,24 +77,24 @@ public class ServiceLoader {
     }
 
     public ServiceLoader(ClassLoader loader) {
-        this(loader,
-                Boolean.getBoolean("org.apache.tika.service.error.warn") ? LoadErrorHandler.WARN :
-                        LoadErrorHandler.IGNORE);
+        this(loader, Boolean.getBoolean("org.apache.tika.service.error.warn")
+                        ? LoadErrorHandler.WARN
+                        : LoadErrorHandler.IGNORE);
     }
 
     public ServiceLoader() {
         this(getContextClassLoader(),
-                Boolean.getBoolean("org.apache.tika.service.error.warn") ? LoadErrorHandler.WARN :
-                        LoadErrorHandler.IGNORE, true);
+                        Boolean.getBoolean("org.apache.tika.service.error.warn")
+                                        ? LoadErrorHandler.WARN
+                                        : LoadErrorHandler.IGNORE,
+                        true);
     }
 
     /**
-     * Returns the context class loader of the current thread. If such
-     * a class loader is not available, then the loader of this class or
-     * finally the system class loader is returned.
+     * Returns the context class loader of the current thread. If such a class loader is not
+     * available, then the loader of this class or finally the system class loader is returned.
      *
-     * @return context class loader, or <code>null</code> if no loader
-     * is available
+     * @return context class loader, or <code>null</code> if no loader is available
      * @see <a href="https://issues.apache.org/jira/browse/TIKA-441">TIKA-441</a>
      */
     static ClassLoader getContextClassLoader() {
@@ -112,12 +109,11 @@ public class ServiceLoader {
     }
 
     /**
-     * Sets the context class loader to use for all threads that access
-     * this class. Used for example in an OSGi environment to avoid problems
-     * with the default context class loader.
+     * Sets the context class loader to use for all threads that access this class. Used for example
+     * in an OSGi environment to avoid problems with the default context class loader.
      *
-     * @param loader default context class loader,
-     *               or <code>null</code> to automatically pick the loader
+     * @param loader default context class loader, or <code>null</code> to automatically pick the
+     *        loader
      */
     public static void setContextClassLoader(ClassLoader loader) {
         CONTEXT_CLASS_LOADER = loader;
@@ -166,8 +162,7 @@ public class ServiceLoader {
     }
 
     /**
-     * Returns an input stream for reading the specified resource from the
-     * configured class loader.
+     * Returns an input stream for reading the specified resource from the configured class loader.
      *
      * @param name resource name
      * @return input stream, or <code>null</code> if the resource was not found
@@ -192,24 +187,23 @@ public class ServiceLoader {
     }
 
     /**
-     * Loads and returns the named service class that's expected to implement
-     * the given interface.
+     * Loads and returns the named service class that's expected to implement the given interface.
      * <p>
      * Note that this class does not use the {@link LoadErrorHandler}, a
-     * {@link ClassNotFoundException} is always returned for unknown
-     * classes or classes of the wrong type
+     * {@link ClassNotFoundException} is always returned for unknown classes or classes of the wrong
+     * type
      *
      * @param iface service interface
-     * @param name  service class name
+     * @param name service class name
      * @return service class
-     * @throws ClassNotFoundException if the service class can not be found
-     *                                or does not implement the given interface
+     * @throws ClassNotFoundException if the service class can not be found or does not implement
+     *         the given interface
      * @see Class#forName(String, boolean, ClassLoader)
      * @since Apache Tika 1.1
      */
     @SuppressWarnings("unchecked")
     public <T> Class<? extends T> getServiceClass(Class<T> iface, String name)
-            throws ClassNotFoundException {
+                    throws ClassNotFoundException {
         if (loader == null) {
             throw new ClassNotFoundException("Service class " + name + " is not available");
         }
@@ -218,17 +212,15 @@ public class ServiceLoader {
             throw new ClassNotFoundException("Service class " + name + " is an interface");
         } else if (!iface.isAssignableFrom(klass)) {
             throw new ClassNotFoundException(
-                    "Service class " + name + " does not implement " + iface.getName());
+                            "Service class " + name + " does not implement " + iface.getName());
         } else {
             return (Class<? extends T>) klass;
         }
     }
 
     /**
-     * Returns all the available service resources matching the
-     * given pattern, such as all instances of tika-mimetypes.xml
-     * on the classpath, or all org.apache.tika.parser.Parser
-     * service files.
+     * Returns all the available service resources matching the given pattern, such as all instances
+     * of tika-mimetypes.xml on the classpath, or all org.apache.tika.parser.Parser service files.
      */
     public Enumeration<URL> findServiceResources(String filePattern) {
         try {
@@ -256,7 +248,7 @@ public class ServiceLoader {
         List<T> providers = new ArrayList<>();
         Set<String> seen = new HashSet<>();
         for (T provider : tmp) {
-            if (! seen.contains(provider.getClass().getCanonicalName())) {
+            if (!seen.contains(provider.getClass().getCanonicalName())) {
                 providers.add(provider);
                 seen.add(provider.getClass().getCanonicalName());
             }
@@ -265,9 +257,8 @@ public class ServiceLoader {
     }
 
     /**
-     * Returns the available dynamic service providers of the given type.
-     * The returned list is newly allocated and may be freely modified
-     * by the caller.
+     * Returns the available dynamic service providers of the given type. The returned list is newly
+     * allocated and may be freely modified by the caller.
      *
      * @param iface service provider interface
      * @return dynamic service providers
@@ -294,10 +285,9 @@ public class ServiceLoader {
     }
 
     /**
-     * Returns the defined static service providers of the given type, without
-     * attempting to load them.
-     * The providers are loaded using the service provider mechanism using
-     * the configured class loader (if any).
+     * Returns the defined static service providers of the given type, without attempting to load
+     * them. The providers are loaded using the service provider mechanism using the configured
+     * class loader (if any).
      *
      * @param iface service provider interface
      * @return static list of uninitialised service providers
@@ -326,19 +316,18 @@ public class ServiceLoader {
     }
 
     /**
-     * Returns the available static service providers of the given type.
-     * The providers are loaded using the service provider mechanism using
-     * the configured class loader (if any). The returned list is newly
-     * allocated and may be freely modified by the caller.
+     * Returns the available static service providers of the given type. The providers are loaded
+     * using the service provider mechanism using the configured class loader (if any). The returned
+     * list is newly allocated and may be freely modified by the caller.
      *
-     * @param iface    service provider interface
+     * @param iface service provider interface
      * @param excludes -- do not load these classes
      * @return static service providers
      * @since Apache Tika 1.2
      */
     @SuppressWarnings("unchecked")
     public <T> List<T> loadStaticServiceProviders(Class<T> iface,
-                                                  Collection<Class<? extends T>> excludes) {
+                    Collection<Class<? extends T>> excludes) {
         List<T> providers = new ArrayList<>();
 
         if (loader != null) {
@@ -359,13 +348,13 @@ public class ServiceLoader {
                             if (instance instanceof Initializable) {
                                 ((Initializable) instance).initialize(Collections.EMPTY_MAP);
                                 ((Initializable) instance)
-                                        .checkInitialization(initializableProblemHandler);
+                                                .checkInitialization(initializableProblemHandler);
                             }
                             providers.add(instance);
                         }
                     } else {
                         throw new TikaConfigException(
-                                "Class " + name + " is not of type: " + iface);
+                                        "Class " + name + " is not of type: " + iface);
                     }
                 } catch (Throwable t) {
                     handler.handleLoadError(name, t);
@@ -376,9 +365,10 @@ public class ServiceLoader {
     }
 
     private void collectServiceClassNames(URL resource, Collection<String> names)
-            throws IOException {
+                    throws IOException {
         try (InputStream stream = resource.openStream();
-                BufferedReader reader = new BufferedReader(new InputStreamReader(stream, UTF_8))) {
+                        BufferedReader reader =
+                                        new BufferedReader(new InputStreamReader(stream, UTF_8))) {
             String line = reader.readLine();
             while (line != null) {
                 line = COMMENT.matcher(line).replaceFirst("");
diff --git a/tika-core/src/main/java/org/apache/tika/config/TikaActivator.java b/tika-core/src/main/java/org/apache/tika/config/TikaActivator.java
index e076f1c2d..85304c441 100644
--- a/tika-core/src/main/java/org/apache/tika/config/TikaActivator.java
+++ b/tika-core/src/main/java/org/apache/tika/config/TikaActivator.java
@@ -1,21 +1,21 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.config;
 
+import org.apache.tika.detect.Detector;
+import org.apache.tika.parser.Parser;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;
@@ -23,17 +23,13 @@ import org.osgi.framework.ServiceReference;
 import org.osgi.util.tracker.ServiceTracker;
 import org.osgi.util.tracker.ServiceTrackerCustomizer;
 
-import org.apache.tika.detect.Detector;
-import org.apache.tika.parser.Parser;
-
 /**
- * Bundle activator that adjust the class loading mechanism of the
- * {@link ServiceLoader} class to work correctly in an OSGi environment.
+ * Bundle activator that adjust the class loading mechanism of the {@link ServiceLoader} class to
+ * work correctly in an OSGi environment.
  * <p>
- * Note that you should <strong>not</strong> access this class directly.
- * Instead the OSGi environment (if present) will automatically invoke the
- * methods of this class based on the Bundle-Activator setting in the bundle
- * manifest.
+ * Note that you should <strong>not</strong> access this class directly. Instead the OSGi
+ * environment (if present) will automatically invoke the methods of this class based on the
+ * Bundle-Activator setting in the bundle manifest.
  *
  * @since Apache Tika 0.9
  */
@@ -44,7 +40,7 @@ public class TikaActivator implements BundleActivator, ServiceTrackerCustomizer
     private ServiceTracker parserTracker;
 
     private BundleContext bundleContext;
-    //-----------------------------------------------------< BundleActivator >
+    // -----------------------------------------------------< BundleActivator >
 
     public void start(final BundleContext context) throws Exception {
         bundleContext = context;
@@ -73,8 +69,7 @@ public class TikaActivator implements BundleActivator, ServiceTrackerCustomizer
         return service;
     }
 
-    public void modifiedService(ServiceReference reference, Object service) {
-    }
+    public void modifiedService(ServiceReference reference, Object service) {}
 
     public void removedService(ServiceReference reference, Object service) {
         ServiceLoader.removeService(reference);
diff --git a/tika-core/src/main/java/org/apache/tika/config/TikaConfig.java b/tika-core/src/main/java/org/apache/tika/config/TikaConfig.java
index 14ff21b11..6ef790606 100644
--- a/tika-core/src/main/java/org/apache/tika/config/TikaConfig.java
+++ b/tika-core/src/main/java/org/apache/tika/config/TikaConfig.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.config;
 
@@ -41,15 +39,6 @@ import java.util.Set;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.atomic.AtomicInteger;
 import javax.imageio.spi.ServiceRegistry;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
-
 import org.apache.tika.concurrent.ConfigurableThreadPoolExecutor;
 import org.apache.tika.concurrent.SimpleThreadPoolExecutor;
 import org.apache.tika.detect.CompositeDetector;
@@ -85,16 +74,23 @@ import org.apache.tika.renderer.Renderer;
 import org.apache.tika.utils.AnnotationUtils;
 import org.apache.tika.utils.StringUtils;
 import org.apache.tika.utils.XMLReaderUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
 
 /**
  * Parse xml config file.
  */
 public class TikaConfig {
 
-    public static int DEFAULT_MAX_JSON_STRING_FIELD_LENGTH = 20_000_000;//jackson's default
+    public static int DEFAULT_MAX_JSON_STRING_FIELD_LENGTH = 20_000_000;// jackson's default
     public static String MAX_JSON_STRING_FIELD_LENGTH_ELEMENT_NAME = "maxJsonStringFieldLength";
 
-    //use this to look for unneeded instantiations of TikaConfig
+    // use this to look for unneeded instantiations of TikaConfig
     protected static final AtomicInteger TIMES_INSTANTIATED = new AtomicInteger();
 
     private static final Logger LOG = LoggerFactory.getLogger(TikaConfig.class);
@@ -114,10 +110,14 @@ public class TikaConfig {
 
     static {
         strategyMap.put("", InitializableProblemHandler.DEFAULT);
-        strategyMap.put(InitializableProblemHandler.IGNORE.toString(), InitializableProblemHandler.IGNORE);
-        strategyMap.put(InitializableProblemHandler.INFO.toString(), InitializableProblemHandler.INFO);
-        strategyMap.put(InitializableProblemHandler.WARN.toString(), InitializableProblemHandler.WARN);
-        strategyMap.put(InitializableProblemHandler.THROW.toString(), InitializableProblemHandler.THROW);
+        strategyMap.put(InitializableProblemHandler.IGNORE.toString(),
+                        InitializableProblemHandler.IGNORE);
+        strategyMap.put(InitializableProblemHandler.INFO.toString(),
+                        InitializableProblemHandler.INFO);
+        strategyMap.put(InitializableProblemHandler.WARN.toString(),
+                        InitializableProblemHandler.WARN);
+        strategyMap.put(InitializableProblemHandler.THROW.toString(),
+                        InitializableProblemHandler.THROW);
     }
 
     private static int MAX_JSON_STRING_FIELD_LENGTH = DEFAULT_MAX_JSON_STRING_FIELD_LENGTH;
@@ -131,26 +131,29 @@ public class TikaConfig {
     }
 
     public TikaConfig(Path path, ServiceLoader loader)
-            throws TikaException, IOException, SAXException {
+                    throws TikaException, IOException, SAXException {
         this(XMLReaderUtils.buildDOM(path), loader);
     }
 
     public TikaConfig(File file) throws TikaException, IOException, SAXException {
         this(XMLReaderUtils.buildDOM(file.toPath()));
     }
+
     public TikaConfig(File file, ServiceLoader loader)
-            throws TikaException, IOException, SAXException {
+                    throws TikaException, IOException, SAXException {
         this(XMLReaderUtils.buildDOM(file.toPath()), loader);
     }
+
     public TikaConfig(URL url) throws TikaException, IOException, SAXException {
         this(url, ServiceLoader.getContextClassLoader());
     }
+
     public TikaConfig(URL url, ClassLoader loader) throws TikaException, IOException, SAXException {
         this(XMLReaderUtils.buildDOM(url.toString()).getDocumentElement(), loader);
     }
 
     public TikaConfig(URL url, ServiceLoader loader)
-            throws TikaException, IOException, SAXException {
+                    throws TikaException, IOException, SAXException {
         this(XMLReaderUtils.buildDOM(url.toString()).getDocumentElement(), loader);
     }
 
@@ -199,15 +202,14 @@ public class TikaConfig {
     }
 
     /**
-     * Creates a Tika configuration from the built-in media type rules
-     * and all the {@link Parser} implementations available through the
-     * {@link ServiceRegistry service provider mechanism} in the given
-     * class loader.
+     * Creates a Tika configuration from the built-in media type rules and all the {@link Parser}
+     * implementations available through the {@link ServiceRegistry service provider mechanism} in
+     * the given class loader.
      *
-     * @param loader the class loader through which parser implementations
-     *               are loaded, or <code>null</code> for no parsers
+     * @param loader the class loader through which parser implementations are loaded, or
+     *        <code>null</code> for no parsers
      * @throws MimeTypeException if the built-in media type rules are broken
-     * @throws IOException       if the built-in media type rules can not be read
+     * @throws IOException if the built-in media type rules can not be read
      * @since Apache Tika 0.8
      */
     public TikaConfig(ClassLoader loader) throws MimeTypeException, IOException {
@@ -226,20 +228,22 @@ public class TikaConfig {
     }
 
     /**
-     * Creates a default Tika configuration.
-     * First checks whether an XML config file is specified, either in
+     * Creates a default Tika configuration. First checks whether an XML config file is specified,
+     * either in
      * <ol>
      * <li>System property "tika.config", or</li>
      * <li>Environment variable TIKA_CONFIG</li>
      * </ol>
-     * <p>If one of these have a value, try to resolve it relative to file
-     * system or classpath.</p>
-     * <p>If XML config is not specified, initialize from the built-in media
-     * type rules and all the {@link Parser} implementations available through
-     * the {@link ServiceRegistry service provider mechanism} in the context
-     * class loader of the current thread.</p>
+     * <p>
+     * If one of these have a value, try to resolve it relative to file system or classpath.
+     * </p>
+     * <p>
+     * If XML config is not specified, initialize from the built-in media type rules and all the
+     * {@link Parser} implementations available through the {@link ServiceRegistry service provider
+     * mechanism} in the context class loader of the current thread.
+     * </p>
      *
-     * @throws IOException   if the configuration can not be read
+     * @throws IOException if the configuration can not be read
      * @throws TikaException if problem with MimeTypes or parsing XML config
      */
     public TikaConfig() throws TikaException, IOException {
@@ -283,8 +287,8 @@ public class TikaConfig {
                 ExecutorServiceXmlLoader executorLoader = new ExecutorServiceXmlLoader();
 
                 this.mimeTypes = typesFromDomElement(element);
-                this.encodingDetector =
-                        encodingDetectorLoader.loadOverall(element, mimeTypes, serviceLoader);
+                this.encodingDetector = encodingDetectorLoader.loadOverall(element, mimeTypes,
+                                serviceLoader);
 
                 this.renderer = rendererLoader.loadOverall(element, mimeTypes, serviceLoader);
 
@@ -293,14 +297,14 @@ public class TikaConfig {
                 this.detector = detectorLoader.loadOverall(element, mimeTypes, serviceLoader);
                 this.translator = translatorLoader.loadOverall(element, mimeTypes, serviceLoader);
                 this.executorService =
-                        executorLoader.loadOverall(element, mimeTypes, serviceLoader);
+                                executorLoader.loadOverall(element, mimeTypes, serviceLoader);
                 this.metadataFilter = MetadataFilter.load(element, true);
                 this.metadataListFilter = MetadataListFilter.load(element, true);
                 this.autoDetectParserConfig = AutoDetectParserConfig.load(element);
                 setMaxJsonStringFieldLength(element);
             } catch (SAXException e) {
                 throw new TikaException("Specified Tika configuration has syntax errors: " + config,
-                        e);
+                                e);
             }
         }
         TIMES_INSTANTIATED.incrementAndGet();
@@ -309,7 +313,7 @@ public class TikaConfig {
     /**
      *
      * @return maximum field length when serializing String fields in Tika's metadata or metadata
-     * list into JSON
+     *         list into JSON
      */
     public static int getMaxJsonStringFieldLength() {
         return MAX_JSON_STRING_FIELD_LENGTH;
@@ -323,8 +327,8 @@ public class TikaConfig {
                 try {
                     MAX_JSON_STRING_FIELD_LENGTH = Integer.parseInt(n.getTextContent());
                 } catch (NumberFormatException e) {
-                    throw new TikaConfigException(MAX_JSON_STRING_FIELD_LENGTH_ELEMENT_NAME + " " +
-                            "is not an integer", e);
+                    throw new TikaConfigException(MAX_JSON_STRING_FIELD_LENGTH_ELEMENT_NAME + " "
+                                    + "is not an integer", e);
                 }
                 return;
             }
@@ -346,8 +350,9 @@ public class TikaConfig {
     protected static CompositeRenderer getDefaultRenderer(ServiceLoader loader) {
         return new CompositeRenderer(loader);
     }
+
     private static CompositeParser getDefaultParser(MimeTypes types, ServiceLoader loader,
-                                                    EncodingDetector encodingDetector, Renderer renderer) {
+                    EncodingDetector encodingDetector, Renderer renderer) {
         return new DefaultParser(types.getMediaTypeRegistry(), loader, encodingDetector, renderer);
     }
 
@@ -360,7 +365,7 @@ public class TikaConfig {
     }
 
     private static InputStream getConfigInputStream(String config, ServiceLoader serviceLoader)
-            throws TikaException, IOException {
+                    throws TikaException, IOException {
         InputStream stream = null;
         try {
             stream = new URI(config).toURL().openStream();
@@ -398,9 +403,9 @@ public class TikaConfig {
     }
 
     /**
-     * Provides a default configuration (TikaConfig).  Currently creates a
-     * new instance each time it's called; we may be able to have it
-     * return a shared instance once it is completely immutable.
+     * Provides a default configuration (TikaConfig). Currently creates a new instance each time
+     * it's called; we may be able to have it return a shared instance once it is completely
+     * immutable.
      *
      * @return default configuration
      */
@@ -426,15 +431,14 @@ public class TikaConfig {
     }
 
     private static List<Element> getTopLevelElementChildren(Element element, String parentName,
-                                                            String childrenName)
-            throws TikaException {
+                    String childrenName) throws TikaException {
         Node parentNode = null;
         if (parentName != null) {
             // Should be only zero or one <parsers> / <detectors> etc tag
             NodeList nodes = element.getElementsByTagName(parentName);
             if (nodes.getLength() > 1) {
                 throw new TikaException(
-                        "Properties may not contain multiple " + parentName + " entries");
+                                "Properties may not contain multiple " + parentName + " entries");
             } else if (nodes.getLength() == 1) {
                 parentNode = nodes.item(0);
             }
@@ -464,7 +468,7 @@ public class TikaConfig {
     }
 
     private static MimeTypes typesFromDomElement(Element element)
-            throws TikaException, IOException {
+                    throws TikaException, IOException {
         Element mtr = getChild(element, "mimeTypeRepository");
         if (mtr != null && mtr.hasAttribute("resource")) {
             return MimeTypesFactory.create(mtr.getAttribute("resource"));
@@ -474,7 +478,7 @@ public class TikaConfig {
     }
 
     private static Set<MediaType> mediaTypesListFromDomElement(Element node, String tag)
-            throws TikaException {
+                    throws TikaException {
         Set<MediaType> types = null;
         NodeList children = node.getChildNodes();
         for (int i = 0; i < children.getLength(); i++) {
@@ -502,7 +506,7 @@ public class TikaConfig {
     }
 
     private static ServiceLoader serviceLoaderFromDomElement(Element element, ClassLoader loader)
-            throws TikaConfigException {
+                    throws TikaConfigException {
         Element serviceLoaderElement = getChild(element, "service-loader");
         ServiceLoader serviceLoader;
 
@@ -516,14 +520,14 @@ public class TikaConfig {
                 loadErrorHandler = LoadErrorHandler.IGNORE;
             }
             InitializableProblemHandler initializableProblemHandler =
-                    getInitializableProblemHandler(
-                            serviceLoaderElement.getAttribute("initializableProblemHandler"));
+                            getInitializableProblemHandler(serviceLoaderElement
+                                            .getAttribute("initializableProblemHandler"));
 
             if (loader == null) {
                 loader = ServiceLoader.getContextClassLoader();
             }
             serviceLoader = new ServiceLoader(loader, loadErrorHandler, initializableProblemHandler,
-                    dynamic);
+                            dynamic);
         } else if (loader != null) {
             serviceLoader = new ServiceLoader(loader);
         } else {
@@ -535,34 +539,36 @@ public class TikaConfig {
     /**
      * Return an InitializableProblemHandler by name.
      *
-     * @param initializableProblemHandler can be empty, 'ignore', 'info', 'warn' or 'throw', but never null.
+     * @param initializableProblemHandler can be empty, 'ignore', 'info', 'warn' or 'throw', but
+     *        never null.
      * @return an InitializableProblemHandler
      * @throws TikaConfigException if invalid name
      */
     private static InitializableProblemHandler getInitializableProblemHandler(
-            String initializableProblemHandler) throws TikaConfigException {
-        InitializableProblemHandler handler = strategyMap.get(initializableProblemHandler.toUpperCase(Locale.US));
+                    String initializableProblemHandler) throws TikaConfigException {
+        InitializableProblemHandler handler =
+                        strategyMap.get(initializableProblemHandler.toUpperCase(Locale.US));
         if (handler != null) {
             return handler;
         }
         throw new TikaConfigException(String.format(Locale.US,
-                "Couldn't parse non-null '%s'. Must be one of 'ignore', 'info', 'warn' or 'throw'",
-                initializableProblemHandler));
+                        "Couldn't parse non-null '%s'. Must be one of 'ignore', 'info', 'warn' or 'throw'",
+                        initializableProblemHandler));
     }
 
     public static void mustNotBeEmpty(String paramName, String paramValue)
-            throws TikaConfigException {
+                    throws TikaConfigException {
         if (StringUtils.isBlank(paramValue)) {
             throw new IllegalArgumentException(
-                    "parameter '" + paramName + "' must be set in the config file");
+                            "parameter '" + paramName + "' must be set in the config file");
         }
     }
 
     public static void mustNotBeEmpty(String paramName, Path paramValue)
-            throws TikaConfigException {
+                    throws TikaConfigException {
         if (paramValue == null) {
             throw new IllegalArgumentException(
-                    "parameter '" + paramName + "' must be set in the config file");
+                            "parameter '" + paramName + "' must be set in the config file");
         }
     }
 
@@ -574,7 +580,8 @@ public class TikaConfig {
         }
 
         if (child.hasAttribute("maxEntityExpansions")) {
-            XMLReaderUtils.setMaxEntityExpansions(Integer.parseInt(child.getAttribute("maxEntityExpansions")));
+            XMLReaderUtils.setMaxEntityExpansions(
+                            Integer.parseInt(child.getAttribute("maxEntityExpansions")));
         }
 
         if (child.hasAttribute("maxNumReuses")) {
@@ -668,29 +675,30 @@ public class TikaConfig {
         abstract boolean isComposite(Class<? extends T> loadedClass);
 
         abstract T preLoadOne(Class<? extends T> loadedClass, String classname, MimeTypes mimeTypes)
-                throws TikaException;
+                        throws TikaException;
 
         abstract CT createDefault(MimeTypes mimeTypes, ServiceLoader loader);
 
         abstract CT createComposite(List<T> loaded, MimeTypes mimeTypes, ServiceLoader loader);
 
         abstract T createComposite(Class<? extends T> compositeClass, List<T> children,
-                                   Set<Class<? extends T>> excludeChildren,
-                                   Map<String, Param> params, MimeTypes mimeTypes,
-                                   ServiceLoader loader)
-                throws InvocationTargetException, IllegalAccessException, InstantiationException;
+                        Set<Class<? extends T>> excludeChildren, Map<String, Param> params,
+                        MimeTypes mimeTypes, ServiceLoader loader) throws InvocationTargetException,
+                        IllegalAccessException, InstantiationException;
 
-        abstract T decorate(T created, Element element)
-                throws IOException, TikaException; // eg explicit mime types
+        abstract T decorate(T created, Element element) throws IOException, TikaException; // eg
+                                                                                           // explicit
+                                                                                           // mime
+                                                                                           // types
 
         @SuppressWarnings("unchecked")
         CT loadOverall(Element element, MimeTypes mimeTypes, ServiceLoader loader)
-                throws TikaException, IOException {
+                        throws TikaException, IOException {
             List<T> loaded = new ArrayList<>();
 
             // Find the children of the parent tag, if any
             for (Element le : getTopLevelElementChildren(element, getParentTagName(),
-                    getLoaderTagName())) {
+                            getLoaderTagName())) {
                 T loadedChild = loadOne(le, mimeTypes, loader);
                 if (loadedChild != null) {
                     loaded.add(loadedChild);
@@ -708,16 +716,15 @@ public class TikaConfig {
                     return (CT) single;
                 }
             } else if (!supportsComposite()) {
-                throw new TikaConfigException(
-                        "Composite not supported for " + getParentTagName() +
-                                ". Must specify only one child!");
+                throw new TikaConfigException("Composite not supported for " + getParentTagName()
+                                + ". Must specify only one child!");
             }
             // Wrap the defined parsers/detectors up in a Composite
             return createComposite(loaded, mimeTypes, loader);
         }
 
         T loadOne(Element element, MimeTypes mimeTypes, ServiceLoader loader)
-                throws TikaException, IOException {
+                        throws TikaException, IOException {
             String name = element.getAttribute("class");
             if (name.isBlank()) {
                 throw new TikaConfigException("class attribute must not be empty: " + element);
@@ -736,7 +743,7 @@ public class TikaConfig {
                 Class<? extends T> loadedClass = loader.getServiceClass(getLoaderClass(), name);
 
                 // Do pre-load checks and short-circuits
-                //TODO : allow duplicate instances with different configurations
+                // TODO : allow duplicate instances with different configurations
                 loaded = preLoadOne(loadedClass, name, mimeTypes);
                 if (loaded != null) {
                     return loaded;
@@ -757,8 +764,8 @@ public class TikaConfig {
                     NodeList childNodes = element.getElementsByTagName(getLoaderTagName());
                     if (childNodes.getLength() > 0) {
                         for (int i = 0; i < childNodes.getLength(); i++) {
-                            T loadedChild =
-                                    loadOne((Element) childNodes.item(i), mimeTypes, loader);
+                            T loadedChild = loadOne((Element) childNodes.item(i), mimeTypes,
+                                            loader);
                             if (loadedChild != null) {
                                 children.add(loadedChild);
                             }
@@ -768,25 +775,25 @@ public class TikaConfig {
                     // Get the list of children to exclude
                     Set<Class<? extends T>> excludeChildren = new HashSet<>();
                     NodeList excludeChildNodes =
-                            element.getElementsByTagName(getLoaderTagName() + "-exclude");
+                                    element.getElementsByTagName(getLoaderTagName() + "-exclude");
                     if (excludeChildNodes.getLength() > 0) {
                         for (int i = 0; i < excludeChildNodes.getLength(); i++) {
                             Element excl = (Element) excludeChildNodes.item(i);
                             String exclName = excl.getAttribute("class");
                             try {
-                                excludeChildren
-                                        .add(loader.getServiceClass(getLoaderClass(), exclName));
+                                excludeChildren.add(
+                                                loader.getServiceClass(getLoaderClass(), exclName));
                             } catch (ClassNotFoundException e) {
-                                //TIKA-3268 -- This should stop the world.
+                                // TIKA-3268 -- This should stop the world.
                                 throw new TikaConfigException(
-                                        "Class not found in -exclude list: " + exclName);
+                                                "Class not found in -exclude list: " + exclName);
                             }
                         }
                     }
 
                     // Create the Composite
                     loaded = createComposite(loadedClass, children, excludeChildren, params,
-                            mimeTypes, loader);
+                                    mimeTypes, loader);
 
                     // Default constructor fallback
                     if (loaded == null) {
@@ -799,7 +806,7 @@ public class TikaConfig {
                     // See the thread "Configuring parsers and translators" for details
                 }
 
-                //Assigning the params to bean fields/setters
+                // Assigning the params to bean fields/setters
                 AnnotationUtils.assignFieldParams(loaded, params);
                 if (loaded instanceof Initializable) {
                     ((Initializable) loaded).initialize(params);
@@ -813,31 +820,31 @@ public class TikaConfig {
                 if (loader.getLoadErrorHandler() == LoadErrorHandler.THROW) {
                     // Use a different exception signature here
                     throw new TikaConfigException(
-                            "Unable to find a " + getLoaderTagName() + " class: " + name, e);
+                                    "Unable to find a " + getLoaderTagName() + " class: " + name,
+                                    e);
                 }
                 // Report the problem
                 loader.getLoadErrorHandler().handleLoadError(name, e);
                 return null;
             } catch (IllegalAccessException e) {
                 throw new TikaException(
-                        "Unable to access a " + getLoaderTagName() + " class: " + name, e);
+                                "Unable to access a " + getLoaderTagName() + " class: " + name, e);
             } catch (InvocationTargetException e) {
                 throw new TikaException(
-                        "Unable to create a " + getLoaderTagName() + " class: " + name, e);
+                                "Unable to create a " + getLoaderTagName() + " class: " + name, e);
             } catch (InstantiationException e) {
                 throw new TikaException(
-                        "Unable to instantiate a " + getLoaderTagName() + " class: " + name, e);
+                                "Unable to instantiate a " + getLoaderTagName() + " class: " + name,
+                                e);
             } catch (NoSuchMethodException e) {
-                throw new TikaException(
-                        "Unable to find the right constructor for " + getLoaderTagName() +
-                                " class: " + name, e);
+                throw new TikaException("Unable to find the right constructor for "
+                                + getLoaderTagName() + " class: " + name, e);
             }
         }
 
 
-        T newInstance(Class<? extends T> loadedClass)
-                throws IllegalAccessException, InstantiationException, NoSuchMethodException,
-                InvocationTargetException {
+        T newInstance(Class<? extends T> loadedClass) throws IllegalAccessException,
+                        InstantiationException, NoSuchMethodException, InvocationTargetException {
             return loadedClass.getDeclaredConstructor().newInstance();
         }
 
@@ -850,8 +857,8 @@ public class TikaConfig {
         Map<String, Param> getParams(Element el) throws TikaException {
             Map<String, Param> params = new HashMap<>();
             for (Node child = el.getFirstChild(); child != null; child = child.getNextSibling()) {
-                if (PARAMS_TAG_NAME.equals(child.getNodeName())) { //found the node
-                    if (child.hasChildNodes()) { //it has children
+                if (PARAMS_TAG_NAME.equals(child.getNodeName())) { // found the node
+                    if (child.hasChildNodes()) { // it has children
                         NodeList childNodes = child.getChildNodes();
                         for (int i = 0; i < childNodes.getLength(); i++) {
                             Node item = childNodes.item(i);
@@ -861,7 +868,7 @@ public class TikaConfig {
                             }
                         }
                     }
-                    break; //only the first one is used
+                    break; // only the first one is used
                 }
             }
             return params;
@@ -898,12 +905,12 @@ public class TikaConfig {
 
         @Override
         Parser preLoadOne(Class<? extends Parser> loadedClass, String classname,
-                          MimeTypes mimeTypes) throws TikaException {
+                        MimeTypes mimeTypes) throws TikaException {
             // Check for classes which can't be set in config
             if (AutoDetectParser.class.isAssignableFrom(loadedClass)) {
                 // https://issues.apache.org/jira/browse/TIKA-866
-                throw new TikaException("AutoDetectParser not supported in a <parser>" +
-                        " configuration element: " + classname);
+                throw new TikaException("AutoDetectParser not supported in a <parser>"
+                                + " configuration element: " + classname);
             }
             // Continue with normal loading
             return null;
@@ -916,9 +923,9 @@ public class TikaConfig {
 
         @Override
         boolean isComposite(Class<? extends Parser> loadedClass) {
-            return CompositeParser.class.isAssignableFrom(loadedClass) ||
-                    AbstractMultipleParser.class.isAssignableFrom(loadedClass) ||
-                    ParserDecorator.class.isAssignableFrom(loadedClass);
+            return CompositeParser.class.isAssignableFrom(loadedClass)
+                            || AbstractMultipleParser.class.isAssignableFrom(loadedClass)
+                            || ParserDecorator.class.isAssignableFrom(loadedClass);
         }
 
         @Override
@@ -928,16 +935,16 @@ public class TikaConfig {
 
         @Override
         CompositeParser createComposite(List<Parser> parsers, MimeTypes mimeTypes,
-                                        ServiceLoader loader) {
+                        ServiceLoader loader) {
             MediaTypeRegistry registry = mimeTypes.getMediaTypeRegistry();
             return new CompositeParser(registry, parsers);
         }
 
         @Override
         Parser createComposite(Class<? extends Parser> parserClass, List<Parser> childParsers,
-                               Set<Class<? extends Parser>> excludeParsers,
-                               Map<String, Param> params, MimeTypes mimeTypes, ServiceLoader loader)
-                throws InvocationTargetException, IllegalAccessException, InstantiationException {
+                        Set<Class<? extends Parser>> excludeParsers, Map<String, Param> params,
+                        MimeTypes mimeTypes, ServiceLoader loader) throws InvocationTargetException,
+                        IllegalAccessException, InstantiationException {
             Parser parser = null;
             Constructor<? extends Parser> c;
             MediaTypeRegistry registry = mimeTypes.getMediaTypeRegistry();
@@ -945,45 +952,46 @@ public class TikaConfig {
             // Try the possible default and composite parser constructors
             try {
                 c = parserClass.getConstructor(MediaTypeRegistry.class, ServiceLoader.class,
-                        Collection.class, EncodingDetector.class, Renderer.class);
-                parser = c.newInstance(registry, loader, excludeParsers, encodingDetector, renderer);
+                                Collection.class, EncodingDetector.class, Renderer.class);
+                parser = c.newInstance(registry, loader, excludeParsers, encodingDetector,
+                                renderer);
             } catch (NoSuchMethodException me) {
-                //swallow
+                // swallow
             }
             if (parser == null) {
                 try {
                     c = parserClass.getConstructor(MediaTypeRegistry.class, ServiceLoader.class,
-                            Collection.class, EncodingDetector.class);
+                                    Collection.class, EncodingDetector.class);
                     parser = c.newInstance(registry, loader, excludeParsers, encodingDetector);
                 } catch (NoSuchMethodException me) {
-                    //swallow
+                    // swallow
                 }
             }
             if (parser == null) {
                 try {
                     c = parserClass.getConstructor(MediaTypeRegistry.class, ServiceLoader.class,
-                            Collection.class);
+                                    Collection.class);
                     parser = c.newInstance(registry, loader, excludeParsers);
                 } catch (NoSuchMethodException me) {
-                    //swallow
+                    // swallow
                 }
             }
             if (parser == null) {
                 try {
-                    c = parserClass
-                            .getConstructor(MediaTypeRegistry.class, List.class, Collection.class);
+                    c = parserClass.getConstructor(MediaTypeRegistry.class, List.class,
+                                    Collection.class);
                     parser = c.newInstance(registry, childParsers, excludeParsers);
                 } catch (NoSuchMethodException me) {
-                    //swallow
+                    // swallow
                 }
             }
             if (parser == null) {
                 try {
-                    c = parserClass
-                            .getConstructor(MediaTypeRegistry.class, Collection.class, Map.class);
+                    c = parserClass.getConstructor(MediaTypeRegistry.class, Collection.class,
+                                    Map.class);
                     parser = c.newInstance(registry, childParsers, params);
                 } catch (NoSuchMethodException me) {
-                    //swallow
+                    // swallow
                 }
             }
             if (parser == null) {
@@ -991,7 +999,7 @@ public class TikaConfig {
                     c = parserClass.getConstructor(MediaTypeRegistry.class, List.class);
                     parser = c.newInstance(registry, childParsers);
                 } catch (NoSuchMethodException me) {
-                    //swallow
+                    // swallow
                 }
             }
 
@@ -999,8 +1007,8 @@ public class TikaConfig {
             if (parser == null && ParserDecorator.class.isAssignableFrom(parserClass)) {
                 try {
                     CompositeParser cp;
-                    if (childParsers.size() == 1 && excludeParsers.isEmpty() &&
-                            childParsers.get(0) instanceof CompositeParser) {
+                    if (childParsers.size() == 1 && excludeParsers.isEmpty()
+                                    && childParsers.get(0) instanceof CompositeParser) {
                         cp = (CompositeParser) childParsers.get(0);
                     } else {
                         cp = new CompositeParser(registry, childParsers, excludeParsers);
@@ -1008,16 +1016,15 @@ public class TikaConfig {
                     c = parserClass.getConstructor(Parser.class);
                     parser = c.newInstance(cp);
                 } catch (NoSuchMethodException me) {
-                    //swallow
+                    // swallow
                 }
             }
             return parser;
         }
 
         @Override
-        Parser newInstance(Class<? extends Parser> loadedClass)
-                throws IllegalAccessException, InstantiationException, NoSuchMethodException,
-                InvocationTargetException {
+        Parser newInstance(Class<? extends Parser> loadedClass) throws IllegalAccessException,
+                        InstantiationException, NoSuchMethodException, InvocationTargetException {
             Parser parser;
             if (AbstractEncodingDetectorParser.class.isAssignableFrom(loadedClass)) {
                 Constructor ctor = loadedClass.getConstructor(EncodingDetector.class);
@@ -1027,7 +1034,7 @@ public class TikaConfig {
             }
 
             if (parser instanceof RenderingParser) {
-                ((RenderingParser)parser).setRenderer(renderer);
+                ((RenderingParser) parser).setRenderer(renderer);
             }
             return parser;
         }
@@ -1073,9 +1080,9 @@ public class TikaConfig {
 
         @Override
         Detector preLoadOne(Class<? extends Detector> loadedClass, String classname,
-                            MimeTypes mimeTypes) {
+                        MimeTypes mimeTypes) {
             // If they asked for the mime types as a detector, give
-            //  them the one we've already created. TIKA-1708
+            // them the one we've already created. TIKA-1708
             if (MimeTypes.class.equals(loadedClass)) {
                 return mimeTypes;
             }
@@ -1100,18 +1107,17 @@ public class TikaConfig {
 
         @Override
         CompositeDetector createComposite(List<Detector> detectors, MimeTypes mimeTypes,
-                                          ServiceLoader loader) {
+                        ServiceLoader loader) {
             MediaTypeRegistry registry = mimeTypes.getMediaTypeRegistry();
             return new CompositeDetector(registry, detectors);
         }
 
         @Override
         Detector createComposite(Class<? extends Detector> detectorClass,
-                                 List<Detector> childDetectors,
-                                 Set<Class<? extends Detector>> excludeDetectors,
-                                 Map<String, Param> params, MimeTypes mimeTypes,
-                                 ServiceLoader loader)
-                throws InvocationTargetException, IllegalAccessException, InstantiationException {
+                        List<Detector> childDetectors,
+                        Set<Class<? extends Detector>> excludeDetectors, Map<String, Param> params,
+                        MimeTypes mimeTypes, ServiceLoader loader) throws InvocationTargetException,
+                        IllegalAccessException, InstantiationException {
             Detector detector = null;
             Constructor<? extends Detector> c;
             MediaTypeRegistry registry = mimeTypes.getMediaTypeRegistry();
@@ -1119,20 +1125,20 @@ public class TikaConfig {
             // Try the possible default and composite detector constructors
             if (detector == null) {
                 try {
-                    c = detectorClass
-                            .getConstructor(MimeTypes.class, ServiceLoader.class, Collection.class);
+                    c = detectorClass.getConstructor(MimeTypes.class, ServiceLoader.class,
+                                    Collection.class);
                     detector = c.newInstance(mimeTypes, loader, excludeDetectors);
                 } catch (NoSuchMethodException me) {
-                    //swallow
+                    // swallow
                 }
             }
             if (detector == null) {
                 try {
-                    c = detectorClass
-                            .getConstructor(MediaTypeRegistry.class, List.class, Collection.class);
+                    c = detectorClass.getConstructor(MediaTypeRegistry.class, List.class,
+                                    Collection.class);
                     detector = c.newInstance(registry, childDetectors, excludeDetectors);
                 } catch (NoSuchMethodException me) {
-                    //swallow
+                    // swallow
                 }
             }
             if (detector == null) {
@@ -1140,7 +1146,7 @@ public class TikaConfig {
                     c = detectorClass.getConstructor(MediaTypeRegistry.class, List.class);
                     detector = c.newInstance(registry, childDetectors);
                 } catch (NoSuchMethodException me) {
-                    //swallow
+                    // swallow
                 }
             }
             if (detector == null) {
@@ -1148,7 +1154,7 @@ public class TikaConfig {
                     c = detectorClass.getConstructor(List.class);
                     detector = c.newInstance(childDetectors);
                 } catch (NoSuchMethodException me) {
-                    //swallow
+                    // swallow
                 }
             }
 
@@ -1181,7 +1187,7 @@ public class TikaConfig {
 
         @Override
         Translator preLoadOne(Class<? extends Translator> loadedClass, String classname,
-                              MimeTypes mimeTypes) {
+                        MimeTypes mimeTypes) {
             // Continue with normal loading
             return null;
         }
@@ -1203,17 +1209,15 @@ public class TikaConfig {
 
         @Override
         Translator createComposite(List<Translator> loaded, MimeTypes mimeTypes,
-                                   ServiceLoader loader) {
+                        ServiceLoader loader) {
             return loaded.get(0);
         }
 
         @Override
         Translator createComposite(Class<? extends Translator> compositeClass,
-                                   List<Translator> children,
-                                   Set<Class<? extends Translator>> excludeChildren,
-                                   Map<String, Param> params, MimeTypes mimeTypes,
-                                   ServiceLoader loader)
-                throws InstantiationException {
+                        List<Translator> children, Set<Class<? extends Translator>> excludeChildren,
+                        Map<String, Param> params, MimeTypes mimeTypes, ServiceLoader loader)
+                        throws InstantiationException {
             throw new InstantiationException("Only one translator supported");
         }
 
@@ -1223,21 +1227,21 @@ public class TikaConfig {
         }
     }
 
-    private static class ExecutorServiceXmlLoader
-            extends XmlLoader<ConfigurableThreadPoolExecutor, ConfigurableThreadPoolExecutor> {
+    private static class ExecutorServiceXmlLoader extends
+                    XmlLoader<ConfigurableThreadPoolExecutor, ConfigurableThreadPoolExecutor> {
         @Override
         ConfigurableThreadPoolExecutor createComposite(
-                Class<? extends ConfigurableThreadPoolExecutor> compositeClass,
-                List<ConfigurableThreadPoolExecutor> children,
-                Set<Class<? extends ConfigurableThreadPoolExecutor>> excludeChildren,
-                Map<String, Param> params, MimeTypes mimeTypes, ServiceLoader loader)
-                throws InstantiationException {
+                        Class<? extends ConfigurableThreadPoolExecutor> compositeClass,
+                        List<ConfigurableThreadPoolExecutor> children,
+                        Set<Class<? extends ConfigurableThreadPoolExecutor>> excludeChildren,
+                        Map<String, Param> params, MimeTypes mimeTypes, ServiceLoader loader)
+                        throws InstantiationException {
             throw new InstantiationException("Only one executor service supported");
         }
 
         @Override
         ConfigurableThreadPoolExecutor createComposite(List<ConfigurableThreadPoolExecutor> loaded,
-                                                       MimeTypes mimeTypes, ServiceLoader loader) {
+                        MimeTypes mimeTypes, ServiceLoader loader) {
             return loaded.get(0);
         }
 
@@ -1248,7 +1252,7 @@ public class TikaConfig {
 
         @Override
         ConfigurableThreadPoolExecutor decorate(ConfigurableThreadPoolExecutor created,
-                                                Element element) {
+                        Element element) {
 
             Element maxThreadElement = getChild(element, "max-threads");
             if (maxThreadElement != null) {
@@ -1269,8 +1273,7 @@ public class TikaConfig {
 
         @Override
         ConfigurableThreadPoolExecutor loadOne(Element element, MimeTypes mimeTypes,
-                                               ServiceLoader loader)
-                throws TikaException, IOException {
+                        ServiceLoader loader) throws TikaException, IOException {
             return super.loadOne(element, mimeTypes, loader);
         }
 
@@ -1301,14 +1304,14 @@ public class TikaConfig {
 
         @Override
         ConfigurableThreadPoolExecutor preLoadOne(
-                Class<? extends ConfigurableThreadPoolExecutor> loadedClass, String classname,
-                MimeTypes mimeTypes) {
+                        Class<? extends ConfigurableThreadPoolExecutor> loadedClass,
+                        String classname, MimeTypes mimeTypes) {
             return null;
         }
     }
 
     private static class EncodingDetectorXmlLoader
-            extends XmlLoader<EncodingDetector, EncodingDetector> {
+                    extends XmlLoader<EncodingDetector, EncodingDetector> {
 
         boolean supportsComposite() {
             return true;
@@ -1340,7 +1343,7 @@ public class TikaConfig {
 
         @Override
         EncodingDetector preLoadOne(Class<? extends EncodingDetector> loadedClass, String classname,
-                                    MimeTypes mimeTypes) {
+                        MimeTypes mimeTypes) {
             // Check for classes which can't be set in config
             // Continue with normal loading
             return null;
@@ -1353,17 +1356,17 @@ public class TikaConfig {
 
         @Override
         CompositeEncodingDetector createComposite(List<EncodingDetector> encodingDetectors,
-                                                  MimeTypes mimeTypes, ServiceLoader loader) {
+                        MimeTypes mimeTypes, ServiceLoader loader) {
             return new CompositeEncodingDetector(encodingDetectors);
         }
 
         @Override
         EncodingDetector createComposite(Class<? extends EncodingDetector> encodingDetectorClass,
-                                         List<EncodingDetector> childEncodingDetectors,
-                                         Set<Class<? extends EncodingDetector>> excludeDetectors,
-                                         Map<String, Param> params, MimeTypes mimeTypes,
-                                         ServiceLoader loader)
-                throws InvocationTargetException, IllegalAccessException, InstantiationException {
+                        List<EncodingDetector> childEncodingDetectors,
+                        Set<Class<? extends EncodingDetector>> excludeDetectors,
+                        Map<String, Param> params, MimeTypes mimeTypes, ServiceLoader loader)
+                        throws InvocationTargetException, IllegalAccessException,
+                        InstantiationException {
             EncodingDetector encodingDetector = null;
             Constructor<? extends EncodingDetector> c;
 
@@ -1374,7 +1377,7 @@ public class TikaConfig {
                     encodingDetector = c.newInstance(loader, excludeDetectors);
                 } catch (NoSuchMethodException me) {
                     LOG.debug("couldn't find constructor for service loader + collection for {}",
-                            encodingDetectorClass);
+                                    encodingDetectorClass);
                 }
             }
             if (encodingDetector == null) {
@@ -1383,7 +1386,7 @@ public class TikaConfig {
                     encodingDetector = c.newInstance(childEncodingDetectors);
                 } catch (NoSuchMethodException me) {
                     LOG.debug("couldn't find constructor for EncodingDetector(List) for {}",
-                            encodingDetectorClass);
+                                    encodingDetectorClass);
                 }
             }
 
@@ -1396,8 +1399,7 @@ public class TikaConfig {
         }
     }
 
-    private static class RendererXmlLoader
-            extends XmlLoader<Renderer, Renderer> {
+    private static class RendererXmlLoader extends XmlLoader<Renderer, Renderer> {
 
         boolean supportsComposite() {
             return true;
@@ -1429,7 +1431,7 @@ public class TikaConfig {
 
         @Override
         Renderer preLoadOne(Class<? extends Renderer> loadedClass, String classname,
-                                    MimeTypes mimeTypes) {
+                        MimeTypes mimeTypes) {
             // Check for classes which can't be set in config
             // Continue with normal loading
             return null;
@@ -1441,18 +1443,17 @@ public class TikaConfig {
         }
 
         @Override
-        Renderer createComposite(List<Renderer> renderers,
-                                                  MimeTypes mimeTypes, ServiceLoader loader) {
+        Renderer createComposite(List<Renderer> renderers, MimeTypes mimeTypes,
+                        ServiceLoader loader) {
             return new CompositeRenderer(renderers);
         }
 
         @Override
         Renderer createComposite(Class<? extends Renderer> rendererClass,
-                                         List<Renderer> childRenderers,
-                                         Set<Class<? extends Renderer>> excludeRenderers,
-                                         Map<String, Param> params, MimeTypes mimeTypes,
-                                         ServiceLoader loader)
-                throws InvocationTargetException, IllegalAccessException, InstantiationException {
+                        List<Renderer> childRenderers,
+                        Set<Class<? extends Renderer>> excludeRenderers, Map<String, Param> params,
+                        MimeTypes mimeTypes, ServiceLoader loader) throws InvocationTargetException,
+                        IllegalAccessException, InstantiationException {
             Renderer renderer = null;
             Constructor<? extends Renderer> c;
 
@@ -1463,7 +1464,7 @@ public class TikaConfig {
                     renderer = c.newInstance(loader, excludeRenderers);
                 } catch (NoSuchMethodException me) {
                     LOG.debug("couldn't find constructor for service loader + collection for {}",
-                            renderer);
+                                    renderer);
                 }
             }
             if (renderer == null) {
@@ -1471,8 +1472,7 @@ public class TikaConfig {
                     c = rendererClass.getConstructor(List.class);
                     renderer = c.newInstance(childRenderers);
                 } catch (NoSuchMethodException me) {
-                    LOG.debug("couldn't find constructor for Renderer(List) for {}",
-                            rendererClass);
+                    LOG.debug("couldn't find constructor for Renderer(List) for {}", rendererClass);
                 }
             }
             return renderer;
diff --git a/tika-core/src/main/java/org/apache/tika/config/TikaConfigSerializer.java b/tika-core/src/main/java/org/apache/tika/config/TikaConfigSerializer.java
index a2313f408..283508b0e 100644
--- a/tika-core/src/main/java/org/apache/tika/config/TikaConfigSerializer.java
+++ b/tika-core/src/main/java/org/apache/tika/config/TikaConfigSerializer.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.config;
 
@@ -39,13 +37,6 @@ import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
 import org.apache.tika.detect.CompositeDetector;
 import org.apache.tika.detect.CompositeEncodingDetector;
 import org.apache.tika.detect.DefaultDetector;
@@ -63,6 +54,11 @@ import org.apache.tika.parser.ParserDecorator;
 import org.apache.tika.parser.multiple.AbstractMultipleParser;
 import org.apache.tika.utils.StringUtils;
 import org.apache.tika.utils.XMLReaderUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
 
 public class TikaConfigSerializer {
 
@@ -86,14 +82,14 @@ public class TikaConfigSerializer {
     }
 
     /**
-     * @param config  config to serialize
-     * @param mode    serialization mode
-     * @param writer  writer
+     * @param config config to serialize
+     * @param mode serialization mode
+     * @param writer writer
      * @param charset charset
      * @throws Exception
      */
     public static void serialize(TikaConfig config, Mode mode, Writer writer, Charset charset)
-            throws Exception {
+                    throws Exception {
         DocumentBuilder docBuilder = XMLReaderUtils.getDocumentBuilder();
 
         // root elements
@@ -122,7 +118,7 @@ public class TikaConfigSerializer {
     }
 
     private static void addExecutorService(Mode mode, Element rootElement, Document doc,
-                                           TikaConfig config) {
+                    TikaConfig config) {
         ExecutorService executor = config.getExecutorService();
 
         // TODO Implement the reverse of ExecutorServiceXmlLoader
@@ -131,7 +127,7 @@ public class TikaConfigSerializer {
     }
 
     private static void addServiceLoader(Mode mode, Element rootElement, Document doc,
-                                         TikaConfig config) {
+                    TikaConfig config) {
         ServiceLoader loader = config.getServiceLoader();
 
         if (mode == Mode.MINIMAL) {
@@ -149,17 +145,17 @@ public class TikaConfigSerializer {
     }
 
     private static void addTranslator(Mode mode, Element rootElement, Document doc,
-                                      TikaConfig config) {
+                    TikaConfig config) {
         // Unlike the other entries, TikaConfig only wants one of
-        //  these, and no outer <translators> list
+        // these, and no outer <translators> list
         Translator translator = config.getTranslator();
         if (mode == Mode.MINIMAL && translator instanceof DefaultTranslator) {
-            Node mimeComment = doc.createComment("for example: <translator " +
-                    "class=\"org.apache.tika.language.translate.GoogleTranslator\"/>");
+            Node mimeComment = doc.createComment("for example: <translator "
+                            + "class=\"org.apache.tika.language.translate.GoogleTranslator\"/>");
             rootElement.appendChild(mimeComment);
         } else {
-            if (translator instanceof DefaultTranslator &&
-                    (mode == Mode.STATIC || mode == Mode.STATIC_FULL)) {
+            if (translator instanceof DefaultTranslator
+                            && (mode == Mode.STATIC || mode == Mode.STATIC_FULL)) {
                 translator = ((DefaultTranslator) translator).getTranslator();
             }
             if (translator != null) {
@@ -173,34 +169,34 @@ public class TikaConfigSerializer {
     }
 
     private static void addMimeComment(Mode mode, Element rootElement, Document doc) {
-        Node mimeComment = doc.createComment("for example: <mimeTypeRepository " +
-                "resource=\"/org/apache/tika/mime/tika-mimetypes.xml\"/>");
+        Node mimeComment = doc.createComment("for example: <mimeTypeRepository "
+                        + "resource=\"/org/apache/tika/mime/tika-mimetypes.xml\"/>");
         rootElement.appendChild(mimeComment);
     }
 
     private static void addEncodingDetectors(Mode mode, Element rootElement, Document doc,
-                                             TikaConfig config) throws Exception {
+                    TikaConfig config) throws Exception {
         EncodingDetector encDetector = config.getEncodingDetector();
 
         if (mode == Mode.MINIMAL && encDetector instanceof DefaultEncodingDetector) {
             // Don't output anything, all using defaults
             Node detComment = doc.createComment(
-                    "for example: <encodingDetectors><encodingDetector class=\"" +
-                            "org.apache.tika.detect.DefaultEncodingDetector\">" +
-                            "</encodingDetectors>");
+                            "for example: <encodingDetectors><encodingDetector class=\""
+                                            + "org.apache.tika.detect.DefaultEncodingDetector\">"
+                                            + "</encodingDetectors>");
             rootElement.appendChild(detComment);
             return;
         }
 
         Element encDetectorsElement = doc.createElement("encodingDetectors");
-        if (mode == Mode.CURRENT && encDetector instanceof DefaultEncodingDetector ||
-                !(encDetector instanceof CompositeEncodingDetector)) {
+        if (mode == Mode.CURRENT && encDetector instanceof DefaultEncodingDetector
+                        || !(encDetector instanceof CompositeEncodingDetector)) {
             Element encDetectorElement = doc.createElement("encodingDetector");
             encDetectorElement.setAttribute("class", encDetector.getClass().getCanonicalName());
             encDetectorsElement.appendChild(encDetectorElement);
         } else {
             List<EncodingDetector> children =
-                    ((CompositeEncodingDetector) encDetector).getDetectors();
+                            ((CompositeEncodingDetector) encDetector).getDetectors();
             for (EncodingDetector d : children) {
                 Element encDetectorElement = doc.createElement("encodingDetector");
                 encDetectorElement.setAttribute("class", d.getClass().getCanonicalName());
@@ -213,20 +209,20 @@ public class TikaConfigSerializer {
     }
 
     private static void addDetectors(Mode mode, Element rootElement, Document doc,
-                                     TikaConfig config) throws Exception {
+                    TikaConfig config) throws Exception {
         Detector detector = config.getDetector();
 
         if (mode == Mode.MINIMAL && detector instanceof DefaultDetector) {
             // Don't output anything, all using defaults
-            Node detComment = doc.createComment("for example: <detectors><detector " +
-                    "class=\"org.apache.tika.detector.MimeTypes\"></detectors>");
+            Node detComment = doc.createComment("for example: <detectors><detector "
+                            + "class=\"org.apache.tika.detector.MimeTypes\"></detectors>");
             rootElement.appendChild(detComment);
             return;
         }
 
         Element detectorsElement = doc.createElement("detectors");
-        if (mode == Mode.CURRENT && detector instanceof DefaultDetector ||
-                !(detector instanceof CompositeDetector)) {
+        if (mode == Mode.CURRENT && detector instanceof DefaultDetector
+                        || !(detector instanceof CompositeDetector)) {
             Element detectorElement = doc.createElement("detector");
             detectorElement.setAttribute("class", detector.getClass().getCanonicalName());
             detectorsElement.appendChild(detectorElement);
@@ -243,7 +239,7 @@ public class TikaConfigSerializer {
     }
 
     private static void addParsers(Mode mode, Element rootElement, Document doc, TikaConfig config)
-            throws Exception {
+                    throws Exception {
         Parser parser = config.getParser();
         if (mode == Mode.MINIMAL && parser instanceof DefaultParser) {
             // Don't output anything, all using defaults
@@ -259,7 +255,7 @@ public class TikaConfigSerializer {
     }
 
     private static void addParser(Mode mode, Element rootElement, Document doc, Parser parser)
-            throws Exception {
+                    throws Exception {
         // If the parser is decorated, is it a kind where we output the parser inside?
         ParserDecorator decoration = null;
         if (parser instanceof ParserDecorator) {
@@ -280,8 +276,8 @@ public class TikaConfigSerializer {
                 outputParser = false;
             }
             // Special case for making Default to static
-            if (parser instanceof DefaultParser &&
-                    (mode == Mode.STATIC || mode == Mode.STATIC_FULL)) {
+            if (parser instanceof DefaultParser
+                            && (mode == Mode.STATIC || mode == Mode.STATIC_FULL)) {
                 outputParser = false;
             }
         } else if (parser instanceof AbstractMultipleParser) {
@@ -299,7 +295,7 @@ public class TikaConfigSerializer {
     }
 
     private static Element addParser(Mode mode, Element rootElement, Document doc, Parser parser,
-                                     ParserDecorator decorator) throws Exception {
+                    ParserDecorator decorator) throws Exception {
         ParseContext context = new ParseContext();
 
         Set<MediaType> addedTypes = new TreeSet<>();
@@ -343,7 +339,7 @@ public class TikaConfigSerializer {
         Matcher setterMatcher = Pattern.compile("\\Aset([A-Z].*)").matcher("");
         Matcher getterMatcher = Pattern.compile("\\A(?:get|is)([A-Z].+)\\Z").matcher("");
 
-        //TODO -- check code base for setters with lowercase initial letters?!
+        // TODO -- check code base for setters with lowercase initial letters?!
         MethodTuples nonPrimitiveSetters = new MethodTuples();
         MethodTuples primitiveSetters = new MethodTuples();
         MethodTuples nonPrimitiveGetters = new MethodTuples();
@@ -353,18 +349,19 @@ public class TikaConfigSerializer {
 
             if (setterMatcher.reset(method.getName()).find()) {
                 if (!Modifier.isPublic(method.getModifiers())) {
-                    //we could just call getMethods, but this can be helpful debugging inf
+                    // we could just call getMethods, but this can be helpful debugging inf
                     LOG.trace("inaccessible setter: {} in {}", method.getName(), object.getClass());
                     continue;
                 }
-                //require @Field on setters
+                // require @Field on setters
                 if (method.getAnnotation(Field.class) == null) {
-                   // LOG.warn("unannotated setter {} in {}", method.getName(), object.getClass());
+                    // LOG.warn("unannotated setter {} in {}", method.getName(), object.getClass());
                     continue;
                 }
                 if (parameterTypes.length != 1) {
-                    //TODO -- check code base for setX() zero parameters that set boolean to true
-                    LOG.warn("setter with wrong number of params " + method.getName() + " " + parameterTypes.length);
+                    // TODO -- check code base for setX() zero parameters that set boolean to true
+                    LOG.warn("setter with wrong number of params " + method.getName() + " "
+                                    + parameterTypes.length);
                     continue;
                 }
                 String paramName = methodToParamName(setterMatcher.group(1));
@@ -375,20 +372,22 @@ public class TikaConfigSerializer {
                 }
             } else if (getterMatcher.reset(method.getName()).find()) {
                 if (parameterTypes.length != 0) {
-                    //require 0 parameters for the getter
+                    // require 0 parameters for the getter
                     continue;
                 }
                 String paramName = methodToParamName(getterMatcher.group(1));
                 if (PRIMITIVES.containsKey(method.getReturnType())) {
-                    primitiveGetters.add(new MethodTuple(paramName, method, method.getReturnType()));
+                    primitiveGetters.add(
+                                    new MethodTuple(paramName, method, method.getReturnType()));
                 } else {
-                    nonPrimitiveGetters.add(new MethodTuple(paramName, method, method.getReturnType()));
+                    nonPrimitiveGetters.add(
+                                    new MethodTuple(paramName, method, method.getReturnType()));
                 }
 
             }
         }
 
-        //TODO -- remove nonprimitive setters/getters that have a string equivalent
+        // TODO -- remove nonprimitive setters/getters that have a string equivalent
         serializePrimitives(doc, element, object, primitiveSetters, primitiveGetters);
         serializeNonPrimitives(doc, element, object, nonPrimitiveSetters, nonPrimitiveGetters);
 
@@ -402,25 +401,22 @@ public class TikaConfigSerializer {
 
     }
 
-    private static void serializeNonPrimitives(Document doc, Element element,
-                                               Object object,
-                                               MethodTuples setterTuples,
-                                               MethodTuples getterTuples) {
+    private static void serializeNonPrimitives(Document doc, Element element, Object object,
+                    MethodTuples setterTuples, MethodTuples getterTuples) {
 
         for (Map.Entry<String, Set<MethodTuple>> e : setterTuples.tuples.entrySet()) {
             Set<MethodTuple> getters = getterTuples.tuples.get(e.getKey());
             processNonPrimitive(e.getKey(), e.getValue(), getters, doc, element, object);
             if (!getterTuples.tuples.containsKey(e.getKey())) {
                 LOG.warn("no getter for setter non-primitive: {} in {}", e.getKey(),
-                        object.getClass());
+                                object.getClass());
                 continue;
             }
         }
     }
 
     private static void processNonPrimitive(String name, Set<MethodTuple> setters,
-                                            Set<MethodTuple> getters, Document doc, Element element,
-                                            Object object) {
+                    Set<MethodTuple> getters, Document doc, Element element, Object object) {
         for (MethodTuple setter : setters) {
             for (MethodTuple getter : getters) {
                 if (setter.singleParam.equals(getter.singleParam)) {
@@ -432,8 +428,7 @@ public class TikaConfigSerializer {
     }
 
     private static void serializeObject(String name, Document doc, Element element,
-                                        MethodTuple setter,
-                                         MethodTuple getter, Object object) {
+                    MethodTuple setter, MethodTuple getter, Object object) {
 
         Object item = null;
         try {
@@ -451,9 +446,8 @@ public class TikaConfigSerializer {
         serializeParams(doc, element, item);
     }
 
-    private static void serializePrimitives(Document doc, Element root,
-                                            Object object,
-                                            MethodTuples setterTuples, MethodTuples getterTuples) {
+    private static void serializePrimitives(Document doc, Element root, Object object,
+                    MethodTuples setterTuples, MethodTuples getterTuples) {
 
         Element paramsElement = null;
         if (object instanceof AbstractMultipleParser) {
@@ -461,7 +455,7 @@ public class TikaConfigSerializer {
             Element paramElement = doc.createElement("param");
             paramElement.setAttribute("name", "metadataPolicy");
             paramElement.setAttribute("value",
-                    ((AbstractMultipleParser) object).getMetadataPolicy().toString());
+                            ((AbstractMultipleParser) object).getMetadataPolicy().toString());
             paramsElement.appendChild(paramElement);
             root.appendChild(paramsElement);
         }
@@ -504,10 +498,10 @@ public class TikaConfigSerializer {
             param.setAttribute("name", getterTuple.name);
             param.setAttribute("type", PRIMITIVES.get(getterTuple.singleParam));
             if (List.class.isAssignableFrom(getterTuple.singleParam)) {
-                //this outputs even empty list elements, which I think is good.
+                // this outputs even empty list elements, which I think is good.
                 addList(param, doc, getterTuple, (List<String>) value);
             } else if (Map.class.isAssignableFrom(getterTuple.singleParam)) {
-                //this outputs even empty lists, which I think is good.
+                // this outputs even empty lists, which I think is good.
                 addMap(param, doc, getterTuple, (Map<String, String>) value);
             } else {
                 param.setTextContent(valString);
@@ -521,7 +515,7 @@ public class TikaConfigSerializer {
     }
 
     private static void addMap(Element param, Document doc, MethodTuple getterTuple,
-                               Map<String, String> object) {
+                    Map<String, String> object) {
         for (Map.Entry<String, String> e : new TreeMap<String, String>(object).entrySet()) {
             Element element = doc.createElement("string");
             element.setAttribute("key", e.getKey());
@@ -532,7 +526,7 @@ public class TikaConfigSerializer {
     }
 
     private static void addList(Element param, Document doc, MethodTuple getterTuple,
-                                List<String> list) {
+                    List<String> list) {
         for (String s : list) {
             Element element = doc.createElement("string");
             element.setTextContent(s);
@@ -563,8 +557,8 @@ public class TikaConfigSerializer {
     }
 
     private static MethodTuple pickBestSetter(Set<MethodTuple> tuples) {
-        //TODO -- if both string and integer, which one do we pick?
-        //stub for now -- just pick the first
+        // TODO -- if both string and integer, which one do we pick?
+        // stub for now -- just pick the first
         for (MethodTuple t : tuples) {
             return t;
         }
@@ -607,8 +601,8 @@ public class TikaConfigSerializer {
                 return false;
             }
             MethodTuple that = (MethodTuple) o;
-            return name.equals(that.name) && method.equals(that.method) &&
-                    singleParam.equals(that.singleParam);
+            return name.equals(that.name) && method.equals(that.method)
+                            && singleParam.equals(that.singleParam);
         }
 
         @Override
@@ -630,8 +624,8 @@ public class TikaConfigSerializer {
          */
         STATIC,
         /**
-         * Static version of the config, with explicit lists of decorators etc,
-         * and all parsers given with their detected supported mime types
+         * Static version of the config, with explicit lists of decorators etc, and all parsers
+         * given with their detected supported mime types
          */
         STATIC_FULL
     }
diff --git a/tika-core/src/main/java/org/apache/tika/config/TikaTaskTimeout.java b/tika-core/src/main/java/org/apache/tika/config/TikaTaskTimeout.java
index 842c7a432..67adb2df7 100644
--- a/tika-core/src/main/java/org/apache/tika/config/TikaTaskTimeout.java
+++ b/tika-core/src/main/java/org/apache/tika/config/TikaTaskTimeout.java
@@ -1,23 +1,20 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.config;
 
 import java.io.Serializable;
-
 import org.apache.tika.parser.ParseContext;
 
 public class TikaTaskTimeout implements Serializable {
diff --git a/tika-core/src/main/java/org/apache/tika/config/package-info.java b/tika-core/src/main/java/org/apache/tika/config/package-info.java
index 77a0559f7..6a2f7a7f5 100644
--- a/tika-core/src/main/java/org/apache/tika/config/package-info.java
+++ b/tika-core/src/main/java/org/apache/tika/config/package-info.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.
  */
 
 /**
diff --git a/tika-core/src/main/java/org/apache/tika/detect/AutoDetectReader.java b/tika-core/src/main/java/org/apache/tika/detect/AutoDetectReader.java
index bd7d4f2a9..26ce38363 100644
--- a/tika-core/src/main/java/org/apache/tika/detect/AutoDetectReader.java
+++ b/tika-core/src/main/java/org/apache/tika/detect/AutoDetectReader.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.detect;
 
@@ -22,9 +20,6 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.nio.charset.Charset;
-
-import org.xml.sax.InputSource;
-
 import org.apache.tika.config.LoadErrorHandler;
 import org.apache.tika.config.ServiceLoader;
 import org.apache.tika.exception.TikaException;
@@ -32,23 +27,24 @@ import org.apache.tika.metadata.Metadata;
 import org.apache.tika.metadata.TikaCoreProperties;
 import org.apache.tika.mime.MediaType;
 import org.apache.tika.utils.CharsetUtils;
+import org.xml.sax.InputSource;
 
 /**
- * An input stream reader that automatically detects the character encoding
- * to be used for converting bytes to characters.
+ * An input stream reader that automatically detects the character encoding to be used for
+ * converting bytes to characters.
  *
  * @since Apache Tika 1.2
  */
 public class AutoDetectReader extends BufferedReader {
 
     private static final ServiceLoader DEFAULT_LOADER =
-            new ServiceLoader(AutoDetectReader.class.getClassLoader());
+                    new ServiceLoader(AutoDetectReader.class.getClassLoader());
 
     private static final EncodingDetector DEFAULT_DETECTOR;
 
     static {
         DEFAULT_DETECTOR = new CompositeEncodingDetector(
-                DEFAULT_LOADER.loadServiceProviders(EncodingDetector.class));
+                        DEFAULT_LOADER.loadServiceProviders(EncodingDetector.class));
     }
 
     private final Charset charset;
@@ -65,34 +61,33 @@ public class AutoDetectReader extends BufferedReader {
     }
 
     /**
-     * @param stream    stream from which to read -- make sure that it supports mark!
+     * @param stream stream from which to read -- make sure that it supports mark!
      * @param metadata
      * @param detector
      * @param handler
      * @throws IOException
      * @throws TikaException
      */
-    private AutoDetectReader(InputStream stream, Metadata metadata,
-                             EncodingDetector detector, LoadErrorHandler handler)
-            throws IOException, TikaException {
+    private AutoDetectReader(InputStream stream, Metadata metadata, EncodingDetector detector,
+                    LoadErrorHandler handler) throws IOException, TikaException {
         this(stream, detect(stream, metadata, detector, handler));
     }
 
     public AutoDetectReader(InputStream stream, Metadata metadata,
-                            EncodingDetector encodingDetector) throws IOException, TikaException {
-        this(getBuffered(stream), metadata, encodingDetector,
-                DEFAULT_LOADER.getLoadErrorHandler());
+                    EncodingDetector encodingDetector) throws IOException, TikaException {
+        this(getBuffered(stream), metadata, encodingDetector, DEFAULT_LOADER.getLoadErrorHandler());
     }
 
     public AutoDetectReader(InputStream stream, Metadata metadata, ServiceLoader loader)
-            throws IOException, TikaException {
+                    throws IOException, TikaException {
         this(getBuffered(stream), metadata,
-                new CompositeEncodingDetector(loader.loadServiceProviders(EncodingDetector.class)),
-                loader.getLoadErrorHandler());
+                        new CompositeEncodingDetector(
+                                        loader.loadServiceProviders(EncodingDetector.class)),
+                        loader.getLoadErrorHandler());
     }
 
     public AutoDetectReader(InputStream stream, Metadata metadata)
-            throws IOException, TikaException {
+                    throws IOException, TikaException {
         this(stream, metadata, DEFAULT_DETECTOR);
     }
 
@@ -100,9 +95,8 @@ public class AutoDetectReader extends BufferedReader {
         this(stream, new Metadata());
     }
 
-    private static Charset detect(InputStream input, Metadata metadata,
-                                  EncodingDetector detector, LoadErrorHandler handler)
-            throws IOException, TikaException {
+    private static Charset detect(InputStream input, Metadata metadata, EncodingDetector detector,
+                    LoadErrorHandler handler) throws IOException, TikaException {
         // Ask all given detectors for the character encoding
         try {
             Charset charset = detector.detect(input, metadata);
@@ -123,7 +117,7 @@ public class AutoDetectReader extends BufferedReader {
                     Charset cs = CharsetUtils.forName(charset);
                     metadata.set(TikaCoreProperties.DETECTED_ENCODING, cs.name());
                     metadata.set(TikaCoreProperties.ENCODING_DETECTOR,
-                            "AutoDetectReader-charset-metadata-fallback");
+                                    "AutoDetectReader-charset-metadata-fallback");
                     return cs;
                 } catch (IllegalArgumentException e) {
                     // ignore
diff --git a/tika-core/src/main/java/org/apache/tika/detect/CompositeDetector.java b/tika-core/src/main/java/org/apache/tika/detect/CompositeDetector.java
index ed5391854..5e9b10885 100644
--- a/tika-core/src/main/java/org/apache/tika/detect/CompositeDetector.java
+++ b/tika-core/src/main/java/org/apache/tika/detect/CompositeDetector.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.detect;
 
@@ -23,7 +21,6 @@ import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
-
 import org.apache.tika.metadata.Metadata;
 import org.apache.tika.metadata.TikaCoreProperties;
 import org.apache.tika.mime.MediaType;
@@ -45,7 +42,7 @@ public class CompositeDetector implements Detector {
     private final List<Detector> detectors;
 
     public CompositeDetector(MediaTypeRegistry registry, List<Detector> detectors,
-                             Collection<Class<? extends Detector>> excludeDetectors) {
+                    Collection<Class<? extends Detector>> excludeDetectors) {
         if (excludeDetectors == null || excludeDetectors.isEmpty()) {
             this.detectors = detectors;
         } else {
@@ -78,8 +75,8 @@ public class CompositeDetector implements Detector {
         }
         MediaType type = MediaType.OCTET_STREAM;
 
-        //we have to iterate through all detectors because the override detector may
-        //be within a CompositeDetector
+        // we have to iterate through all detectors because the override detector may
+        // be within a CompositeDetector
         for (Detector detector : getDetectors()) {
             MediaType detected = detector.detect(input, metadata);
             if (registry.isSpecializationOf(detected, type)) {
@@ -111,6 +108,7 @@ public class CompositeDetector implements Detector {
         }
         return null;
     }
+
     /**
      * Returns the component detectors.
      */
@@ -119,12 +117,12 @@ public class CompositeDetector implements Detector {
     }
 
     private boolean isExcluded(Collection<Class<? extends Detector>> excludeDetectors,
-                               Class<? extends Detector> d) {
+                    Class<? extends Detector> d) {
         return excludeDetectors.contains(d) || assignableFrom(excludeDetectors, d);
     }
 
     private boolean assignableFrom(Collection<Class<? extends Detector>> excludeDetectors,
-                                   Class<? extends Detector> d) {
+                    Class<? extends Detector> d) {
         for (Class<? extends Detector> e : excludeDetectors) {
             if (e.isAssignableFrom(d)) {
                 return true;
diff --git a/tika-core/src/main/java/org/apache/tika/detect/CompositeEncodingDetector.java b/tika-core/src/main/java/org/apache/tika/detect/CompositeEncodingDetector.java
index 7db79ccc7..b24e7440a 100644
--- a/tika-core/src/main/java/org/apache/tika/detect/CompositeEncodingDetector.java
+++ b/tika-core/src/main/java/org/apache/tika/detect/CompositeEncodingDetector.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.detect;
 
@@ -24,7 +22,6 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.LinkedList;
 import java.util.List;
-
 import org.apache.tika.metadata.Metadata;
 import org.apache.tika.metadata.TikaCoreProperties;
 
@@ -38,8 +35,7 @@ public class CompositeEncodingDetector implements EncodingDetector, Serializable
     private final List<EncodingDetector> detectors;
 
     public CompositeEncodingDetector(List<EncodingDetector> detectors,
-                                     Collection<Class<? extends EncodingDetector>>
-                                             excludeEncodingDetectors) {
+                    Collection<Class<? extends EncodingDetector>> excludeEncodingDetectors) {
         this.detectors = new LinkedList<>();
         for (EncodingDetector encodingDetector : detectors) {
             if (!isExcluded(excludeEncodingDetectors, encodingDetector.getClass())) {
@@ -55,7 +51,7 @@ public class CompositeEncodingDetector implements EncodingDetector, Serializable
     }
 
     /**
-     * @param input    text document input stream, or <code>null</code>
+     * @param input text document input stream, or <code>null</code>
      * @param metadata input metadata for the document
      * @return the detected Charset or null if no charset could be detected
      * @throws IOException
@@ -66,10 +62,10 @@ public class CompositeEncodingDetector implements EncodingDetector, Serializable
             Charset detected = detector.detect(input, metadata);
             if (detected != null) {
                 metadata.set(TikaCoreProperties.DETECTED_ENCODING, detected.name());
-                //if this has been set by a leaf detector, do not overwrite
-                if (! detector.getClass().getSimpleName().equals("CompositeEncodingDetector")) {
+                // if this has been set by a leaf detector, do not overwrite
+                if (!detector.getClass().getSimpleName().equals("CompositeEncodingDetector")) {
                     metadata.set(TikaCoreProperties.ENCODING_DETECTOR,
-                            detector.getClass().getSimpleName());
+                                    detector.getClass().getSimpleName());
                 }
                 return detected;
             }
@@ -82,15 +78,15 @@ public class CompositeEncodingDetector implements EncodingDetector, Serializable
     }
 
     private boolean isExcluded(
-            Collection<Class<? extends EncodingDetector>> excludeEncodingDetectors,
-            Class<? extends EncodingDetector> encodingDetector) {
-        return excludeEncodingDetectors.contains(encodingDetector) ||
-                assignableFrom(excludeEncodingDetectors, encodingDetector);
+                    Collection<Class<? extends EncodingDetector>> excludeEncodingDetectors,
+                    Class<? extends EncodingDetector> encodingDetector) {
+        return excludeEncodingDetectors.contains(encodingDetector)
+                        || assignableFrom(excludeEncodingDetectors, encodingDetector);
     }
 
     private boolean assignableFrom(
-            Collection<Class<? extends EncodingDetector>> excludeEncodingDetectors,
-            Class<? extends EncodingDetector> encodingDetector) {
+                    Collection<Class<? extends EncodingDetector>> excludeEncodingDetectors,
+                    Class<? extends EncodingDetector> encodingDetector) {
         for (Class<? extends EncodingDetector> e : excludeEncodingDetectors) {
             if (e.isAssignableFrom(encodingDetector)) {
                 return true;
diff --git a/tika-core/src/main/java/org/apache/tika/detect/DefaultDetector.java b/tika-core/src/main/java/org/apache/tika/detect/DefaultDetector.java
index 038d274e4..12ecd2c33 100644
--- a/tika-core/src/main/java/org/apache/tika/detect/DefaultDetector.java
+++ b/tika-core/src/main/java/org/apache/tika/detect/DefaultDetector.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.detect;
 
@@ -20,20 +18,18 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 import javax.imageio.spi.ServiceRegistry;
-
 import org.apache.tika.config.ServiceLoader;
 import org.apache.tika.mime.MimeTypes;
 import org.apache.tika.utils.ServiceLoaderUtils;
 
 /**
- * A composite detector based on all the {@link Detector} implementations
- * available through the {@link ServiceRegistry service provider mechanism}.
+ * A composite detector based on all the {@link Detector} implementations available through the
+ * {@link ServiceRegistry service provider mechanism}.
  * <p>
- * Detectors are loaded and returned in a specified order, of user supplied
- * followed by non-MimeType Tika, followed by the Tika MimeType class.
- * If you need to control the order of the Detectors, you should instead
- * construct your own {@link CompositeDetector} and pass in the list
- * of Detectors in the required order.
+ * Detectors are loaded and returned in a specified order, of user supplied followed by non-MimeType
+ * Tika, followed by the Tika MimeType class. If you need to control the order of the Detectors, you
+ * should instead construct your own {@link CompositeDetector} and pass in the list of Detectors in
+ * the required order.
  *
  * @since Apache Tika 0.9
  */
@@ -46,7 +42,7 @@ public class DefaultDetector extends CompositeDetector {
     private transient final ServiceLoader loader;
 
     public DefaultDetector(MimeTypes types, ServiceLoader loader,
-                           Collection<Class<? extends Detector>> excludeDetectors) {
+                    Collection<Class<? extends Detector>> excludeDetectors) {
         super(types.getMediaTypeRegistry(), getDefaultDetectors(types, loader, excludeDetectors));
         this.loader = loader;
     }
@@ -72,25 +68,22 @@ public class DefaultDetector extends CompositeDetector {
     }
 
     /**
-     * Finds all statically loadable detectors and sort the list by name,
-     * rather than discovery order. Detectors are used in the given order,
-     * so put the Tika parsers last so that non-Tika (user supplied)
-     * parsers can take precedence.
+     * Finds all statically loadable detectors and sort the list by name, rather than discovery
+     * order. Detectors are used in the given order, so put the Tika parsers last so that non-Tika
+     * (user supplied) parsers can take precedence.
      * <p>
-     * If an {@link OverrideDetector} is loaded, it takes precedence over
-     * all other detectors.
+     * If an {@link OverrideDetector} is loaded, it takes precedence over all other detectors.
      *
      * @param loader service loader
      * @return ordered list of statically loadable detectors
      */
     private static List<Detector> getDefaultDetectors(MimeTypes types, ServiceLoader loader,
-                                                      Collection<Class<? extends Detector>>
-                                                              excludeDetectors) {
+                    Collection<Class<? extends Detector>> excludeDetectors) {
         List<Detector> detectors =
-                loader.loadStaticServiceProviders(Detector.class, excludeDetectors);
+                        loader.loadStaticServiceProviders(Detector.class, excludeDetectors);
 
         ServiceLoaderUtils.sortLoadedClasses(detectors);
-        //look for the override index and put that first
+        // look for the override index and put that first
         int overrideIndex = -1;
         int i = 0;
         for (Detector detector : detectors) {
diff --git a/tika-core/src/main/java/org/apache/tika/detect/DefaultEncodingDetector.java b/tika-core/src/main/java/org/apache/tika/detect/DefaultEncodingDetector.java
index 4cf64d5e9..2e9f6ad95 100644
--- a/tika-core/src/main/java/org/apache/tika/detect/DefaultEncodingDetector.java
+++ b/tika-core/src/main/java/org/apache/tika/detect/DefaultEncodingDetector.java
@@ -1,37 +1,33 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.detect;
 
 import java.util.Collection;
 import javax.imageio.spi.ServiceRegistry;
-
 import org.apache.tika.config.ServiceLoader;
 
 /**
- * A composite encoding detector based on all the {@link EncodingDetector} implementations
- * available through the {@link ServiceRegistry service provider mechanism}.  Those
- * loaded via the service provider mechanism are ordered by how they appear in the
- * file, if there is a single service file.  If multiple, there is no guarantee of order.
+ * A composite encoding detector based on all the {@link EncodingDetector} implementations available
+ * through the {@link ServiceRegistry service provider mechanism}. Those loaded via the service
+ * provider mechanism are ordered by how they appear in the file, if there is a single service file.
+ * If multiple, there is no guarantee of order.
  * <p>
  * <p>
- * If you need to control the order of the Detectors, you should instead
- * construct your own {@link CompositeDetector} and pass in the list
- * of Detectors in the required order.
+ * If you need to control the order of the Detectors, you should instead construct your own
+ * {@link CompositeDetector} and pass in the list of Detectors in the required order.
  *
  * @since Apache Tika 1.15
  */
@@ -46,8 +42,7 @@ public class DefaultEncodingDetector extends CompositeEncodingDetector {
     }
 
     public DefaultEncodingDetector(ServiceLoader loader,
-                                   Collection<Class<? extends EncodingDetector>>
-                                           excludeEncodingDetectors) {
+                    Collection<Class<? extends EncodingDetector>> excludeEncodingDetectors) {
         super(loader.loadServiceProviders(EncodingDetector.class), excludeEncodingDetectors);
     }
 
diff --git a/tika-core/src/main/java/org/apache/tika/detect/DefaultProbDetector.java b/tika-core/src/main/java/org/apache/tika/detect/DefaultProbDetector.java
index b7df0b6fa..197fed999 100644
--- a/tika-core/src/main/java/org/apache/tika/detect/DefaultProbDetector.java
+++ b/tika-core/src/main/java/org/apache/tika/detect/DefaultProbDetector.java
@@ -1,34 +1,29 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.detect;
 
 import java.util.List;
-
 import org.apache.tika.config.ServiceLoader;
 import org.apache.tika.mime.MimeTypes;
 import org.apache.tika.mime.ProbabilisticMimeDetectionSelector;
 import org.apache.tika.utils.ServiceLoaderUtils;
 
 /**
- * A version of {@link DefaultDetector} for probabilistic mime
- * detectors, which use statistical techniques to blend the
- * results of differing underlying detectors when attempting
- * to detect the type of a given file.
- * TODO Link to documentation on configuring these probabilities
+ * A version of {@link DefaultDetector} for probabilistic mime detectors, which use statistical
+ * techniques to blend the results of differing underlying detectors when attempting to detect the
+ * type of a given file. TODO Link to documentation on configuring these probabilities
  */
 public class DefaultProbDetector extends CompositeDetector {
     private static final long serialVersionUID = -8836240060532323352L;
@@ -56,7 +51,7 @@ public class DefaultProbDetector extends CompositeDetector {
     }
 
     private static List<Detector> getDefaultDetectors(ProbabilisticMimeDetectionSelector sel,
-                                                      ServiceLoader loader) {
+                    ServiceLoader loader) {
         List<Detector> detectors = loader.loadStaticServiceProviders(Detector.class);
         ServiceLoaderUtils.sortLoadedClasses(detectors);
         detectors.add(sel);
diff --git a/tika-core/src/main/java/org/apache/tika/detect/Detector.java b/tika-core/src/main/java/org/apache/tika/detect/Detector.java
index fc237aa5a..d58368dba 100644
--- a/tika-core/src/main/java/org/apache/tika/detect/Detector.java
+++ b/tika-core/src/main/java/org/apache/tika/detect/Detector.java
@@ -1,32 +1,29 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.detect;
 
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.Serializable;
-
 import org.apache.tika.metadata.Metadata;
 import org.apache.tika.mime.MediaType;
 
 /**
- * Content type detector. Implementations of this interface use various
- * heuristics to detect the content type of a document based on given
- * input metadata or the first few bytes of the document stream.
+ * Content type detector. Implementations of this interface use various heuristics to detect the
+ * content type of a document based on given input metadata or the first few bytes of the document
+ * stream.
  *
  * @since Apache Tika 0.3
  */
@@ -34,22 +31,19 @@ public interface Detector extends Serializable {
 
     /**
      * Detects the content type of the given input document. Returns
-     * <code>application/octet-stream</code> if the type of the document
-     * can not be detected.
+     * <code>application/octet-stream</code> if the type of the document can not be detected.
      * <p>
-     * If the document input stream is not available, then the first
-     * argument may be <code>null</code>. Otherwise the detector may
-     * read bytes from the start of the stream to help in type detection.
-     * The given stream is guaranteed to support the
-     * {@link InputStream#markSupported() mark feature} and the detector
-     * is expected to {@link InputStream#mark(int) mark} the stream before
-     * reading any bytes from it, and to {@link InputStream#reset() reset}
-     * the stream before returning. The stream must not be closed by the
-     * detector.
+     * If the document input stream is not available, then the first argument may be
+     * <code>null</code>. Otherwise the detector may read bytes from the start of the stream to help
+     * in type detection. The given stream is guaranteed to support the
+     * {@link InputStream#markSupported() mark feature} and the detector is expected to
+     * {@link InputStream#mark(int) mark} the stream before reading any bytes from it, and to
+     * {@link InputStream#reset() reset} the stream before returning. The stream must not be closed
+     * by the detector.
      * <p>
      * The given input metadata is only read, not modified, by the detector.
      *
-     * @param input    document input stream, or <code>null</code>
+     * @param input document input stream, or <code>null</code>
      * @param metadata input metadata for the document
      * @return detected media type, or <code>application/octet-stream</code>
      * @throws IOException if the document input stream could not be read
diff --git a/tika-core/src/main/java/org/apache/tika/detect/EmptyDetector.java b/tika-core/src/main/java/org/apache/tika/detect/EmptyDetector.java
index 9f996301c..89d82eb7a 100644
--- a/tika-core/src/main/java/org/apache/tika/detect/EmptyDetector.java
+++ b/tika-core/src/main/java/org/apache/tika/detect/EmptyDetector.java
@@ -1,24 +1,21 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.detect;
 
 import java.io.IOException;
 import java.io.InputStream;
-
 import org.apache.tika.metadata.Metadata;
 import org.apache.tika.mime.MediaType;
 
diff --git a/tika-core/src/main/java/org/apache/tika/detect/EncodingDetector.java b/tika-core/src/main/java/org/apache/tika/detect/EncodingDetector.java
index 9dbad4c27..a8f5460c4 100644
--- a/tika-core/src/main/java/org/apache/tika/detect/EncodingDetector.java
+++ b/tika-core/src/main/java/org/apache/tika/detect/EncodingDetector.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.detect;
 
@@ -20,35 +18,32 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.Serializable;
 import java.nio.charset.Charset;
-
 import org.apache.tika.metadata.Metadata;
 
 /**
- * Character encoding detector. Implementations of this interface use
- * various heuristics to detect the character encoding of a text document
- * based on given input metadata or the first few bytes of the document stream.
+ * Character encoding detector. Implementations of this interface use various heuristics to detect
+ * the character encoding of a text document based on given input metadata or the first few bytes of
+ * the document stream.
  *
  * @since Apache Tika 0.4
  */
 public interface EncodingDetector extends Serializable {
 
     /**
-     * Detects the character encoding of the given text document, or
-     * <code>null</code> if the encoding of the document can not be detected.
+     * Detects the character encoding of the given text document, or <code>null</code> if the
+     * encoding of the document can not be detected.
      * <p>
-     * If the document input stream is not available, then the first
-     * argument may be <code>null</code>. Otherwise the detector may
-     * read bytes from the start of the stream to help in encoding detection.
-     * The given stream is guaranteed to support the
-     * {@link InputStream#markSupported() mark feature} and the detector
-     * is expected to {@link InputStream#mark(int) mark} the stream before
-     * reading any bytes from it, and to {@link InputStream#reset() reset}
-     * the stream before returning. The stream must not be closed by the
-     * detector.
+     * If the document input stream is not available, then the first argument may be
+     * <code>null</code>. Otherwise the detector may read bytes from the start of the stream to help
+     * in encoding detection. The given stream is guaranteed to support the
+     * {@link InputStream#markSupported() mark feature} and the detector is expected to
+     * {@link InputStream#mark(int) mark} the stream before reading any bytes from it, and to
+     * {@link InputStream#reset() reset} the stream before returning. The stream must not be closed
+     * by the detector.
      * <p>
      * The given input metadata is only read, not modified, by the detector.
      *
-     * @param input    text document input stream, or <code>null</code>
+     * @param input text document input stream, or <code>null</code>
      * @param metadata input metadata for the document
      * @return detected character encoding, or <code>null</code>
      * @throws IOException if the document input stream could not be read
diff --git a/tika-core/src/main/java/org/apache/tika/detect/FileCommandDetector.java b/tika-core/src/main/java/org/apache/tika/detect/FileCommandDetector.java
index 42349faec..6a2f6388a 100644
--- a/tika-core/src/main/java/org/apache/tika/detect/FileCommandDetector.java
+++ b/tika-core/src/main/java/org/apache/tika/detect/FileCommandDetector.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.detect;
 
@@ -22,10 +20,6 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.nio.file.Files;
 import java.nio.file.Path;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 import org.apache.tika.config.Field;
 import org.apache.tika.io.BoundedInputStream;
 import org.apache.tika.io.TemporaryResources;
@@ -38,26 +32,27 @@ import org.apache.tika.parser.external.ExternalParser;
 import org.apache.tika.utils.FileProcessResult;
 import org.apache.tika.utils.ProcessUtils;
 import org.apache.tika.utils.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
- * This runs the linux 'file' command against a file.  If
- * this is called on a TikaInputStream, it will use the underlying Path
- * or spool the full file to disk and then run file against that.
+ * This runs the linux 'file' command against a file. If this is called on a TikaInputStream, it
+ * will use the underlying Path or spool the full file to disk and then run file against that.
  * <p>
- * If this is run against any other type of InputStream, it will spool
- * up to {@link #maxBytes} to disk and then run the detector.
+ * If this is run against any other type of InputStream, it will spool up to {@link #maxBytes} to
+ * disk and then run the detector.
  * <p>
  * As with all detectors, mark must be supported.
  * <p>
- * If you want to use file's mime type in the parse, e.g.
- * to select the parser in AutoDetectParser, set {@link FileCommandDetector#setUseMime(boolean)}
- * to true.  The default behavior is to store the value as {@link FileCommandDetector#FILE_MIME}
- * but rely on other detectors for the "active" mime used by Tika.
+ * If you want to use file's mime type in the parse, e.g. to select the parser in AutoDetectParser,
+ * set {@link FileCommandDetector#setUseMime(boolean)} to true. The default behavior is to store the
+ * value as {@link FileCommandDetector#FILE_MIME} but rely on other detectors for the "active" mime
+ * used by Tika.
  */
 public class FileCommandDetector implements Detector {
 
-    //TODO: file has some diff mimes names for some very common mimes
-    //should we map file mimes to Tika mimes, e.g. text/xml -> application/xml??
+    // TODO: file has some diff mimes names for some very common mimes
+    // should we map file mimes to Tika mimes, e.g. text/xml -> application/xml??
 
     public static Property FILE_MIME = Property.externalText("file:mime");
     private static final Logger LOGGER = LoggerFactory.getLogger(FileCommandDetector.class);
@@ -77,12 +72,12 @@ public class FileCommandDetector implements Detector {
 
 
     public static boolean checkHasFile(String fileCommandPath) {
-        String[] commandline = new String[]{fileCommandPath, "-v"};
+        String[] commandline = new String[] {fileCommandPath, "-v"};
         return ExternalParser.check(commandline);
     }
 
     /**
-     * @param input    document input stream, or <code>null</code>
+     * @param input document input stream, or <code>null</code>
      * @param metadata input metadata for the document
      * @return mime as identified by the file command or application/octet-stream otherwise
      * @throws IOException
@@ -101,8 +96,8 @@ public class FileCommandDetector implements Detector {
         }
         TikaInputStream tis = TikaInputStream.cast(input);
         if (tis != null) {
-            //spool the full file to disk, if called with a TikaInputStream
-            //and there is no underlying file
+            // spool the full file to disk, if called with a TikaInputStream
+            // and there is no underlying file
             return detectOnPath(tis.getPath(), metadata);
         }
 
@@ -118,8 +113,8 @@ public class FileCommandDetector implements Detector {
 
     private MediaType detectOnPath(Path path, Metadata metadata) throws IOException {
 
-        String[] args =
-                new String[]{ProcessUtils.escapeCommandLine(fileCommandPath), "-b", "--mime-type",
+        String[] args = new String[] {ProcessUtils.escapeCommandLine(fileCommandPath), "-b",
+                        "--mime-type",
                         ProcessUtils.escapeCommandLine(path.toAbsolutePath().toString())};
         ProcessBuilder builder = new ProcessBuilder(args);
         FileProcessResult result = ProcessUtils.execute(builder, timeoutMs, 10000, 10000);
@@ -149,8 +144,8 @@ public class FileCommandDetector implements Detector {
 
     @Field
     public void setFilePath(String fileCommandPath) {
-        //this opens up a potential command vulnerability.
-        //Don't ever let an untrusted user set this.
+        // this opens up a potential command vulnerability.
+        // Don't ever let an untrusted user set this.
         this.fileCommandPath = fileCommandPath;
         checkHasFile(this.fileCommandPath);
     }
@@ -163,10 +158,10 @@ public class FileCommandDetector implements Detector {
     public boolean isUseMime() {
         return useMime;
     }
+
     /**
-     * If this is not called on a TikaInputStream, this detector
-     * will spool up to this many bytes to a file to be detected
-     * by the 'file' command.
+     * If this is not called on a TikaInputStream, this detector will spool up to this many bytes to
+     * a file to be detected by the 'file' command.
      *
      * @param maxBytes
      */
diff --git a/tika-core/src/main/java/org/apache/tika/detect/MagicDetector.java b/tika-core/src/main/java/org/apache/tika/detect/MagicDetector.java
index 5e00779be..57c50b628 100644
--- a/tika-core/src/main/java/org/apache/tika/detect/MagicDetector.java
+++ b/tika-core/src/main/java/org/apache/tika/detect/MagicDetector.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.detect;
 
@@ -28,25 +26,24 @@ import java.util.Arrays;
 import java.util.Locale;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
-
 import org.apache.tika.metadata.Metadata;
 import org.apache.tika.mime.MediaType;
 
 /**
- * Content type detection based on magic bytes, i.e. type-specific patterns
- * near the beginning of the document input stream.
+ * Content type detection based on magic bytes, i.e. type-specific patterns near the beginning of
+ * the document input stream.
  * <p>
- * Because this works on bytes, not characters, by default any string
- * matching is done as ISO_8859_1. To use an explicit different
- * encoding, supply a type other than "string" / "stringignorecase"
+ * Because this works on bytes, not characters, by default any string matching is done as
+ * ISO_8859_1. To use an explicit different encoding, supply a type other than "string" /
+ * "stringignorecase"
  *
  * @since Apache Tika 0.3
  */
 public class MagicDetector implements Detector {
 
     /**
-     * The matching media type. Returned by the
-     * {@link #detect(InputStream, Metadata)} method if a match is found.
+     * The matching media type. Returned by the {@link #detect(InputStream, Metadata)} method if a
+     * match is found.
      */
     private final MediaType type;
     /**
@@ -54,14 +51,14 @@ public class MagicDetector implements Detector {
      */
     private final int length;
     /**
-     * The magic match pattern. If this byte pattern is equal to the
-     * possibly bit-masked bytes from the input stream, then the type
-     * detection succeeds and the configured {@link #type} is returned.
+     * The magic match pattern. If this byte pattern is equal to the possibly bit-masked bytes from
+     * the input stream, then the type detection succeeds and the configured {@link #type} is
+     * returned.
      */
     private final byte[] pattern;
     /**
-     * Length of the pattern, which in the case of regular expressions will
-     * not be the same as the comparison window length.
+     * Length of the pattern, which in the case of regular expressions will not be the same as the
+     * comparison window length.
      */
     private final int patternLength;
     /**
@@ -77,26 +74,24 @@ public class MagicDetector implements Detector {
      */
     private final byte[] mask;
     /**
-     * First offset (inclusive) of the comparison window within the
-     * document input stream. Greater than or equal to zero.
+     * First offset (inclusive) of the comparison window within the document input stream. Greater
+     * than or equal to zero.
      */
     private final int offsetRangeBegin;
     /**
-     * Last offset (inclusive) of the comparison window within the document
-     * input stream. Greater than or equal to the
-     * {@link #offsetRangeBegin first offset}.
+     * Last offset (inclusive) of the comparison window within the document input stream. Greater
+     * than or equal to the {@link #offsetRangeBegin first offset}.
      * <p>
-     * Note that this is <em>not</em> the offset of the last byte read from
-     * the document stream. Instead, the last window of bytes to be compared
-     * starts at this offset.
+     * Note that this is <em>not</em> the offset of the last byte read from the document stream.
+     * Instead, the last window of bytes to be compared starts at this offset.
      */
     private final int offsetRangeEnd;
 
     /**
-     * Creates a detector for input documents that have the exact given byte
-     * pattern at the beginning of the document stream.
+     * Creates a detector for input documents that have the exact given byte pattern at the
+     * beginning of the document stream.
      *
-     * @param type    matching media type
+     * @param type matching media type
      * @param pattern magic match pattern
      */
     public MagicDetector(MediaType type, byte[] pattern) {
@@ -104,49 +99,46 @@ public class MagicDetector implements Detector {
     }
 
     /**
-     * Creates a detector for input documents that have the exact given byte
-     * pattern at the given offset of the document stream.
+     * Creates a detector for input documents that have the exact given byte pattern at the given
+     * offset of the document stream.
      *
-     * @param type    matching media type
+     * @param type matching media type
      * @param pattern magic match pattern
-     * @param offset  offset of the pattern match
+     * @param offset offset of the pattern match
      */
     public MagicDetector(MediaType type, byte[] pattern, int offset) {
         this(type, pattern, null, offset, offset);
     }
 
     /**
-     * Creates a detector for input documents that meet the specified magic
-     * match.  {@code pattern} must NOT be a regular expression.
-     * Constructor maintained for legacy reasons.
+     * Creates a detector for input documents that meet the specified magic match. {@code pattern}
+     * must NOT be a regular expression. Constructor maintained for legacy reasons.
      */
     public MagicDetector(MediaType type, byte[] pattern, byte[] mask, int offsetRangeBegin,
-                         int offsetRangeEnd) {
+                    int offsetRangeEnd) {
         this(type, pattern, mask, false, offsetRangeBegin, offsetRangeEnd);
     }
 
     /**
-     * Creates a detector for input documents that meet the specified
-     * magic match.
+     * Creates a detector for input documents that meet the specified magic match.
      */
     public MagicDetector(MediaType type, byte[] pattern, byte[] mask, boolean isRegex,
-                         int offsetRangeBegin, int offsetRangeEnd) {
+                    int offsetRangeBegin, int offsetRangeEnd) {
         this(type, pattern, mask, isRegex, false, offsetRangeBegin, offsetRangeEnd);
     }
 
     /**
-     * Creates a detector for input documents that meet the specified
-     * magic match.
+     * Creates a detector for input documents that meet the specified magic match.
      */
     public MagicDetector(MediaType type, byte[] pattern, byte[] mask, boolean isRegex,
-                         boolean isStringIgnoreCase, int offsetRangeBegin, int offsetRangeEnd) {
+                    boolean isStringIgnoreCase, int offsetRangeBegin, int offsetRangeEnd) {
         if (type == null) {
             throw new IllegalArgumentException("Matching media type is null");
         } else if (pattern == null) {
             throw new IllegalArgumentException("Magic match pattern is null");
         } else if (offsetRangeBegin < 0 || offsetRangeEnd < offsetRangeBegin) {
-            throw new IllegalArgumentException(
-                    "Invalid offset range: [" + offsetRangeBegin + "," + offsetRangeEnd + "]");
+            throw new IllegalArgumentException("Invalid offset range: [" + offsetRangeBegin + ","
+                            + offsetRangeEnd + "]");
         }
 
         this.type = type;
@@ -185,7 +177,7 @@ public class MagicDetector implements Detector {
     }
 
     public static MagicDetector parse(MediaType mediaType, String type, String offset, String value,
-                                      String mask) {
+                    String mask) {
         int start = 0;
         int end = 0;
         if (offset != null) {
@@ -206,7 +198,7 @@ public class MagicDetector implements Detector {
         }
 
         return new MagicDetector(mediaType, patternBytes, maskBytes, type.equals("regex"),
-                type.equals("stringignorecase"), start, end);
+                        type.equals("stringignorecase"), start, end);
     }
 
     private static byte[] decodeValue(String value, String type) {
@@ -244,25 +236,26 @@ public class MagicDetector implements Detector {
             case "host16":
             case "little16": {
                 int i = Integer.parseInt(tmpVal, radix);
-                decoded = new byte[]{(byte) (i & 0x00FF), (byte) (i >> 8)};
+                decoded = new byte[] {(byte) (i & 0x00FF), (byte) (i >> 8)};
                 break;
             }
             case "big16": {
                 int i = Integer.parseInt(tmpVal, radix);
-                decoded = new byte[]{(byte) (i >> 8), (byte) (i & 0x00FF)};
+                decoded = new byte[] {(byte) (i >> 8), (byte) (i & 0x00FF)};
                 break;
             }
             case "host32":
             case "little32": {
                 long i = Long.parseLong(tmpVal, radix);
-                decoded = new byte[]{(byte) ((i & 0x000000FF)), (byte) ((i & 0x0000FF00) >> 8),
-                        (byte) ((i & 0x00FF0000) >> 16), (byte) ((i & 0xFF000000) >> 24)};
+                decoded = new byte[] {(byte) ((i & 0x000000FF)), (byte) ((i & 0x0000FF00) >> 8),
+                                (byte) ((i & 0x00FF0000) >> 16), (byte) ((i & 0xFF000000) >> 24)};
                 break;
             }
             case "big32": {
                 long i = Long.parseLong(tmpVal, radix);
-                decoded = new byte[]{(byte) ((i & 0xFF000000) >> 24), (byte) ((i & 0x00FF0000) >> 16),
-                        (byte) ((i & 0x0000FF00) >> 8), (byte) ((i & 0x000000FF))};
+                decoded = new byte[] {(byte) ((i & 0xFF000000) >> 24),
+                                (byte) ((i & 0x00FF0000) >> 16), (byte) ((i & 0x0000FF00) >> 8),
+                                (byte) ((i & 0x000000FF))};
                 break;
             }
         }
@@ -296,8 +289,8 @@ public class MagicDetector implements Detector {
                     i++;
                 } else {
                     int j = i + 1;
-                    while ((j < i + 4) && (j < value.length()) &&
-                            (Character.isDigit(value.charAt(j)))) {
+                    while ((j < i + 4) && (j < value.length())
+                                    && (Character.isDigit(value.charAt(j)))) {
                         j++;
                     }
                     decoded.write(Short.decode("0" + value.substring(i + 1, j)).byteValue());
@@ -334,7 +327,7 @@ public class MagicDetector implements Detector {
     }
 
     /**
-     * @param input    document input stream, or <code>null</code>
+     * @param input document input stream, or <code>null</code>
      * @param metadata ignored
      */
     public MediaType detect(InputStream input, Metadata metadata) throws IOException {
@@ -426,13 +419,12 @@ public class MagicDetector implements Detector {
     }
 
     /**
-     * Returns a string representation of the Detection Rule.
-     * Should sort nicely by type and details, as we sometimes
-     * compare these.
+     * Returns a string representation of the Detection Rule. Should sort nicely by type and
+     * details, as we sometimes compare these.
      */
     public String toString() {
         // Needs to be unique, as these get compared.
-        return "Magic Detection for " + type + " looking for " + pattern.length + " bytes = " +
-                Arrays.toString(this.pattern) + " mask = " + Arrays.toString(this.mask);
+        return "Magic Detection for " + type + " looking for " + pattern.length + " bytes = "
+                        + Arrays.toString(this.pattern) + " mask = " + Arrays.toString(this.mask);
     }
 }
diff --git a/tika-core/src/main/java/org/apache/tika/detect/NNExampleModelDetector.java b/tika-core/src/main/java/org/apache/tika/detect/NNExampleModelDetector.java
index bcbf48feb..14117bca9 100644
--- a/tika-core/src/main/java/org/apache/tika/detect/NNExampleModelDetector.java
+++ b/tika-core/src/main/java/org/apache/tika/detect/NNExampleModelDetector.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.detect;
@@ -27,12 +25,10 @@ import java.io.InputStreamReader;
 import java.net.URL;
 import java.nio.file.Path;
 import java.util.Objects;
-
+import org.apache.tika.mime.MediaType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.tika.mime.MediaType;
-
 public class NNExampleModelDetector extends TrainedModelDetector {
     private static final String EXAMPLE_NNMODEL_FILE = "tika-example.nnmodel";
 
@@ -87,12 +83,12 @@ public class NNExampleModelDetector extends TrainedModelDetector {
         // This allows us to replicate class.getResource() when using
         // the classloader directly
         String classPrefix =
-                TrainedModelDetector.class.getPackage().getName().replace('.', '/') + "/";
+                        TrainedModelDetector.class.getPackage().getName().replace('.', '/') + "/";
 
         // Get the core URL, and all the extensions URLs
         URL modelURL = classLoader.getResource(classPrefix + EXAMPLE_NNMODEL_FILE);
         Objects.requireNonNull(modelURL,
-                "required resource " + classPrefix + EXAMPLE_NNMODEL_FILE + " not found");
+                        "required resource " + classPrefix + EXAMPLE_NNMODEL_FILE + " not found");
         try (InputStream stream = modelURL.openStream()) {
             loadDefaultModels(stream);
         } catch (IOException e) {
@@ -102,11 +98,10 @@ public class NNExampleModelDetector extends TrainedModelDetector {
     }
 
     /**
-     * read the comments where the model configuration is written, e.g the
-     * number of inputs, hiddens and output please ensure the first char in the
-     * given string is # In this example grb model file, there are 4 elements 1)
-     * type 2) number of input units 3) number of hidden units. 4) number of
-     * output units.
+     * read the comments where the model configuration is written, e.g the number of inputs, hiddens
+     * and output please ensure the first char in the given string is # In this example grb model
+     * file, there are 4 elements 1) type 2) number of input units 3) number of hidden units. 4)
+     * number of output units.
      */
     private void readDescription(final NNTrainedModelBuilder builder, final String line) {
         int numInputs;
@@ -130,8 +125,8 @@ public class NNExampleModelDetector extends TrainedModelDetector {
     }
 
     /**
-     * Read the next line for the model parameters and populate the build which
-     * later will be used to instantiate the instance of TrainedModel
+     * Read the next line for the model parameters and populate the build which later will be used
+     * to instantiate the instance of TrainedModel
      *
      * @param builder
      * @param line
diff --git a/tika-core/src/main/java/org/apache/tika/detect/NNTrainedModel.java b/tika-core/src/main/java/org/apache/tika/detect/NNTrainedModel.java
index 73ee560db..25de18f41 100644
--- a/tika-core/src/main/java/org/apache/tika/detect/NNTrainedModel.java
+++ b/tika-core/src/main/java/org/apache/tika/detect/NNTrainedModel.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.detect;
@@ -26,7 +24,7 @@ public class NNTrainedModel extends TrainedModel {
     private final float[][] Theta2;
 
     public NNTrainedModel(final int nInput, final int nHidden, final int nOutput,
-                          final float[] nn_params) {
+                    final float[] nn_params) {
         this.numOfInputs = nInput;
         this.numOfHidden = nHidden;
         this.numOfOutputs = nOutput;
@@ -64,8 +62,7 @@ public class NNTrainedModel extends TrainedModel {
     }
 
     /**
-     * The given input vector of unseen is m=(256 + 1) * n= 1 this returns a
-     * prediction probability
+     * The given input vector of unseen is m=(256 + 1) * n= 1 this returns a prediction probability
      */
     @Override
     public float predict(float[] unseen) {
diff --git a/tika-core/src/main/java/org/apache/tika/detect/NNTrainedModelBuilder.java b/tika-core/src/main/java/org/apache/tika/detect/NNTrainedModelBuilder.java
index 9b4eab385..15c5ad14c 100644
--- a/tika-core/src/main/java/org/apache/tika/detect/NNTrainedModelBuilder.java
+++ b/tika-core/src/main/java/org/apache/tika/detect/NNTrainedModelBuilder.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.
  */
 
 
diff --git a/tika-core/src/main/java/org/apache/tika/detect/NameDetector.java b/tika-core/src/main/java/org/apache/tika/detect/NameDetector.java
index 36d01e171..6bd334187 100644
--- a/tika-core/src/main/java/org/apache/tika/detect/NameDetector.java
+++ b/tika-core/src/main/java/org/apache/tika/detect/NameDetector.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.detect;
 
@@ -23,22 +21,20 @@ import java.io.UnsupportedEncodingException;
 import java.net.URLDecoder;
 import java.util.Map;
 import java.util.regex.Pattern;
-
 import org.apache.tika.metadata.Metadata;
 import org.apache.tika.metadata.TikaCoreProperties;
 import org.apache.tika.mime.MediaType;
 
 /**
- * Content type detection based on the resource name. An instance of this
- * class contains a set of regular expression patterns that are matched
- * against the resource name potentially given as a part of the input metadata.
+ * Content type detection based on the resource name. An instance of this class contains a set of
+ * regular expression patterns that are matched against the resource name potentially given as a
+ * part of the input metadata.
  * <p>
- * If a pattern matches the given name, then the media type associated with
- * that pattern is returned as the likely content type of the input document.
- * Otherwise the returned type is <code>application/octet-stream</code>.
+ * If a pattern matches the given name, then the media type associated with that pattern is returned
+ * as the likely content type of the input document. Otherwise the returned type is
+ * <code>application/octet-stream</code>.
  * <p>
- * See the {@link #detect(InputStream, Metadata)} method for more details
- * of the matching algorithm.
+ * See the {@link #detect(InputStream, Metadata)} method for more details of the matching algorithm.
  *
  * @since Apache Tika 0.3
  */
@@ -50,10 +46,9 @@ public class NameDetector implements Detector {
     private final Map<Pattern, MediaType> patterns;
 
     /**
-     * Creates a new content type detector based on the given name patterns.
-     * The given pattern map is not copied, so the caller may update the
-     * mappings even after this detector instance has been created. However,
-     * the map <em>must not be concurrently modified</em> while this instance
+     * Creates a new content type detector based on the given name patterns. The given pattern map
+     * is not copied, so the caller may update the mappings even after this detector instance has
+     * been created. However, the map <em>must not be concurrently modified</em> while this instance
      * is used for type detection.
      *
      * @param patterns map from name patterns to corresponding media types
@@ -63,34 +58,24 @@ public class NameDetector implements Detector {
     }
 
     /**
-     * Detects the content type of an input document based on the document
-     * name given in the input metadata. The RESOURCE_NAME_KEY attribute of
-     * the given input metadata is expected to contain the name (normally
-     * a file name or a URL) of the input document.
+     * Detects the content type of an input document based on the document name given in the input
+     * metadata. The RESOURCE_NAME_KEY attribute of the given input metadata is expected to contain
+     * the name (normally a file name or a URL) of the input document.
      * <p>
      * If a resource name is given, then it is first processed as follows.
      * <ol>
-     *   <li>
-     *     Potential URL query (?...) and fragment identifier (#...)
-     *     parts are removed from the end of the resource name.
-     *   </li>
-     *   <li>
-     *     Potential leading path elements (up to the last slash or backslash)
-     *     are removed from the beginning of the resource name.
-     *   </li>
-     *   <li>
-     *     Potential URL encodings (%nn, in UTF-8) are decoded.
-     *   </li>
-     *   <li>
-     *     Any leading and trailing whitespace is removed.
-     *   </li>
+     * <li>Potential URL query (?...) and fragment identifier (#...) parts are removed from the end
+     * of the resource name.</li>
+     * <li>Potential leading path elements (up to the last slash or backslash) are removed from the
+     * beginning of the resource name.</li>
+     * <li>Potential URL encodings (%nn, in UTF-8) are decoded.</li>
+     * <li>Any leading and trailing whitespace is removed.</li>
      * </ol>
      * <p>
-     * The resulting name string (if any) is then matched in sequence against
-     * all the configured name patterns. If a match is found, then the (first)
-     * matching media type is returned.
+     * The resulting name string (if any) is then matched in sequence against all the configured
+     * name patterns. If a match is found, then the (first) matching media type is returned.
      *
-     * @param input    ignored
+     * @param input ignored
      * @param metadata input metadata, possibly with a RESOURCE_NAME_KEY value
      * @return detected media type, or <code>application/octet-stream</code>
      */
diff --git a/tika-core/src/main/java/org/apache/tika/detect/NonDetectingEncodingDetector.java b/tika-core/src/main/java/org/apache/tika/detect/NonDetectingEncodingDetector.java
index 896a79531..7ec58f4d8 100644
--- a/tika-core/src/main/java/org/apache/tika/detect/NonDetectingEncodingDetector.java
+++ b/tika-core/src/main/java/org/apache/tika/detect/NonDetectingEncodingDetector.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.detect;
@@ -21,7 +19,6 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.nio.charset.Charset;
 import java.nio.charset.StandardCharsets;
-
 import org.apache.tika.config.Field;
 import org.apache.tika.metadata.Metadata;
 
@@ -29,8 +26,8 @@ import org.apache.tika.metadata.Metadata;
  * Always returns the charset passed in via the initializer
  */
 public class NonDetectingEncodingDetector implements EncodingDetector {
-    //would have preferred final, but need mutability for
-    //loading via TikaConfig
+    // would have preferred final, but need mutability for
+    // loading via TikaConfig
     private Charset charset = StandardCharsets.UTF_8;
 
     /**
diff --git a/tika-core/src/main/java/org/apache/tika/detect/OverrideDetector.java b/tika-core/src/main/java/org/apache/tika/detect/OverrideDetector.java
index b6c5a41f8..879cff0f7 100644
--- a/tika-core/src/main/java/org/apache/tika/detect/OverrideDetector.java
+++ b/tika-core/src/main/java/org/apache/tika/detect/OverrideDetector.java
@@ -1,24 +1,21 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.detect;
 
 import java.io.IOException;
 import java.io.InputStream;
-
 import org.apache.tika.metadata.Metadata;
 import org.apache.tika.metadata.TikaCoreProperties;
 import org.apache.tika.mime.MediaType;
@@ -27,8 +24,8 @@ import org.apache.tika.mime.MediaType;
  * Use this to force a content type detection via the
  * {@link TikaCoreProperties#CONTENT_TYPE_USER_OVERRIDE} key in the metadata object.
  * <p>
- * This is also required to override detection by some parsers
- * via {@link TikaCoreProperties#CONTENT_TYPE_PARSER_OVERRIDE}.
+ * This is also required to override detection by some parsers via
+ * {@link TikaCoreProperties#CONTENT_TYPE_PARSER_OVERRIDE}.
  *
  * @deprecated after 2.5.0 this functionality was moved to the CompositeDetector
  */
diff --git a/tika-core/src/main/java/org/apache/tika/detect/TextDetector.java b/tika-core/src/main/java/org/apache/tika/detect/TextDetector.java
index 96583be7c..796eb868a 100644
--- a/tika-core/src/main/java/org/apache/tika/detect/TextDetector.java
+++ b/tika-core/src/main/java/org/apache/tika/detect/TextDetector.java
@@ -1,38 +1,34 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.detect;
 
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.Arrays;
-
 import org.apache.tika.metadata.Metadata;
 import org.apache.tika.mime.MediaType;
 
 /**
- * Content type detection of plain text documents. This detector looks at the
- * beginning of the document input stream and considers the document to be
- * a text document if no ASCII (ISO-Latin-1, UTF-8, etc.) control bytes are
- * found. As a special case some control bytes (up to 2% of all characters)
- * are also allowed in a text document if it also contains no or just a few
- * (less than 10%) characters above the 7-bit ASCII range.
+ * Content type detection of plain text documents. This detector looks at the beginning of the
+ * document input stream and considers the document to be a text document if no ASCII (ISO-Latin-1,
+ * UTF-8, etc.) control bytes are found. As a special case some control bytes (up to 2% of all
+ * characters) are also allowed in a text document if it also contains no or just a few (less than
+ * 10%) characters above the 7-bit ASCII range.
  * <p>
- * Note that text documents with a character encoding like UTF-16 are better
- * detected with {@link MagicDetector} and an appropriate magic byte pattern.
+ * Note that text documents with a character encoding like UTF-16 are better detected with
+ * {@link MagicDetector} and an appropriate magic byte pattern.
  *
  * @since Apache Tika 0.3
  */
@@ -44,21 +40,20 @@ public class TextDetector implements Detector {
     private static final long serialVersionUID = 4774601079503507765L;
 
     /**
-     * The number of bytes from the beginning of the document stream
-     * to test for control bytes.
+     * The number of bytes from the beginning of the document stream to test for control bytes.
      */
     private static final int DEFAULT_NUMBER_OF_BYTES_TO_TEST = 512;
 
     /**
-     * Lookup table for all the ASCII/ISO-Latin/UTF-8/etc. control bytes
-     * in the range below 0x20 (the space character). If an entry in this
-     * table is <code>true</code> then that byte is very unlikely to occur
-     * in a plain text document.
+     * Lookup table for all the ASCII/ISO-Latin/UTF-8/etc. control bytes in the range below 0x20
+     * (the space character). If an entry in this table is <code>true</code> then that byte is very
+     * unlikely to occur in a plain text document.
      * <p>
-     * The contents of this lookup table are based on the following definition
-     * from section 4 of the "Content-Type Processing Model" Internet-draft
+     * The contents of this lookup table are based on the following definition from section 4 of the
+     * "Content-Type Processing Model" Internet-draft
      * (<a href="http://webblaze.cs.berkeley.edu/2009/mime-sniff/mime-sniff.txt"
      * >draft-abarth-mime-sniff-01</a>).
+     * 
      * <pre>
      * +-------------------------+
      * | Binary data byte ranges |
@@ -86,29 +81,29 @@ public class TextDetector implements Detector {
     private final int bytesToTest;
 
     /**
-     * Constructs a {@link TextDetector} which will look at the default number
-     * of bytes from the beginning of the document.
+     * Constructs a {@link TextDetector} which will look at the default number of bytes from the
+     * beginning of the document.
      */
     public TextDetector() {
         this(DEFAULT_NUMBER_OF_BYTES_TO_TEST);
     }
 
     /**
-     * Constructs a {@link TextDetector} which will look at a given number of
-     * bytes from the beginning of the document.
+     * Constructs a {@link TextDetector} which will look at a given number of bytes from the
+     * beginning of the document.
      */
     public TextDetector(int bytesToTest) {
         this.bytesToTest = bytesToTest;
     }
 
     /**
-     * Looks at the beginning of the document input stream to determine
-     * whether the document is text or not.
+     * Looks at the beginning of the document input stream to determine whether the document is text
+     * or not.
      *
-     * @param input    document input stream, or <code>null</code>
+     * @param input document input stream, or <code>null</code>
      * @param metadata ignored
-     * @return "text/plain" if the input stream suggest a text document,
-     * "application/octet-stream" otherwise
+     * @return "text/plain" if the input stream suggest a text document, "application/octet-stream"
+     *         otherwise
      */
     public MediaType detect(InputStream input, Metadata metadata) throws IOException {
         if (input == null) {
diff --git a/tika-core/src/main/java/org/apache/tika/detect/TextStatistics.java b/tika-core/src/main/java/org/apache/tika/detect/TextStatistics.java
index 50f8d790a..9434af867 100644
--- a/tika-core/src/main/java/org/apache/tika/detect/TextStatistics.java
+++ b/tika-core/src/main/java/org/apache/tika/detect/TextStatistics.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.detect;
 
@@ -35,11 +33,11 @@ public class TextStatistics {
     }
 
     /**
-     * Checks whether at least one byte was seen and that the bytes that
-     * were seen were mostly plain text (i.e. < 2% control, > 90% ASCII range).
+     * Checks whether at least one byte was seen and that the bytes that were seen were mostly plain
+     * text (i.e. < 2% control, > 90% ASCII range).
      *
-     * @return <code>true</code> if the seen bytes were mostly safe ASCII,
-     * <code>false</code> otherwise
+     * @return <code>true</code> if the seen bytes were mostly safe ASCII, <code>false</code>
+     *         otherwise
      * @see <a href="https://issues.apache.org/jira/browse/TIKA-483">TIKA-483</a>
      * @see <a href="https://issues.apache.org/jira/browse/TIKA-688">TIKA-688</a>
      */
@@ -53,8 +51,7 @@ public class TextStatistics {
     /**
      * Checks whether the observed byte stream looks like UTF-8 encoded text.
      *
-     * @return <code>true</code> if the seen bytes look like UTF-8,
-     * <code>false</code> otherwise
+     * @return <code>true</code> if the seen bytes look like UTF-8, <code>false</code> otherwise
      * @since Apache Tika 1.3
      */
     public boolean looksLikeUTF8() {
@@ -63,16 +60,16 @@ public class TextStatistics {
         int safe = countSafeControl();
 
         int expectedContinuation = 0;
-        int[] leading = new int[]{count(0xc0, 0xe0), count(0xe0, 0xf0), count(0xf0, 0xf8)};
+        int[] leading = new int[] {count(0xc0, 0xe0), count(0xe0, 0xf0), count(0xf0, 0xf8)};
         for (int i = 0; i < leading.length; i++) {
             utf8 += leading[i];
             expectedContinuation += (i + 1) * leading[i];
         }
 
         int continuation = count(0x80, 0xc0);
-        return utf8 > 0 && continuation <= expectedContinuation &&
-                continuation >= expectedContinuation - 3 && count(0xf8, 0x100) == 0 &&
-                (control - safe) * 100 < utf8 * 2;
+        return utf8 > 0 && continuation <= expectedContinuation
+                        && continuation >= expectedContinuation - 3 && count(0xf8, 0x100) == 0
+                        && (control - safe) * 100 < utf8 * 2;
     }
 
     /**
@@ -95,13 +92,13 @@ public class TextStatistics {
     }
 
     /**
-     * Counts control characters (i.e. < 0x20, excluding tab, CR, LF,
-     * page feed and escape).
+     * Counts control characters (i.e. < 0x20, excluding tab, CR, LF, page feed and escape).
      * <p>
-     * This definition of control characters is based on section 4 of the
-     * "Content-Type Processing Model" Internet-draft
+     * This definition of control characters is based on section 4 of the "Content-Type Processing
+     * Model" Internet-draft
      * (<a href="http://webblaze.cs.berkeley.edu/2009/mime-sniff/mime-sniff.txt"
      * >draft-abarth-mime-sniff-01</a>).
+     * 
      * <pre>
      * +-------------------------+
      * | Binary data byte ranges |
@@ -150,7 +147,7 @@ public class TextStatistics {
 
     private int countSafeControl() {
         return count('\t') + count('\n') + count('\r') // tab, LF, CR
-                + count(0x0c) + count(0x1b);           // new page, escape
+                        + count(0x0c) + count(0x1b); // new page, escape
     }
 
 }
diff --git a/tika-core/src/main/java/org/apache/tika/detect/TrainedModel.java b/tika-core/src/main/java/org/apache/tika/detect/TrainedModel.java
index 0111b233b..53e16dfcf 100644
--- a/tika-core/src/main/java/org/apache/tika/detect/TrainedModel.java
+++ b/tika-core/src/main/java/org/apache/tika/detect/TrainedModel.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.detect;
 
diff --git a/tika-core/src/main/java/org/apache/tika/detect/TrainedModelDetector.java b/tika-core/src/main/java/org/apache/tika/detect/TrainedModelDetector.java
index 25b9f085b..8592d67bc 100644
--- a/tika-core/src/main/java/org/apache/tika/detect/TrainedModelDetector.java
+++ b/tika-core/src/main/java/org/apache/tika/detect/TrainedModelDetector.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.detect;
@@ -31,7 +29,6 @@ import java.nio.file.Files;
 import java.nio.file.Path;
 import java.util.HashMap;
 import java.util.Map;
-
 import org.apache.tika.io.TemporaryResources;
 import org.apache.tika.metadata.Metadata;
 import org.apache.tika.mime.MediaType;
@@ -61,8 +58,7 @@ public abstract class TrainedModelDetector implements Detector {
             MediaType maxType = MediaType.OCTET_STREAM;
 
             /*
-             * iterate the map to find out the one that gives the higher
-             * prediction value.
+             * iterate the map to find out the one that gives the higher prediction value.
              */
             for (Map.Entry<MediaType, TrainedModel> entry : MODEL_MAP.entrySet()) {
                 MediaType key = entry.getKey();
diff --git a/tika-core/src/main/java/org/apache/tika/detect/TypeDetector.java b/tika-core/src/main/java/org/apache/tika/detect/TypeDetector.java
index 60d75c7b0..6e4b14e07 100644
--- a/tika-core/src/main/java/org/apache/tika/detect/TypeDetector.java
+++ b/tika-core/src/main/java/org/apache/tika/detect/TypeDetector.java
@@ -1,43 +1,39 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.detect;
 
 import java.io.InputStream;
-
 import org.apache.tika.metadata.Metadata;
 import org.apache.tika.mime.MediaType;
 
 /**
- * Content type detection based on a content type hint. This detector simply
- * trusts any valid content type hint given in the input metadata, and returns
- * that as the likely type of the input document.
+ * Content type detection based on a content type hint. This detector simply trusts any valid
+ * content type hint given in the input metadata, and returns that as the likely type of the input
+ * document.
  *
  * @since Apache Tika 0.3
  */
 public class TypeDetector implements Detector {
 
     /**
-     * Detects the content type of an input document based on a type hint
-     * given in the input metadata. The CONTENT_TYPE attribute of the given
-     * input metadata is expected to contain the type of the input document.
-     * If that attribute exists and contains a valid type name, then that
-     * type is returned.
+     * Detects the content type of an input document based on a type hint given in the input
+     * metadata. The CONTENT_TYPE attribute of the given input metadata is expected to contain the
+     * type of the input document. If that attribute exists and contains a valid type name, then
+     * that type is returned.
      *
-     * @param input    ignored
+     * @param input ignored
      * @param metadata input metadata, possibly with a CONTENT_TYPE value
      * @return detected media type, or <code>application/octet-stream</code>
      */
diff --git a/tika-core/src/main/java/org/apache/tika/detect/XmlRootExtractor.java b/tika-core/src/main/java/org/apache/tika/detect/XmlRootExtractor.java
index 94d853149..5589318e7 100644
--- a/tika-core/src/main/java/org/apache/tika/detect/XmlRootExtractor.java
+++ b/tika-core/src/main/java/org/apache/tika/detect/XmlRootExtractor.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.detect;
 
@@ -20,19 +18,17 @@ import java.io.CharConversionException;
 import java.io.InputStream;
 import java.util.Arrays;
 import javax.xml.namespace.QName;
-
 import org.apache.commons.io.input.CloseShieldInputStream;
 import org.apache.commons.io.input.UnsynchronizedByteArrayInputStream;
+import org.apache.tika.parser.ParseContext;
+import org.apache.tika.utils.XMLReaderUtils;
 import org.xml.sax.Attributes;
 import org.xml.sax.SAXException;
 import org.xml.sax.helpers.DefaultHandler;
 
-import org.apache.tika.parser.ParseContext;
-import org.apache.tika.utils.XMLReaderUtils;
-
 /**
- * Utility class that uses a {@link javax.xml.parsers.SAXParser} to determine
- * the namespace URI and local name of the root element of an XML file.
+ * Utility class that uses a {@link javax.xml.parsers.SAXParser} to determine the namespace URI and
+ * local name of the root element of an XML file.
  *
  * @since Apache Tika 0.4
  */
@@ -66,17 +62,16 @@ public class XmlRootExtractor {
     public QName extractRootElement(InputStream stream) {
         return extractRootElement(stream, false);
     }
-    
+
     private QName extractRootElement(InputStream stream, boolean throwMalformed) {
         ExtractorHandler handler = new ExtractorHandler();
         try {
-            XMLReaderUtils.parseSAX(CloseShieldInputStream.wrap(stream),
-                    handler, EMPTY_CONTEXT);
+            XMLReaderUtils.parseSAX(CloseShieldInputStream.wrap(stream), handler, EMPTY_CONTEXT);
         } catch (SecurityException e) {
             throw e;
         } catch (Exception e) {
             if (throwMalformed && (e instanceof CharConversionException
-                    || e.getCause() instanceof CharConversionException)) {
+                            || e.getCause() instanceof CharConversionException)) {
                 throw new MalformedCharException(e);
             }
         }
@@ -89,7 +84,7 @@ public class XmlRootExtractor {
 
         @Override
         public void startElement(String uri, String local, String name, Attributes attributes)
-                throws SAXException {
+                        throws SAXException {
             this.rootElement = new QName(uri, local);
             throw new SAXException("Aborting: root element received");
         }
diff --git a/tika-core/src/main/java/org/apache/tika/detect/ZeroSizeFileDetector.java b/tika-core/src/main/java/org/apache/tika/detect/ZeroSizeFileDetector.java
index 5ce52681e..3ba9cbdb4 100644
--- a/tika-core/src/main/java/org/apache/tika/detect/ZeroSizeFileDetector.java
+++ b/tika-core/src/main/java/org/apache/tika/detect/ZeroSizeFileDetector.java
@@ -1,24 +1,21 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.detect;
 
 import java.io.IOException;
 import java.io.InputStream;
-
 import org.apache.tika.metadata.Metadata;
 import org.apache.tika.mime.MediaType;
 
diff --git a/tika-core/src/main/java/org/apache/tika/detect/package-info.java b/tika-core/src/main/java/org/apache/tika/detect/package-info.java
index dede49cfb..7e6ae4476 100644
--- a/tika-core/src/main/java/org/apache/tika/detect/package-info.java
+++ b/tika-core/src/main/java/org/apache/tika/detect/package-info.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.
  */
 
 /**
diff --git a/tika-core/src/main/java/org/apache/tika/embedder/Embedder.java b/tika-core/src/main/java/org/apache/tika/embedder/Embedder.java
index 2af59d326..1aad277e5 100644
--- a/tika-core/src/main/java/org/apache/tika/embedder/Embedder.java
+++ b/tika-core/src/main/java/org/apache/tika/embedder/Embedder.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.embedder;
 
@@ -21,7 +19,6 @@ import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.Serializable;
 import java.util.Set;
-
 import org.apache.tika.exception.TikaException;
 import org.apache.tika.metadata.Metadata;
 import org.apache.tika.mime.MediaType;
@@ -36,11 +33,11 @@ import org.apache.tika.parser.Parser;
 public interface Embedder extends Serializable {
 
     /**
-     * Returns the set of media types supported by this embedder when used with
-     * the given parse context.
+     * Returns the set of media types supported by this embedder when used with the given parse
+     * context.
      * <p>
-     * The name differs from the precedence of {@link Parser#getSupportedTypes(ParseContext)}
-     * so that parser implementations may also choose to implement this interface.
+     * The name differs from the precedence of {@link Parser#getSupportedTypes(ParseContext)} so
+     * that parser implementations may also choose to implement this interface.
      *
      * @param context parse context
      * @return immutable set of media types
@@ -48,46 +45,41 @@ public interface Embedder extends Serializable {
     Set<MediaType> getSupportedEmbedTypes(ParseContext context);
 
     /**
-     * Embeds related document metadata from the given metadata object into the
-     * given output stream.
+     * Embeds related document metadata from the given metadata object into the given output stream.
      * <p>
-     * The given document stream is consumed but not closed by this method. The
-     * responsibility to close the stream remains on the caller.
+     * The given document stream is consumed but not closed by this method. The responsibility to
+     * close the stream remains on the caller.
      * <p>
-     * Information about the parsing context can be passed in the context
-     * parameter. See the parser implementations for the kinds of context
-     * information they expect.
+     * Information about the parsing context can be passed in the context parameter. See the parser
+     * implementations for the kinds of context information they expect.
      * <p>
-     * In general implementations should favor preserving the source file's metadata
-     * unless an update to a field is explicitly defined in the Metadata object.
-     * More specifically:
+     * In general implementations should favor preserving the source file's metadata unless an
+     * update to a field is explicitly defined in the Metadata object. More specifically:
      * <ul>
-     *  <li>Embedder implementations should only attempt to update metadata fields
-     *  present in the given Metadata object.  Other fields should be left untouched.</li>
-     *  <li>Embedder implementations should set properties as empty when the
-     *  corresponding field in the Metadata object is an empty string, i.e. ""</li>
-     *  <li>Embedder implementations should nullify or delete properties
-     *  corresponding to fields with a null value in the given Metadata object.</li>
-     *  <li>Embedder implementations should set the property
-     *  corresponding to a particular field in the given Metadata object in all
-     *  metadata containers whenever possible and appropriate for the file format at the time.
-     *  If a particular metadata container falls out of use and/or is superseded by another
-     *  (such as IIC vs XMP for IPTC) it is up to the implementation to decide if and when
-     *  to cease embedding in the alternate container.</li>
-     *  <li>Embedder implementations should attempt to embed as much of the metadata
-     *  as accurately as possible. An implementation may choose a strict approach
-     *  and throw an exception if a value to be embedded exceeds the length allowed
-     *  or may choose to truncate the value.</li>
+     * <li>Embedder implementations should only attempt to update metadata fields present in the
+     * given Metadata object. Other fields should be left untouched.</li>
+     * <li>Embedder implementations should set properties as empty when the corresponding field in
+     * the Metadata object is an empty string, i.e. ""</li>
+     * <li>Embedder implementations should nullify or delete properties corresponding to fields with
+     * a null value in the given Metadata object.</li>
+     * <li>Embedder implementations should set the property corresponding to a particular field in
+     * the given Metadata object in all metadata containers whenever possible and appropriate for
+     * the file format at the time. If a particular metadata container falls out of use and/or is
+     * superseded by another (such as IIC vs XMP for IPTC) it is up to the implementation to decide
+     * if and when to cease embedding in the alternate container.</li>
+     * <li>Embedder implementations should attempt to embed as much of the metadata as accurately as
+     * possible. An implementation may choose a strict approach and throw an exception if a value to
+     * be embedded exceeds the length allowed or may choose to truncate the value.</li>
      * </ul>
      *
-     * @param metadata       document metadata (input and output)
+     * @param metadata document metadata (input and output)
      * @param originalStream the document stream (input)
-     * @param outputStream   the output stream to write the metadata embedded data to
-     * @param context        parse context
-     * @throws IOException   if the document stream could not be read
+     * @param outputStream the output stream to write the metadata embedded data to
+     * @param context parse context
+     * @throws IOException if the document stream could not be read
      * @throws TikaException if the document could not be parsed
      */
     void embed(Metadata metadata, InputStream originalStream, OutputStream outputStream,
-               ParseContext context) throws IOException, TikaException;
+                    ParseContext context) throws IOException, TikaException;
 
 }
diff --git a/tika-core/src/main/java/org/apache/tika/embedder/ExternalEmbedder.java b/tika-core/src/main/java/org/apache/tika/embedder/ExternalEmbedder.java
index c58d57345..edba0747b 100644
--- a/tika-core/src/main/java/org/apache/tika/embedder/ExternalEmbedder.java
+++ b/tika-core/src/main/java/org/apache/tika/embedder/ExternalEmbedder.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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.tika.embedder;
 
@@ -29,10 +27,8 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream;
-
 import org.apache.tika.exception.TikaException;
 import org.apache.tika.io.TemporaryResources;
 import org.apache.tika.io.TikaInputStream;
@@ -43,24 +39,22 @@ import org.apache.tika.parser.ParseContext;
 import org.apache.tika.parser.external.ExternalParser;
 
 /**
- * Embedder that uses an external program (like sed or exiftool) to embed text
- * content and metadata into a given document.
+ * Embedder that uses an external program (like sed or exiftool) to embed text content and metadata
+ * into a given document.
  *
  * @since Apache Tika 1.3
  */
 public class ExternalEmbedder implements Embedder {
 
     /**
-     * Token to be replaced with a String array of metadata assignment command
-     * arguments
+     * Token to be replaced with a String array of metadata assignment command arguments
      */
     public static final String METADATA_COMMAND_ARGUMENTS_TOKEN = "${METADATA}";
     /**
-     * Token to be replaced with a String array of metadata assignment command
-     * arguments
+     * Token to be replaced with a String array of metadata assignment command arguments
      */
     public static final String METADATA_COMMAND_ARGUMENTS_SERIALIZED_TOKEN =
-            "${METADATA_SERIALIZED}";
+                    "${METADATA_SERIALIZED}";
     private static final long serialVersionUID = -2828829275642475697L;
     private final TemporaryResources tmp = new TemporaryResources();
     /**
@@ -76,8 +70,8 @@ public class ExternalEmbedder implements Embedder {
      *
      * @see Runtime#exec(String[])
      */
-    private String[] command =
-            new String[]{"sed", "-e", "$a\\\n" + METADATA_COMMAND_ARGUMENTS_SERIALIZED_TOKEN,
+    private String[] command = new String[] {"sed", "-e",
+                    "$a\\\n" + METADATA_COMMAND_ARGUMENTS_SERIALIZED_TOKEN,
                     ExternalParser.INPUT_FILE_TOKEN};
     private String commandAssignmentOperator = "=";
     private String commandAssignmentDelimeter = ", ";
@@ -85,8 +79,7 @@ public class ExternalEmbedder implements Embedder {
     private boolean quoteAssignmentValues = false;
 
     /**
-     * Serializes a collection of metadata command line arguments into a single
-     * string.
+     * Serializes a collection of metadata command line arguments into a single string.
      *
      * @param metadataCommandArguments
      * @return the serialized metadata arguments string
@@ -99,30 +92,28 @@ public class ExternalEmbedder implements Embedder {
     }
 
     /**
-     * Checks to see if the command can be run. Typically used with something
-     * like "myapp --version" to check to see if "myapp" is installed and on the
-     * path.
+     * Checks to see if the command can be run. Typically used with something like "myapp --version"
+     * to check to see if "myapp" is installed and on the path.
      *
-     * @param checkCmd   the check command to run
+     * @param checkCmd the check command to run
      * @param errorValue what is considered an error value?
      * @return whether or not the check completed without error
      */
     public static boolean check(String checkCmd, int... errorValue) {
-        return check(new String[]{checkCmd}, errorValue);
+        return check(new String[] {checkCmd}, errorValue);
     }
 
     /**
-     * Checks to see if the command can be run. Typically used with something
-     * like "myapp --version" to check to see if "myapp" is installed and on the
-     * path.
+     * Checks to see if the command can be run. Typically used with something like "myapp --version"
+     * to check to see if "myapp" is installed and on the path.
      *
-     * @param checkCmd   the check command to run
+     * @param checkCmd the check command to run
      * @param errorValue what is considered an error value?
      * @return whether or not the check completed without error
      */
     public static boolean check(String[] checkCmd, int... errorValue) {
         if (errorValue.length == 0) {
-            errorValue = new int[]{127};
+            errorValue = new int[] {127};
         }
 
         try {
@@ -156,15 +147,13 @@ public class ExternalEmbedder implements Embedder {
     }
 
     public void setSupportedEmbedTypes(Set<MediaType> supportedEmbedTypes) {
-        this.supportedEmbedTypes =
-                Collections.unmodifiableSet(new HashSet<>(supportedEmbedTypes));
+        this.supportedEmbedTypes = Collections.unmodifiableSet(new HashSet<>(supportedEmbedTypes));
     }
 
     /**
      * Gets the command to be run. This can include either of
-     * {@link ExternalParser#INPUT_FILE_TOKEN} or
-     * {@link ExternalParser#OUTPUT_FILE_TOKEN} if the command
-     * needs filenames.
+     * {@link ExternalParser#INPUT_FILE_TOKEN} or {@link ExternalParser#OUTPUT_FILE_TOKEN} if the
+     * command needs filenames.
      *
      * @return
      */
@@ -174,9 +163,8 @@ public class ExternalEmbedder implements Embedder {
 
     /**
      * Sets the command to be run. This can include either of
-     * {@link ExternalParser#INPUT_FILE_TOKEN} or
-     * {@link ExternalParser#OUTPUT_FILE_TOKEN} if the command
-     * needs filenames.
+     * {@link ExternalParser#INPUT_FILE_TOKEN} or {@link ExternalParser#OUTPUT_FILE_TOKEN} if the
+     * command needs filenames.
      *
      * @see Runtime#exec(String[])
      */
@@ -203,8 +191,7 @@ public class ExternalEmbedder implements Embedder {
     }
 
     /**
-     * Gets the delimiter for multiple assignments for the command line tool,
-     * i.e. ", ".
+     * Gets the delimiter for multiple assignments for the command line tool, i.e. ", ".
      *
      * @return the assignment delimiter
      */
@@ -213,8 +200,7 @@ public class ExternalEmbedder implements Embedder {
     }
 
     /**
-     * Sets the delimiter for multiple assignments for the command line tool,
-     * i.e. ", ".
+     * Sets the delimiter for multiple assignments for the command line tool, i.e. ", ".
      *
      * @param commandAssignmentDelimeter
      */
@@ -223,8 +209,7 @@ public class ExternalEmbedder implements Embedder {
     }
 
     /**
-     * Gets the operator to append rather than replace a value for the command
-     * line tool, i.e. "+=".
+     * Gets the operator to append rather than replace a value for the command line tool, i.e. "+=".
      *
      * @return the append operator
      */
@@ -233,8 +218,7 @@ public class ExternalEmbedder implements Embedder {
     }
 
     /**
-     * Sets the operator to append rather than replace a value for the command
-     * line tool, i.e. "+=".
+     * Sets the operator to append rather than replace a value for the command line tool, i.e. "+=".
      *
      * @param commandAppendOperator
      */
@@ -243,8 +227,7 @@ public class ExternalEmbedder implements Embedder {
     }
 
     /**
-     * Gets whether or not to quote assignment values, i.e. tag='value'. The
-     * default is false.
+     * Gets whether or not to quote assignment values, i.e. tag='value'. The default is false.
      *
      * @return whether or not to quote assignment values
      */
@@ -271,8 +254,8 @@ public class ExternalEmbedder implements Embedder {
     }
 
     /**
-     * Sets the map of Metadata keys to command line parameters. Set this to
-     * null to disable Metadata embedding.
+     * Sets the map of Metadata keys to command line parameters. Set this to null to disable
+     * Metadata embedding.
      *
      * @param arguments
      */
@@ -281,8 +264,8 @@ public class ExternalEmbedder implements Embedder {
     }
 
     /**
-     * Constructs a collection of command line arguments responsible for setting
-     * individual metadata fields based on the given <code>metadata</code>.
+     * Constructs a collection of command line arguments responsible for setting individual metadata
+     * fields based on the given <code>metadata</code>.
      *
      * @param metadata the metadata to embed
      * @return the metadata-related command line arguments
@@ -304,18 +287,16 @@ public class ExternalEmbedder implements Embedder {
                                     if (quoteAssignmentValues) {
                                         assignmentValue = "'" + assignmentValue + "'";
                                     }
-                                    commandMetadataSegments
-                                            .add(metadataCommandArgument + commandAppendOperator +
-                                                    assignmentValue);
+                                    commandMetadataSegments.add(metadataCommandArgument
+                                                    + commandAppendOperator + assignmentValue);
                                 }
                             } else {
                                 String assignmentValue = metadata.get(metadataName);
                                 if (quoteAssignmentValues) {
                                     assignmentValue = "'" + assignmentValue + "'";
                                 }
-                                commandMetadataSegments
-                                        .add(metadataCommandArgument + commandAssignmentOperator +
-                                                assignmentValue);
+                                commandMetadataSegments.add(metadataCommandArgument
+                                                + commandAssignmentOperator + assignmentValue);
                             }
                         }
                     }
@@ -326,20 +307,19 @@ public class ExternalEmbedder implements Embedder {
     }
 
     /**
-     * Executes the configured external command and passes the given document
-     * stream as a simple XHTML document to the given SAX content handler.
-     * Metadata is only extracted if {@link #setMetadataCommandArguments(Map)}
-     * has been called to set arguments.
+     * Executes the configured external command and passes the given document stream as a simple
+     * XHTML document to the given SAX content handler. Metadata is only extracted if
+     * {@link #setMetadataCommandArguments(Map)} has been called to set arguments.
      */
     @Override
     public void embed(final Metadata metadata, final InputStream inputStream,
-                      final OutputStream outputStream, final ParseContext context)
-            throws IOException, TikaException {
+                    final OutputStream outputStream, final ParseContext context)
+                    throws IOException, TikaException {
 
         boolean inputToStdIn = true;
         boolean outputFromStdOut = true;
         boolean hasMetadataCommandArguments =
-                (metadataCommandArguments != null && !metadataCommandArguments.isEmpty());
+                        (metadataCommandArguments != null && !metadataCommandArguments.isEmpty());
         boolean serializeMetadataCommandArgumentsToken = false;
         boolean replacedMetadataCommandArgumentsToken = false;
 
@@ -357,13 +337,13 @@ public class ExternalEmbedder implements Embedder {
         for (String commandSegment : origCmd) {
             if (commandSegment.contains(ExternalParser.INPUT_FILE_TOKEN)) {
                 commandSegment = commandSegment.replace(ExternalParser.INPUT_FILE_TOKEN,
-                        tikaInputStream.getFile().toString());
+                                tikaInputStream.getFile().toString());
                 inputToStdIn = false;
             }
             if (commandSegment.contains(ExternalParser.OUTPUT_FILE_TOKEN)) {
                 tempOutputFile = tmp.createTemporaryFile();
-                commandSegment = commandSegment
-                        .replace(ExternalParser.OUTPUT_FILE_TOKEN, tempOutputFile.toString());
+                commandSegment = commandSegment.replace(ExternalParser.OUTPUT_FILE_TOKEN,
+                                tempOutputFile.toString());
                 outputFromStdOut = false;
             }
             if (commandSegment.contains(METADATA_COMMAND_ARGUMENTS_SERIALIZED_TOKEN)) {
@@ -384,15 +364,15 @@ public class ExternalEmbedder implements Embedder {
                 int i = 0;
                 for (String commandSegment : cmd) {
                     if (commandSegment.contains(METADATA_COMMAND_ARGUMENTS_SERIALIZED_TOKEN)) {
-                        commandSegment = commandSegment
-                                .replace(METADATA_COMMAND_ARGUMENTS_SERIALIZED_TOKEN,
+                        commandSegment = commandSegment.replace(
+                                        METADATA_COMMAND_ARGUMENTS_SERIALIZED_TOKEN,
                                         serializeMetadata(commandMetadataSegments));
                         cmd.set(i, commandSegment);
                     }
                     i++;
                 }
-            } else if (!replacedMetadataCommandArgumentsToken &&
-                    !serializeMetadataCommandArgumentsToken) {
+            } else if (!replacedMetadataCommandArgumentsToken
+                            && !serializeMetadataCommandArgumentsToken) {
                 // Tack metadata onto the end of the cmd as arguments
                 cmd.addAll(commandMetadataSegments);
             }
@@ -406,7 +386,8 @@ public class ExternalEmbedder implements Embedder {
             process = Runtime.getRuntime().exec(cmd.toArray(String[]::new));
         }
 
-        UnsynchronizedByteArrayOutputStream stdErrOutputStream = UnsynchronizedByteArrayOutputStream.builder().get();
+        UnsynchronizedByteArrayOutputStream stdErrOutputStream =
+                        UnsynchronizedByteArrayOutputStream.builder().get();
 
         try {
             sendStdErrToOutputStream(process, stdErrOutputStream);
@@ -427,7 +408,8 @@ public class ExternalEmbedder implements Embedder {
                 } catch (InterruptedException ignore) {
                 }
                 // The command is finished, read the output file into the given output stream
-                InputStream tempOutputFileInputStream = TikaInputStream.get(tempOutputFile.toPath());
+                InputStream tempOutputFileInputStream =
+                                TikaInputStream.get(tempOutputFile.toPath());
                 IOUtils.copy(tempOutputFileInputStream, outputStream);
             }
         } finally {
@@ -441,7 +423,7 @@ public class ExternalEmbedder implements Embedder {
                     // Clean up temp output files
                     tempOutputFile.delete();
                 } catch (Exception e) {
-                    //swallow
+                    // swallow
                 }
             }
             if (!inputToStdIn) {
@@ -452,9 +434,9 @@ public class ExternalEmbedder implements Embedder {
             IOUtils.closeQuietly(outputStream);
             IOUtils.closeQuietly(stdErrOutputStream);
             if (process.exitValue() != 0) {
-                throw new TikaException("There was an error executing the command line" +
-                        "\nExecutable Command:\n\n" + cmd + "\nExecutable Error:\n\n" +
-                        stdErrOutputStream.toString(UTF_8.name()));
+                throw new TikaException("There was an error executing the command line"
+                                + "\nExecutable Command:\n\n" + cmd + "\nExecutable Error:\n\n"
+                                + stdErrOutputStream.toString(UTF_8.name()));
             }
         }
     }
@@ -462,11 +444,11 @@ public class ExternalEmbedder implements Embedder {
     /**
      * Creates a new thread for copying a given input stream to a given output stream.
      *
-     * @param inputStream  the source input stream
+     * @param inputStream the source input stream
      * @param outputStream the target output stream
      */
     private void multiThreadedStreamCopy(final InputStream inputStream,
-                                         final OutputStream outputStream) {
+                    final OutputStream outputStream) {
         new Thread(() -> {
... 204123 lines suppressed ...