Identifies accesses to local reference variables that are once done in a guarded context
(w.r.t. its nullness property; guarded by an if instruction) and that are also done in
an unguarded context.
This is only a very shallow analysis that is subject to false positives; to filter
potential false positives we filter all those issues where we can identify a
control and data-dependency to a derived value. E.g.,
def printSize(f : File) : Unit = {
val name = if(f eq null) nullelse f.getName
if(name == null) thrownew NullPointerException;
// here... f is not null; because if f is null at the beginning, name would be null to// and the method call would have returned abnormally (raised a NullPointerException).
println(f.size)
}
Linear Supertypes
AnyRef, Any
Ordering
Alphabetic
By Inheritance
Inherited
GuardedAndUnguardedAccessAnalysis
AnyRef
Any
Hide All
Show All
Visibility
Public
All
Type Members
typeUnGuardedAccessAnalysisDomain = Domain with ReferenceValues with RecordCFG with RecordAllThrownExceptions
Identifies accesses to local reference variables that are once done in a guarded context (w.r.t. its nullness property; guarded by an if instruction) and that are also done in an unguarded context.
This is only a very shallow analysis that is subject to false positives; to filter potential false positives we filter all those issues where we can identify a control and data-dependency to a derived value. E.g.,