Storyyeller / Krakatau

Java decompiler, assembler, and disassembler
GNU General Public License v3.0
1.95k stars 219 forks source link

unnecessary super() in constructor #145

Closed GraxCode closed 6 years ago

GraxCode commented 6 years ago

http://prntscr.com/jecb11

Janmm14 commented 6 years ago

Bytecode can execute before and after super call if I remember correctly.

GraxCode commented 6 years ago

that doesn't matter, that super call at the beginning of the constructor is redundant

Janmm14 commented 6 years ago

Behaviour could be different. Superclass looking at variable of current class in constructor before/after init, results could differ.

Storyyeller commented 6 years ago

That's a good point. But I think in the case where an argument-less super() call is the first code in the function and there are no exception handlers, it can be safely removed. It shouldn't be hard to do, so I do plan to get to it eventually.

Storyyeller commented 6 years ago

Should be fixed now. Thanks for the report.