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

Issue in the code #199

Open
alexey-levande opened this issue Mar 7, 2020 · 1 comment
Open

Issue in the code #199

alexey-levande opened this issue Mar 7, 2020 · 1 comment
Labels
Milestone

Comments

@alexey-levande
Copy link

alexey-levande commented Mar 7, 2020

Hello everyone,

I'm solving an issue in my app for building tables in PDF and found strange code in the method DrawRow of the Table class. Please look on the code snippet:

	// if it is not header row or first row in the table then remove row's
		// top border
		if (row != header && row != rows.get(0)) {
			if (!isEndOfPage(row)) {
				row.removeTopBorders();
			}
		}

here is the row variable compared to header. I'm not so deep in java, but they have different types - row is Row and header is List. Could you please double check that it is correct?

I assumed that this comparison can be removed at all - so top borders can be removed if this row is not first and it is not EndOfPage.

@Frulenzo Frulenzo added the bug label Oct 6, 2020
@Frulenzo
Copy link
Collaborator

Frulenzo commented Oct 6, 2020

@alexey-levande thanks for your input.

You are right! row != header is redundant and makes no sense but we need this part of the code beacause not only that we need to check if row is not first row, we need to check if current row is part of the header rows. That need to be changed and I mark this as a bug.

@Frulenzo Frulenzo pinned this issue Oct 6, 2020
@johnmanko johnmanko added this to the 1.7.1 milestone Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants