Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider inheritance when checking models #85

Open
msridhar opened this issue Dec 17, 2017 · 2 comments
Open

Consider inheritance when checking models #85

msridhar opened this issue Dec 17, 2017 · 2 comments

Comments

@msridhar
Copy link
Collaborator

We should be able to leverage inheritance when writing models for librarys. E.g., Collections.toArray(T[]) is specified to throw an NPE whenever the parameter is null. Right now, we need to add a model for Collections.toArray, ArrayDeque.toArray, LinkedList.toArray, etc. to get full safety. It'd be nice to just add a model for Collections.toArray and then catch this for any overriding method. Would need to be careful about performance when implementing this.

msridhar added a commit that referenced this issue Dec 18, 2017
Eventually we should address #85 but in the meantime this gets some safety for these methods. Note that we'll get a NullAway error for invoking LinkedList methods with null through the Deque interface, but I think that's reasonable (workaround is to downcast to a LinkedList first).
@kageiit
Copy link
Contributor

kageiit commented Dec 18, 2017

@msridhar we are seeing the word performance thrown around a lot during many tickets failed against nullaway, but we dont seem to have a concrete way to measure this. Can we setup a profiling sample using jmh in this repo that can we run as part of travis and give us numbers on what the performance change looks like on PRs? or atleast a way for us to run manually?

@msridhar
Copy link
Collaborator Author

@kageiit opened #87 on benchmarking / profiling. Not sure we can trust numbers from Travis, but at least for running locally it should be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants