Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added check/error in PdfPTable.addCell #1195

Merged
merged 3 commits into from
Nov 25, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions openpdf/src/main/java/com/lowagie/text/pdf/PdfPTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,9 @@
* @param table the table to be added to the cell
*/
public PdfPCell addCell(PdfPTable table) {
if(table == this) {

Check notice on line 659 in openpdf/src/main/java/com/lowagie/text/pdf/PdfPTable.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf/src/main/java/com/lowagie/text/pdf/PdfPTable.java#L659

'if' is not followed by whitespace.

Check notice on line 659 in openpdf/src/main/java/com/lowagie/text/pdf/PdfPTable.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf/src/main/java/com/lowagie/text/pdf/PdfPTable.java#L659

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 failure on line 659 in openpdf/src/main/java/com/lowagie/text/pdf/PdfPTable.java

View workflow job for this annotation

GitHub Actions / Checkstyle job

[checkstyle] reported by reviewdog 🐶 'if' is not followed by whitespace. Raw Output: /github/workspace/./openpdf/src/main/java/com/lowagie/text/pdf/PdfPTable.java:659:9: error: 'if' is not followed by whitespace. (com.puppycrawl.tools.checkstyle.checks.whitespace.WhitespaceAfterCheck)

Check failure on line 659 in openpdf/src/main/java/com/lowagie/text/pdf/PdfPTable.java

View workflow job for this annotation

GitHub Actions / Checkstyle job

[checkstyle] reported by reviewdog 🐶 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) Raw Output: /github/workspace/./openpdf/src/main/java/com/lowagie/text/pdf/PdfPTable.java:659:9: error: 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) (com.puppycrawl.tools.checkstyle.checks.whitespace.WhitespaceAroundCheck)
throw new DocumentException("unable.to.add.self.to.table.contents");

Check notice on line 660 in openpdf/src/main/java/com/lowagie/text/pdf/PdfPTable.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf/src/main/java/com/lowagie/text/pdf/PdfPTable.java#L660

Line contains a tab character.

Check failure on line 660 in openpdf/src/main/java/com/lowagie/text/pdf/PdfPTable.java

View workflow job for this annotation

GitHub Actions / Checkstyle job

[checkstyle] reported by reviewdog 🐶 Line contains a tab character. Raw Output: /github/workspace/./openpdf/src/main/java/com/lowagie/text/pdf/PdfPTable.java:660:5: error: Line contains a tab character. (com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck)
}

Check notice on line 661 in openpdf/src/main/java/com/lowagie/text/pdf/PdfPTable.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf/src/main/java/com/lowagie/text/pdf/PdfPTable.java#L661

Line contains a tab character.

Check failure on line 661 in openpdf/src/main/java/com/lowagie/text/pdf/PdfPTable.java

View workflow job for this annotation

GitHub Actions / Checkstyle job

[checkstyle] reported by reviewdog 🐶 Line contains a tab character. Raw Output: /github/workspace/./openpdf/src/main/java/com/lowagie/text/pdf/PdfPTable.java:661:5: error: Line contains a tab character. (com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck)
defaultCell.setTable(table);
addCell(defaultCell);
defaultCell.setTable(null);
Expand Down