javapathfinder / jpf-core

JPF is an extensible software analysis framework for Java bytecode. jpf-core is the basis for all JPF projects; you always need to install it. It contains the basic VM and model checking infrastructure, and can be used to check for concurrency defects like deadlocks, and unhandled exceptions like NullPointerExceptions and AssertionErrors.
517 stars 326 forks source link

`Package.toString()` not working in JPF #466

Closed Harsh4902 closed 1 week ago

Harsh4902 commented 1 week ago
cyrille-artho commented 1 week ago

Thanks. For the main branch, we wait with merging code until the test passes.

Harsh4902 commented 1 week ago

@cyrille-artho @pparizek I have changed the approach of loading package. We can access package by using object of Class class for current class. With this approach, we can further call Package.toString() method, which will not fail on JPF.

cyrille-artho commented 1 week ago

Great! Can you please try to make the patch (in terms of changes) a bit smaller? For example, it's usually better to explicitly import the classes you need rather than using the wildcard, so the change from import java.util.A; import java.util.B; ... to import java.util.*; is not ideal. It also makes the patch bigger, which will make it harder to merge it into other branches. Please check if you can do that (and push the changes again to this branch, which will auto-update the PR).

cyrille-artho commented 1 week ago

Thanks!