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

report.py lines 61 and 63 seem to have a problem #175

Open
massimiliano-della-rovere opened this issue Aug 21, 2024 · 2 comments · Fixed by #176
Open

report.py lines 61 and 63 seem to have a problem #175

massimiliano-della-rovere opened this issue Aug 21, 2024 · 2 comments · Fixed by #176
Labels
bug enhancement This issue requests an improvement to a current feature.

Comments

@massimiliano-della-rovere
Copy link
Contributor

massimiliano-della-rovere commented Aug 21, 2024

I'm not sure if this is a bug, but seems strange code.

The file is report.py, class Report, method __init__, inside the if not jpype.isJVMStarted() there are 2 ifs, one in line 61 and one in line 63.
The combined logic of their evaluation seems... strange to me:
if the condition of the if at line 61 is True, then the classpath list is updated, but the condition of the if at line 63 will automatically eval to False, so the updated classpath won't be used and will be thrashed since it's not used anywhere else in the __init__ method.

Am I missing something?

immagine

@jadsonbr
Copy link
Collaborator

Yes, you are correct. There is a mistake there.

@jadsonbr jadsonbr added bug enhancement This issue requests an improvement to a current feature. labels Aug 21, 2024
@massimiliano-della-rovere
Copy link
Contributor Author

massimiliano-della-rovere commented Aug 21, 2024

My recent pull request #176 modifies the code inside the second if, i.e. the block starting from line 64.

So it could be convenient to examine the pull request before refactoring the 2 ifs.

@jadsonbr jadsonbr linked a pull request Aug 21, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug enhancement This issue requests an improvement to a current feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants