typetools / checker-framework

Pluggable type-checking for Java
http://checkerframework.org/
Other
988 stars 347 forks source link

Optimize temporary variable creation by excluding void method invocations in ResourceLeakTransfer #6568

Closed iamsanjaymalakar closed 2 weeks ago

iamsanjaymalakar commented 2 weeks ago

Description

The ResourceLeakTransfer class currently creates temporary variables for nodes unless they are of primitive or boxed types. This setup excludes certain cases but can be further optimized by also excluding method invocations that return void. Implementing this change could potentially improve performance by reducing unnecessary processing and memory usage associated with managing temporary variables for void returns.

By reducing the creation of unnecessary temporary variables, this change is expected to slightly improve the system's performance. Although the impact may not be substantial, it will contribute to the overall efficiency and cleanliness of the code, potentially reducing memory usage and processing time during analysis.