njit-jerse / specimin

SPECIfication MINimizer. A different kind of slicer for Java.
MIT License
3 stars 5 forks source link

Make synthetic classes used in a try with resources statement implement AutoCloseable #337

Closed kelloggm closed 2 months ago

kelloggm commented 2 months ago

Based on a problem I noticed while investigating why Specimin wasn't handling na-176 properly. There are probably other issues with that bug, but this one seemed like a good place to start.

kelloggm commented 2 months ago

Besides one comment regarding the test case's behavior, the code changes look good to me. By the way, before I realized you were working on this issue, I was looking into this issue and created a minimal reproducible test case for the IllegalStateException, if it helps

Definitely! I actually haven't investigated that part of the crash yet at all - I looked at the code that was causing the problem and immediately noticed the try-with-resources and realized that Specimin didn't handle that case at all, so I just started working on fixing that. I'll look into this problem next, starting with your test case.