Skip to content

Commit 31ed3aa

Browse files
StevenStreasickasturio
authored andcommitted
Update PdfPTable.java
Fixed workflow issues
1 parent 64bca8f commit 31ed3aa

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -654,11 +654,12 @@ public PdfPCell addCell(String text) {
654654
* Adds a nested table.
655655
*
656656
* @param table the table to be added to the cell
657+
* @throws DocumentException if table tries to add itself
657658
*/
658-
public PdfPCell addCell(PdfPTable table) {
659-
if(table == this) {
660-
throw new DocumentException("unable.to.add.self.to.table.contents");
661-
}
659+
public PdfPCell addCell(PdfPTable table) throws DocumentException {
660+
if (table == this) {
661+
throw new DocumentException("unable.to.add.self.to.table.contents");
662+
}
662663
defaultCell.setTable(table);
663664
addCell(defaultCell);
664665
defaultCell.setTable(null);

0 commit comments

Comments
 (0)