Skip to content

Commit

Permalink
Update PdfPTable.java
Browse files Browse the repository at this point in the history
Fixed workflow issues
  • Loading branch information
StevenStreasick authored and asturio committed Nov 25, 2024
1 parent 64bca8f commit 31ed3aa
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions openpdf/src/main/java/com/lowagie/text/pdf/PdfPTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -654,11 +654,12 @@ public PdfPCell addCell(String text) {
* Adds a nested table.
*
* @param table the table to be added to the cell
* @throws DocumentException if table tries to add itself
*/
public PdfPCell addCell(PdfPTable table) {
if(table == this) {
throw new DocumentException("unable.to.add.self.to.table.contents");
}
public PdfPCell addCell(PdfPTable table) throws DocumentException {
if (table == this) {
throw new DocumentException("unable.to.add.self.to.table.contents");
}
defaultCell.setTable(table);
addCell(defaultCell);
defaultCell.setTable(null);
Expand Down

0 comments on commit 31ed3aa

Please sign in to comment.