javaw: fix buglet overwrites working variable while adding dependencies

variable x is used in the outer loop and gets corrupted by inner enumeration in case of non-jar dependency

to reproduce: use the demos/java and run waf build twice: the first time will work (since no class files around)
while the second will not since will by bad luck pick a class file in the inner loop
This commit is contained in:
Federico Pellegrin 2020-01-04 09:35:07 +01:00 committed by Thomas Nagy
parent 3204e2597c
commit c438138476
1 changed files with 1 additions and 1 deletions

View File

@ -251,7 +251,7 @@ def use_javac_files(self):
base_node = tg.path.get_bld()
self.use_lst.append(base_node.abspath())
self.javac_task.dep_nodes.extend([x for x in base_node.ant_glob(JAR_RE, remove=False, quiet=True)])
self.javac_task.dep_nodes.extend([dx for dx in base_node.ant_glob(JAR_RE, remove=False, quiet=True)])
for tsk in tg.tasks:
self.javac_task.set_run_after(tsk)