Skip to content

Changed `PdfContentStreamHandler` to abstract class and moved the log…

f6c14a6
Select commit
Loading
Failed to load commit list.
Open

New Feature: extract coordinates of matched text #1442

Changed `PdfContentStreamHandler` to abstract class and moved the log…
f6c14a6
Select commit
Loading
Failed to load commit list.
Codacy Production / Codacy Static Code Analysis required action Oct 23, 2025 in 0s

15 new issues (0 max.) of at least minor severity.

Codacy Here is an overview of what got changed by this pull request:

Issues
======
+ Solved 1
- Added 15
           

Complexity increasing per file
==============================
- openpdf-core/src/main/java/org/openpdf/text/pdf/parser/MatchedPattern.java  6
- openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfTextLocator.java  16
- openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfContentTextExtractor.java  102
- openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfContentTextLocator.java  105
         

Complexity decreasing per file
==============================
+ openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfContentStreamHandler.java  -101
         

Clones added
============
- openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfContentStreamHandler.java  1
- openpdf-core/src/main/java/org/openpdf/text/pdf/parser/ParsedText.java  2
- openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfTextExtractor.java  1
- openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfTextLocator.java  1
- openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfContentTextExtractor.java  18
- openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfContentTextLocator.java  19
         

See the complete overview on Codacy

Annotations

Check notice on line 91 in openpdf-core/src/main/java/org/openpdf/text/pdf/parser/MatchedPattern.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/parser/MatchedPattern.java#L91

'for' is not followed by whitespace.

Check notice on line 91 in openpdf-core/src/main/java/org/openpdf/text/pdf/parser/MatchedPattern.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/parser/MatchedPattern.java#L91

WhitespaceAround: 'for' is not followed by whitespace. Empty blocks may only be represented as {}         when not part of a multi-block statement (4.1.3)

Check warning on line 76 in openpdf-core/src/main/java/org/openpdf/text/pdf/parser/ParsedText.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/parser/ParsedText.java#L76

Avoid reassigning parameters such as 'text'

Check warning on line 239 in openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfContentTextExtractor.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfContentTextExtractor.java#L239

Avoid throwing raw exception types.

Check notice on line 76 in openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfContentTextLocator.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfContentTextLocator.java#L76

'if' construct must use '{}'s.

Check notice on line 76 in openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfContentTextLocator.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfContentTextLocator.java#L76

'if' is not followed by whitespace.

Check notice on line 76 in openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfContentTextLocator.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfContentTextLocator.java#L76

WhitespaceAround: 'if' is not followed by whitespace. Empty blocks may only be represented as {}         when not part of a multi-block statement (4.1.3)

Check notice on line 78 in openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfContentTextLocator.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfContentTextLocator.java#L78

'if' construct must use '{}'s.

Check notice on line 78 in openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfContentTextLocator.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfContentTextLocator.java#L78

'if' is not followed by whitespace.

Check notice on line 78 in openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfContentTextLocator.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfContentTextLocator.java#L78

WhitespaceAround: 'if' is not followed by whitespace. Empty blocks may only be represented as {}         when not part of a multi-block statement (4.1.3)

Check notice on line 187 in openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfContentTextLocator.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfContentTextLocator.java#L187

Document empty method body

Check warning on line 102 in openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfTextLocator.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfTextLocator.java#L102

Avoid unused constructor parameters such as 'pattern'.

Check notice on line 174 in openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfTextLocator.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfTextLocator.java#L174

Javadoc comment at column 31 has parse error. Missed HTML close tag 'MatchedPattern'. Sometimes it means that close tag missed for one of previous tags.

Check notice on line 174 in openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfTextLocator.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfTextLocator.java#L174

Javadoc comment at column 31 has parse error. Missed HTML close tag 'MatchedPattern'. Sometimes it means that close tag missed for one of previous tags.

Check notice on line 174 in openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfTextLocator.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/parser/PdfTextLocator.java#L174

Javadoc comment at column 31 has parse error. Missed HTML close tag 'MatchedPattern'. Sometimes it means that close tag missed for one of previous tags.