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

Suppress warnings about safe this leaks #1323

Merged
merged 2 commits into from
Sep 5, 2023

Conversation

liblit
Copy link
Contributor

@liblit liblit commented Sep 5, 2023

Leaking this before the constructor has completed can be dangerous in general, specifically if any methods are called or not-yet-initialized fields are used. However, in the specific cases addressed here, the escaping this is merely recorded in fields of other objects for later use. Members of this instance are not actually used during construction, so these escapes are safe.

Leaking `this` before the constructor has completed can be dangerous in
general, specifically if any methods are called or not-yet-initialized
fields are used.  However, in the specific cases addressed here, the
escaping `this` is merely recorded in fields of other objects for later
use.  Members of `this` instance are not actually used during
construction, so these escapes are safe.
@liblit liblit added the gradle WALA’s Gradle build system label Sep 5, 2023
@liblit liblit requested a review from msridhar September 5, 2023 01:33
@liblit liblit self-assigned this Sep 5, 2023
@github-actions
Copy link

github-actions bot commented Sep 5, 2023

Test Results

   455 files  ±0     455 suites  ±0   2h 34m 46s ⏱️ - 7m 24s
   731 tests ±0     714 ✔️ ±0  17 💤 ±0  0 ±0 
2 808 runs  ±0  2 738 ✔️ ±0  70 💤 ±0  0 ±0 

Results for commit 4a28fcc. ± Comparison against base commit df52cbb.

♻️ This comment has been updated with latest results.

@liblit liblit enabled auto-merge (rebase) September 5, 2023 01:55
@liblit liblit merged commit 1f962e6 into wala:master Sep 5, 2023
6 checks passed
@liblit liblit deleted the silently-allow-this-leaks branch September 5, 2023 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gradle WALA’s Gradle build system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants