Open massimiliano-della-rovere opened 2 months ago
Yes, you are correct. There is a mistake there.
My recent pull request https://github.com/acesseonline/pyreportjasper/pull/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 if
s.
I'm not sure if this is a bug, but seems strange code.
The file is
report.py
,class Report
, method__init__
, inside theif not jpype.isJVMStarted()
there are 2if
s, one in line 61 and one in line 63. The combined logic of their evaluation seems... strange to me: if the condition of theif
at line 61 is True, then theclasspath
list is updated, but the condition of theif
at line 63 will automatically eval to False, so the updatedclasspath
won't be used and will be thrashed since it's not used anywhere else in the__init__
method.Am I missing something?