WALA/com.ibm.wala.scandroid
Ben Liblit cb6d3b282a Fix Eclipse warnings about redundant null checks and assignments
Most of these are harmless, and are best fixed simply by removing the
redundant check or assignment.  The one in FlowType.compareBlocks,
however, revealed a real problem.  This code checks for nullness of
`a` *after* having called a method on `a`.  Assuming that `a` can
indeed be `null` here, the check must come first to avoid a
`NullPointerException`.

In several places, I saw code of this form:

   if (thing == null)
     assert thing != null : ... ;

I honestly don't understand the purpose of that `if` statement.  Why
not just have the `assert` statement there directly?  I removed the
seemingly irrelevant `if` statements in these cases, but if this is
some intentional pattern, please explain it to me.

In a few places where nullness is statically known but non-obvious,
add assert statements to point out what's going on to help future
developers.

Upgrade future such warnings to errors to keep us moving in a cleaner
direction.
2017-08-15 09:11:29 -07:00
..
.settings Fix Eclipse warnings about redundant null checks and assignments 2017-08-15 09:11:29 -07:00
META-INF version 1.4.4-SNAPSHOT 2017-08-06 07:25:20 -07:00
OSGI-INF/l10n Externalize bundle names and vendors 2017-06-07 17:42:11 +02:00
source/org/scandroid Fix Eclipse warnings about redundant null checks and assignments 2017-08-15 09:11:29 -07:00
.classpath scandriod merge 2014-10-01 21:32:36 -04:00
.project scandriod merge 2014-10-01 21:32:36 -04:00
build.properties Externalize bundle names and vendors 2017-06-07 17:42:11 +02:00
mvncentral.xml version 1.4.4-SNAPSHOT 2017-08-06 07:25:20 -07:00
pom.xml version 1.4.4-SNAPSHOT 2017-08-06 07:25:20 -07:00