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

Comparing String with enum in CMScorer.java #490

Open
brodecva opened this issue Feb 15, 2018 · 1 comment
Open

Comparing String with enum in CMScorer.java #490

brodecva opened this issue Feb 15, 2018 · 1 comment

Comments

@brodecva
Copy link
Member

Hi, @tomas-knap , in the statement
// special context blocks does not count towards the maximum number of context blocks to be // considered if (ctx.getType().equals(TContext.TableContextType.CAPTION) || ctx.getText().equals(TContext.TableContextType.PAGETITLE)) { // FIXME: Comparing String to Enum (maybe PAGETITLE.getText() was meant?) } else { countContextBlocks++; }

in the CMScorer.java the comparison between ctx.getText() and TContext.TableContextType.PAGETITLE is evidently wrong, as you compare string with an enum. This is bound to always return false. I assume that you actually want to compare the ctx.getText() with TContext.TableContextType.PAGETITLE.getText(), but I was not sure enough to fix it myself. Please look into it. Thx!

@tomas-knap
Copy link
Member

Thanks, will look into that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants