You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since final classes cannot be subclassed, the use of the return value of getClass as a lock object inside a final class is safe. Anonymous classes are a special kind of final classes. So, the use of getClass inside an anonymous class is safe. If our detector reports too many false positives in these cases, we can have the detector check for these corner cases.
The text was updated successfully, but these errors were encountered:
The detector doesn't report a use of getClass inside an anonymous class as instance of LCK02J. However, it reports the use of getClass inside a final class as an instance of LCK02J.
This commit belongs to issue #40.
Since final classes cannot be subclassed, the use of the return value of
getClass
as a lock object inside a final class is safe. Anonymous classes are a special kind of final classes. So, the use ofgetClass
inside an anonymous class is safe. If our detector reports too many false positives in these cases, we can have the detector check for these corner cases.The text was updated successfully, but these errors were encountered: