FindBugs Report

Produced using FindBugs3.0.1.

Project: tika

Metrics

39244 lines of code analyzed, in 811 classes, in 98 packages.

Metric Total Density*
High Priority Warnings 38 0.97
Medium Priority Warnings 280 7.13
Total Warnings 318 8.10

(* Defects per Thousand lines of non-commenting source statements)



Summary

Warning Type Number
Bad practice Warnings 65
Correctness Warnings 21
Experimental Warnings 23
Malicious code vulnerability Warnings 66
Multithreaded correctness Warnings 3
Performance Warnings 52
Dodgy code Warnings 86
Total 316



Warnings

Click on each warning link to see a full description of the issue, and details of how to resolve it.

Bad practice Warnings

Warning Priority Details
Class defines equals() and uses Object.hashCode() High

org.apache.tika.metadata.Metadata defines equals and uses Object.hashCode()


In file Metadata.java, lines 520 to 548
In class org.apache.tika.metadata.Metadata
In method org.apache.tika.metadata.Metadata.equals(Object)
At Metadata.java:[lines 520-548]

Class defines equals() and uses Object.hashCode() High

org.apache.tika.xmp.XMPMetadata defines equals and uses Object.hashCode()


In file XMPMetadata.java, line 583
In class org.apache.tika.xmp.XMPMetadata
In method org.apache.tika.xmp.XMPMetadata.equals(Object)
At XMPMetadata.java:[line 583]

Non-serializable value stored into instance field of a serializable class High

org.apache.commons.io.output.NullOutputStream stored into non-transient field CTAKESConfig.stream


In file CTAKESConfig.java, line 54
In class org.apache.tika.parser.ctakes.CTAKESConfig
Field org.apache.tika.parser.ctakes.CTAKESConfig.stream
Actual type org.apache.commons.io.output.NullOutputStream
At CTAKESConfig.java:[line 54]

Equals method should not assume anything about the type of its argument Medium

Equals method for org.apache.tika.parser.journal.TEIParser$Address assumes the argument is of type TEIParser$Address


In file TEIParser.java, line 786
In class org.apache.tika.parser.journal.TEIParser$Address
In method org.apache.tika.parser.journal.TEIParser$Address.equals(Object)
At TEIParser.java:[line 786]
At TEIParser.java:[line 786]

Equals method should not assume anything about the type of its argument Medium

Equals method for org.apache.tika.parser.journal.TEIParser$Affiliation assumes the argument is of type TEIParser$Affiliation


In file TEIParser.java, line 570
In class org.apache.tika.parser.journal.TEIParser$Affiliation
In method org.apache.tika.parser.journal.TEIParser$Affiliation.equals(Object)
At TEIParser.java:[line 570]
At TEIParser.java:[line 570]

Equals method should not assume anything about the type of its argument Medium

Equals method for org.apache.tika.parser.journal.TEIParser$Country assumes the argument is of type TEIParser$Country


In file TEIParser.java, line 868
In class org.apache.tika.parser.journal.TEIParser$Country
In method org.apache.tika.parser.journal.TEIParser$Country.equals(Object)
At TEIParser.java:[line 868]
At TEIParser.java:[line 868]

Equals method should not assume anything about the type of its argument Medium

Equals method for org.apache.tika.parser.journal.TEIParser$OrgName assumes the argument is of type TEIParser$OrgName


In file TEIParser.java, line 633
In class org.apache.tika.parser.journal.TEIParser$OrgName
In method org.apache.tika.parser.journal.TEIParser$OrgName.equals(Object)
At TEIParser.java:[line 633]
At TEIParser.java:[line 633]

Equals method should not assume anything about the type of its argument Medium

Equals method for org.apache.tika.parser.journal.TEIParser$OrgTypeName assumes the argument is of type TEIParser$OrgTypeName


In file TEIParser.java, line 698
In class org.apache.tika.parser.journal.TEIParser$OrgTypeName
In method org.apache.tika.parser.journal.TEIParser$OrgTypeName.equals(Object)
At TEIParser.java:[line 698]
At TEIParser.java:[line 698]

Method might ignore exception Medium

new org.apache.tika.gui.TikaGUI$ImageSavingParser(Parser) might ignore java.io.IOException


In file TikaGUI.java, line 632
In class org.apache.tika.gui.TikaGUI$ImageSavingParser
In method new org.apache.tika.gui.TikaGUI$ImageSavingParser(Parser)
Exception class java.io.IOException
At TikaGUI.java:[line 632]
At TikaGUI.java:[line 632]
At TikaGUI.java:[line 632]

Method invokes System.exit(...) Medium

org.apache.tika.batch.fs.FSBatchProcessCLI.execute(String[]) invokes System.exit(...), which shuts down the entire virtual machine


In file FSBatchProcessCLI.java, line 101
In class org.apache.tika.batch.fs.FSBatchProcessCLI
In method org.apache.tika.batch.fs.FSBatchProcessCLI.execute(String[])
At FSBatchProcessCLI.java:[line 101]
At FSBatchProcessCLI.java:[line 101]

Method invokes System.exit(...) Medium

org.apache.tika.fork.ForkServer.run() invokes System.exit(...), which shuts down the entire virtual machine


In file ForkServer.java, line 102
In class org.apache.tika.fork.ForkServer
In method org.apache.tika.fork.ForkServer.run()
At ForkServer.java:[line 102]
At ForkServer.java:[line 102]

Adding elements of an entry set may fail due to reuse of Entry objects Medium

Adding elements of an entry set may fail due to reuse of Map.Entry object in org.apache.tika.language.LanguageProfile$Interleaved.getSortedNgrams()


In file LanguageProfile.java, line 264
In class org.apache.tika.language.LanguageProfile$Interleaved
In method org.apache.tika.language.LanguageProfile$Interleaved.getSortedNgrams()
Called method java.util.Map.entrySet()
Called method java.util.ArrayList.addAll(Collection)
Return value of java.util.Map.entrySet() of type java.util.Set
At LanguageProfile.java:[line 264]

Class defines compareTo(...) and uses Object.equals() Medium

org.apache.tika.config.ServiceLoader$RankedService defines compareTo(ServiceLoader$RankedService) and uses Object.equals()


In file ServiceLoader.java, line 62
In class org.apache.tika.config.ServiceLoader$RankedService
In method org.apache.tika.config.ServiceLoader$RankedService.compareTo(ServiceLoader$RankedService)
At ServiceLoader.java:[line 62]

Class defines compareTo(...) and uses Object.equals() Medium

org.apache.tika.language.LanguageProfile$Interleaved$Entry defines compareTo(LanguageProfile$Interleaved$Entry) and uses Object.equals()


In file LanguageProfile.java, lines 291 to 296
In class org.apache.tika.language.LanguageProfile$Interleaved$Entry
In method org.apache.tika.language.LanguageProfile$Interleaved$Entry.compareTo(LanguageProfile$Interleaved$Entry)
At LanguageProfile.java:[lines 291-296]

Comparison of String objects using == or != Medium

Comparison of String objects using == or != in org.apache.tika.language.LanguageIdentifier.hasErrors()


In file LanguageIdentifier.java, line 217
In class org.apache.tika.language.LanguageIdentifier
In method org.apache.tika.language.LanguageIdentifier.hasErrors()
Actual type String
String constant ""
Value loaded from field org.apache.tika.language.LanguageIdentifier.errors
At LanguageIdentifier.java:[line 217]
At LanguageIdentifier.java:[line 217]

Class defines equals() and uses Object.hashCode() Medium

org.apache.tika.parser.journal.TEIParser$Address defines equals and uses Object.hashCode()


In file TEIParser.java, lines 786 to 797
In class org.apache.tika.parser.journal.TEIParser$Address
In method org.apache.tika.parser.journal.TEIParser$Address.equals(Object)
At TEIParser.java:[lines 786-797]

Class defines equals() and uses Object.hashCode() Medium

org.apache.tika.parser.journal.TEIParser$Affiliation defines equals and uses Object.hashCode()


In file TEIParser.java, lines 570 to 571
In class org.apache.tika.parser.journal.TEIParser$Affiliation
In method org.apache.tika.parser.journal.TEIParser$Affiliation.equals(Object)
At TEIParser.java:[lines 570-571]

Class defines equals() and uses Object.hashCode() Medium

org.apache.tika.parser.journal.TEIParser$Country defines equals and uses Object.hashCode()


In file TEIParser.java, lines 868 to 892
In class org.apache.tika.parser.journal.TEIParser$Country
In method org.apache.tika.parser.journal.TEIParser$Country.equals(Object)
At TEIParser.java:[lines 868-892]

Class defines equals() and uses Object.hashCode() Medium

org.apache.tika.parser.journal.TEIParser$OrgName defines equals and uses Object.hashCode()


In file TEIParser.java, lines 633 to 645
In class org.apache.tika.parser.journal.TEIParser$OrgName
In method org.apache.tika.parser.journal.TEIParser$OrgName.equals(Object)
At TEIParser.java:[lines 633-645]

Class defines equals() and uses Object.hashCode() Medium

org.apache.tika.parser.journal.TEIParser$OrgTypeName defines equals and uses Object.hashCode()


In file TEIParser.java, lines 698 to 699
In class org.apache.tika.parser.journal.TEIParser$OrgTypeName
In method org.apache.tika.parser.journal.TEIParser$OrgTypeName.equals(Object)
At TEIParser.java:[lines 698-699]

equals() method does not check for null argument Medium

org.apache.tika.parser.journal.TEIParser$Address.equals(Object) does not check for null argument


In file TEIParser.java, lines 786 to 797
In class org.apache.tika.parser.journal.TEIParser$Address
In method org.apache.tika.parser.journal.TEIParser$Address.equals(Object)
Parameter obj
At TEIParser.java:[lines 786-797]

equals() method does not check for null argument Medium

org.apache.tika.parser.journal.TEIParser$Affiliation.equals(Object) does not check for null argument


In file TEIParser.java, lines 570 to 571
In class org.apache.tika.parser.journal.TEIParser$Affiliation
In method org.apache.tika.parser.journal.TEIParser$Affiliation.equals(Object)
Parameter obj
At TEIParser.java:[lines 570-571]

equals() method does not check for null argument Medium

org.apache.tika.parser.journal.TEIParser$Country.equals(Object) does not check for null argument


In file TEIParser.java, lines 868 to 892
In class org.apache.tika.parser.journal.TEIParser$Country
In method org.apache.tika.parser.journal.TEIParser$Country.equals(Object)
Parameter obj
At TEIParser.java:[lines 868-892]

equals() method does not check for null argument Medium

org.apache.tika.parser.journal.TEIParser$OrgName.equals(Object) does not check for null argument


In file TEIParser.java, lines 633 to 645
In class org.apache.tika.parser.journal.TEIParser$OrgName
In method org.apache.tika.parser.journal.TEIParser$OrgName.equals(Object)
Parameter obj
At TEIParser.java:[lines 633-645]

equals() method does not check for null argument Medium

org.apache.tika.parser.journal.TEIParser$OrgTypeName.equals(Object) does not check for null argument


In file TEIParser.java, lines 698 to 699
In class org.apache.tika.parser.journal.TEIParser$OrgTypeName
In method org.apache.tika.parser.journal.TEIParser$OrgTypeName.equals(Object)
Parameter obj
At TEIParser.java:[lines 698-699]

toString method may return null Medium

org.apache.tika.xmp.XMPMetadata.toString() may return null


In file XMPMetadata.java, line 601
In class org.apache.tika.xmp.XMPMetadata
In method org.apache.tika.xmp.XMPMetadata.toString()
Value loaded from result
Returned at XMPMetadata.java:[line 601]
Null value at XMPMetadata.java:[line 593]
Known null at XMPMetadata.java:[line 598]

Method may fail to close database resource Medium

org.apache.tika.parser.jdbc.JDBCTableReader.reset() may fail to close Statement


In file JDBCTableReader.java, line 304
In class org.apache.tika.parser.jdbc.JDBCTableReader
In method org.apache.tika.parser.jdbc.JDBCTableReader.reset()
Need to close java.sql.Statement
At JDBCTableReader.java:[line 304]
At JDBCTableReader.java:[line 304]

Method may fail to close stream Medium

org.apache.tika.cli.TikaCLI$10.process(InputStream, OutputStream, Metadata) may fail to close stream


In file TikaCLI.java, line 300
In class org.apache.tika.cli.TikaCLI$10
In method org.apache.tika.cli.TikaCLI$10.process(InputStream, OutputStream, Metadata)
Need to close java.io.Writer
At TikaCLI.java:[line 300]
At TikaCLI.java:[line 300]

Method may fail to close stream Medium

org.apache.tika.config.ServiceLoader.collectServiceClassNames(URL, Collection) may fail to close stream


In file ServiceLoader.java, line 347
In class org.apache.tika.config.ServiceLoader
In method org.apache.tika.config.ServiceLoader.collectServiceClassNames(URL, Collection)
Need to close java.io.Reader
At ServiceLoader.java:[line 347]
At ServiceLoader.java:[line 347]

Method may fail to close stream Medium

org.apache.tika.example.ZipListFiles.listZipEntries(String) may fail to close stream


In file ZipListFiles.java, line 40
In class org.apache.tika.example.ZipListFiles
In method org.apache.tika.example.ZipListFiles.listZipEntries(String)
Need to close java.util.zip.ZipFile
At ZipListFiles.java:[line 40]
At ZipListFiles.java:[line 40]

Method may fail to close stream Medium

org.apache.tika.language.LanguageIdentifier.addProfile(String) may fail to close stream


In file LanguageIdentifier.java, line 80
In class org.apache.tika.language.LanguageIdentifier
In method org.apache.tika.language.LanguageIdentifier.addProfile(String)
Need to close java.io.Reader
At LanguageIdentifier.java:[line 80]
At LanguageIdentifier.java:[line 80]

Method may fail to close stream Medium

org.apache.tika.language.LanguageIdentifier.initProfiles() may fail to close stream


In file LanguageIdentifier.java, line 165
In class org.apache.tika.language.LanguageIdentifier
In method org.apache.tika.language.LanguageIdentifier.initProfiles()
Need to close java.io.InputStream
At LanguageIdentifier.java:[line 165]
At LanguageIdentifier.java:[line 165]

Method may fail to close stream Medium

new org.apache.tika.language.LanguageProfile(String, int) may fail to close stream


In file LanguageProfile.java, line 78
In class org.apache.tika.language.LanguageProfile
In method new org.apache.tika.language.LanguageProfile(String, int)
Need to close java.io.Writer
At LanguageProfile.java:[line 78]
At LanguageProfile.java:[line 78]

Method may fail to close stream Medium

new org.apache.tika.language.translate.GoogleTranslator() may fail to close stream


In file GoogleTranslator.java, line 69
In class org.apache.tika.language.translate.GoogleTranslator
In method new org.apache.tika.language.translate.GoogleTranslator()
Need to close java.io.InputStream
At GoogleTranslator.java:[line 69]
At GoogleTranslator.java:[line 69]

Method may fail to close stream Medium

org.apache.tika.language.translate.GoogleTranslator.translate(String, String, String) may fail to close stream


In file GoogleTranslator.java, line 88
In class org.apache.tika.language.translate.GoogleTranslator
In method org.apache.tika.language.translate.GoogleTranslator.translate(String, String, String)
Need to close java.io.Reader
At GoogleTranslator.java:[line 88]
At GoogleTranslator.java:[line 88]

Method may fail to close stream Medium

new org.apache.tika.language.translate.Lingo24Translator() may fail to close stream


In file Lingo24Translator.java, line 61
In class org.apache.tika.language.translate.Lingo24Translator
In method new org.apache.tika.language.translate.Lingo24Translator()
Need to close java.io.InputStream
At Lingo24Translator.java:[line 61]
At Lingo24Translator.java:[line 61]

Method may fail to close stream Medium

org.apache.tika.language.translate.Lingo24Translator.translate(String, String, String) may fail to close stream


In file Lingo24Translator.java, line 80
In class org.apache.tika.language.translate.Lingo24Translator
In method org.apache.tika.language.translate.Lingo24Translator.translate(String, String, String)
Need to close java.io.Reader
At Lingo24Translator.java:[line 80]
At Lingo24Translator.java:[line 80]

Method may fail to close stream Medium

new org.apache.tika.language.translate.MosesTranslator() may fail to close stream


In file MosesTranslator.java, line 54
In class org.apache.tika.language.translate.MosesTranslator
In method new org.apache.tika.language.translate.MosesTranslator()
Need to close java.io.InputStream
At MosesTranslator.java:[line 54]
At MosesTranslator.java:[line 54]

Method may fail to close stream Medium

org.apache.tika.language.translate.MosesTranslator.translate(String, String, String) may fail to close stream


In file MosesTranslator.java, line 87
In class org.apache.tika.language.translate.MosesTranslator
In method org.apache.tika.language.translate.MosesTranslator.translate(String, String, String)
Need to close java.io.Reader
At MosesTranslator.java:[line 87]
At MosesTranslator.java:[line 87]

Method may fail to close stream Medium

org.apache.tika.language.translate.MosesTranslator.translate(String, String, String) may fail to close stream


In file MosesTranslator.java, line 79
In class org.apache.tika.language.translate.MosesTranslator
In method org.apache.tika.language.translate.MosesTranslator.translate(String, String, String)
Need to close java.io.Writer
At MosesTranslator.java:[line 79]
At MosesTranslator.java:[line 79]

Method may fail to close stream Medium

new org.apache.tika.language.translate.YandexTranslator() may fail to close stream


In file YandexTranslator.java, line 70
In class org.apache.tika.language.translate.YandexTranslator
In method new org.apache.tika.language.translate.YandexTranslator()
Need to close java.io.InputStream
At YandexTranslator.java:[line 70]
At YandexTranslator.java:[line 70]

Method may fail to close stream Medium

org.apache.tika.language.translate.YandexTranslator.translate(String, String, String) may fail to close stream


In file YandexTranslator.java, line 102
In class org.apache.tika.language.translate.YandexTranslator
In method org.apache.tika.language.translate.YandexTranslator.translate(String, String, String)
Need to close java.io.Reader
At YandexTranslator.java:[line 102]
At YandexTranslator.java:[line 102]

Method may fail to close stream Medium

org.apache.tika.parser.journal.GrobidRESTParser.readRestUrl() may fail to close stream


In file GrobidRESTParser.java, line 93
In class org.apache.tika.parser.journal.GrobidRESTParser
In method org.apache.tika.parser.journal.GrobidRESTParser.readRestUrl()
Need to close java.io.InputStream
At GrobidRESTParser.java:[line 93]
At GrobidRESTParser.java:[line 93]

Method may fail to close stream Medium

org.apache.tika.parser.microsoft.AbstractPOIFSExtractor.handleEmbeddedOfficeDoc(DirectoryEntry, XHTMLContentHandler) may fail to close stream


In file AbstractPOIFSExtractor.java, line 204
In class org.apache.tika.parser.microsoft.AbstractPOIFSExtractor
In method org.apache.tika.parser.microsoft.AbstractPOIFSExtractor.handleEmbeddedOfficeDoc(DirectoryEntry, XHTMLContentHandler)
Need to close java.io.InputStream
At AbstractPOIFSExtractor.java:[line 204]
At AbstractPOIFSExtractor.java:[line 204]

Method ignores results of InputStream.skip() Medium

org.apache.tika.parser.executable.ExecutableParser.parsePE(XHTMLContentHandler, Metadata, InputStream, byte[]) ignores result of java.io.InputStream.skip(long)


In file ExecutableParser.java, line 105
In class org.apache.tika.parser.executable.ExecutableParser
In method org.apache.tika.parser.executable.ExecutableParser.parsePE(XHTMLContentHandler, Metadata, InputStream, byte[])
Called method java.io.InputStream.skip(long)
At ExecutableParser.java:[line 105]
At ExecutableParser.java:[line 105]

Method ignores results of InputStream.skip() Medium

org.apache.tika.parser.image.BPGParser.parse(InputStream, ContentHandler, Metadata, ParseContext) ignores result of java.io.InputStream.skip(long)


In file BPGParser.java, line 155
In class org.apache.tika.parser.image.BPGParser
In method org.apache.tika.parser.image.BPGParser.parse(InputStream, ContentHandler, Metadata, ParseContext)
Called method java.io.InputStream.skip(long)
At BPGParser.java:[line 155]
At BPGParser.java:[line 155]

Method ignores results of InputStream.skip() Medium

org.apache.tika.parser.image.PSDParser.parse(InputStream, ContentHandler, Metadata, ParseContext) ignores result of java.io.InputStream.skip(long)


In file PSDParser.java, line 109
In class org.apache.tika.parser.image.PSDParser
In method org.apache.tika.parser.image.PSDParser.parse(InputStream, ContentHandler, Metadata, ParseContext)
Called method java.io.InputStream.skip(long)
At PSDParser.java:[line 109]
At PSDParser.java:[line 109]

Method ignores results of InputStream.skip() Medium

org.apache.tika.parser.iptc.IptcAnpaParser.getSection(InputStream, int, byte, byte, boolean) ignores result of java.io.InputStream.skip(long)


In file IptcAnpaParser.java, line 328
In class org.apache.tika.parser.iptc.IptcAnpaParser
In method org.apache.tika.parser.iptc.IptcAnpaParser.getSection(InputStream, int, byte, byte, boolean)
Called method java.io.InputStream.skip(long)
At IptcAnpaParser.java:[line 328]
At IptcAnpaParser.java:[line 328]

Method ignores exceptional return value Medium

Exceptional return value of java.io.File.delete() ignored in org.apache.tika.example.ImportContextImpl.informCompleted(boolean)


In file ImportContextImpl.java, line 214
In class org.apache.tika.example.ImportContextImpl
In method org.apache.tika.example.ImportContextImpl.informCompleted(boolean)
Called method java.io.File.delete()
At ImportContextImpl.java:[line 214]
At ImportContextImpl.java:[line 214]

Method ignores exceptional return value Medium

Exceptional return value of java.io.File.delete() ignored in org.apache.tika.fork.ForkClient.close()


In file ForkClient.java, line 185
In class org.apache.tika.fork.ForkClient
In method org.apache.tika.fork.ForkClient.close()
Called method java.io.File.delete()
At ForkClient.java:[line 185]
At ForkClient.java:[line 185]

Method ignores exceptional return value Medium

Exceptional return value of java.io.File.delete() ignored in org.apache.tika.fork.ForkClient.createBootstrapJar()


In file ForkClient.java, line 252
In class org.apache.tika.fork.ForkClient
In method org.apache.tika.fork.ForkClient.createBootstrapJar()
Called method java.io.File.delete()
At ForkClient.java:[line 252]
At ForkClient.java:[line 252]

Method ignores exceptional return value Medium

Exceptional return value of java.io.File.delete() ignored in org.apache.tika.parser.mbox.OutlookPSTParser.parseMailAttachments(XHTMLContentHandler, PSTMessage, EmbeddedDocumentExtractor)


In file OutlookPSTParser.java, line 198
In class org.apache.tika.parser.mbox.OutlookPSTParser
In method org.apache.tika.parser.mbox.OutlookPSTParser.parseMailAttachments(XHTMLContentHandler, PSTMessage, EmbeddedDocumentExtractor)
Called method java.io.File.delete()
At OutlookPSTParser.java:[line 198]
At OutlookPSTParser.java:[line 198]

Method ignores exceptional return value Medium

Exceptional return value of java.io.File.delete() ignored in org.apache.tika.parser.ocr.TesseractOCRParser.parse(InputStream, ContentHandler, Metadata, ParseContext)


In file TesseractOCRParser.java, line 197
In class org.apache.tika.parser.ocr.TesseractOCRParser
In method org.apache.tika.parser.ocr.TesseractOCRParser.parse(InputStream, ContentHandler, Metadata, ParseContext)
Called method java.io.File.delete()
At TesseractOCRParser.java:[line 197]
At TesseractOCRParser.java:[line 197]

Method ignores exceptional return value Medium

Exceptional return value of java.io.File.delete() ignored in org.apache.tika.utils.RereadableInputStream.close()


In file RereadableInputStream.java, line 224
In class org.apache.tika.utils.RereadableInputStream
In method org.apache.tika.utils.RereadableInputStream.close()
Called method java.io.File.delete()
At RereadableInputStream.java:[line 224]
At RereadableInputStream.java:[line 224]

Non-transient non-serializable instance field in serializable class Medium

Class org.apache.tika.embedder.ExternalEmbedder defines non-transient non-serializable instance field metadataCommandArguments


In file ExternalEmbedder.java, lines to
In class org.apache.tika.embedder.ExternalEmbedder
Field org.apache.tika.embedder.ExternalEmbedder.metadataCommandArguments
Actual type org.apache.tika.metadata.Property
In ExternalEmbedder.java

Non-transient non-serializable instance field in serializable class Medium

Class org.apache.tika.embedder.ExternalEmbedder defines non-transient non-serializable instance field tmp


In file ExternalEmbedder.java, lines to
In class org.apache.tika.embedder.ExternalEmbedder
Field org.apache.tika.embedder.ExternalEmbedder.tmp
Actual type org.apache.tika.io.TemporaryResources
In ExternalEmbedder.java

Non-transient non-serializable instance field in serializable class Medium

Class org.apache.tika.fork.ForkParser defines non-transient non-serializable instance field pool


In file ForkParser.java, lines to
In class org.apache.tika.fork.ForkParser
Field org.apache.tika.fork.ForkParser.pool
Actual type org.apache.tika.fork.ForkClient
In ForkParser.java

Comparator doesn't implement Serializable Medium

org.apache.tika.metadata.serialization.PrettyMetadataKeyComparator implements Comparator but not Serializable


In file PrettyMetadataKeyComparator.java, lines 20 to 41
In class org.apache.tika.metadata.serialization.PrettyMetadataKeyComparator
At PrettyMetadataKeyComparator.java:[lines 20-41]

Non-transient non-serializable instance field in serializable class Medium

Class org.apache.tika.parser.ctakes.CTAKESConfig defines non-transient non-serializable instance field stream


In file CTAKESConfig.java, lines to
In class org.apache.tika.parser.ctakes.CTAKESConfig
Field org.apache.tika.parser.ctakes.CTAKESConfig.stream
Actual type java.io.OutputStream
In CTAKESConfig.java

Non-transient non-serializable instance field in serializable class Medium

Class org.apache.tika.parser.geo.topic.GeoParser defines non-transient non-serializable instance field gazetteerClient


In file GeoParser.java, lines to
In class org.apache.tika.parser.geo.topic.GeoParser
Field org.apache.tika.parser.geo.topic.GeoParser.gazetteerClient
Actual type org.apache.tika.parser.geo.topic.gazetteer.GeoGazetteerClient
In GeoParser.java

Non-transient non-serializable instance field in serializable class Medium

Class org.apache.tika.parser.geo.topic.GeoParser defines non-transient non-serializable instance field nameFinder


In file GeoParser.java, lines to
In class org.apache.tika.parser.geo.topic.GeoParser
Field org.apache.tika.parser.geo.topic.GeoParser.nameFinder
Actual type opennlp.tools.namefind.NameFinderME
In GeoParser.java

Comparator doesn't implement Serializable Medium

org.apache.tika.parser.microsoft.ExcelExtractor$PointComparator implements Comparator but not Serializable


In file ExcelExtractor.java, lines 622 to 629
In class org.apache.tika.parser.microsoft.ExcelExtractor$PointComparator
At ExcelExtractor.java:[lines 622-629]

Non-transient non-serializable instance field in serializable class Medium

Class org.apache.tika.parser.ner.NamedEntityParser defines non-transient non-serializable instance field secondaryParser


In file NamedEntityParser.java, lines to
In class org.apache.tika.parser.ner.NamedEntityParser
Field org.apache.tika.parser.ner.NamedEntityParser.secondaryParser
Actual type org.apache.tika.Tika
In NamedEntityParser.java

Non-transient non-serializable instance field in serializable class Medium

Class org.apache.tika.parser.RecursiveParserWrapper defines non-transient non-serializable instance field contentHandlerFactory


In file RecursiveParserWrapper.java, lines to
In class org.apache.tika.parser.RecursiveParserWrapper
Field org.apache.tika.parser.RecursiveParserWrapper.contentHandlerFactory
Actual type org.apache.tika.sax.ContentHandlerFactory
In RecursiveParserWrapper.java

Non-transient non-serializable instance field in serializable class Medium

Class org.apache.tika.parser.strings.Latin1StringsParser defines non-transient non-serializable instance field xhtml


In file Latin1StringsParser.java, lines to
In class org.apache.tika.parser.strings.Latin1StringsParser
Field org.apache.tika.parser.strings.Latin1StringsParser.xhtml
Actual type org.apache.tika.sax.XHTMLContentHandler
In Latin1StringsParser.java



Correctness Warnings

Warning Priority Details
Bad comparison of signed byte High

Bad comparison of signed byte with 232 in org.apache.tika.parser.chm.lzx.ChmLzxBlock.intelE8Decoding()


In file ChmLzxBlock.java, line 224
In class org.apache.tika.parser.chm.lzx.ChmLzxBlock
In method org.apache.tika.parser.chm.lzx.ChmLzxBlock.intelE8Decoding()
Value 232
At ChmLzxBlock.java:[line 224]
At ChmLzxBlock.java:[line 224]

Method ignores return value High

Return value of String.substring(int) ignored in org.apache.tika.gui.TikaGUI$ImageSavingParser.requestSave(String)


In file TikaGUI.java, line 640
In class org.apache.tika.gui.TikaGUI$ImageSavingParser
In method org.apache.tika.gui.TikaGUI$ImageSavingParser.requestSave(String)
Called method String.substring(int)
At TikaGUI.java:[line 640]
At TikaGUI.java:[line 640]

Method ignores return value High

Return value of java.math.BigInteger.add(BigInteger) ignored in org.apache.tika.parser.mp4.DirectFileReadDataSource.map(long, long)


In file DirectFileReadDataSource.java, line 105
In class org.apache.tika.parser.mp4.DirectFileReadDataSource
In method org.apache.tika.parser.mp4.DirectFileReadDataSource.map(long, long)
Called method java.math.BigInteger.add(BigInteger)
At DirectFileReadDataSource.java:[line 105]
At DirectFileReadDataSource.java:[line 105]

Invocation of toString on an array High

Invocation of toString on MagicDetector.mask in org.apache.tika.detect.MagicDetector.toString()


In file MagicDetector.java, line 449
In class org.apache.tika.detect.MagicDetector
In method org.apache.tika.detect.MagicDetector.toString()
Value loaded from field org.apache.tika.detect.MagicDetector.mask
At MagicDetector.java:[line 449]
At MagicDetector.java:[line 449]

Invocation of toString on an array High

Invocation of toString on MagicDetector.pattern in org.apache.tika.detect.MagicDetector.toString()


In file MagicDetector.java, line 449
In class org.apache.tika.detect.MagicDetector
In method org.apache.tika.detect.MagicDetector.toString()
Value loaded from field org.apache.tika.detect.MagicDetector.pattern
At MagicDetector.java:[line 449]
At MagicDetector.java:[line 449]

Invocation of toString on an array High

Invocation of toString on getDir_uuid() in org.apache.tika.parser.chm.accessor.ChmItsfHeader.toString()


In file ChmItsfHeader.java, line 80
In class org.apache.tika.parser.chm.accessor.ChmItsfHeader
In method org.apache.tika.parser.chm.accessor.ChmItsfHeader.toString()
Return value of org.apache.tika.parser.chm.accessor.ChmItsfHeader.getDir_uuid() of type byte[]
At ChmItsfHeader.java:[line 80]
At ChmItsfHeader.java:[line 80]

Invocation of toString on an array High

Invocation of toString on getStream_uuid() in org.apache.tika.parser.chm.accessor.ChmItsfHeader.toString()


In file ChmItsfHeader.java, line 81
In class org.apache.tika.parser.chm.accessor.ChmItsfHeader
In method org.apache.tika.parser.chm.accessor.ChmItsfHeader.toString()
Return value of org.apache.tika.parser.chm.accessor.ChmItsfHeader.getStream_uuid() of type byte[]
At ChmItsfHeader.java:[line 81]
At ChmItsfHeader.java:[line 81]

Invocation of toString on an array High

Invocation of toString on getSystem_uuid() in org.apache.tika.parser.chm.accessor.ChmItspHeader.toString()


In file ChmItspHeader.java, line 114
In class org.apache.tika.parser.chm.accessor.ChmItspHeader
In method org.apache.tika.parser.chm.accessor.ChmItspHeader.toString()
Return value of org.apache.tika.parser.chm.accessor.ChmItspHeader.getSystem_uuid() of type byte[]
At ChmItspHeader.java:[line 114]
At ChmItspHeader.java:[line 114]

Invocation of toString on an array High

Invocation of toString on getUnknown_0044() in org.apache.tika.parser.chm.accessor.ChmItspHeader.toString()


In file ChmItspHeader.java, line 116
In class org.apache.tika.parser.chm.accessor.ChmItspHeader
In method org.apache.tika.parser.chm.accessor.ChmItspHeader.toString()
Return value of org.apache.tika.parser.chm.accessor.ChmItspHeader.getUnknown_0044() of type byte[]
At ChmItspHeader.java:[line 116]
At ChmItspHeader.java:[line 116]

Bitwise OR of signed byte value Medium

Bitwise OR of signed byte value computed in org.apache.tika.parser.chm.accessor.ChmItsfHeader.unmarshalUInt32(byte[], long)


In file ChmItsfHeader.java, line 400
In class org.apache.tika.parser.chm.accessor.ChmItsfHeader
In method org.apache.tika.parser.chm.accessor.ChmItsfHeader.unmarshalUInt32(byte[], long)
At ChmItsfHeader.java:[line 400]
At ChmItsfHeader.java:[line 400]

Bitwise OR of signed byte value Medium

Bitwise OR of signed byte value computed in org.apache.tika.parser.chm.accessor.ChmLzxcControlData.unmarshalUInt32(byte[], long)


In file ChmLzxcControlData.java, line 231
In class org.apache.tika.parser.chm.accessor.ChmLzxcControlData
In method org.apache.tika.parser.chm.accessor.ChmLzxcControlData.unmarshalUInt32(byte[], long)
At ChmLzxcControlData.java:[line 231]
At ChmLzxcControlData.java:[line 231]

Bad comparison of signed byte Medium

Bad comparison of signed byte with 128 in org.apache.tika.parser.chm.accessor.ChmDirectoryListingSet.enumerateOneSegment(byte[])


In file ChmDirectoryListingSet.java, line 222
In class org.apache.tika.parser.chm.accessor.ChmDirectoryListingSet
In method org.apache.tika.parser.chm.accessor.ChmDirectoryListingSet.enumerateOneSegment(byte[])
Value 128
At ChmDirectoryListingSet.java:[line 222]
At ChmDirectoryListingSet.java:[line 222]

Method call passes null for non-null parameter Medium

Null passed for non-null parameter of applyProbilities(List, MimeType, MimeType) in org.apache.tika.mime.ProbabilisticMimeDetectionSelector.detect(InputStream, Metadata)


In file ProbabilisticMimeDetectionSelector.java, line 190
In class org.apache.tika.mime.ProbabilisticMimeDetectionSelector
In method org.apache.tika.mime.ProbabilisticMimeDetectionSelector.detect(InputStream, Metadata)
Called method org.apache.tika.mime.ProbabilisticMimeDetectionSelector.applyProbilities(List, MimeType, MimeType)
Argument 1 might be null but must not be null
Value loaded from possibleTypes
Method invoked at ProbabilisticMimeDetectionSelector.java:[line 190]
Null value at ProbabilisticMimeDetectionSelector.java:[line 131]
Known null at ProbabilisticMimeDetectionSelector.java:[line 134]

Possible null pointer dereference Medium

Possible null pointer dereference of chmPrevLzxBlock in org.apache.tika.parser.chm.lzx.ChmLzxBlock.checkLzxBlock(ChmLzxBlock)


In file ChmLzxBlock.java, line 868
In class org.apache.tika.parser.chm.lzx.ChmLzxBlock
In method org.apache.tika.parser.chm.lzx.ChmLzxBlock.checkLzxBlock(ChmLzxBlock)
Value loaded from chmPrevLzxBlock
Dereferenced at ChmLzxBlock.java:[line 868]
Known null at ChmLzxBlock.java:[line 864]

Possible null pointer dereference in method on exception path Medium

Possible null pointer dereference of process in org.apache.tika.parser.external.ExternalParser.parse(TikaInputStream, XHTMLContentHandler, Metadata, TemporaryResources) on exception path


In file ExternalParser.java, line 202
In class org.apache.tika.parser.external.ExternalParser
In method org.apache.tika.parser.external.ExternalParser.parse(TikaInputStream, XHTMLContentHandler, Metadata, TemporaryResources)
Value loaded from process
Dereferenced at ExternalParser.java:[line 202]
Null value at ExternalParser.java:[line 183]
Known null at ExternalParser.java:[line 191]
Known null at ExternalParser.java:[line 192]

Possible null pointer dereference Medium

Possible null pointer dereference of element in org.apache.tika.parser.external.ExternalParsersConfigReader.read(Element)


In file ExternalParsersConfigReader.java, line 89
In class org.apache.tika.parser.external.ExternalParsersConfigReader
In method org.apache.tika.parser.external.ExternalParsersConfigReader.read(Element)
Value loaded from element
Dereferenced at ExternalParsersConfigReader.java:[line 89]
Known null at ExternalParsersConfigReader.java:[line 72]

Method call passes null for non-null parameter Medium

Null passed for non-null parameter of addStaticMet(String, JSONObject, Metadata) in org.apache.tika.parser.journal.TEIParser.createGrobidMetadata(String, JSONObject, Metadata)


In file TEIParser.java, line 64
In class org.apache.tika.parser.journal.TEIParser
In method org.apache.tika.parser.journal.TEIParser.createGrobidMetadata(String, JSONObject, Metadata)
Called method org.apache.tika.parser.journal.TEIParser.addStaticMet(String, JSONObject, Metadata)
Argument 2 might be null but must not be null
Value loaded from obj
Method invoked at TEIParser.java:[line 64]
Known null at TEIParser.java:[line 43]

Possible null pointer dereference in method on exception path Medium

Possible null pointer dereference of arr in org.apache.tika.parser.mp3.MpegStream.calculateBitRate(int, int, int) on exception path


In file MpegStream.java, line 329
In class org.apache.tika.parser.mp3.MpegStream
In method org.apache.tika.parser.mp3.MpegStream.calculateBitRate(int, int, int)
Value loaded from arr
Dereferenced at MpegStream.java:[line 329]
Null value at MpegStream.java:[line 301]
Known null at MpegStream.java:[line 305]

Nullcheck of value previously dereferenced Medium

Nullcheck of possibleTypes at line 226 of value previously dereferenced in org.apache.tika.mime.ProbabilisticMimeDetectionSelector.applyProbilities(List, MimeType, MimeType)


In file ProbabilisticMimeDetectionSelector.java, line 200
In class org.apache.tika.mime.ProbabilisticMimeDetectionSelector
In method org.apache.tika.mime.ProbabilisticMimeDetectionSelector.applyProbilities(List, MimeType, MimeType)
Value loaded from possibleTypes
At ProbabilisticMimeDetectionSelector.java:[line 200]
Redundant null check at ProbabilisticMimeDetectionSelector.java:[line 226]
Redundant null check at ProbabilisticMimeDetectionSelector.java:[line 226]

Nullcheck of value previously dereferenced Medium

Nullcheck of prevcontent at line 536 of value previously dereferenced in org.apache.tika.parser.chm.lzx.ChmLzxBlock.decompressVerbatimBlock(int, byte[])


In file ChmLzxBlock.java, line 535
In class org.apache.tika.parser.chm.lzx.ChmLzxBlock
In method org.apache.tika.parser.chm.lzx.ChmLzxBlock.decompressVerbatimBlock(int, byte[])
Value loaded from prevcontent
At ChmLzxBlock.java:[line 535]
Redundant null check at ChmLzxBlock.java:[line 536]
Redundant null check at ChmLzxBlock.java:[line 536]

Unwritten field Medium

Unwritten field: org.apache.tika.parser.pdf.XFAExtractor$XFAField.value


In file XFAExtractor.java, line 296
In class org.apache.tika.parser.pdf.XFAExtractor$XFAField
Field org.apache.tika.parser.pdf.XFAExtractor$XFAField.value
At XFAExtractor.java:[line 296]



Experimental Warnings

Warning Priority Details
Method may fail to clean up stream or resource Medium

org.apache.tika.example.TrecDocumentGenerator.summarize(File) may fail to clean up java.io.InputStream


In file TrecDocumentGenerator.java, line 41
In class org.apache.tika.example.TrecDocumentGenerator
In method org.apache.tika.example.TrecDocumentGenerator.summarize(File)
Reference type java.io.InputStream
1 instances of obligation remaining
Obligation to clean up resource created at TrecDocumentGenerator.java:[line 41] is not discharged
Path continues at TrecDocumentGenerator.java:[line 42]
Path continues at TrecDocumentGenerator.java:[line 43]
Path continues at TrecDocumentGenerator.java:[line 42]
Remaining obligations: {InputStream x 1}

Method may fail to clean up stream or resource Medium

org.apache.tika.language.LanguageIdentifier.initProfiles() may fail to clean up java.io.InputStream


In file LanguageIdentifier.java, line 165
In class org.apache.tika.language.LanguageIdentifier
In method org.apache.tika.language.LanguageIdentifier.initProfiles()
Reference type java.io.InputStream
1 instances of obligation remaining
Obligation to clean up resource created at LanguageIdentifier.java:[line 165] is not discharged
Path continues at LanguageIdentifier.java:[line 166]
Path continues at LanguageIdentifier.java:[line 170]
Path continues at LanguageIdentifier.java:[line 172]
Path continues at LanguageIdentifier.java:[line 173]
Path continues at LanguageIdentifier.java:[line 176]
Path continues at LanguageIdentifier.java:[line 179]
Path continues at LanguageIdentifier.java:[line 180]
Path continues at LanguageIdentifier.java:[line 189]
Remaining obligations: {InputStream x 1}

Method may fail to clean up stream or resource Medium

org.apache.tika.language.LanguageProfilerBuilder.main(String[]) may fail to clean up java.io.OutputStream


In file LanguageProfilerBuilder.java, line 508
In class org.apache.tika.language.LanguageProfilerBuilder
In method org.apache.tika.language.LanguageProfilerBuilder.main(String[])
Reference type java.io.OutputStream
1 instances of obligation remaining
Obligation to clean up resource created at LanguageProfilerBuilder.java:[line 508] is not discharged
Path continues at LanguageProfilerBuilder.java:[line 509]
Path continues at LanguageProfilerBuilder.java:[line 510]
Path continues at LanguageProfilerBuilder.java:[line 512]
Path continues at LanguageProfilerBuilder.java:[line 552]
Path continues at LanguageProfilerBuilder.java:[line 553]
Remaining obligations: {OutputStream x 1}

Method may fail to clean up stream or resource Medium

new org.apache.tika.language.translate.GoogleTranslator() may fail to clean up java.io.InputStream


In file GoogleTranslator.java, line 69
In class org.apache.tika.language.translate.GoogleTranslator
In method new org.apache.tika.language.translate.GoogleTranslator()
Reference type java.io.InputStream
1 instances of obligation remaining
Obligation to clean up resource created at GoogleTranslator.java:[line 69] is not discharged
Path continues at GoogleTranslator.java:[line 68]
Path continues at GoogleTranslator.java:[line 71]
Path continues at GoogleTranslator.java:[line 72]
Path continues at GoogleTranslator.java:[line 77]
Path continues at GoogleTranslator.java:[line 78]
Remaining obligations: {InputStream x 1}

Method may fail to clean up stream or resource Medium

new org.apache.tika.language.translate.Lingo24Translator() may fail to clean up java.io.InputStream


In file Lingo24Translator.java, line 61
In class org.apache.tika.language.translate.Lingo24Translator
In method new org.apache.tika.language.translate.Lingo24Translator()
Reference type java.io.InputStream
1 instances of obligation remaining
Obligation to clean up resource created at Lingo24Translator.java:[line 61] is not discharged
Path continues at Lingo24Translator.java:[line 60]
Path continues at Lingo24Translator.java:[line 63]
Path continues at Lingo24Translator.java:[line 64]
Path continues at Lingo24Translator.java:[line 69]
Path continues at Lingo24Translator.java:[line 70]
Remaining obligations: {InputStream x 1}

Method may fail to clean up stream or resource Medium

new org.apache.tika.language.translate.MicrosoftTranslator() may fail to clean up java.io.InputStream


In file MicrosoftTranslator.java, line 54
In class org.apache.tika.language.translate.MicrosoftTranslator
In method new org.apache.tika.language.translate.MicrosoftTranslator()
Reference type java.io.InputStream
1 instances of obligation remaining
Obligation to clean up resource created at MicrosoftTranslator.java:[line 54] is not discharged
Path continues at MicrosoftTranslator.java:[line 56]
Path continues at MicrosoftTranslator.java:[line 57]
Path continues at MicrosoftTranslator.java:[line 58]
Path continues at MicrosoftTranslator.java:[line 59]
Path continues at MicrosoftTranslator.java:[line 60]
Path continues at MicrosoftTranslator.java:[line 66]
Path continues at MicrosoftTranslator.java:[line 67]
Remaining obligations: {InputStream x 1}

Method may fail to clean up stream or resource Medium

new org.apache.tika.language.translate.MosesTranslator() may fail to clean up java.io.InputStream


In file MosesTranslator.java, line 54
In class org.apache.tika.language.translate.MosesTranslator
In method new org.apache.tika.language.translate.MosesTranslator()
Reference type java.io.InputStream
1 instances of obligation remaining
Obligation to clean up resource created at MosesTranslator.java:[line 54] is not discharged
Path continues at MosesTranslator.java:[line 53]
Path continues at MosesTranslator.java:[line 55]
Path continues at MosesTranslator.java:[line 56]
Path continues at MosesTranslator.java:[line 57]
Path continues at MosesTranslator.java:[line 60]
Path continues at MosesTranslator.java:[line 61]
Remaining obligations: {InputStream x 1}

Method may fail to clean up stream or resource Medium

new org.apache.tika.language.translate.YandexTranslator() may fail to clean up java.io.InputStream


In file YandexTranslator.java, line 70
In class org.apache.tika.language.translate.YandexTranslator
In method new org.apache.tika.language.translate.YandexTranslator()
Reference type java.io.InputStream
1 instances of obligation remaining
Obligation to clean up resource created at YandexTranslator.java:[line 70] is not discharged
Path continues at YandexTranslator.java:[line 69]
Path continues at YandexTranslator.java:[line 72]
Path continues at YandexTranslator.java:[line 73]
Path continues at YandexTranslator.java:[line 76]
Path continues at YandexTranslator.java:[line 77]
Remaining obligations: {InputStream x 1}

Method may fail to clean up stream or resource on checked exception Medium

org.apache.tika.parser.chm.core.ChmCommons.writeFile(byte[][], String) may fail to clean up java.io.OutputStream on checked exception


In file ChmCommons.java, line 212
In class org.apache.tika.parser.chm.core.ChmCommons
In method org.apache.tika.parser.chm.core.ChmCommons.writeFile(byte[][], String)
Reference type java.io.OutputStream
1 instances of obligation remaining
Obligation to clean up resource created at ChmCommons.java:[line 212] is not discharged
Path continues at ChmCommons.java:[line 213]
Path continues at ChmCommons.java:[line 221]
Path continues at ChmCommons.java:[line 223]
Path continues at ChmCommons.java:[line 225]
Path continues at ChmCommons.java:[line 226]
Path continues at ChmCommons.java:[line 227]
Path continues at ChmCommons.java:[line 230]
Remaining obligations: {OutputStream x 1}

Method may fail to clean up stream or resource Medium

new org.apache.tika.parser.ctakes.CTAKESConfig() may fail to clean up java.io.InputStream


In file CTAKESConfig.java, line 75
In class org.apache.tika.parser.ctakes.CTAKESConfig
In method new org.apache.tika.parser.ctakes.CTAKESConfig()
Reference type java.io.InputStream
1 instances of obligation remaining
Obligation to clean up resource created at CTAKESConfig.java:[line 75] is not discharged
Path continues at CTAKESConfig.java:[line 76]
Remaining obligations: {InputStream x 1}

Method may fail to clean up stream or resource Medium

org.apache.tika.parser.external.ExternalParser.parse(TikaInputStream, XHTMLContentHandler, Metadata, TemporaryResources) may fail to clean up java.io.InputStream


In file ExternalParser.java, line 231
In class org.apache.tika.parser.external.ExternalParser
In method org.apache.tika.parser.external.ExternalParser.parse(TikaInputStream, XHTMLContentHandler, Metadata, TemporaryResources)
Reference type java.io.InputStream
1 instances of obligation remaining
Obligation to clean up resource created at ExternalParser.java:[line 231] is not discharged
Path continues at ExternalParser.java:[line 233]
Remaining obligations: {InputStream x 1}

Method may fail to clean up stream or resource Medium

new org.apache.tika.parser.geo.topic.GeoParserConfig() may fail to clean up java.io.InputStream


In file GeoParserConfig.java, line 38
In class org.apache.tika.parser.geo.topic.GeoParserConfig
In method new org.apache.tika.parser.geo.topic.GeoParserConfig()
Reference type java.io.InputStream
1 instances of obligation remaining
Obligation to clean up resource created at GeoParserConfig.java:[line 38] is not discharged
Path continues at GeoParserConfig.java:[line 39]
Remaining obligations: {InputStream x 1}

Method may fail to clean up stream or resource on checked exception Medium

org.apache.tika.parser.jdbc.JDBCTableReader.reset() may fail to clean up java.sql.Statement on checked exception


In file JDBCTableReader.java, line 304
In class org.apache.tika.parser.jdbc.JDBCTableReader
In method org.apache.tika.parser.jdbc.JDBCTableReader.reset()
Reference type java.sql.Statement
1 instances of obligation remaining
Obligation to clean up resource created at JDBCTableReader.java:[line 304] is not discharged
Path continues at JDBCTableReader.java:[line 305]
Path continues at JDBCTableReader.java:[line 306]
Path continues at JDBCTableReader.java:[line 307]
Remaining obligations: {Statement x 1}

Method may fail to clean up stream or resource Medium

org.apache.tika.parser.jdbc.SQLite3DBParser.getTableNames(Connection, Metadata, ParseContext) may fail to clean up java.sql.ResultSet


In file SQLite3DBParser.java, line 122
In class org.apache.tika.parser.jdbc.SQLite3DBParser
In method org.apache.tika.parser.jdbc.SQLite3DBParser.getTableNames(Connection, Metadata, ParseContext)
Reference type java.sql.ResultSet
1 instances of obligation remaining
Obligation to clean up resource created at SQLite3DBParser.java:[line 122] is not discharged
Path continues at SQLite3DBParser.java:[line 124]
Path continues at SQLite3DBParser.java:[line 127]
Path continues at SQLite3DBParser.java:[line 128]
Remaining obligations: {ResultSet x 1}

Method may fail to clean up stream or resource Medium

org.apache.tika.parser.journal.GrobidRESTParser.readRestUrl() may fail to clean up java.io.InputStream


In file GrobidRESTParser.java, line 93
In class org.apache.tika.parser.journal.GrobidRESTParser
In method org.apache.tika.parser.journal.GrobidRESTParser.readRestUrl()
Reference type java.io.InputStream
1 instances of obligation remaining
Obligation to clean up resource created at GrobidRESTParser.java:[line 93] is not discharged
Path continues at GrobidRESTParser.java:[line 92]
Path continues at GrobidRESTParser.java:[line 95]
Remaining obligations: {InputStream x 1}

Method may fail to clean up stream or resource Medium

org.apache.tika.parser.journal.JournalParser.parse(InputStream, ContentHandler, Metadata, ParseContext) may fail to clean up java.io.InputStream


In file JournalParser.java, line 63
In class org.apache.tika.parser.journal.JournalParser
In method org.apache.tika.parser.journal.JournalParser.parse(InputStream, ContentHandler, Metadata, ParseContext)
Reference type java.io.InputStream
1 instances of obligation remaining
Obligation to clean up resource created at JournalParser.java:[line 63] is not discharged
Path continues at JournalParser.java:[line 64]
Remaining obligations: {InputStream x 1}

Method may fail to clean up stream or resource Medium

org.apache.tika.parser.ner.grobid.GrobidNERecogniser.readRestEndpoint() may fail to clean up java.io.InputStream


In file GrobidNERecogniser.java, line 81
In class org.apache.tika.parser.ner.grobid.GrobidNERecogniser
In method org.apache.tika.parser.ner.grobid.GrobidNERecogniser.readRestEndpoint()
Reference type java.io.InputStream
1 instances of obligation remaining
Obligation to clean up resource created at GrobidNERecogniser.java:[line 81] is not discharged
Path continues at GrobidNERecogniser.java:[line 82]
Remaining obligations: {InputStream x 1}

Method may fail to clean up stream or resource Medium

org.apache.tika.parser.ner.grobid.GrobidNERecogniser.readRestUrl() may fail to clean up java.io.InputStream


In file GrobidNERecogniser.java, line 71
In class org.apache.tika.parser.ner.grobid.GrobidNERecogniser
In method org.apache.tika.parser.ner.grobid.GrobidNERecogniser.readRestUrl()
Reference type java.io.InputStream
1 instances of obligation remaining
Obligation to clean up resource created at GrobidNERecogniser.java:[line 71] is not discharged
Path continues at GrobidNERecogniser.java:[line 72]
Remaining obligations: {InputStream x 1}

Method may fail to clean up stream or resource Medium

org.apache.tika.parser.ner.nltk.NLTKNERecogniser.readRestUrl() may fail to clean up java.io.InputStream


In file NLTKNERecogniser.java, line 93
In class org.apache.tika.parser.ner.nltk.NLTKNERecogniser
In method org.apache.tika.parser.ner.nltk.NLTKNERecogniser.readRestUrl()
Reference type java.io.InputStream
1 instances of obligation remaining
Obligation to clean up resource created at NLTKNERecogniser.java:[line 93] is not discharged
Path continues at NLTKNERecogniser.java:[line 92]
Path continues at NLTKNERecogniser.java:[line 95]
Remaining obligations: {InputStream x 1}

Method may fail to clean up stream or resource Medium

new org.apache.tika.parser.ocr.TesseractOCRConfig() may fail to clean up java.io.InputStream


In file TesseractOCRConfig.java, line 70
In class org.apache.tika.parser.ocr.TesseractOCRConfig
In method new org.apache.tika.parser.ocr.TesseractOCRConfig()
Reference type java.io.InputStream
1 instances of obligation remaining
Obligation to clean up resource created at TesseractOCRConfig.java:[line 70] is not discharged
Path continues at TesseractOCRConfig.java:[line 71]
Remaining obligations: {InputStream x 1}

Method may fail to clean up stream or resource Medium

org.apache.tika.parser.ocr.TesseractOCRParser.parse(InputStream, ContentHandler, Metadata, ParseContext) may fail to clean up java.io.InputStream


In file TesseractOCRParser.java, line 185
In class org.apache.tika.parser.ocr.TesseractOCRParser
In method org.apache.tika.parser.ocr.TesseractOCRParser.parse(InputStream, ContentHandler, Metadata, ParseContext)
Reference type java.io.InputStream
1 instances of obligation remaining
Obligation to clean up resource created at TesseractOCRParser.java:[line 185] is not discharged
Path continues at TesseractOCRParser.java:[line 193]
Path continues at TesseractOCRParser.java:[line 195]
Path continues at TesseractOCRParser.java:[line 196]
Path continues at TesseractOCRParser.java:[line 200]
Remaining obligations: {InputStream x 1}

Method may fail to clean up stream or resource Medium

new org.apache.tika.parser.pdf.PDFParserConfig() may fail to clean up java.io.InputStream


In file PDFParserConfig.java, line 92
In class org.apache.tika.parser.pdf.PDFParserConfig
In method new org.apache.tika.parser.pdf.PDFParserConfig()
Reference type java.io.InputStream
1 instances of obligation remaining
Obligation to clean up resource created at PDFParserConfig.java:[line 92] is not discharged
Path continues at PDFParserConfig.java:[line 93]
Remaining obligations: {InputStream x 1}

Method may fail to clean up stream or resource Medium

new org.apache.tika.parser.strings.StringsConfig() may fail to clean up java.io.InputStream


In file StringsConfig.java, line 47
In class org.apache.tika.parser.strings.StringsConfig
In method new org.apache.tika.parser.strings.StringsConfig()
Reference type java.io.InputStream
1 instances of obligation remaining
Obligation to clean up resource created at StringsConfig.java:[line 47] is not discharged
Path continues at StringsConfig.java:[line 48]
Remaining obligations: {InputStream x 1}



Malicious code vulnerability Warnings

Warning Priority Details
Field isn't final but should be High

org.apache.tika.batch.FileResourceConsumer.ELAPSED_MILLIS isn't final but should be


In file FileResourceConsumer.java, line 72
In class org.apache.tika.batch.FileResourceConsumer
Field org.apache.tika.batch.FileResourceConsumer.ELAPSED_MILLIS
At FileResourceConsumer.java:[line 72]

Field isn't final but should be High

org.apache.tika.batch.FileResourceConsumer.IO_IS isn't final but should be


In file FileResourceConsumer.java, line 67
In class org.apache.tika.batch.FileResourceConsumer
Field org.apache.tika.batch.FileResourceConsumer.IO_IS
At FileResourceConsumer.java:[line 67]

Field isn't final but should be High

org.apache.tika.batch.FileResourceConsumer.IO_OS isn't final but should be


In file FileResourceConsumer.java, line 68
In class org.apache.tika.batch.FileResourceConsumer
Field org.apache.tika.batch.FileResourceConsumer.IO_OS
At FileResourceConsumer.java:[line 68]

Field isn't final but should be High

org.apache.tika.batch.FileResourceConsumer.OOM isn't final but should be


In file FileResourceConsumer.java, line 66
In class org.apache.tika.batch.FileResourceConsumer
Field org.apache.tika.batch.FileResourceConsumer.OOM
At FileResourceConsumer.java:[line 66]

Field isn't final but should be High

org.apache.tika.batch.FileResourceConsumer.PARSE_ERR isn't final but should be


In file FileResourceConsumer.java, line 69
In class org.apache.tika.batch.FileResourceConsumer
Field org.apache.tika.batch.FileResourceConsumer.PARSE_ERR
At FileResourceConsumer.java:[line 69]

Field isn't final but should be High

org.apache.tika.batch.FileResourceConsumer.PARSE_EX isn't final but should be


In file FileResourceConsumer.java, line 70
In class org.apache.tika.batch.FileResourceConsumer
Field org.apache.tika.batch.FileResourceConsumer.PARSE_EX
At FileResourceConsumer.java:[line 70]

Field isn't final but should be High

org.apache.tika.batch.FileResourceConsumer.TIMED_OUT isn't final but should be


In file FileResourceConsumer.java, line 65
In class org.apache.tika.batch.FileResourceConsumer
Field org.apache.tika.batch.FileResourceConsumer.TIMED_OUT
At FileResourceConsumer.java:[line 65]

Field isn't final but should be High

org.apache.tika.batch.FileResourceConsumer.logger isn't final but should be


In file FileResourceConsumer.java, line 75
In class org.apache.tika.batch.FileResourceConsumer
Field org.apache.tika.batch.FileResourceConsumer.logger
At FileResourceConsumer.java:[line 75]

Field isn't final but should be High

org.apache.tika.batch.FileResourceCrawler.logger isn't final but should be


In file FileResourceCrawler.java, line 44
In class org.apache.tika.batch.FileResourceCrawler
Field org.apache.tika.batch.FileResourceCrawler.logger
At FileResourceCrawler.java:[line 44]

Field isn't final but should be High

org.apache.tika.batch.fs.FSBatchProcessCLI.FINISHED_STRING isn't final but should be


In file FSBatchProcessCLI.java, line 49
In class org.apache.tika.batch.fs.FSBatchProcessCLI
Field org.apache.tika.batch.fs.FSBatchProcessCLI.FINISHED_STRING
At FSBatchProcessCLI.java:[line 49]

Field is a mutable array High

org.apache.tika.metadata.Photoshop._COLOR_MODE_CHOICES_INDEXED is a mutable array


In file Photoshop.java, line 42
In class org.apache.tika.metadata.Photoshop
Field org.apache.tika.metadata.Photoshop._COLOR_MODE_CHOICES_INDEXED
At Photoshop.java:[line 42]

Field is a mutable array High

org.apache.tika.parser.chm.core.ChmConstants.EXTRA_BITS is a mutable array


In file ChmConstants.java, line 91
In class org.apache.tika.parser.chm.core.ChmConstants
Field org.apache.tika.parser.chm.core.ChmConstants.EXTRA_BITS
At ChmConstants.java:[line 91]

Field is a mutable array High

org.apache.tika.parser.chm.core.ChmConstants.POSITION_BASE is a mutable array


In file ChmConstants.java, line 96
In class org.apache.tika.parser.chm.core.ChmConstants
Field org.apache.tika.parser.chm.core.ChmConstants.POSITION_BASE
At ChmConstants.java:[line 96]

Field isn't final but should be High

org.apache.tika.parser.ctakes.CTAKESContentHandler.CTAKES_META_PREFIX isn't final but should be


In file CTAKESContentHandler.java, line 43
In class org.apache.tika.parser.ctakes.CTAKESContentHandler
Field org.apache.tika.parser.ctakes.CTAKESContentHandler.CTAKES_META_PREFIX
At CTAKESContentHandler.java:[line 43]

Field isn't final but should be High

org.apache.tika.parser.microsoft.JackcessParser.MDB_PROPERTY_PREFIX isn't final but should be


In file JackcessParser.java, line 54
In class org.apache.tika.parser.microsoft.JackcessParser
Field org.apache.tika.parser.microsoft.JackcessParser.MDB_PROPERTY_PREFIX
At JackcessParser.java:[line 54]

Field isn't final but should be High

org.apache.tika.parser.microsoft.JackcessParser.MDB_PW isn't final but should be


In file JackcessParser.java, line 56
In class org.apache.tika.parser.microsoft.JackcessParser
Field org.apache.tika.parser.microsoft.JackcessParser.MDB_PW
At JackcessParser.java:[line 56]

Field isn't final but should be High

org.apache.tika.parser.microsoft.JackcessParser.USER_DEFINED_PROPERTY_PREFIX isn't final but should be


In file JackcessParser.java, line 55
In class org.apache.tika.parser.microsoft.JackcessParser
Field org.apache.tika.parser.microsoft.JackcessParser.USER_DEFINED_PROPERTY_PREFIX
At JackcessParser.java:[line 55]

May expose internal representation by returning reference to mutable object Medium

org.apache.tika.detect.NNTrainedModelBuilder.getParams() may expose internal representation by returning NNTrainedModelBuilder.params


In file NNTrainedModelBuilder.java, line 49
In class org.apache.tika.detect.NNTrainedModelBuilder
In method org.apache.tika.detect.NNTrainedModelBuilder.getParams()
Field org.apache.tika.detect.NNTrainedModelBuilder.params
At NNTrainedModelBuilder.java:[line 49]
At NNTrainedModelBuilder.java:[line 49]

May expose internal representation by returning reference to mutable object Medium

org.apache.tika.embedder.ExternalEmbedder.getCommand() may expose internal representation by returning ExternalEmbedder.command


In file ExternalEmbedder.java, line 116
In class org.apache.tika.embedder.ExternalEmbedder
In method org.apache.tika.embedder.ExternalEmbedder.getCommand()
Field org.apache.tika.embedder.ExternalEmbedder.command
At ExternalEmbedder.java:[line 116]
At ExternalEmbedder.java:[line 116]

May expose internal representation by returning reference to mutable object Medium

org.apache.tika.metadata.Property.getSecondaryExtractProperties() may expose internal representation by returning Property.secondaryExtractProperties


In file Property.java, line 211
In class org.apache.tika.metadata.Property
In method org.apache.tika.metadata.Property.getSecondaryExtractProperties()
Field org.apache.tika.metadata.Property.secondaryExtractProperties
At Property.java:[line 211]
At Property.java:[line 211]

May expose internal representation by returning reference to mutable object Medium

org.apache.tika.parser.chm.accessor.ChmItsfHeader.getDir_uuid() may expose internal representation by returning ChmItsfHeader.dir_uuid


In file ChmItsfHeader.java, line 204
In class org.apache.tika.parser.chm.accessor.ChmItsfHeader
In method org.apache.tika.parser.chm.accessor.ChmItsfHeader.getDir_uuid()
Field org.apache.tika.parser.chm.accessor.ChmItsfHeader.dir_uuid
At ChmItsfHeader.java:[line 204]
At ChmItsfHeader.java:[line 204]

May expose internal representation by returning reference to mutable object Medium

org.apache.tika.parser.chm.accessor.ChmItsfHeader.getSignature() may expose internal representation by returning ChmItsfHeader.signature


In file ChmItsfHeader.java, line 96
In class org.apache.tika.parser.chm.accessor.ChmItsfHeader
In method org.apache.tika.parser.chm.accessor.ChmItsfHeader.getSignature()
Field org.apache.tika.parser.chm.accessor.ChmItsfHeader.signature
At ChmItsfHeader.java:[line 96]
At ChmItsfHeader.java:[line 96]

May expose internal representation by returning reference to mutable object Medium

org.apache.tika.parser.chm.accessor.ChmItsfHeader.getStream_uuid() may expose internal representation by returning ChmItsfHeader.stream_uuid


In file ChmItsfHeader.java, line 222
In class org.apache.tika.parser.chm.accessor.ChmItsfHeader
In method org.apache.tika.parser.chm.accessor.ChmItsfHeader.getStream_uuid()
Field org.apache.tika.parser.chm.accessor.ChmItsfHeader.stream_uuid
At ChmItsfHeader.java:[line 222]
At ChmItsfHeader.java:[line 222]

May expose internal representation by returning reference to mutable object Medium

org.apache.tika.parser.chm.accessor.ChmItspHeader.getSignature() may expose internal representation by returning ChmItspHeader.signature


In file ChmItspHeader.java, line 216
In class org.apache.tika.parser.chm.accessor.ChmItspHeader
In method org.apache.tika.parser.chm.accessor.ChmItspHeader.getSignature()
Field org.apache.tika.parser.chm.accessor.ChmItspHeader.signature
At ChmItspHeader.java:[line 216]
At ChmItspHeader.java:[line 216]

May expose internal representation by returning reference to mutable object Medium

org.apache.tika.parser.chm.accessor.ChmItspHeader.getSystem_uuid() may expose internal representation by returning ChmItspHeader.system_uuid


In file ChmItspHeader.java, line 449
In class org.apache.tika.parser.chm.accessor.ChmItspHeader
In method org.apache.tika.parser.chm.accessor.ChmItspHeader.getSystem_uuid()
Field org.apache.tika.parser.chm.accessor.ChmItspHeader.system_uuid
At ChmItspHeader.java:[line 449]
At ChmItspHeader.java:[line 449]

May expose internal representation by returning reference to mutable object Medium

org.apache.tika.parser.chm.accessor.ChmItspHeader.getUnknown_0044() may expose internal representation by returning ChmItspHeader.unknown_0044


In file ChmItspHeader.java, line 467
In class org.apache.tika.parser.chm.accessor.ChmItspHeader
In method org.apache.tika.parser.chm.accessor.ChmItspHeader.getUnknown_0044()
Field org.apache.tika.parser.chm.accessor.ChmItspHeader.unknown_0044
At ChmItspHeader.java:[line 467]
At ChmItspHeader.java:[line 467]

May expose internal representation by returning reference to mutable object Medium

org.apache.tika.parser.chm.accessor.ChmLzxcControlData.getSignature() may expose internal representation by returning ChmLzxcControlData.signature


In file ChmLzxcControlData.java, line 124
In class org.apache.tika.parser.chm.accessor.ChmLzxcControlData
In method org.apache.tika.parser.chm.accessor.ChmLzxcControlData.getSignature()
Field org.apache.tika.parser.chm.accessor.ChmLzxcControlData.signature
At ChmLzxcControlData.java:[line 124]
At ChmLzxcControlData.java:[line 124]

May expose internal representation by returning reference to mutable object Medium

org.apache.tika.parser.chm.accessor.ChmLzxcResetTable.getBlockAddress() may expose internal representation by returning ChmLzxcResetTable.block_address


In file ChmLzxcResetTable.java, line 68
In class org.apache.tika.parser.chm.accessor.ChmLzxcResetTable
In method org.apache.tika.parser.chm.accessor.ChmLzxcResetTable.getBlockAddress()
Field org.apache.tika.parser.chm.accessor.ChmLzxcResetTable.block_address
At ChmLzxcResetTable.java:[line 68]
At ChmLzxcResetTable.java:[line 68]

May expose internal representation by returning reference to mutable object Medium

org.apache.tika.parser.chm.accessor.ChmPmgiHeader.getSignature() may expose internal representation by returning ChmPmgiHeader.signature


In file ChmPmgiHeader.java, line 118
In class org.apache.tika.parser.chm.accessor.ChmPmgiHeader
In method org.apache.tika.parser.chm.accessor.ChmPmgiHeader.getSignature()
Field org.apache.tika.parser.chm.accessor.ChmPmgiHeader.signature
At ChmPmgiHeader.java:[line 118]
At ChmPmgiHeader.java:[line 118]

May expose internal representation by returning reference to mutable object Medium

org.apache.tika.parser.chm.accessor.ChmPmglHeader.getSignature() may expose internal representation by returning ChmPmglHeader.signature


In file ChmPmglHeader.java, line 176
In class org.apache.tika.parser.chm.accessor.ChmPmglHeader
In method org.apache.tika.parser.chm.accessor.ChmPmglHeader.getSignature()
Field org.apache.tika.parser.chm.accessor.ChmPmglHeader.signature
At ChmPmglHeader.java:[line 176]
At ChmPmglHeader.java:[line 176]

May expose internal representation by returning reference to mutable object Medium

org.apache.tika.parser.chm.lzx.ChmLzxBlock.getContent() may expose internal representation by returning ChmLzxBlock.content


In file ChmLzxBlock.java, line 846
In class org.apache.tika.parser.chm.lzx.ChmLzxBlock
In method org.apache.tika.parser.chm.lzx.ChmLzxBlock.getContent()
Field org.apache.tika.parser.chm.lzx.ChmLzxBlock.content
At ChmLzxBlock.java:[line 846]
At ChmLzxBlock.java:[line 846]

May expose internal representation by returning reference to mutable object Medium

org.apache.tika.parser.chm.lzx.ChmLzxState.getLengthTreeLengtsTable() may expose internal representation by returning ChmLzxState.lengthTreeLengtsTable


In file ChmLzxState.java, line 321
In class org.apache.tika.parser.chm.lzx.ChmLzxState
In method org.apache.tika.parser.chm.lzx.ChmLzxState.getLengthTreeLengtsTable()
Field org.apache.tika.parser.chm.lzx.ChmLzxState.lengthTreeLengtsTable
At ChmLzxState.java:[line 321]
At ChmLzxState.java:[line 321]

May expose internal representation by returning reference to mutable object Medium

org.apache.tika.parser.chm.lzx.ChmLzxState.getMainTreeLengtsTable() may expose internal representation by returning ChmLzxState.mainTreeLengtsTable


In file ChmLzxState.java, line 313
In class org.apache.tika.parser.chm.lzx.ChmLzxState
In method org.apache.tika.parser.chm.lzx.ChmLzxState.getMainTreeLengtsTable()
Field org.apache.tika.parser.chm.lzx.ChmLzxState.mainTreeLengtsTable
At ChmLzxState.java:[line 313]
At ChmLzxState.java:[line 313]

May expose internal representation by returning reference to mutable object Medium

org.apache.tika.parser.chm.lzx.ChmSection.getData() may expose internal representation by returning ChmSection.data


In file ChmSection.java, line 91
In class org.apache.tika.parser.chm.lzx.ChmSection
In method org.apache.tika.parser.chm.lzx.ChmSection.getData()
Field org.apache.tika.parser.chm.lzx.ChmSection.data
At ChmSection.java:[line 91]
At ChmSection.java:[line 91]

May expose internal representation by returning reference to mutable object Medium

org.apache.tika.parser.chm.lzx.ChmSection.getPrevContent() may expose internal representation by returning ChmSection.prevcontent


In file ChmSection.java, line 95
In class org.apache.tika.parser.chm.lzx.ChmSection
In method org.apache.tika.parser.chm.lzx.ChmSection.getPrevContent()
Field org.apache.tika.parser.chm.lzx.ChmSection.prevcontent
At ChmSection.java:[line 95]
At ChmSection.java:[line 95]

May expose internal representation by returning reference to mutable object Medium

org.apache.tika.parser.ctakes.CTAKESConfig.getAnnotationProps() may expose internal representation by returning CTAKESConfig.annotationProps


In file CTAKESConfig.java, line 210
In class org.apache.tika.parser.ctakes.CTAKESConfig
In method org.apache.tika.parser.ctakes.CTAKESConfig.getAnnotationProps()
Field org.apache.tika.parser.ctakes.CTAKESConfig.annotationProps
At CTAKESConfig.java:[line 210]
At CTAKESConfig.java:[line 210]

May expose internal representation by returning reference to mutable object Medium

org.apache.tika.parser.ctakes.CTAKESConfig.getMetadata() may expose internal representation by returning CTAKESConfig.metadata


In file CTAKESConfig.java, line 184
In class org.apache.tika.parser.ctakes.CTAKESConfig
In method org.apache.tika.parser.ctakes.CTAKESConfig.getMetadata()
Field org.apache.tika.parser.ctakes.CTAKESConfig.metadata
At CTAKESConfig.java:[line 184]
At CTAKESConfig.java:[line 184]

May expose internal representation by returning reference to mutable object Medium

org.apache.tika.parser.external.ExternalParser.getCommand() may expose internal representation by returning ExternalParser.command


In file ExternalParser.java, line 101
In class org.apache.tika.parser.external.ExternalParser
In method org.apache.tika.parser.external.ExternalParser.getCommand()
Field org.apache.tika.parser.external.ExternalParser.command
At ExternalParser.java:[line 101]
At ExternalParser.java:[line 101]

May expose internal representation by returning reference to mutable object Medium

org.apache.tika.parser.mp3.ID3v2Frame.getData() may expose internal representation by returning ID3v2Frame.data


In file ID3v2Frame.java, line 63
In class org.apache.tika.parser.mp3.ID3v2Frame
In method org.apache.tika.parser.mp3.ID3v2Frame.getData()
Field org.apache.tika.parser.mp3.ID3v2Frame.data
At ID3v2Frame.java:[line 63]
At ID3v2Frame.java:[line 63]

May expose internal representation by returning reference to mutable object Medium

org.apache.tika.parser.mp3.ID3v2Frame.getExtendedHeader() may expose internal representation by returning ID3v2Frame.extendedHeader


In file ID3v2Frame.java, line 59
In class org.apache.tika.parser.mp3.ID3v2Frame
In method org.apache.tika.parser.mp3.ID3v2Frame.getExtendedHeader()
Field org.apache.tika.parser.mp3.ID3v2Frame.extendedHeader
At ID3v2Frame.java:[line 59]
At ID3v2Frame.java:[line 59]

May expose internal representation by incorporating reference to mutable object Medium

new org.apache.tika.batch.fs.strawman.StrawManTikaAppDriver(Path, Path, int, String[]) may expose internal representation by storing an externally mutable object into StrawManTikaAppDriver.args


In file StrawManTikaAppDriver.java, line 70
In class org.apache.tika.batch.fs.strawman.StrawManTikaAppDriver
In method new org.apache.tika.batch.fs.strawman.StrawManTikaAppDriver(Path, Path, int, String[])
Field org.apache.tika.batch.fs.strawman.StrawManTikaAppDriver.args
Local variable named args
At StrawManTikaAppDriver.java:[line 70]
At StrawManTikaAppDriver.java:[line 70]

May expose internal representation by incorporating reference to mutable object Medium

org.apache.tika.detect.NNTrainedModelBuilder.setParams(float[]) may expose internal representation by storing an externally mutable object into NNTrainedModelBuilder.params


In file NNTrainedModelBuilder.java, line 69
In class org.apache.tika.detect.NNTrainedModelBuilder
In method org.apache.tika.detect.NNTrainedModelBuilder.setParams(float[])
Field org.apache.tika.detect.NNTrainedModelBuilder.params
Local variable named params
At NNTrainedModelBuilder.java:[line 69]
At NNTrainedModelBuilder.java:[line 69]

May expose internal representation by incorporating reference to mutable object Medium

org.apache.tika.parser.chm.accessor.ChmLzxcResetTable.setBlockAddress(long[]) may expose internal representation by storing an externally mutable object into ChmLzxcResetTable.block_address


In file ChmLzxcResetTable.java, line 77
In class org.apache.tika.parser.chm.accessor.ChmLzxcResetTable
In method org.apache.tika.parser.chm.accessor.ChmLzxcResetTable.setBlockAddress(long[])
Field org.apache.tika.parser.chm.accessor.ChmLzxcResetTable.block_address
Local variable named block_address
At ChmLzxcResetTable.java:[line 77]
At ChmLzxcResetTable.java:[line 77]

May expose internal representation by incorporating reference to mutable object Medium

org.apache.tika.parser.chm.lzx.ChmLzxState.setLengthTreeLengtsTable(short[]) may expose internal representation by storing an externally mutable object into ChmLzxState.lengthTreeLengtsTable


In file ChmLzxState.java, line 317
In class org.apache.tika.parser.chm.lzx.ChmLzxState
In method org.apache.tika.parser.chm.lzx.ChmLzxState.setLengthTreeLengtsTable(short[])
Field org.apache.tika.parser.chm.lzx.ChmLzxState.lengthTreeLengtsTable
Local variable named lengthTreeLengtsTable
At ChmLzxState.java:[line 317]
At ChmLzxState.java:[line 317]

May expose internal representation by incorporating reference to mutable object Medium

org.apache.tika.parser.chm.lzx.ChmLzxState.setMainTreeLengtsTable(short[]) may expose internal representation by storing an externally mutable object into ChmLzxState.mainTreeLengtsTable


In file ChmLzxState.java, line 309
In class org.apache.tika.parser.chm.lzx.ChmLzxState
In method org.apache.tika.parser.chm.lzx.ChmLzxState.setMainTreeLengtsTable(short[])
Field org.apache.tika.parser.chm.lzx.ChmLzxState.mainTreeLengtsTable
Local variable named mainTreeLengtsTable
At ChmLzxState.java:[line 309]
At ChmLzxState.java:[line 309]

May expose internal representation by incorporating reference to mutable object Medium

new org.apache.tika.parser.chm.lzx.ChmSection(byte[], byte[]) may expose internal representation by storing an externally mutable object into ChmSection.data


In file ChmSection.java, line 38
In class org.apache.tika.parser.chm.lzx.ChmSection
In method new org.apache.tika.parser.chm.lzx.ChmSection(byte[], byte[])
Field org.apache.tika.parser.chm.lzx.ChmSection.data
Local variable named data
At ChmSection.java:[line 38]
At ChmSection.java:[line 38]

May expose internal representation by incorporating reference to mutable object Medium

new org.apache.tika.parser.chm.lzx.ChmSection(byte[], byte[]) may expose internal representation by storing an externally mutable object into ChmSection.prevcontent


In file ChmSection.java, line 39
In class org.apache.tika.parser.chm.lzx.ChmSection
In method new org.apache.tika.parser.chm.lzx.ChmSection(byte[], byte[])
Field org.apache.tika.parser.chm.lzx.ChmSection.prevcontent
Local variable named prevconent
At ChmSection.java:[line 39]
At ChmSection.java:[line 39]

May expose internal representation by incorporating reference to mutable object Medium

org.apache.tika.parser.ctakes.CTAKESConfig.setAnnotationProps(CTAKESAnnotationProperty[]) may expose internal representation by storing an externally mutable object into CTAKESConfig.annotationProps


In file CTAKESConfig.java, line 314
In class org.apache.tika.parser.ctakes.CTAKESConfig
In method org.apache.tika.parser.ctakes.CTAKESConfig.setAnnotationProps(CTAKESAnnotationProperty[])
Field org.apache.tika.parser.ctakes.CTAKESConfig.annotationProps
Local variable named annotationProps
At CTAKESConfig.java:[line 314]
At CTAKESConfig.java:[line 314]

May expose internal representation by incorporating reference to mutable object Medium

org.apache.tika.parser.ctakes.CTAKESConfig.setMetadata(String[]) may expose internal representation by storing an externally mutable object into CTAKESConfig.metadata


In file CTAKESConfig.java, line 306
In class org.apache.tika.parser.ctakes.CTAKESConfig
In method org.apache.tika.parser.ctakes.CTAKESConfig.setMetadata(String[])
Field org.apache.tika.parser.ctakes.CTAKESConfig.metadata
Local variable named metadata
At CTAKESConfig.java:[line 306]
At CTAKESConfig.java:[line 306]

May expose internal representation by incorporating reference to mutable object Medium

new org.apache.tika.parser.microsoft.AbstractListManager$ParagraphLevelCounter(AbstractListManager, AbstractListManager$LevelTuple[]) may expose internal representation by storing an externally mutable object into AbstractListManager$ParagraphLevelCounter.levelTuples


In file AbstractListManager.java, line 47
In class org.apache.tika.parser.microsoft.AbstractListManager$ParagraphLevelCounter
In method new org.apache.tika.parser.microsoft.AbstractListManager$ParagraphLevelCounter(AbstractListManager, AbstractListManager$LevelTuple[])
Field org.apache.tika.parser.microsoft.AbstractListManager$ParagraphLevelCounter.levelTuples
Local variable named levelTuples
At AbstractListManager.java:[line 47]
At AbstractListManager.java:[line 47]

May expose internal representation by incorporating reference to mutable object Medium

new org.apache.tika.parser.mp3.CompositeTagHandler(ID3Tags[]) may expose internal representation by storing an externally mutable object into CompositeTagHandler.tags


In file CompositeTagHandler.java, line 31
In class org.apache.tika.parser.mp3.CompositeTagHandler
In method new org.apache.tika.parser.mp3.CompositeTagHandler(ID3Tags[])
Field org.apache.tika.parser.mp3.CompositeTagHandler.tags
Local variable named tags
At CompositeTagHandler.java:[line 31]
At CompositeTagHandler.java:[line 31]

May expose internal representation by incorporating reference to mutable object Medium

org.apache.tika.parser.txt.CharsetDetector.setText(byte[]) may expose internal representation by storing an externally mutable object into CharsetDetector.fRawInput


In file CharsetDetector.java, line 212
In class org.apache.tika.parser.txt.CharsetDetector
In method org.apache.tika.parser.txt.CharsetDetector.setText(byte[])
Field org.apache.tika.parser.txt.CharsetDetector.fRawInput
Local variable named in
At CharsetDetector.java:[line 212]
At CharsetDetector.java:[line 212]

Field should be package protected Medium

org.apache.tika.io.FilenameUtils.RESERVED_FILENAME_CHARACTERS should be package protected


In file FilenameUtils.java, line 29
In class org.apache.tika.io.FilenameUtils
Field org.apache.tika.io.FilenameUtils.RESERVED_FILENAME_CHARACTERS
At FilenameUtils.java:[line 29]

Field isn't final but should be Medium

org.apache.tika.language.LanguageProfile.useInterleaved isn't final but should be


In file LanguageProfile.java, line 52
In class org.apache.tika.language.LanguageProfile
Field org.apache.tika.language.LanguageProfile.useInterleaved
At LanguageProfile.java:[line 52]

Field should be moved out of an interface and made package protected Medium

org.apache.tika.parser.mp3.ID3Tags.GENRES should be moved out of an interface and made package protected


In file ID3Tags.java, line 37
In class org.apache.tika.parser.mp3.ID3Tags
Field org.apache.tika.parser.mp3.ID3Tags.GENRES
At ID3Tags.java:[line 37]

Field should be package protected Medium

org.apache.tika.parser.mp3.ID3v2Frame.encodings should be package protected


In file ID3v2Frame.java, line 212
In class org.apache.tika.parser.mp3.ID3v2Frame
Field org.apache.tika.parser.mp3.ID3v2Frame.encodings
At ID3v2Frame.java:[line 212]

Field is a mutable collection which should be package protected Medium

org.apache.tika.parser.ner.corenlp.CoreNLPNERecogniser.ENTITY_TYPES is a mutable collection which should be package protected


In file CoreNLPNERecogniser.java, line 59
In class org.apache.tika.parser.ner.corenlp.CoreNLPNERecogniser
Field org.apache.tika.parser.ner.corenlp.CoreNLPNERecogniser.ENTITY_TYPES
At CoreNLPNERecogniser.java:[line 59]

Field is a mutable collection which should be package protected Medium

org.apache.tika.parser.ner.grobid.GrobidNERecogniser.ENTITY_TYPES is a mutable collection which should be package protected


In file GrobidNERecogniser.java, line 26
In class org.apache.tika.parser.ner.grobid.GrobidNERecogniser
Field org.apache.tika.parser.ner.grobid.GrobidNERecogniser.ENTITY_TYPES
At GrobidNERecogniser.java:[line 26]

Field is a mutable collection which should be package protected Medium

org.apache.tika.parser.ner.mitie.MITIENERecogniser.ENTITY_TYPES is a mutable collection which should be package protected


In file MITIENERecogniser.java, line 48
In class org.apache.tika.parser.ner.mitie.MITIENERecogniser
Field org.apache.tika.parser.ner.mitie.MITIENERecogniser.ENTITY_TYPES
At MITIENERecogniser.java:[line 48]

Field is a mutable collection which should be package protected Medium

org.apache.tika.parser.ner.NamedEntityParser.MEDIA_TYPES is a mutable collection which should be package protected


In file NamedEntityParser.java, line 62
In class org.apache.tika.parser.ner.NamedEntityParser
Field org.apache.tika.parser.ner.NamedEntityParser.MEDIA_TYPES
At NamedEntityParser.java:[line 62]

Field is a mutable collection which should be package protected Medium

org.apache.tika.parser.ner.nltk.NLTKNERecogniser.ENTITY_TYPES is a mutable collection which should be package protected


In file NLTKNERecogniser.java, line 55
In class org.apache.tika.parser.ner.nltk.NLTKNERecogniser
Field org.apache.tika.parser.ner.nltk.NLTKNERecogniser.ENTITY_TYPES
At NLTKNERecogniser.java:[line 55]

Field is a mutable collection which should be package protected Medium

org.apache.tika.parser.ner.opennlp.OpenNLPNERecogniser.DEFAULT_MODELS is a mutable collection which should be package protected


In file OpenNLPNERecogniser.java, line 90
In class org.apache.tika.parser.ner.opennlp.OpenNLPNERecogniser
Field org.apache.tika.parser.ner.opennlp.OpenNLPNERecogniser.DEFAULT_MODELS
At OpenNLPNERecogniser.java:[line 90]

Field should be package protected Medium

org.apache.tika.parser.odf.OpenDocumentContentParser.TAB should be package protected


In file OpenDocumentContentParser.java, line 376
In class org.apache.tika.parser.odf.OpenDocumentContentParser
Field org.apache.tika.parser.odf.OpenDocumentContentParser.TAB
At OpenDocumentContentParser.java:[line 376]

Public static method may expose internal representation by returning array Medium

Public static org.apache.tika.parser.txt.CharsetDetector.getAllDetectableCharsets() may expose internal representation by returning CharsetDetector.fCharsetNames


In file CharsetDetector.java, line 99
In class org.apache.tika.parser.txt.CharsetDetector
In method org.apache.tika.parser.txt.CharsetDetector.getAllDetectableCharsets()
Field org.apache.tika.parser.txt.CharsetDetector.fCharsetNames
At CharsetDetector.java:[line 99]
At CharsetDetector.java:[line 99]

Field should be package protected Medium

org.apache.tika.sax.CleanPhoneText.cleanSubstitutions should be package protected


In file CleanPhoneText.java, line 74
In class org.apache.tika.sax.CleanPhoneText
Field org.apache.tika.sax.CleanPhoneText.cleanSubstitutions
At CleanPhoneText.java:[line 74]

Field is a mutable collection which should be package protected Medium

org.apache.tika.server.TikaServerCli.LOG_LEVELS is a mutable collection which should be package protected


In file TikaServerCli.java, line 68
In class org.apache.tika.server.TikaServerCli
Field org.apache.tika.server.TikaServerCli.LOG_LEVELS
At TikaServerCli.java:[line 68]



Multithreaded correctness Warnings

Warning Priority Details
Synchronization performed on util.concurrent instance Medium

Synchronization performed on java.util.concurrent.ArrayBlockingQueue in org.apache.tika.batch.FileResourceCrawler.isQueueEmpty()


In file FileResourceCrawler.java, line 228
In class org.apache.tika.batch.FileResourceCrawler
In method org.apache.tika.batch.FileResourceCrawler.isQueueEmpty()
Type java.util.concurrent.ArrayBlockingQueue
Value loaded from field org.apache.tika.batch.FileResourceCrawler.queue
At FileResourceCrawler.java:[line 228]

An increment to a volatile field isn't atomic Medium

Increment of volatile field org.apache.tika.batch.FileResourceConsumer.numResourcesConsumed in org.apache.tika.batch.FileResourceConsumer.call()


In file FileResourceConsumer.java, line 119
In class org.apache.tika.batch.FileResourceConsumer
In method org.apache.tika.batch.FileResourceConsumer.call()
Field org.apache.tika.batch.FileResourceConsumer.numResourcesConsumed
At FileResourceConsumer.java:[line 119]

An increment to a volatile field isn't atomic Medium

Increment of volatile field org.apache.tika.batch.FileResourceConsumer.numHandledExceptions in org.apache.tika.batch.FileResourceConsumer.incrementHandledExceptions()


In file FileResourceConsumer.java, line 158
In class org.apache.tika.batch.FileResourceConsumer
In method org.apache.tika.batch.FileResourceConsumer.incrementHandledExceptions()
Field org.apache.tika.batch.FileResourceConsumer.numHandledExceptions
At FileResourceConsumer.java:[line 158]



Performance Warnings

Warning Priority Details
Boxing/unboxing to parse a primitive High

Boxing/unboxing to parse a primitive org.apache.tika.example.DirListParser.addMetadata(Metadata, String, String, String, String, String, String, String)


In file DirListParser.java, line 134
In class org.apache.tika.example.DirListParser
In method org.apache.tika.example.DirListParser.addMetadata(Metadata, String, String, String, String, String, String, String)
Called method Integer.intValue()
Should call Integer.parseInt(String) instead
At DirListParser.java:[line 134]
At DirListParser.java:[line 134]

Boxing/unboxing to parse a primitive High

Boxing/unboxing to parse a primitive org.apache.tika.parser.odf.OpenDocumentContentParser$OpenDocumentElementMappingContentHandler.startElement(String, String, String, Attributes)


In file OpenDocumentContentParser.java, line 252
In class org.apache.tika.parser.odf.OpenDocumentContentParser$OpenDocumentElementMappingContentHandler
In method org.apache.tika.parser.odf.OpenDocumentContentParser$OpenDocumentElementMappingContentHandler.startElement(String, String, String, Attributes)
Called method Integer.intValue()
Should call Integer.parseInt(String) instead
At OpenDocumentContentParser.java:[line 252]
At OpenDocumentContentParser.java:[line 252]

Boxing/unboxing to parse a primitive High

Boxing/unboxing to parse a primitive org.apache.tika.server.TikaServerCli.main(String[])


In file TikaServerCli.java, line 114
In class org.apache.tika.server.TikaServerCli
In method org.apache.tika.server.TikaServerCli.main(String[])
Called method Integer.intValue()
Should call Integer.parseInt(String) instead
At TikaServerCli.java:[line 114]
At TikaServerCli.java:[line 114]

The equals and hashCode methods of URL are blocking High

Invocation of java.net.URL.equals(Object), which blocks to do domain name resolution, in org.apache.tika.parser.geo.topic.GeoParser.initialize(URL)


In file GeoParser.java, line 69
In class org.apache.tika.parser.geo.topic.GeoParser
In method org.apache.tika.parser.geo.topic.GeoParser.initialize(URL)
Called method java.net.URL.equals(Object)
At GeoParser.java:[line 69]
At GeoParser.java:[line 69]

Method invokes inefficient Number constructor; use static valueOf instead Medium

org.apache.tika.xmp.XMPMetadata.getInt(Property) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead


In file XMPMetadata.java, line 308
In class org.apache.tika.xmp.XMPMetadata
In method org.apache.tika.xmp.XMPMetadata.getInt(Property)
Called method new Integer(int)
Should call Integer.valueOf(int) instead
At XMPMetadata.java:[line 308]
At XMPMetadata.java:[line 308]

Method invokes inefficient new String(String) constructor Medium

org.apache.tika.parser.pdf.PDFEncodedStringDecoder.decode(String) invokes inefficient new String(String) constructor


In file PDFEncodedStringDecoder.java, line 84
In class org.apache.tika.parser.pdf.PDFEncodedStringDecoder
In method org.apache.tika.parser.pdf.PDFEncodedStringDecoder.decode(String)
At PDFEncodedStringDecoder.java:[line 84]
At PDFEncodedStringDecoder.java:[line 84]

Method concatenates strings using + in a loop Medium

org.apache.tika.parser.iptc.IptcAnpaParser.parseBody(byte[], HashMap) concatenates strings using + in a loop


In file IptcAnpaParser.java, line 464
In class org.apache.tika.parser.iptc.IptcAnpaParser
In method org.apache.tika.parser.iptc.IptcAnpaParser.parseBody(byte[], HashMap)
At IptcAnpaParser.java:[line 464]

Method concatenates strings using + in a loop Medium

org.apache.tika.parser.iptc.IptcAnpaParser.parseFooter(byte[], HashMap) concatenates strings using + in a loop


In file IptcAnpaParser.java, line 713
In class org.apache.tika.parser.iptc.IptcAnpaParser
In method org.apache.tika.parser.iptc.IptcAnpaParser.parseFooter(byte[], HashMap)
At IptcAnpaParser.java:[line 713]

Method concatenates strings using + in a loop Medium

org.apache.tika.parser.iptc.IptcAnpaParser.parseHeader(byte[], HashMap) concatenates strings using + in a loop


In file IptcAnpaParser.java, line 367
In class org.apache.tika.parser.iptc.IptcAnpaParser
In method org.apache.tika.parser.iptc.IptcAnpaParser.parseHeader(byte[], HashMap)
At IptcAnpaParser.java:[line 367]

Method concatenates strings using + in a loop Medium

org.apache.tika.parser.microsoft.WordExtractor.handleSpecialCharacterRuns(Paragraph, int, boolean, WordExtractor$PicturesSource, XHTMLContentHandler) concatenates strings using + in a loop


In file WordExtractor.java, line 473
In class org.apache.tika.parser.microsoft.WordExtractor
In method org.apache.tika.parser.microsoft.WordExtractor.handleSpecialCharacterRuns(Paragraph, int, boolean, WordExtractor$PicturesSource, XHTMLContentHandler)
At WordExtractor.java:[line 473]

Method concatenates strings using + in a loop Medium

org.apache.tika.parser.ner.mitie.MITIENERecogniser.recognise(String) concatenates strings using + in a loop


In file MITIENERecogniser.java, line 148
In class org.apache.tika.parser.ner.mitie.MITIENERecogniser
In method org.apache.tika.parser.ner.mitie.MITIENERecogniser.recognise(String)
At MITIENERecogniser.java:[line 148]

Should be a static inner class Medium

Should org.apache.tika.batch.BatchProcess$State be a _static_ inner class?


In file BatchProcess.java, lines 360 to 367
In class org.apache.tika.batch.BatchProcess$State
At BatchProcess.java:[lines 360-367]

Should be a static inner class Medium

Should org.apache.tika.batch.BatchProcess$TimeoutFutureResult be a _static_ inner class?


In file BatchProcess.java, lines 584 to 594
In class org.apache.tika.batch.BatchProcess$TimeoutFutureResult
At BatchProcess.java:[lines 584-594]

Should be a static inner class Medium

Should org.apache.tika.batch.fs.FSDirectoryCrawler$FileNameComparator be a _static_ inner class?


In file FSDirectoryCrawler.java, lines 155 to 162
In class org.apache.tika.batch.fs.FSDirectoryCrawler$FileNameComparator
At FSDirectoryCrawler.java:[lines 155-162]

Should be a static inner class Medium

Should org.apache.tika.cli.TikaCLI$NoDocumentMetHandler be a _static_ inner class?


In file TikaCLI.java, lines 1154 to 1178
In class org.apache.tika.cli.TikaCLI$NoDocumentMetHandler
At TikaCLI.java:[lines 1154-1178]

Should be a static inner class Medium

Should org.apache.tika.cli.TikaCLI$NoDocumentXMPMetaHandler be a _static_ inner class?


In file TikaCLI.java, lines 1192 to 1212
In class org.apache.tika.cli.TikaCLI$NoDocumentXMPMetaHandler
At TikaCLI.java:[lines 1192-1212]

Should be a static inner class Medium

Should org.apache.tika.example.InterruptableParsingExample$QueryMatchedException be a _static_ inner class?


In file InterruptableParsingExample.java, line 65
In class org.apache.tika.example.InterruptableParsingExample$QueryMatchedException
At InterruptableParsingExample.java:[line 65]

Should be a static inner class Medium

Should org.apache.tika.example.TrecDocumentGenerator$TrecDocument be a _static_ inner class?


In file TrecDocumentGenerator.java, lines 56 to 105
In class org.apache.tika.example.TrecDocumentGenerator$TrecDocument
At TrecDocumentGenerator.java:[lines 56-105]

Should be a static inner class Medium

Should org.apache.tika.parser.iwork.PagesContentHandler$Annotations be a _static_ inner class?


In file PagesContentHandler.java, lines 424 to 445
In class org.apache.tika.parser.iwork.PagesContentHandler$Annotations
At PagesContentHandler.java:[lines 424-445]

Should be a static inner class Medium

Should org.apache.tika.parser.journal.TEIParser$Author be a _static_ inner class?


In file TEIParser.java, lines 441 to 515
In class org.apache.tika.parser.journal.TEIParser$Author
At TEIParser.java:[lines 441-515]

Should be a static inner class Medium

Should org.apache.tika.parser.journal.TEIParser$Country be a _static_ inner class?


In file TEIParser.java, lines 826 to 893
In class org.apache.tika.parser.journal.TEIParser$Country
At TEIParser.java:[lines 826-893]

Should be a static inner class Medium

Should org.apache.tika.parser.journal.TEIParser$OrgName be a _static_ inner class?


In file TEIParser.java, lines 591 to 645
In class org.apache.tika.parser.journal.TEIParser$OrgName
At TEIParser.java:[lines 591-645]

Should be a static inner class Medium

Should org.apache.tika.parser.journal.TEIParser$OrgTypeName be a _static_ inner class?


In file TEIParser.java, lines 656 to 700
In class org.apache.tika.parser.journal.TEIParser$OrgTypeName
At TEIParser.java:[lines 656-700]

Should be a static inner class Medium

Should org.apache.tika.parser.microsoft.AbstractListManager$LevelTuple be a _static_ inner class?


In file AbstractListManager.java, lines 246 to 267
In class org.apache.tika.parser.microsoft.AbstractListManager$LevelTuple
At AbstractListManager.java:[lines 246-267]

Should be a static inner class Medium

Should org.apache.tika.parser.microsoft.AbstractListManager$ParagraphLevelCounter be a _static_ inner class?


In file AbstractListManager.java, lines 39 to 241
In class org.apache.tika.parser.microsoft.AbstractListManager$ParagraphLevelCounter
At AbstractListManager.java:[lines 39-241]

Should be a static inner class Medium

Should org.apache.tika.parser.microsoft.ooxml.XWPFWordExtractorDecorator$TmpFormatting be a _static_ inner class?


In file XWPFWordExtractorDecorator.java, lines 432 to 455
In class org.apache.tika.parser.microsoft.ooxml.XWPFWordExtractorDecorator$TmpFormatting
At XWPFWordExtractorDecorator.java:[lines 432-455]

Should be a static inner class Medium

Should org.apache.tika.parser.pdf.PDFEncodedStringDecoder$COSStringParser be a _static_ inner class?


In file PDFEncodedStringDecoder.java, lines 100 to 116
In class org.apache.tika.parser.pdf.PDFEncodedStringDecoder$COSStringParser
At PDFEncodedStringDecoder.java:[lines 100-116]

Should be a static inner class Medium

Should org.apache.tika.parser.pdf.XFAExtractor$XFAField be a _static_ inner class?


In file XFAExtractor.java, lines 288 to 296
In class org.apache.tika.parser.pdf.XFAExtractor$XFAField
At XFAExtractor.java:[lines 288-296]

Should be a static inner class Medium

Should org.apache.tika.parser.utils.CommonsDigester$SimpleBoundedInputStream be a _static_ inner class?


In file CommonsDigester.java, lines 211 to 296
In class org.apache.tika.parser.utils.CommonsDigester$SimpleBoundedInputStream
At CommonsDigester.java:[lines 211-296]

Should be a static inner class Medium

Should org.apache.tika.server.resource.TikaWelcome$Endpoint be a _static_ inner class?


In file TikaWelcome.java, lines 224 to 230
In class org.apache.tika.server.resource.TikaWelcome$Endpoint
At TikaWelcome.java:[lines 224-230]

Should be a static inner class Medium

Should org.apache.tika.server.resource.UnpackerResource$MyEmbeddedDocumentExtractor be a _static_ inner class?


In file UnpackerResource.java, lines 163 to 259
In class org.apache.tika.server.resource.UnpackerResource$MyEmbeddedDocumentExtractor
At UnpackerResource.java:[lines 163-259]

Private method is never called Medium

Private method org.apache.tika.parser.image.ImageParser.setIfPresent(Metadata, String, String) is never called


In file ImageParser.java, lines 67 to 70
In class org.apache.tika.parser.image.ImageParser
In method org.apache.tika.parser.image.ImageParser.setIfPresent(Metadata, String, String)
At ImageParser.java:[lines 67-70]

Private method is never called Medium

Private method org.apache.tika.parser.mp4.MP4Parser.addMetadata(String, Metadata, Utf8AppleDataBox) is never called


In file MP4Parser.java, lines 306 to 309
In class org.apache.tika.parser.mp4.MP4Parser
In method org.apache.tika.parser.mp4.MP4Parser.addMetadata(String, Metadata, Utf8AppleDataBox)
At MP4Parser.java:[lines 306-309]

Unread field Medium

Unread field: org.apache.tika.parser.image.PSDParser$ResourceBlock.name


In file PSDParser.java, line 181
In class org.apache.tika.parser.image.PSDParser$ResourceBlock
Field org.apache.tika.parser.image.PSDParser$ResourceBlock.name
At PSDParser.java:[line 181]

Unread field Medium

Unread field: org.apache.tika.parser.iwork.KeynoteContentHandler.inBody


In file KeynoteContentHandler.java, line 37
In class org.apache.tika.parser.iwork.KeynoteContentHandler
Field org.apache.tika.parser.iwork.KeynoteContentHandler.inBody
At KeynoteContentHandler.java:[line 37]

Unread field Medium

Unread field: org.apache.tika.parser.iwork.KeynoteContentHandler.inTitle


In file KeynoteContentHandler.java, line 36
In class org.apache.tika.parser.iwork.KeynoteContentHandler
Field org.apache.tika.parser.iwork.KeynoteContentHandler.inTitle
At KeynoteContentHandler.java:[line 36]

Unread field Medium

Unread field: org.apache.tika.parser.iwork.NumbersContentHandler.inText


In file NumbersContentHandler.java, line 37
In class org.apache.tika.parser.iwork.NumbersContentHandler
Field org.apache.tika.parser.iwork.NumbersContentHandler.inText
At NumbersContentHandler.java:[line 37]

Unread field Medium

Unread field: org.apache.tika.parser.iwork.PagesContentHandler.numberOfColumns


In file PagesContentHandler.java, line 61
In class org.apache.tika.parser.iwork.PagesContentHandler
Field org.apache.tika.parser.iwork.PagesContentHandler.numberOfColumns
At PagesContentHandler.java:[line 61]

Unread field Medium

Unread field: org.apache.tika.parser.iwork.PagesContentHandler$HeaderFooter.type


In file PagesContentHandler.java, line 347
In class org.apache.tika.parser.iwork.PagesContentHandler$HeaderFooter
Field org.apache.tika.parser.iwork.PagesContentHandler$HeaderFooter.type
At PagesContentHandler.java:[line 347]

Unread field Medium

Unread field: org.apache.tika.parser.mp3.LyricsHandler.foundLyrics


In file LyricsHandler.java, line 39
In class org.apache.tika.parser.mp3.LyricsHandler
Field org.apache.tika.parser.mp3.LyricsHandler.foundLyrics
At LyricsHandler.java:[line 39]

Unread field Medium

Unread field: org.apache.tika.parser.txt.CharsetRecog_mbcs$iteratedChar.index


In file CharsetRecog_mbcs.java, line 159
In class org.apache.tika.parser.txt.CharsetRecog_mbcs$iteratedChar
Field org.apache.tika.parser.txt.CharsetRecog_mbcs$iteratedChar.index
At CharsetRecog_mbcs.java:[line 159]

Inefficient use of keySet iterator instead of entrySet iterator Medium

org.apache.tika.detect.NameDetector.detect(InputStream, Metadata) makes inefficient use of keySet iterator instead of entrySet iterator


In file NameDetector.java, line 136
In class org.apache.tika.detect.NameDetector
In method org.apache.tika.detect.NameDetector.detect(InputStream, Metadata)
Field org.apache.tika.detect.NameDetector.patterns
At NameDetector.java:[line 136]
At NameDetector.java:[line 136]

Inefficient use of keySet iterator instead of entrySet iterator Medium

org.apache.tika.detect.TrainedModelDetector.detect(InputStream, Metadata) makes inefficient use of keySet iterator instead of entrySet iterator


In file TrainedModelDetector.java, line 71
In class org.apache.tika.detect.TrainedModelDetector
In method org.apache.tika.detect.TrainedModelDetector.detect(InputStream, Metadata)
Field org.apache.tika.detect.TrainedModelDetector.MODEL_MAP
At TrainedModelDetector.java:[line 71]
At TrainedModelDetector.java:[line 71]

Inefficient use of keySet iterator instead of entrySet iterator Medium

org.apache.tika.example.MediaTypeExample.describeMediaType() makes inefficient use of keySet iterator instead of entrySet iterator


In file MediaTypeExample.java, line 36
In class org.apache.tika.example.MediaTypeExample
In method org.apache.tika.example.MediaTypeExample.describeMediaType()
At MediaTypeExample.java:[line 36]
At MediaTypeExample.java:[line 36]

Inefficient use of keySet iterator instead of entrySet iterator Medium

org.apache.tika.langdetect.OptimaizeLangDetector.createDetector(List) makes inefficient use of keySet iterator instead of entrySet iterator


In file OptimaizeLangDetector.java, line 116
In class org.apache.tika.langdetect.OptimaizeLangDetector
In method org.apache.tika.langdetect.OptimaizeLangDetector.createDetector(List)
Field org.apache.tika.langdetect.OptimaizeLangDetector.languageProbabilities
At OptimaizeLangDetector.java:[line 116]
At OptimaizeLangDetector.java:[line 116]

Inefficient use of keySet iterator instead of entrySet iterator Medium

org.apache.tika.metadata.Property.getProperties(String) makes inefficient use of keySet iterator instead of entrySet iterator


In file Property.java, line 220
In class org.apache.tika.metadata.Property
In method org.apache.tika.metadata.Property.getProperties(String)
Field org.apache.tika.metadata.Property.properties
At Property.java:[line 220]
At Property.java:[line 220]

Inefficient use of keySet iterator instead of entrySet iterator Medium

org.apache.tika.parser.gdal.GDALParser.applyPatternsToOutput(String, Metadata, Map) makes inefficient use of keySet iterator instead of entrySet iterator


In file GDALParser.java, line 342
In class org.apache.tika.parser.gdal.GDALParser
In method org.apache.tika.parser.gdal.GDALParser.applyPatternsToOutput(String, Metadata, Map)
At GDALParser.java:[line 342]
At GDALParser.java:[line 342]

Inefficient use of keySet iterator instead of entrySet iterator Medium

org.apache.tika.parser.geo.topic.GeoTag.toGeoTag(Map, String) makes inefficient use of keySet iterator instead of entrySet iterator


In file GeoTag.java, line 53
In class org.apache.tika.parser.geo.topic.GeoTag
In method org.apache.tika.parser.geo.topic.GeoTag.toGeoTag(Map, String)
At GeoTag.java:[line 53]
At GeoTag.java:[line 53]

Inefficient use of keySet iterator instead of entrySet iterator Medium

org.apache.tika.parser.mp4.MP4Parser.parse(InputStream, ContentHandler, Metadata, ParseContext) makes inefficient use of keySet iterator instead of entrySet iterator


In file MP4Parser.java, line 139
In class org.apache.tika.parser.mp4.MP4Parser
In method org.apache.tika.parser.mp4.MP4Parser.parse(InputStream, ContentHandler, Metadata, ParseContext)
Field org.apache.tika.parser.mp4.MP4Parser.typesMap
At MP4Parser.java:[line 139]
At MP4Parser.java:[line 139]

Inefficient use of keySet iterator instead of entrySet iterator Medium

org.apache.tika.parser.ner.nltk.NLTKNERecogniser.recognise(String) makes inefficient use of keySet iterator instead of entrySet iterator


In file NLTKNERecogniser.java, line 134
In class org.apache.tika.parser.ner.nltk.NLTKNERecogniser
In method org.apache.tika.parser.ner.nltk.NLTKNERecogniser.recognise(String)
At NLTKNERecogniser.java:[line 134]
At NLTKNERecogniser.java:[line 134]

Inefficient use of keySet iterator instead of entrySet iterator Medium

org.apache.tika.server.resource.TikaMimeTypes.getMimeTypesHTML() makes inefficient use of keySet iterator instead of entrySet iterator


In file TikaMimeTypes.java, line 66
In class org.apache.tika.server.resource.TikaMimeTypes
In method org.apache.tika.server.resource.TikaMimeTypes.getMimeTypesHTML()
At TikaMimeTypes.java:[line 66]
At TikaMimeTypes.java:[line 66]

Inefficient use of keySet iterator instead of entrySet iterator Medium

org.apache.tika.server.resource.TikaWelcome.identifyEndpoints() makes inefficient use of keySet iterator instead of entrySet iterator


In file TikaWelcome.java, line 91
In class org.apache.tika.server.resource.TikaWelcome
In method org.apache.tika.server.resource.TikaWelcome.identifyEndpoints()
Field org.apache.tika.server.resource.TikaWelcome.HTTP_METHODS
At TikaWelcome.java:[line 91]
At TikaWelcome.java:[line 91]



Dodgy code Warnings

Warning Priority Details
Dead store to local variable High

Dead store to ex in org.apache.tika.example.DumpTikaConfigExample.main(String[])


In file DumpTikaConfigExample.java, line 84
In class org.apache.tika.example.DumpTikaConfigExample
In method org.apache.tika.example.DumpTikaConfigExample.main(String[])
Local variable named ex
At DumpTikaConfigExample.java:[line 84]
At DumpTikaConfigExample.java:[line 84]

Dead store to local variable High

Dead store to type in org.apache.tika.parser.envi.EnviHeaderParser.parse(InputStream, ContentHandler, Metadata, ParseContext)


In file EnviHeaderParser.java, line 64
In class org.apache.tika.parser.envi.EnviHeaderParser
In method org.apache.tika.parser.envi.EnviHeaderParser.parse(InputStream, ContentHandler, Metadata, ParseContext)
Local variable named type
At EnviHeaderParser.java:[line 64]
At EnviHeaderParser.java:[line 64]

Dead store to local variable High

Dead store to tmp in org.apache.tika.parser.pdf.PDFParser.parse(InputStream, ContentHandler, Metadata, ParseContext)


In file PDFParser.java, line 116
In class org.apache.tika.parser.pdf.PDFParser
In method org.apache.tika.parser.pdf.PDFParser.parse(InputStream, ContentHandler, Metadata, ParseContext)
Local variable named tmp
At PDFParser.java:[line 116]
At PDFParser.java:[line 116]

Write to static field from instance method High

Write to static field org.apache.tika.langdetect.TextLangDetector.restHostUrlStr from instance method new org.apache.tika.langdetect.TextLangDetector()


In file TextLangDetector.java, line 54
In class org.apache.tika.langdetect.TextLangDetector
In method new org.apache.tika.langdetect.TextLangDetector()
Field org.apache.tika.langdetect.TextLangDetector.restHostUrlStr
At TextLangDetector.java:[line 54]
At TextLangDetector.java:[line 54]

instanceof will always return true Medium

instanceof will always return true for all non-null values in org.apache.tika.gui.TikaGUI.handleStream(InputStream, Metadata), since all org.apache.tika.io.TikaInputStream are instances of org.apache.tika.io.TikaInputStream


In file TikaGUI.java, line 347
In class org.apache.tika.gui.TikaGUI
In method org.apache.tika.gui.TikaGUI.handleStream(InputStream, Metadata)
Actual type org.apache.tika.io.TikaInputStream
Expected org.apache.tika.io.TikaInputStream
At TikaGUI.java:[line 347]
At TikaGUI.java:[line 347]

Dead store to local variable Medium

Dead store to exit in org.apache.tika.batch.fs.strawman.StrawManTikaAppDriver$TikaVisitor.visitFile(Path, BasicFileAttributes)


In file StrawManTikaAppDriver.java, line 134
In class org.apache.tika.batch.fs.strawman.StrawManTikaAppDriver$TikaVisitor
In method org.apache.tika.batch.fs.strawman.StrawManTikaAppDriver$TikaVisitor.visitFile(Path, BasicFileAttributes)
Local variable named exit
At StrawManTikaAppDriver.java:[line 134]
At StrawManTikaAppDriver.java:[line 134]

Dead store to local variable Medium

Dead store to locale in org.apache.tika.language.detect.LanguageNames.hasMacroLanguage(String)


In file LanguageNames.java, line 50
In class org.apache.tika.language.detect.LanguageNames
In method org.apache.tika.language.detect.LanguageNames.hasMacroLanguage(String)
Local variable named locale
At LanguageNames.java:[line 50]
At LanguageNames.java:[line 50]

Dead store to local variable Medium

Dead store to locale in org.apache.tika.language.detect.LanguageNames.isMacroLanguage(String)


In file LanguageNames.java, line 44
In class org.apache.tika.language.detect.LanguageNames
In method org.apache.tika.language.detect.LanguageNames.isMacroLanguage(String)
Local variable named locale
At LanguageNames.java:[line 44]
At LanguageNames.java:[line 44]

Dead store to local variable Medium

Dead store to stopPmgl in org.apache.tika.parser.chm.accessor.ChmDirectoryListingSet.enumerateChmDirectoryListingList(ChmItsfHeader, ChmItspHeader)


In file ChmDirectoryListingSet.java, line 127
In class org.apache.tika.parser.chm.accessor.ChmDirectoryListingSet
In method org.apache.tika.parser.chm.accessor.ChmDirectoryListingSet.enumerateChmDirectoryListingList(ChmItsfHeader, ChmItspHeader)
Local variable named stopPmgl
At ChmDirectoryListingSet.java:[line 127]
At ChmDirectoryListingSet.java:[line 127]

Dead store to local variable Medium

Dead store to position_slots in new org.apache.tika.parser.chm.lzx.ChmLzxState(int)


In file ChmLzxState.java, line 164
In class org.apache.tika.parser.chm.lzx.ChmLzxState
In method new org.apache.tika.parser.chm.lzx.ChmLzxState(int)
Local variable named position_slots
At ChmLzxState.java:[line 164]
At ChmLzxState.java:[line 164]

Dead store to local variable Medium

Dead store to elfVer in org.apache.tika.parser.executable.ExecutableParser.parseELF(XHTMLContentHandler, Metadata, InputStream, byte[])


In file ExecutableParser.java, line 251
In class org.apache.tika.parser.executable.ExecutableParser
In method org.apache.tika.parser.executable.ExecutableParser.parseELF(XHTMLContentHandler, Metadata, InputStream, byte[])
Local variable named elfVer
At ExecutableParser.java:[line 251]
At ExecutableParser.java:[line 251]

Dead store to local variable Medium

Dead store to characteristcs in org.apache.tika.parser.executable.ExecutableParser.parsePE(XHTMLContentHandler, Metadata, InputStream, byte[])


In file ExecutableParser.java, line 126
In class org.apache.tika.parser.executable.ExecutableParser
In method org.apache.tika.parser.executable.ExecutableParser.parsePE(XHTMLContentHandler, Metadata, InputStream, byte[])
Local variable named characteristcs
At ExecutableParser.java:[line 126]
At ExecutableParser.java:[line 126]

Dead store to local variable Medium

Dead store to numSectors in org.apache.tika.parser.executable.ExecutableParser.parsePE(XHTMLContentHandler, Metadata, InputStream, byte[])


In file ExecutableParser.java, line 121
In class org.apache.tika.parser.executable.ExecutableParser
In method org.apache.tika.parser.executable.ExecutableParser.parsePE(XHTMLContentHandler, Metadata, InputStream, byte[])
Local variable named numSectors
At ExecutableParser.java:[line 121]
At ExecutableParser.java:[line 121]

Dead store to local variable Medium

Dead store to numSymbols in org.apache.tika.parser.executable.ExecutableParser.parsePE(XHTMLContentHandler, Metadata, InputStream, byte[])


In file ExecutableParser.java, line 124
In class org.apache.tika.parser.executable.ExecutableParser
In method org.apache.tika.parser.executable.ExecutableParser.parsePE(XHTMLContentHandler, Metadata, InputStream, byte[])
Local variable named numSymbols
At ExecutableParser.java:[line 124]
At ExecutableParser.java:[line 124]

Dead store to local variable Medium

Dead store to sizeOptHdrs in org.apache.tika.parser.executable.ExecutableParser.parsePE(XHTMLContentHandler, Metadata, InputStream, byte[])


In file ExecutableParser.java, line 125
In class org.apache.tika.parser.executable.ExecutableParser
In method org.apache.tika.parser.executable.ExecutableParser.parsePE(XHTMLContentHandler, Metadata, InputStream, byte[])
Local variable named sizeOptHdrs
At ExecutableParser.java:[line 125]
At ExecutableParser.java:[line 125]

Dead store to local variable Medium

Dead store to symbolTableOffset in org.apache.tika.parser.executable.ExecutableParser.parsePE(XHTMLContentHandler, Metadata, InputStream, byte[])


In file ExecutableParser.java, line 123
In class org.apache.tika.parser.executable.ExecutableParser
In method org.apache.tika.parser.executable.ExecutableParser.parsePE(XHTMLContentHandler, Metadata, InputStream, byte[])
Local variable named symbolTableOffset
At ExecutableParser.java:[line 123]
At ExecutableParser.java:[line 123]

Dead store to local variable Medium

Dead store to alphaDataLength in org.apache.tika.parser.image.BPGParser.parse(InputStream, ContentHandler, Metadata, ParseContext)


In file BPGParser.java, line 136
In class org.apache.tika.parser.image.BPGParser
In method org.apache.tika.parser.image.BPGParser.parse(InputStream, ContentHandler, Metadata, ParseContext)
Local variable named alphaDataLength
At BPGParser.java:[line 136]
At BPGParser.java:[line 136]

Dead store to local variable Medium

Dead store to pixelFormat in org.apache.tika.parser.image.BPGParser.parse(InputStream, ContentHandler, Metadata, ParseContext)


In file BPGParser.java, line 77
In class org.apache.tika.parser.image.BPGParser
In method org.apache.tika.parser.image.BPGParser.parse(InputStream, ContentHandler, Metadata, ParseContext)
Local variable named pixelFormat
At BPGParser.java:[line 77]
At BPGParser.java:[line 77]

Dead store to local variable Medium

Dead store to webPMetadata in org.apache.tika.parser.image.ImageMetadataExtractor.parseWebP(File)


In file ImageMetadataExtractor.java, line 136
In class org.apache.tika.parser.image.ImageMetadataExtractor
In method org.apache.tika.parser.image.ImageMetadataExtractor.parseWebP(File)
Local variable named webPMetadata
At ImageMetadataExtractor.java:[line 136]
At ImageMetadataExtractor.java:[line 136]

Dead store to local variable Medium

Dead store to numChannels in org.apache.tika.parser.image.PSDParser.parse(InputStream, ContentHandler, Metadata, ParseContext)


In file PSDParser.java, line 89
In class org.apache.tika.parser.image.PSDParser
In method org.apache.tika.parser.image.PSDParser.parse(InputStream, ContentHandler, Metadata, ParseContext)
Local variable named numChannels
At PSDParser.java:[line 89]
At PSDParser.java:[line 89]

Dead store to local variable Medium

Dead store to residual in org.apache.tika.parser.iptc.IptcAnpaParser.loadProperties(InputStream)


In file IptcAnpaParser.java, line 140
In class org.apache.tika.parser.iptc.IptcAnpaParser
In method org.apache.tika.parser.iptc.IptcAnpaParser.loadProperties(InputStream)
Local variable named residual
At IptcAnpaParser.java:[line 140]
At IptcAnpaParser.java:[line 140]

Dead store to local variable Medium

Dead store to b in org.apache.tika.parser.microsoft.ooxml.XWPFListManager.<static initializer for XWPFListManager>()


In file XWPFListManager.java, line 43
In class org.apache.tika.parser.microsoft.ooxml.XWPFListManager
In method org.apache.tika.parser.microsoft.ooxml.XWPFListManager.<static initializer for XWPFListManager>()
Local variable named b
At XWPFListManager.java:[line 43]
At XWPFListManager.java:[line 43]

Dead store to local variable Medium

Dead store to exitValue in org.apache.tika.parser.pot.PooledTimeSeriesParser.computePoT(File)


In file PooledTimeSeriesParser.java, line 188
In class org.apache.tika.parser.pot.PooledTimeSeriesParser
In method org.apache.tika.parser.pot.PooledTimeSeriesParser.computePoT(File)
Local variable named exitValue
At PooledTimeSeriesParser.java:[line 188]
At PooledTimeSeriesParser.java:[line 188]

Dead store to local variable Medium

Dead store to cmdOutput in org.apache.tika.parser.pot.PooledTimeSeriesParser.parse(InputStream, ContentHandler, Metadata, ParseContext)


In file PooledTimeSeriesParser.java, line 132
In class org.apache.tika.parser.pot.PooledTimeSeriesParser
In method org.apache.tika.parser.pot.PooledTimeSeriesParser.parse(InputStream, ContentHandler, Metadata, ParseContext)
Local variable named cmdOutput
At PooledTimeSeriesParser.java:[line 132]
At PooledTimeSeriesParser.java:[line 132]

Unusual equals method Medium

org.apache.tika.xmp.XMPMetadata.equals(Object) is unusual


In file XMPMetadata.java, line 583
In class org.apache.tika.xmp.XMPMetadata
In method org.apache.tika.xmp.XMPMetadata.equals(Object)
At XMPMetadata.java:[line 583]

Test for floating point equality Medium

Test for floating point equality in org.apache.tika.parser.audio.MidiParser.parse(InputStream, ContentHandler, Metadata, ParseContext)


In file MidiParser.java, line 90
In class org.apache.tika.parser.audio.MidiParser
In method org.apache.tika.parser.audio.MidiParser.parse(InputStream, ContentHandler, Metadata, ParseContext)
At MidiParser.java:[line 90]

Check for oddness that won't work for negative numbers Medium

Check for oddness that won't work for negative numbers in new org.apache.tika.parser.image.PSDParser$ResourceBlock(InputStream)


In file PSDParser.java, line 173
In class org.apache.tika.parser.image.PSDParser$ResourceBlock
In method new org.apache.tika.parser.image.PSDParser$ResourceBlock(InputStream)
At PSDParser.java:[line 173]
At PSDParser.java:[line 173]

Possible null pointer dereference due to return value of called method Medium

Possible null pointer dereference in org.apache.tika.batch.fs.FSDirectoryCrawler$FileNameComparator.compare(Path, Path) due to return value of called method


In file FSDirectoryCrawler.java, line 162
In class org.apache.tika.batch.fs.FSDirectoryCrawler$FileNameComparator
In method org.apache.tika.batch.fs.FSDirectoryCrawler$FileNameComparator.compare(Path, Path)
Local variable stored in JVM register ?
Dereferenced at FSDirectoryCrawler.java:[line 162]
Known null at FSDirectoryCrawler.java:[line 162]

Possible null pointer dereference due to return value of called method Medium

Possible null pointer dereference in new org.apache.tika.batch.fs.FSFileResource(Path, Path) due to return value of called method


In file FSFileResource.java, line 79
In class org.apache.tika.batch.fs.FSFileResource
In method new org.apache.tika.batch.fs.FSFileResource(Path, Path)
Local variable stored in JVM register ?
Dereferenced at FSFileResource.java:[line 79]
Known null at FSFileResource.java:[line 79]

Possible null pointer dereference due to return value of called method Medium

Possible null pointer dereference in org.apache.tika.batch.fs.FSFileResource.getExtension(Path) due to return value of called method


In file FSFileResource.java, line 102
In class org.apache.tika.batch.fs.FSFileResource
In method org.apache.tika.batch.fs.FSFileResource.getExtension(Path)
Local variable stored in JVM register ?
Dereferenced at FSFileResource.java:[line 102]
Known null at FSFileResource.java:[line 102]

Possible null pointer dereference due to return value of called method Medium

Possible null pointer dereference in org.apache.tika.batch.fs.FSOutputStreamFactory.getOutputStream(Metadata) due to return value of called method


In file FSOutputStreamFactory.java, line 92
In class org.apache.tika.batch.fs.FSOutputStreamFactory
In method org.apache.tika.batch.fs.FSOutputStreamFactory.getOutputStream(Metadata)
Local variable stored in JVM register ?
Method invoked at FSOutputStreamFactory.java:[line 92]
Known null at FSOutputStreamFactory.java:[line 92]

Possible null pointer dereference due to return value of called method Medium

Possible null pointer dereference in org.apache.tika.batch.fs.FSOutputStreamFactory.getOutputStream(Metadata) due to return value of called method


In file FSOutputStreamFactory.java, line 93
In class org.apache.tika.batch.fs.FSOutputStreamFactory
In method org.apache.tika.batch.fs.FSOutputStreamFactory.getOutputStream(Metadata)
Local variable stored in JVM register ?
Method invoked at FSOutputStreamFactory.java:[line 93]
Known null at FSOutputStreamFactory.java:[line 93]

Possible null pointer dereference due to return value of called method Medium

Possible null pointer dereference in org.apache.tika.batch.fs.FSOutputStreamFactory.getOutputStream(Metadata) due to return value of called method


In file FSOutputStreamFactory.java, line 95
In class org.apache.tika.batch.fs.FSOutputStreamFactory
In method org.apache.tika.batch.fs.FSOutputStreamFactory.getOutputStream(Metadata)
Local variable stored in JVM register ?
Method invoked at FSOutputStreamFactory.java:[line 95]
Known null at FSOutputStreamFactory.java:[line 95]

Possible null pointer dereference due to return value of called method Medium

Possible null pointer dereference in org.apache.tika.batch.fs.FSUtil.getOutputPath(Path, String, FSUtil$HANDLE_EXISTING, String) due to return value of called method


In file FSUtil.java, line 159
In class org.apache.tika.batch.fs.FSUtil
In method org.apache.tika.batch.fs.FSUtil.getOutputPath(Path, String, FSUtil$HANDLE_EXISTING, String)
Local variable stored in JVM register ?
Dereferenced at FSUtil.java:[line 159]
Known null at FSUtil.java:[line 159]

Possible null pointer dereference due to return value of called method Medium

Possible null pointer dereference in org.apache.tika.batch.fs.strawman.StrawManTikaAppDriver$TikaVisitor.visitFile(Path, BasicFileAttributes) due to return value of called method


In file StrawManTikaAppDriver.java, line 96
In class org.apache.tika.batch.fs.strawman.StrawManTikaAppDriver$TikaVisitor
In method org.apache.tika.batch.fs.strawman.StrawManTikaAppDriver$TikaVisitor.visitFile(Path, BasicFileAttributes)
Local variable stored in JVM register ?
Method invoked at StrawManTikaAppDriver.java:[line 96]
Known null at StrawManTikaAppDriver.java:[line 96]

Possible null pointer dereference due to return value of called method Medium

Possible null pointer dereference in org.apache.tika.cli.TikaCLI.compareFileMagic(String) due to return value of called method


In file TikaCLI.java, line 851
In class org.apache.tika.cli.TikaCLI
In method org.apache.tika.cli.TikaCLI.compareFileMagic(String)
Value loaded from config
Dereferenced at TikaCLI.java:[line 851]
Known null at TikaCLI.java:[line 851]

Possible null pointer dereference due to return value of called method Medium

Possible null pointer dereference in org.apache.tika.example.ExtractEmbeddedFiles$MyEmbeddedDocumentExtractor.parseEmbedded(InputStream, ContentHandler, Metadata, boolean) due to return value of called method


In file ExtractEmbeddedFiles.java, line 102
In class org.apache.tika.example.ExtractEmbeddedFiles$MyEmbeddedDocumentExtractor
In method org.apache.tika.example.ExtractEmbeddedFiles$MyEmbeddedDocumentExtractor.parseEmbedded(InputStream, ContentHandler, Metadata, boolean)
Local variable stored in JVM register ?
Method invoked at ExtractEmbeddedFiles.java:[line 102]
Known null at ExtractEmbeddedFiles.java:[line 102]

Possible null pointer dereference due to return value of called method Medium

Possible null pointer dereference in org.apache.tika.example.RollbackSoftware$DeploymentAreaParser.parse(InputStream, ContentHandler, Metadata, ParseContext) due to return value of called method


In file RollbackSoftware.java, line 124
In class org.apache.tika.example.RollbackSoftware$DeploymentAreaParser
In method org.apache.tika.example.RollbackSoftware$DeploymentAreaParser.parse(InputStream, ContentHandler, Metadata, ParseContext)
Value loaded from versions
Dereferenced at RollbackSoftware.java:[line 124]
Known null at RollbackSoftware.java:[line 115]

Possible null pointer dereference due to return value of called method Medium

Possible null pointer dereference in org.apache.tika.io.TikaInputStream.get(Path, Metadata) due to return value of called method


In file TikaInputStream.java, line 226
In class org.apache.tika.io.TikaInputStream
In method org.apache.tika.io.TikaInputStream.get(Path, Metadata)
Local variable stored in JVM register ?
Dereferenced at TikaInputStream.java:[line 226]
Known null at TikaInputStream.java:[line 226]

Load of known null value Medium

Load of known null value in org.apache.tika.langdetect.TextLangDetector.detectAll()


In file TextLangDetector.java, line 97
In class org.apache.tika.langdetect.TextLangDetector
In method org.apache.tika.langdetect.TextLangDetector.detectAll()
Value loaded from language
At TextLangDetector.java:[line 97]
At TextLangDetector.java:[line 97]

Load of known null value Medium

Load of known null value in org.apache.tika.language.LanguageProfilerBuilder$QuickStringBuffer.append(String)


In file LanguageProfilerBuilder.java, line 741
In class org.apache.tika.language.LanguageProfilerBuilder$QuickStringBuffer
In method org.apache.tika.language.LanguageProfilerBuilder$QuickStringBuffer.append(String)
Value loaded from str
At LanguageProfilerBuilder.java:[line 741]
At LanguageProfilerBuilder.java:[line 741]

Dereference of the result of readLine() without nullcheck Medium

Dereference of the result of readLine() without nullcheck in org.apache.tika.parser.mbox.MboxParser.parse(InputStream, ContentHandler, Metadata, ParseContext)


In file MboxParser.java, line 100
In class org.apache.tika.parser.mbox.MboxParser
In method org.apache.tika.parser.mbox.MboxParser.parse(InputStream, ContentHandler, Metadata, ParseContext)
Value loaded from curLine
At MboxParser.java:[line 100]
At MboxParser.java:[line 100]

Possible null pointer dereference due to return value of called method Medium

Possible null pointer dereference in new org.apache.tika.parser.ParsingReader(Path) due to return value of called method


In file ParsingReader.java, line 131
In class org.apache.tika.parser.ParsingReader
In method new org.apache.tika.parser.ParsingReader(Path)
Local variable stored in JVM register ?
Dereferenced at ParsingReader.java:[line 131]
Known null at ParsingReader.java:[line 131]

Dereference of the result of readLine() without nullcheck Medium

Dereference of the result of readLine() without nullcheck in org.apache.tika.parser.pot.PooledTimeSeriesParser.extractHeaderOutput(InputStream, Metadata, String)


In file PooledTimeSeriesParser.java, line 237
In class org.apache.tika.parser.pot.PooledTimeSeriesParser
In method org.apache.tika.parser.pot.PooledTimeSeriesParser.extractHeaderOutput(InputStream, Metadata, String)
Value loaded from line
At PooledTimeSeriesParser.java:[line 237]
At PooledTimeSeriesParser.java:[line 237]

Redundant nullcheck of value known to be non-null Medium

Redundant nullcheck of t, which is known to be non-null in org.apache.tika.parser.chm.core.ChmCommons.getChmBlockSegment(byte[], ChmLzxcResetTable, int, int, int)


In file ChmCommons.java, line 112
In class org.apache.tika.parser.chm.core.ChmCommons
In method org.apache.tika.parser.chm.core.ChmCommons.getChmBlockSegment(byte[], ChmLzxcResetTable, int, int, int)
Value loaded from t
Return value of org.apache.tika.parser.chm.core.ChmCommons.copyOfRange(byte[], int, int) of type byte[]
Redundant null check at ChmCommons.java:[line 112]
Redundant null check at ChmCommons.java:[line 112]

Redundant nullcheck of value known to be non-null Medium

Redundant nullcheck of prelentable, which is known to be non-null in org.apache.tika.parser.chm.lzx.ChmLzxBlock.createLengthTreeLenTable(int, int, short[], short[])


In file ChmLzxBlock.java, line 573
In class org.apache.tika.parser.chm.lzx.ChmLzxBlock
In method org.apache.tika.parser.chm.lzx.ChmLzxBlock.createLengthTreeLenTable(int, int, short[], short[])
Value loaded from prelentable
Redundant null check at ChmLzxBlock.java:[line 573]
Redundant null check at ChmLzxBlock.java:[line 573]

Redundant nullcheck of value known to be non-null Medium

Redundant nullcheck of stream, which is known to be non-null in org.apache.tika.parser.ctakes.CTAKESConfig.init(InputStream)


In file CTAKESConfig.java, line 97
In class org.apache.tika.parser.ctakes.CTAKESConfig
In method org.apache.tika.parser.ctakes.CTAKESConfig.init(InputStream)
Value loaded from stream
Redundant null check at CTAKESConfig.java:[line 97]
Redundant null check at CTAKESConfig.java:[line 97]

Redundant nullcheck of value known to be non-null Medium

Redundant nullcheck of stream, which is known to be non-null in org.apache.tika.parser.geo.topic.GeoParserConfig.init(InputStream)


In file GeoParserConfig.java, line 56
In class org.apache.tika.parser.geo.topic.GeoParserConfig
In method org.apache.tika.parser.geo.topic.GeoParserConfig.init(InputStream)
Value loaded from stream
Redundant null check at GeoParserConfig.java:[line 56]
Redundant null check at GeoParserConfig.java:[line 56]

Redundant nullcheck of value known to be non-null Medium

Redundant nullcheck of restHostUrlStr, which is known to be non-null in new org.apache.tika.parser.journal.GrobidRESTParser()


In file GrobidRESTParser.java, line 57
In class org.apache.tika.parser.journal.GrobidRESTParser
In method new org.apache.tika.parser.journal.GrobidRESTParser()
Value loaded from restHostUrlStr
Return value of org.apache.tika.parser.journal.GrobidRESTParser.readRestUrl() of type String
Redundant null check at GrobidRESTParser.java:[line 57]
Redundant null check at GrobidRESTParser.java:[line 57]

Redundant nullcheck of value known to be non-null Medium

Redundant nullcheck of affiliationJSON, which is known to be non-null in org.apache.tika.parser.journal.TEIParser.parseAffiliation(Object, TEIParser$Author)


In file TEIParser.java, line 306
In class org.apache.tika.parser.journal.TEIParser
In method org.apache.tika.parser.journal.TEIParser.parseAffiliation(Object, TEIParser$Author)
Value loaded from affiliationJSON
Redundant null check at TEIParser.java:[line 306]
Redundant null check at TEIParser.java:[line 306]

Redundant nullcheck of value known to be non-null Medium

Redundant nullcheck of orgObject, which is known to be non-null in org.apache.tika.parser.journal.TEIParser.parseOneAffiliation(JSONObject, TEIParser$Author)


In file TEIParser.java, line 329
In class org.apache.tika.parser.journal.TEIParser
In method org.apache.tika.parser.journal.TEIParser.parseOneAffiliation(JSONObject, TEIParser$Author)
Value loaded from orgObject
Return value of org.json.JSONObject.get(String) of type Object
Redundant null check at TEIParser.java:[line 329]
Redundant null check at TEIParser.java:[line 329]

Redundant nullcheck of value known to be non-null Medium

Redundant nullcheck of StringBuilder.toString(), which is known to be non-null in org.apache.tika.parser.journal.TEIParser$Author.toString()


In file TEIParser.java, line 515
In class org.apache.tika.parser.journal.TEIParser$Author
In method org.apache.tika.parser.journal.TEIParser$Author.toString()
Return value of StringBuilder.toString() of type String
Redundant null check at TEIParser.java:[line 515]
Redundant null check at TEIParser.java:[line 515]

Redundant nullcheck of value known to be non-null Medium

Redundant nullcheck of is, which is known to be non-null in org.apache.tika.parser.ocr.TesseractOCRConfig.init(InputStream)


In file TesseractOCRConfig.java, line 93
In class org.apache.tika.parser.ocr.TesseractOCRConfig
In method org.apache.tika.parser.ocr.TesseractOCRConfig.init(InputStream)
Value loaded from is
Redundant null check at TesseractOCRConfig.java:[line 93]
Redundant null check at TesseractOCRConfig.java:[line 93]

Redundant nullcheck of value known to be non-null Medium

Redundant nullcheck of is, which is known to be non-null in org.apache.tika.parser.pdf.PDFParserConfig.init(InputStream)


In file PDFParserConfig.java, line 117
In class org.apache.tika.parser.pdf.PDFParserConfig
In method org.apache.tika.parser.pdf.PDFParserConfig.init(InputStream)
Value loaded from is
Redundant null check at PDFParserConfig.java:[line 117]
Redundant null check at PDFParserConfig.java:[line 117]

Redundant nullcheck of value known to be non-null Medium

Redundant nullcheck of ansiFilePath, which is known to be non-null in org.apache.tika.parser.rtf.RTFObjDataParser.handlePackage(byte[], Metadata)


In file RTFObjDataParser.java, line 241
In class org.apache.tika.parser.rtf.RTFObjDataParser
In method org.apache.tika.parser.rtf.RTFObjDataParser.handlePackage(byte[], Metadata)
Value loaded from ansiFilePath
Return value of org.apache.tika.parser.rtf.RTFObjDataParser.readAnsiString(InputStream) of type String
Redundant null check at RTFObjDataParser.java:[line 241]
Redundant null check at RTFObjDataParser.java:[line 241]

Redundant nullcheck of value known to be non-null Medium

Redundant nullcheck of displayName, which is known to be non-null in org.apache.tika.parser.rtf.RTFObjDataParser.handlePackage(byte[], Metadata)


In file RTFObjDataParser.java, line 240
In class org.apache.tika.parser.rtf.RTFObjDataParser
In method org.apache.tika.parser.rtf.RTFObjDataParser.handlePackage(byte[], Metadata)
Value loaded from displayName
Return value of org.apache.tika.parser.rtf.RTFObjDataParser.readAnsiString(InputStream) of type String
Redundant null check at RTFObjDataParser.java:[line 240]
Redundant null check at RTFObjDataParser.java:[line 240]

Redundant nullcheck of value known to be non-null Medium

Redundant nullcheck of is, which is known to be non-null in org.apache.tika.parser.strings.StringsConfig.init(InputStream)


In file StringsConfig.java, line 76
In class org.apache.tika.parser.strings.StringsConfig
In method org.apache.tika.parser.strings.StringsConfig.init(InputStream)
Value loaded from is
Redundant null check at StringsConfig.java:[line 76]
Redundant null check at StringsConfig.java:[line 76]

Exception is caught when Exception is not thrown Medium

Exception is caught when Exception is not thrown in org.apache.tika.detect.XmlRootExtractor.extractRootElement(InputStream)


In file XmlRootExtractor.java, line 65
In class org.apache.tika.detect.XmlRootExtractor
In method org.apache.tika.detect.XmlRootExtractor.extractRootElement(InputStream)
At XmlRootExtractor.java:[line 65]
At XmlRootExtractor.java:[line 65]

Exception is caught when Exception is not thrown Medium

Exception is caught when Exception is not thrown in org.apache.tika.language.LanguageProfilerBuilder.main(String[])


In file LanguageProfilerBuilder.java, line 549
In class org.apache.tika.language.LanguageProfilerBuilder
In method org.apache.tika.language.LanguageProfilerBuilder.main(String[])
At LanguageProfilerBuilder.java:[line 549]
At LanguageProfilerBuilder.java:[line 549]

Exception is caught when Exception is not thrown Medium

Exception is caught when Exception is not thrown in org.apache.tika.mime.MimeTypes.getMimeType(byte[])


In file MimeTypes.java, line 232
In class org.apache.tika.mime.MimeTypes
In method org.apache.tika.mime.MimeTypes.getMimeType(byte[])
At MimeTypes.java:[line 232]
At MimeTypes.java:[line 232]

Exception is caught when Exception is not thrown Medium

Exception is caught when Exception is not thrown in org.apache.tika.parser.chm.core.ChmExtractor.extractChmEntry(DirectoryListingEntry)


In file ChmExtractor.java, line 362
In class org.apache.tika.parser.chm.core.ChmExtractor
In method org.apache.tika.parser.chm.core.ChmExtractor.extractChmEntry(DirectoryListingEntry)
At ChmExtractor.java:[line 362]
At ChmExtractor.java:[line 362]

Exception is caught when Exception is not thrown Medium

Exception is caught when Exception is not thrown in org.apache.tika.parser.ctakes.CTAKESContentHandler.endDocument()


In file CTAKESContentHandler.java, line 161
In class org.apache.tika.parser.ctakes.CTAKESContentHandler
In method org.apache.tika.parser.ctakes.CTAKESContentHandler.endDocument()
At CTAKESContentHandler.java:[line 161]
At CTAKESContentHandler.java:[line 161]

Exception is caught when Exception is not thrown Medium

Exception is caught when Exception is not thrown in org.apache.tika.parser.ner.mitie.MITIENERecogniser.recognise(String)


In file MITIENERecogniser.java, line 153
In class org.apache.tika.parser.ner.mitie.MITIENERecogniser
In method org.apache.tika.parser.ner.mitie.MITIENERecogniser.recognise(String)
At MITIENERecogniser.java:[line 153]
At MITIENERecogniser.java:[line 153]

Exception is caught when Exception is not thrown Medium

Exception is caught when Exception is not thrown in org.apache.tika.server.TikaServerCli.main(String[])


In file TikaServerCli.java, line 215
In class org.apache.tika.server.TikaServerCli
In method org.apache.tika.server.TikaServerCli.main(String[])
At TikaServerCli.java:[line 215]
At TikaServerCli.java:[line 215]

Exception is caught when Exception is not thrown Medium

Exception is caught when Exception is not thrown in org.apache.tika.Tika.toString()


In file Tika.java, line 730
In class org.apache.tika.Tika
In method org.apache.tika.Tika.toString()
At Tika.java:[line 730]
At Tika.java:[line 730]

Return value of method without side effect is ignored Medium

Return value of parseHeader(byte[], HashMap) ignored, but method has no side effect


In file IptcAnpaParser.java, line 143
In class org.apache.tika.parser.iptc.IptcAnpaParser
In method org.apache.tika.parser.iptc.IptcAnpaParser.loadProperties(InputStream)
Called method org.apache.tika.parser.iptc.IptcAnpaParser.parseHeader(byte[], HashMap)
At IptcAnpaParser.java:[line 143]
At IptcAnpaParser.java:[line 143]

Switch statement found where default case is missing Medium

Switch statement found in org.apache.tika.batch.fs.FSOutputStreamFactory.getOutputStream(Metadata) where default case is missing


In file FSOutputStreamFactory.java, lines 101 to 109
In class org.apache.tika.batch.fs.FSOutputStreamFactory
In method org.apache.tika.batch.fs.FSOutputStreamFactory.getOutputStream(Metadata)
At FSOutputStreamFactory.java:[lines 101-109]
At FSOutputStreamFactory.java:[lines 101-109]

Switch statement found where one case falls through to the next case Medium

Switch statement found in org.apache.tika.parser.chm.lzx.ChmLzxBlock.extractContent() where one case falls through to the next case


In file ChmLzxBlock.java, lines 142 to 146
In class org.apache.tika.parser.chm.lzx.ChmLzxBlock
In method org.apache.tika.parser.chm.lzx.ChmLzxBlock.extractContent()
At ChmLzxBlock.java:[lines 142-146]
At ChmLzxBlock.java:[lines 142-146]

Switch statement found where default case is missing Medium

Switch statement found in org.apache.tika.parser.chm.lzx.ChmLzxBlock.extractContent() where default case is missing


In file ChmLzxBlock.java, lines 191 to 200
In class org.apache.tika.parser.chm.lzx.ChmLzxBlock
In method org.apache.tika.parser.chm.lzx.ChmLzxBlock.extractContent()
At ChmLzxBlock.java:[lines 191-200]
At ChmLzxBlock.java:[lines 191-200]

Switch statement found where default case is missing Medium

Switch statement found in org.apache.tika.parser.executable.ExecutableParser.parseELF(XHTMLContentHandler, Metadata, InputStream, byte[]) where default case is missing


In file ExecutableParser.java, lines 259 to 306
In class org.apache.tika.parser.executable.ExecutableParser
In method org.apache.tika.parser.executable.ExecutableParser.parseELF(XHTMLContentHandler, Metadata, InputStream, byte[])
At ExecutableParser.java:[lines 259-306]
At ExecutableParser.java:[lines 259-306]

Switch statement found where one case falls through to the next case Medium

Switch statement found in org.apache.tika.parser.html.BoilerpipeContentHandler.endDocument() where one case falls through to the next case


In file BoilerpipeContentHandler.java, lines 227 to 233
In class org.apache.tika.parser.html.BoilerpipeContentHandler
In method org.apache.tika.parser.html.BoilerpipeContentHandler.endDocument()
At BoilerpipeContentHandler.java:[lines 227-233]
At BoilerpipeContentHandler.java:[lines 227-233]

Switch statement found where default case is missing Medium

Switch statement found in org.apache.tika.parser.image.BPGParser.parse(InputStream, ContentHandler, Metadata, ParseContext) where default case is missing


In file BPGParser.java, lines 93 to 107
In class org.apache.tika.parser.image.BPGParser
In method org.apache.tika.parser.image.BPGParser.parse(InputStream, ContentHandler, Metadata, ParseContext)
At BPGParser.java:[lines 93-107]
At BPGParser.java:[lines 93-107]

Switch statement found where default case is missing Medium

Switch statement found in org.apache.tika.parser.microsoft.ExcelExtractor$TikaHSSFListener.internalProcessRecord(Record) where default case is missing


In file ExcelExtractor.java, lines 357 to 477
In class org.apache.tika.parser.microsoft.ExcelExtractor$TikaHSSFListener
In method org.apache.tika.parser.microsoft.ExcelExtractor$TikaHSSFListener.internalProcessRecord(Record)
At ExcelExtractor.java:[lines 357-477]
At ExcelExtractor.java:[lines 357-477]

Switch statement found where default case is missing Medium

Switch statement found in org.apache.tika.parser.microsoft.JackcessExtractor.handleOLE(Row, String, XHTMLContentHandler) where default case is missing


In file JackcessExtractor.java, lines 296 to 321
In class org.apache.tika.parser.microsoft.JackcessExtractor
In method org.apache.tika.parser.microsoft.JackcessExtractor.handleOLE(Row, String, XHTMLContentHandler)
At JackcessExtractor.java:[lines 296-321]
At JackcessExtractor.java:[lines 296-321]

Switch statement found where default case is missing Medium

Switch statement found in org.apache.tika.parser.mp3.MpegStream.calculateBitRate(int, int, int) where default case is missing


In file MpegStream.java, lines 305 to 314
In class org.apache.tika.parser.mp3.MpegStream
In method org.apache.tika.parser.mp3.MpegStream.calculateBitRate(int, int, int)
At MpegStream.java:[lines 305-314]
At MpegStream.java:[lines 305-314]

Switch statement found where default case is missing Medium

Switch statement found in org.apache.tika.parser.pdf.XFAExtractor.handleField(XMLStreamReader, Map) where default case is missing


In file XFAExtractor.java, lines 246 to 264
In class org.apache.tika.parser.pdf.XFAExtractor
In method org.apache.tika.parser.pdf.XFAExtractor.handleField(XMLStreamReader, Map)
At XFAExtractor.java:[lines 246-264]
At XFAExtractor.java:[lines 246-264]

Switch statement found where default case is missing Medium

Switch statement found in org.apache.tika.parser.pdf.XFAExtractor.scrapeTextUntil(XMLStreamReader, QName) where default case is missing


In file XFAExtractor.java, lines 187 to 210
In class org.apache.tika.parser.pdf.XFAExtractor
In method org.apache.tika.parser.pdf.XFAExtractor.scrapeTextUntil(XMLStreamReader, QName)
At XFAExtractor.java:[lines 187-210]
At XFAExtractor.java:[lines 187-210]

Switch statement found where default case is missing Medium

Switch statement found in org.apache.tika.parser.pdf.XFAExtractor.scrapeTextUntil(XMLStreamReader, XHTMLContentHandler, QName) where default case is missing


