Class ReleaseSensorsCheck

All Implemented Interfaces:
JavaCheck, JavaFileScanner

public class ReleaseSensorsCheck extends IssuableSubscriptionVisitor
Rule S6889 flags issues when any sensor defined in ReleaseSensorsCheck.AcquireReleaseSensor is not released. The intent of this rule is to make the developer aware of the need to release the sensor when it is not needed anymore.

The implemented logic checks that after acquiring a sensor there is at least one release invocation within the same file.