This is an automated email from the ASF dual-hosted git repository.
tallison pushed a commit to branch branch_1x
in repository https://gitbox.apache.org/repos/asf/tika.git
The following commit(s) were added to refs/heads/branch_1x by this push:
new ffa5412 TIKA-3172 -- setEnableAutoSpace and a few others should have
@Field annotation
ffa5412 is described below
commit ffa5412a9d0b01ac1be526af14363f305e4edd65
Author: tallison <[email protected]>
AuthorDate: Wed Aug 19 03:35:39 2020 -0400
TIKA-3172 -- setEnableAutoSpace and a few others should have @Field
annotation
---
tika-parsers/pom.xml | 21 +--------------------
.../java/org/apache/tika/parser/pdf/PDFParser.java | 11 ++---------
.../org/apache/tika/parser/pdf/PDFParserConfig.java | 1 -
3 files changed, 3 insertions(+), 30 deletions(-)
diff --git a/tika-parsers/pom.xml b/tika-parsers/pom.xml
index 87ad0ea..51c1cbb 100644
--- a/tika-parsers/pom.xml
+++ b/tika-parsers/pom.xml
@@ -87,26 +87,7 @@
<scope>test</scope>
</dependency>
- <!-- for java 10
- See TIKA-2778 for why we need to do this now.
- May the gods of API design fix this in the future.
- -->
- <dependency>
- <groupId>org.glassfish.jaxb</groupId>
- <artifactId>jaxb-runtime</artifactId>
- <version>${jaxb.version}</version>
- <exclusions>
- <exclusion>
- <groupId>jakarta.activation</groupId>
- <artifactId>jakarta.activation-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>com.sun.activation</groupId>
- <artifactId>jakarta.activation</artifactId>
- <version>1.2.1</version>
- </dependency>
+
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
diff --git
a/tika-parsers/src/main/java/org/apache/tika/parser/pdf/PDFParser.java
b/tika-parsers/src/main/java/org/apache/tika/parser/pdf/PDFParser.java
index 3b36c99..d610879 100644
--- a/tika-parsers/src/main/java/org/apache/tika/parser/pdf/PDFParser.java
+++ b/tika-parsers/src/main/java/org/apache/tika/parser/pdf/PDFParser.java
@@ -395,7 +395,6 @@ public class PDFParser extends AbstractParser implements
Initializable {
/**
* @see #setEnableAutoSpace(boolean)
- * @deprecated use {@link #getPDFParserConfig()}
*/
public boolean getEnableAutoSpace() {
return defaultConfig.getEnableAutoSpace();
@@ -406,9 +405,8 @@ public class PDFParser extends AbstractParser implements
Initializable {
* where spaces should be inserted between words. For
* many PDFs this is necessary as they do not include
* explicit whitespace characters.
- *
- * @deprecated use {@link #setPDFParserConfig(PDFParserConfig)}
*/
+ @Field
public void setEnableAutoSpace(boolean v) {
defaultConfig.setEnableAutoSpace(v);
}
@@ -425,8 +423,6 @@ public class PDFParser extends AbstractParser implements
Initializable {
/**
* If true (the default), text in annotations will be
* extracted.
- *
- * @deprecated use {@link #setPDFParserConfig(PDFParserConfig)}
*/
public void setExtractAnnotationText(boolean v) {
defaultConfig.setExtractAnnotationText(v);
@@ -448,9 +444,8 @@ public class PDFParser extends AbstractParser implements
Initializable {
* slow down extraction substantially (PDFBOX-956) and
* sometimes remove characters that were not in fact
* duplicated (PDFBOX-1155). By default this is disabled.
- *
- * @deprecated use {@link #setPDFParserConfig(PDFParserConfig)}
*/
+ @Field
public void setSuppressDuplicateOverlappingText(boolean v) {
defaultConfig.setSuppressDuplicateOverlappingText(v);
}
@@ -470,8 +465,6 @@ public class PDFParser extends AbstractParser implements
Initializable {
* order"), while for other PDFs it can produce the
* wrong result (for example if there are 2 columns,
* the text will be interleaved). Default is false.
- *
- * @deprecated use {@link #setPDFParserConfig(PDFParserConfig)}
*/
@Field
public void setSortByPosition(boolean v) {
diff --git
a/tika-parsers/src/main/java/org/apache/tika/parser/pdf/PDFParserConfig.java
b/tika-parsers/src/main/java/org/apache/tika/parser/pdf/PDFParserConfig.java
index f88ff0f..845c4ad 100644
--- a/tika-parsers/src/main/java/org/apache/tika/parser/pdf/PDFParserConfig.java
+++ b/tika-parsers/src/main/java/org/apache/tika/parser/pdf/PDFParserConfig.java
@@ -93,7 +93,6 @@ public class PDFParserConfig implements Serializable {
// True if we should sort text tokens by position
// (necessary for some PDFs, but messes up other PDFs):
- @Field
private boolean sortByPosition = false;
//True if acroform content should be extracted