In file XFAExtractor.java, lines 147 to 171
In class org.apache.tika.parser.pdf.XFAExtractor
In method org.apache.tika.parser.pdf.XFAExtractor.scrapeTextUntil(XMLStreamReader, XHTMLContentHandler, QName)
At XFAExtractor.java:[lines 147-171]
At XFAExtractor.java:[lines 147-171]

Switch statement found where default case is missing Medium

Switch statement found in org.apache.tika.xmp.convert.GenericConverter.process(Metadata) where default case is missing


In file GenericConverter.java, lines 71 to 84
In class org.apache.tika.xmp.convert.GenericConverter
In method org.apache.tika.xmp.convert.GenericConverter.process(Metadata)
At GenericConverter.java:[lines 71-84]
At GenericConverter.java:[lines 71-84]

Switch statement found where default case is missing Medium

Switch statement found in org.apache.tika.xmp.XMPMetadata.tikaToXMPArrayType(Property$PropertyType) where default case is missing


In file XMPMetadata.java, lines 661 to 669
In class org.apache.tika.xmp.XMPMetadata
In method org.apache.tika.xmp.XMPMetadata.tikaToXMPArrayType(Property$PropertyType)
At XMPMetadata.java:[lines 661-669]
At XMPMetadata.java:[lines 661-669]

Write to static field from instance method Medium

Write to static field org.apache.tika.parser.ner.grobid.GrobidNERecogniser.available from instance method new org.apache.tika.parser.ner.grobid.GrobidNERecogniser()


In file GrobidNERecogniser.java, line 53
In class org.apache.tika.parser.ner.grobid.GrobidNERecogniser
In method new org.apache.tika.parser.ner.grobid.GrobidNERecogniser()
Field org.apache.tika.parser.ner.grobid.GrobidNERecogniser.available
At GrobidNERecogniser.java:[line 53]
At GrobidNERecogniser.java:[line 53]

Write to static field from instance method Medium

Write to static field org.apache.tika.parser.ner.nltk.NLTKNERecogniser.available from instance method new org.apache.tika.parser.ner.nltk.NLTKNERecogniser()


In file NLTKNERecogniser.java, line 79
In class org.apache.tika.parser.ner.nltk.NLTKNERecogniser
In method new org.apache.tika.parser.ner.nltk.NLTKNERecogniser()
Field org.apache.tika.parser.ner.nltk.NLTKNERecogniser.available
At NLTKNERecogniser.java:[line 79]
At NLTKNERecogniser.java:[line 79]

Condition has no effect Medium

Useless condition: it's known that firstByte >= 129 (0x81) at this point


In file CharsetRecog_mbcs.java, line 490
In class org.apache.tika.parser.txt.CharsetRecog_mbcs$CharsetRecog_gb_18030
In method org.apache.tika.parser.txt.CharsetRecog_mbcs$CharsetRecog_gb_18030.nextChar(CharsetRecog_mbcs$iteratedChar, CharsetDetector)
Value firstByte >= 129 (0x81)
At CharsetRecog_mbcs.java:[line 490]
At CharsetRecog_mbcs.java:[line 490]

Unread public/protected field Medium

Unread public/protected field: org.apache.tika.parser.mp3.ID3v2Frame$RawTag.flag


In file ID3v2Frame.java, line 405
In class org.apache.tika.parser.mp3.ID3v2Frame$RawTag
Field org.apache.tika.parser.mp3.ID3v2Frame$RawTag.flag
At ID3v2Frame.java:[line 405]

Unread public/protected field Medium

Unread public/protected field: org.apache.tika.parser.rtf.ListDescriptor.isStyle


In file TextExtractor.java, line 1099
In class org.apache.tika.parser.rtf.ListDescriptor
Field org.apache.tika.parser.rtf.ListDescriptor.isStyle
At TextExtractor.java:[line 1099]

Unread public/protected field Medium

Unread public/protected field: org.apache.tika.parser.rtf.ListDescriptor.templateID


In file TextExtractor.java, line 870
In class org.apache.tika.parser.rtf.ListDescriptor
Field org.apache.tika.parser.rtf.ListDescriptor.templateID
At TextExtractor.java:[line 870]





Warning Types

Equals method should not assume anything about the type of its argument

The equals(Object o) method shouldn't make any assumptions about the type of o. It should simply return false if o is not the same type as this.



instanceof will always return true

This instanceof test will always return true (unless the value being tested is null). Although this is safe, make sure it isn't an indication of some misunderstanding or some other logic error. If you really want to test the value for being null, perhaps it would be clearer to do better to do a null test rather than an instanceof test.



Bitwise OR of signed byte value

Loads a byte value (e.g., a value loaded from a byte array or returned by a method with return type byte) and performs a bitwise OR with that value. Byte values are sign extended to 32 bits before any any bitwise operations are performed on the value. Thus, if b[0] contains the value 0xff, and x is initially 0, then the code ((x << 8) | b[0]) will sign extend 0xff to get 0xffffffff, and thus give the value 0xffffffff as the result.

In particular, the following code for packing a byte array into an int is badly wrong:

int result = 0;
for(int i = 0; i < 4; i++)
  result = ((result << 8) | b[i]);

The following idiom will work instead:

int result = 0;
for(int i = 0; i < 4; i++)
  result = ((result << 8) | (b[i] & 0xff));



Boxing/unboxing to parse a primitive

A boxed primitive is created from a String, just to extract the unboxed primitive value. It is more efficient to just call the static parseXXX method.



Method invokes inefficient Number constructor; use static valueOf instead

Using new Integer(int) is guaranteed to always result in a new object whereas Integer.valueOf(int) allows caching of values to be done by the compiler, class library, or JVM. Using of cached values avoids object allocation and the code will be faster.

Values between -128 and 127 are guaranteed to have corresponding cached instances and using valueOf is approximately 3.5 times faster than using constructor. For values outside the constant range the performance of both styles is the same.

Unless the class must be compatible with JVMs predating Java 1.5, use either autoboxing or the valueOf() method when creating instances of Long, Integer, Short, Character, and Byte.



Method might ignore exception

This method might ignore an exception.  In general, exceptions should be handled or reported in some way, or they should be thrown out of the method.



Dead store to local variable

This instruction assigns a value to a local variable, but the value is not read or used in any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.



Method invokes inefficient new String(String) constructor

Using the java.lang.String(String) constructor wastes memory because the object so constructed will be functionally indistinguishable from the String passed as a parameter.  Just use the argument String directly.



Method invokes System.exit(...)

Invoking System.exit shuts down the entire Java virtual machine. This should only been done when it is appropriate. Such calls make it hard or impossible for your code to be invoked by other code. Consider throwing a RuntimeException instead.



The equals and hashCode methods of URL are blocking

The equals and hashCode method of URL perform domain name resolution, this can result in a big performance hit. See http://michaelscharf.blogspot.com/2006/11/javaneturlequals-and-hashcode-make.html for more information. Consider using java.net.URI instead.



Adding elements of an entry set may fail due to reuse of Entry objects

The entrySet() method is allowed to return a view of the underlying Map in which a single Entry object is reused and returned during the iteration. As of Java 1.6, both IdentityHashMap and EnumMap did so. When iterating through such a Map, the Entry value is only valid until you advance to the next iteration. If, for example, you try to pass such an entrySet to an addAll method, things will go badly wrong.



May expose internal representation by returning reference to mutable object

Returning a reference to a mutable object value stored in one of the object's fields exposes the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Returning a new copy of the object is better approach in many situations.



May expose internal representation by incorporating reference to mutable object

This code stores a reference to an externally mutable object into the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Storing a copy of the object is better approach in many situations.



Class defines compareTo(...) and uses Object.equals()

This class defines a compareTo(...) method but inherits its equals() method from java.lang.Object. Generally, the value of compareTo should return zero if and only if equals returns true. If this is violated, weird and unpredictable failures will occur in classes such as PriorityQueue. In Java 5 the PriorityQueue.remove method uses the compareTo method, while in Java 6 it uses the equals method.

From the JavaDoc for the compareTo method in the Comparable interface:

It is strongly recommended, but not strictly required that (x.compareTo(y)==0) == (x.equals(y)). Generally speaking, any class that implements the Comparable interface and violates this condition should clearly indicate this fact. The recommended language is "Note: this class has a natural ordering that is inconsistent with equals."



Unusual equals method

This class doesn't do any of the patterns we recognize for checking that the type of the argument is compatible with the type of the this object. There might not be anything wrong with this code, but it is worth reviewing.



Comparison of String objects using == or !=

This code compares java.lang.String objects for reference equality using the == or != operators. Unless both strings are either constants in a source file, or have been interned using the String.intern() method, the same string value may be represented by two different String objects. Consider using the equals(Object) method instead.



Test for floating point equality

This operation compares two floating point values for equality. Because floating point calculations may involve rounding, calculated float and double values may not be accurate. For values that must be precise, such as monetary values, consider using a fixed-precision type such as BigDecimal. For values that need not be precise, consider comparing for equality within some range, for example: if ( Math.abs(x - y) < .0000001 ). See the Java Language Specification, section 4.2.4.



Class defines equals() and uses Object.hashCode()

This class overrides equals(Object), but does not override hashCode(), and inherits the implementation of hashCode() from java.lang.Object (which returns the identity hash code, an arbitrary value assigned to the object by the VM).  Therefore, the class is very likely to violate the invariant that equal objects must have equal hashcodes.

If you don't think instances of this class will ever be inserted into a HashMap/HashTable, the recommended hashCode implementation to use is:

public int hashCode() {
  assert false : "hashCode not designed";
  return 42; // any arbitrary constant will do
  }



Check for oddness that won't work for negative numbers

The code uses x % 2 == 1 to check to see if a value is odd, but this won't work for negative numbers (e.g., (-5) % 2 == -1). If this code is intending to check for oddness, consider using x & 1 == 1, or x % 2 != 0.



Bad comparison of signed byte

Signed bytes can only have a value in the range -128 to 127. Comparing a signed byte with a value outside that range is vacuous and likely to be incorrect. To convert a signed byte b to an unsigned value in the range 0..255, use 0xff & b



Synchronization performed on util.concurrent instance

This method performs synchronization an object that is an instance of a class from the java.util.concurrent package (or its subclasses). Instances of these classes have their own concurrency control mechanisms that are orthogonal to the synchronization provided by the Java keyword synchronized. For example, synchronizing on an AtomicBoolean will not prevent other threads from modifying the AtomicBoolean.

Such code may be correct, but should be carefully reviewed and documented, and may confuse people who have to maintain the code at a later date.



Field is a mutable array

A final static field references an array and can be accessed by malicious code or by accident from another package. This code can freely modify the contents of the array.



Field is a mutable collection which should be package protected

A mutable collection instance is assigned to a final static field, thus can be changed by malicious code or by accident from another package. The field could be made package protected to avoid this vulnerability. Alternatively you may wrap this field into Collections.unmodifiableSet/List/Map/etc. to avoid this vulnerability.



Field isn't final but should be

This static field public but not final, and could be changed by malicious code or by accident from another package. The field could be made final to avoid this vulnerability.



Field should be moved out of an interface and made package protected

A final static field that is defined in an interface references a mutable object such as an array or hashtable. This mutable object could be changed by malicious code or by accident from another package. To solve this, the field needs to be moved to a class and made package protected to avoid this vulnerability.



Field should be package protected

A mutable static field could be changed by malicious code or by accident. The field could be made package protected to avoid this vulnerability.



Public static method may expose internal representation by returning array

A public static method returns a reference to an array that is part of the static state of the class. Any code that calls this method can freely modify the underlying array. One fix is to return a copy of the array.



Dereference of the result of readLine() without nullcheck

The result of invoking readLine() is dereferenced without checking to see if the result is null. If there are no more lines of text to read, readLine() will return null and dereferencing that will generate a null pointer exception.



equals() method does not check for null argument

This implementation of equals(Object) violates the contract defined by java.lang.Object.equals() because it does not check for null being passed as the argument. All equals() methods should return false if passed a null value.



Load of known null value

The variable referenced at this point is known to be null due to an earlier check against null. Although this is valid, it might be a mistake (perhaps you intended to refer to a different variable, or perhaps the earlier check to see if the variable is null should have been a check to see if it was non-null).



Method call passes null for non-null parameter

This method call passes a null value for a non-null method parameter. Either the parameter is annotated as a parameter that should always be non-null, or analysis has shown that it will always be dereferenced.



Possible null pointer dereference

There is a branch of statement that, if executed, guarantees that a null value will be dereferenced, which would generate a NullPointerException when the code is executed. Of course, the problem might be that the branch or statement is infeasible and that the null pointer exception can't ever be executed; deciding that is beyond the ability of FindBugs.



Possible null pointer dereference due to return value of called method

The return value from a method is dereferenced without a null check, and the return value of that method is one that should generally be checked for null. This may lead to a NullPointerException when the code is executed.



Possible null pointer dereference in method on exception path

A reference value which is null on some exception control path is dereferenced here.  This may lead to a NullPointerException when the code is executed.  Note that because FindBugs currently does not prune infeasible exception paths, this may be a false warning.

Also note that FindBugs considers the default case of a switch statement to be an exception path, since the default case is often infeasible.



toString method may return null

This toString method seems to return null in some circumstances. A liberal reading of the spec could be interpreted as allowing this, but it is probably a bad idea and could cause other code to break. Return the empty string or some other appropriate string rather than null.



Method may fail to clean up stream or resource

This method may fail to clean up (close, dispose of) a stream, database object, or other resource requiring an explicit cleanup operation.

In general, if a method opens a stream or other resource, the method should use a try/finally block to ensure that the stream or resource is cleaned up before the method returns.

This bug pattern is essentially the same as the OS_OPEN_STREAM and ODR_OPEN_DATABASE_RESOURCE bug patterns, but is based on a different (and hopefully better) static analysis technique. We are interested is getting feedback about the usefulness of this bug pattern. To send feedback, either:

In particular, the false-positive suppression heuristics for this bug pattern have not been extensively tuned, so reports about false positives are helpful to us.

See Weimer and Necula, Finding and Preventing Run-Time Error Handling Mistakes, for a description of the analysis technique.



Method may fail to clean up stream or resource on checked exception

This method may fail to clean up (close, dispose of) a stream, database object, or other resource requiring an explicit cleanup operation.

In general, if a method opens a stream or other resource, the method should use a try/finally block to ensure that the stream or resource is cleaned up before the method returns.

This bug pattern is essentially the same as the OS_OPEN_STREAM and ODR_OPEN_DATABASE_RESOURCE bug patterns, but is based on a different (and hopefully better) static analysis technique. We are interested is getting feedback about the usefulness of this bug pattern. To send feedback, either:

In particular, the false-positive suppression heuristics for this bug pattern have not been extensively tuned, so reports about false positives are helpful to us.

See Weimer and Necula, Finding and Preventing Run-Time Error Handling Mistakes, for a description of the analysis technique.



Method may fail to close database resource

The method creates a database resource (such as a database connection or row set), does not assign it to any fields, pass it to other methods, or return it, and does not appear to close the object on all paths out of the method.  Failure to close database resources on all paths out of a method may result in poor performance, and could cause the application to have problems communicating with the database.



Method may fail to close stream

The method creates an IO stream object, does not assign it to any fields, pass it to other methods that might close it, or return it, and does not appear to close the stream on all paths out of the method.  This may result in a file descriptor leak.  It is generally a good idea to use a finally block to ensure that streams are closed.



Nullcheck of value previously dereferenced

A value is checked here to see whether it is null, but this value can't be null because it was previously dereferenced and if it were null a null pointer exception would have occurred at the earlier dereference. Essentially, this code and the previous dereference disagree as to whether this value is allowed to be null. Either the check is redundant or the previous dereference is erroneous.



Redundant nullcheck of value known to be non-null

This method contains a redundant check of a known non-null value against the constant null.



Exception is caught when Exception is not thrown

This method uses a try-catch block that catches Exception objects, but Exception is not thrown within the try block, and RuntimeException is not explicitly caught. It is a common bug pattern to say try { ... } catch (Exception e) { something } as a shorthand for catching a number of types of exception each of whose catch blocks is identical, but this construct also accidentally catches RuntimeException as well, masking potential bugs.

A better approach is to either explicitly catch the specific exceptions that are thrown, or to explicitly catch RuntimeException exception, rethrow it, and then catch all non-Runtime Exceptions, as shown below:

  try {
    ...
  } catch (RuntimeException e) {
    throw e;
  } catch (Exception e) {
    ... deal with all non-runtime exceptions ...
  }



Method ignores results of InputStream.skip()

This method ignores the return value of java.io.InputStream.skip() which can skip multiple bytes.  If the return value is not checked, the caller will not be able to correctly handle the case where fewer bytes were skipped than the caller requested.  This is a particularly insidious kind of bug, because in many programs, skips from input streams usually do skip the full amount of data requested, causing the program to fail only sporadically. With Buffered streams, however, skip() will only skip data in the buffer, and will routinely fail to skip the requested number of bytes.



Method ignores exceptional return value

This method returns a value that is not checked. The return value should be checked since it can indicate an unusual or unexpected function execution. For example, the File.delete() method returns false if the file could not be successfully deleted (rather than throwing an Exception). If you don't check the result, you won't notice if the method invocation signals unexpected behavior by returning an atypical return value.



Method ignores return value

The return value of this method should be checked. One common cause of this warning is to invoke a method on an immutable object, thinking that it updates the object. For example, in the following code fragment,

String dateString = getHeaderField(name);
dateString.trim();

the programmer seems to be thinking that the trim() method will update the String referenced by dateString. But since Strings are immutable, the trim() function returns a new String value, which is being ignored here. The code should be corrected to:

String dateString = getHeaderField(name);
dateString = dateString.trim();



Return value of method without side effect is ignored

This code calls a method and ignores the return value. However our analysis shows that the method (including its implementations in subclasses if any) does not produce any effect other than return value. Thus this call can be removed.

We are trying to reduce the false positives as much as possible, but in some cases this warning might be wrong. Common false-positive cases include:

- The method is designed to be overridden and produce a side effect in other projects which are out of the scope of the analysis.

- The method is called to trigger the class loading which may have a side effect.

- The method is called just to get some exception.

If you feel that our assumption is incorrect, you can use a @CheckReturnValue annotation to instruct FindBugs that ignoring the return value of this method is acceptable.



Method concatenates strings using + in a loop

The method seems to be building a String using concatenation in a loop. In each iteration, the String is converted to a StringBuffer/StringBuilder, appended to, and converted back to a String. This can lead to a cost quadratic in the number of iterations, as the growing string is recopied in each iteration.

Better performance can be obtained by using a StringBuffer (or StringBuilder in Java 1.5) explicitly.

For example:

  // This is bad
  String s = "";
  for (int i = 0; i < field.length; ++i) {
    s = s + field[i];
  }

  // This is better
  StringBuffer buf = new StringBuffer();
  for (int i = 0; i < field.length; ++i) {
    buf.append(field[i]);
  }
  String s = buf.toString();



Comparator doesn't implement Serializable

This class implements the Comparator interface. You should consider whether or not it should also implement the Serializable interface. If a comparator is used to construct an ordered collection such as a TreeMap, then the TreeMap will be serializable only if the comparator is also serializable. As most comparators have little or no state, making them serializable is generally easy and good defensive programming.



Non-serializable value stored into instance field of a serializable class

A non-serializable value is stored into a non-transient field of a serializable class.



Non-transient non-serializable instance field in serializable class

This Serializable class defines a non-primitive instance field which is neither transient, Serializable, or java.lang.Object, and does not appear to implement the Externalizable interface or the readObject() and writeObject() methods.  Objects of this class will not be deserialized correctly if a non-Serializable object is stored in this field.



Switch statement found where default case is missing

This method contains a switch statement where default case is missing. Usually you need to provide a default case.

Because the analysis only looks at the generated bytecode, this warning can be incorrect triggered if the default case is at the end of the switch statement and the switch statement doesn't contain break statements for other cases.



Switch statement found where one case falls through to the next case

This method contains a switch statement where one case branch will fall through to the next case. Usually you need to end this case with a break or return.



Should be a static inner class

This class is an inner class, but does not use its embedded reference to the object which created it.  This reference makes the instances of the class larger, and may keep the reference to the creator object alive longer than necessary.  If possible, the class should be made static.



Write to static field from instance method

This instance method writes to a static field. This is tricky to get correct if multiple instances are being manipulated, and generally bad practice.



Condition has no effect

This condition always produces the same result as the value of the involved variable was narrowed before. Probably something else was meant or condition can be removed.



Private method is never called

This private method is never called. Although it is possible that the method will be invoked through reflection, it is more likely that the method is never used, and should be removed.



Unread field

This field is never read.  Consider removing it from the class.



Unread public/protected field

This field is never read.  The field is public or protected, so perhaps it is intended to be used with classes not seen as part of the analysis. If not, consider removing it from the class.



Invocation of toString on an array

The code invokes toString on an array, which will generate a fairly useless result such as [C@16f0472. Consider using Arrays.toString to convert the array into a readable String that gives the contents of the array. See Programming Puzzlers, chapter 3, puzzle 12.



Unwritten field

This field is never written.  All reads of it will return the default value. Check for errors (should it have been initialized?), or remove it if it is useless.



An increment to a volatile field isn't atomic

This code increments a volatile field. Increments of volatile fields aren't atomic. If more than one thread is incrementing the field at the same time, increments could be lost.



Inefficient use of keySet iterator instead of entrySet iterator

This method accesses the value of a Map entry, using a key that was retrieved from a keySet iterator. It is more efficient to use an iterator on the entrySet of the map, to avoid the Map.get(key) lookup.