Commit Graph

4975 Commits

Author SHA1 Message Date
Manu Sridharan 2d0518963d Tag release 1.4.1 2017-03-25 13:24:39 -07:00
Manu Sridharan c1b2151e08 make Maven Central files for wala.dalvik and wala.scandroid (#158) 2017-03-25 13:20:34 -07:00
Manu Sridharan b82e808b32 Merge pull request #156 from liblit/warning-fixes-unnecessary-code-uncontroversial
Fix 265 Eclipse warnings about unnecessary code
2017-03-23 17:48:10 -07:00
Ben Liblit 1bb3d827c4 Turn off Eclipse warnings about unused caught-exception parameters
Manu requested that we use this approach instead of adding
`@SuppressWarnings("unused")` at each affected catch block.  That
seems reasonable to me, given the large number of such warnings and
the lack of likely harm from ignoring such caught exceptions.
2017-03-23 16:39:58 -05:00
Ben Liblit 16492c7b78 Revert "Suppress 157 Eclipse warnings about unused exception parameters"
This reverts commit fe9f7a793a.
2017-03-23 16:32:00 -05:00
Manu Sridharan 9dafd5050f Merge pull request #155 from liblit/warning-fixes-javadoc-true-fixes
Fix 161 Eclipse Javadoc warnings
2017-03-23 13:30:51 -07:00
Manu Sridharan 167244ed5e Merge pull request #154 from liblit/warning-fixes-javadoc-bankruptcy
Disable Eclipse checks for routinely-violated Javadoc rules
2017-03-23 11:04:59 -07:00
Ben Liblit 67013a0d77 Fix 21 Eclipse warnings about unnecessary warning suppressions 2017-03-23 12:28:14 -05:00
Ben Liblit e52d872e3e Fix 19 Eclipse warnings about unnecessary casts 2017-03-23 12:28:14 -05:00
Ben Liblit 0f36e92f7e Remove "@inheritDoc" for classes; it's not allowed there 2017-03-22 20:40:53 -05:00
Ben Liblit 266b58970b Remove "@inheritDoc" for non-overriding methods 2017-03-22 20:40:53 -05:00
Ben Liblit b012b21147 Remove "@return" for void-returning functions 2017-03-22 20:40:53 -05:00
Ben Liblit 3b88d7be39 Remove advice to look at a deprecated class 2017-03-22 20:40:52 -05:00
Ben Liblit 5ec33b4636 Remove advice to use an alternate method that doesn't actually exist 2017-03-22 20:40:52 -05:00
Ben Liblit b8264b884d Remove "@param" tags for which there is no corresponding parameter 2017-03-22 20:40:52 -05:00
Ben Liblit 780804e159 Fix "@param" tags whose name doesn't match the parameter name 2017-03-22 20:40:52 -05:00
Ben Liblit 7a198b0968 "@throws" with no other information is neither valid nor useful 2017-03-22 20:40:52 -05:00
Ben Liblit 17ee9c3f98 Fix assorted Javadoc typos, such as omitted "}" 2017-03-22 20:40:52 -05:00
Ben Liblit 323224504a Suppress several unfixable warnings about unresolved type references
Fixing these Javadoc comments would require adding packages to various
other packages' build paths.  In some of the cases suppressed,
changing build paths in that manner would create circular build
dependencies.  In other cases, it would simply add a Javadoc-motivated
dependency that does not exist for the real code, which seems
undesirable.  For a few cases, the reference seems to be to types in
code we don't even have here, such as code from "android" or
"org.mozilla" packages.
2017-03-22 20:40:52 -05:00
Ben Liblit 3b88836488 Fix broken type, field, and method references in Javadoc comments 2017-03-22 20:40:51 -05:00
Ben Liblit 98d5c02280 Don't warn about missing Javadoc tags
These changes turn off Eclipse warnings for Javadoc comments with
missing tags, such as "@throw" or "@param".

We don't turn this warning off in all projects.  Rather, we turn it
off only in projects that were producing at least one such warning.
In other words, if a project was already completely "clean" with
respect to this warning, then we leave this warning enabled for that
project.

Turning off these warnings is a partial declaration of Javadoc
bankruptcy.  In an ideal world, we would enable and fix all of these
warnings.  However, there are 327 of them.  Apparently the WALA team's
implicit coding style says that omitting Javadoc tags is OK.  If
there's no intent to systematically add these tags, then we may as
well turn off these warnings so that we can see other warnings that we
may want to fix.
2017-03-22 20:39:36 -05:00
Ben Liblit 49f08acb13 Don't warn about missing Javadoc comments
These changes turn off Eclipse warnings for documentable items without
Javadoc comments.  In some subprojects, we turn these off entirely.
In others, we leave these warnings on for public items but not for
items whose visibility is protected or below.

We don't turn this warning off in all projects.  Rather, we turn it
off only in projects that were producing at least one such warning.
In other words, if a project was already completely "clean" with
respect to this warning, then we leave this warning enabled for that
project.

Turning off these warnings is a partial declaration of Javadoc
bankruptcy.  In an ideal world, we would enable and fix all of these
warnings.  However, there are 1,366 of them.  Apparently the WALA
team's implicit coding style says that omitting Javadoc comments is
OK.  If there's no intent to systematically add documentation, then we
may as well turn off these warnings so that we can see other warnings
that we may want to fix.
2017-03-22 20:39:36 -05:00
Ben Liblit 0aad8739d9 Don't warn about Javadoc comments with non-visible references
These arise, for example, when Javadoc documentation on a public class
includes a @link to a private field.  I can see how this would be
problematic for closed-source Java code where private items are
invisible to outsiders.  However, given that WALA is open source,
nothing is truly non-visible.  If the WALA documentation authors
considered non-visible references useful when explaining things,
that's fine with me.

We don't turn this warning off in all projects.  Rather, we turn it
off only in projects that were producing at least one such warning.
In other words, if a project was already completely "clean" with
respect to this warning, then we leave this warning enabled for that
project.
2017-03-22 20:39:36 -05:00
Ben Liblit ea39ad647e Don't warn about Javadoc tags with missing descriptions
These changes turn off Eclipse warnings for Javadoc tags without
descriptions.  In some subprojects, we turn these off entirely.  In
others, leave on missing-descrption checks for "@return" tags only.

We don't turn this warning off in all projects.  Rather, we turn it
off only in projects that were producing at least one such warning.
In other words, if a project was already completely "clean" with
respect to this warning, then we leave this warning enabled for that
project.

Turning off these warnings is a partial declaration of Javadoc
bankruptcy.  In an ideal world, we would enable and fix all of these
warnings.  However, there are 576 of them.  Apparently the WALA team's
implicit coding style says that omitting descriptions is OK.  If
there's no intent to systematically add descriptions, then we may as
well turn off these warnings so that we can see other warnings that we
may want to fix.
2017-03-22 20:39:36 -05:00
Manu Sridharan f56ee9cd72 Merge pull request #153 from liblit/generalize-generic-types
Generalize a generic type parameter even more
2017-03-22 18:17:47 -07:00
Ben Liblit 9921fe37e6 Generalize a generic type parameter even more
As it turns out, I should have been using "? extends InstanceKey" rather
than "? super InstanceKey".  But really, we can just use "?" here since
HeapGraph itself constrains its own type parameter appropriately.
2017-03-22 16:15:41 -05:00
Manu Sridharan f7a3b98764 Merge pull request #152 from liblit/generalize-generic-types
Generalize a generic type
2017-03-22 13:32:23 -07:00
Ben Liblit ff5e79c2d3 Merge remote-tracking branch 'official/master' 2017-03-22 15:29:24 -05:00
Manu Sridharan dce9ede601 Merge pull request #148 from liblit/automatic-dx-jar-download
Automatically download “dx.jar” when building
2017-03-22 12:31:25 -07:00
Ben Liblit 2a33cb3649 Generalize an over-constrained generic parameter
This fixes WALA bug #151, which was first introduced in commit fde6534.
2017-03-22 14:16:54 -05:00
Ben Liblit ce2335c61f Merge branch 'master' of github.com:liblit/WALA 2017-03-22 12:00:46 -05:00
Manu Sridharan 9b692e714f switch version to 1.4.1-SNAPSHOT 2017-03-21 09:38:36 -07:00
Manu Sridharan bfe378e7f2 1.4.0 release 2017-03-21 08:59:08 -07:00
Ben Liblit fe9f7a793a Suppress 157 Eclipse warnings about unused exception parameters
In the cases addressed here, the caught exception is truly not needed
by the handling code.
2017-03-20 00:44:06 -05:00
Ben Liblit 16cb596947 Fix 10 Eclipse warnings about declared-but-never-thrown exceptions 2017-03-20 00:44:04 -05:00
Ben Liblit 4cd6e590a9 Fix 5 Eclipse warnings about local-but-unused constructors 2017-03-20 00:44:01 -05:00
Ben Liblit aa878f0b68 Fix 11 Eclipse warnings about redundant interfaces 2017-03-20 00:43:57 -05:00
Ben Liblit 6766f1e261 Fix 42 Eclipse warnings about unused imports 2017-03-20 00:43:48 -05:00
Ben Liblit 64f7751a00 Merge branch 'warning-fixes-potential-programming-problems' 2017-03-19 23:35:12 -05:00
Manu Sridharan a3f4c10c20 Merge pull request #150 from liblit/warning-fixes-potential-programming-problems
Resolve all Eclipse “Potential Programming Problem” warnings
2017-03-18 15:00:53 -07:00
Manu Sridharan fcd003f328 Merge pull request #149 from liblit/warning-fixes-deprecation
Resolve all Eclipse warnings about deprecated APIs
2017-03-18 13:59:51 -07:00
Ben Liblit 421dcd4991 Change two "if" checks that can never be true into asserts
Eclipse warns that the "if" statements' true blocks are dead, and
indeed the conditions being tested here can never be true.  It's a
little subtle why that's so, though.  Changing them to "assert"
statements removes two warnings about deprecated code, while still
helping human readers understand what invariants must hold here.
2017-03-17 22:03:22 -05:00
Ben Liblit 1ddbad17a3 Remove an assert before an "if" that checks the same thing
The assert will throw AssertionError if it finds a bad argument,
unless the code is running without assertion checking enabled.  The
"if" will throw an IllegalArgumentException if it finds the same bad
argument, and that check is always enabled.  Better to be consistent
in what exception is used to report a bad argument.  Since the "if" is
always active, let's go with that and remove the redundant,
not-always-active assert.
2017-03-17 21:59:11 -05:00
Ben Liblit 53f99a359b Update expected exception when test assertions fail
We used to use junit.framework.Assert for test assertions, and that
class reports failures by throwing
junit.framework.AssertionFailedError.  However, junit.framework.Assert
is obsoleted by org.junit.Assert, and we've already replaced the
former with the latter.  org.junit.Assert reports failures by throwing
java.lang.AssertionError, so that's what we need to expect in our
testing infrastructure.
2017-03-17 21:52:47 -05:00
Ben Liblit 296657a394 Suppress 88 Eclipse warnings about dead code
All of these involve conditionals that check some static, final debug
flag or debug level.  The code will indeed be dead if WALA is built
with those debug facilities turned off.  But we still want the code
present in case someone needs to turn some aspect of debugging on for
a while.
2017-03-17 21:49:34 -05:00
Ben Liblit 6a81cf8df2 Fix 19 Eclipse warnings about unnecessary semicolons 2017-03-17 21:49:22 -05:00
Ben Liblit dfa8f15dac Suppress two deprecation warnings about an internal CGNode API
The supposedly deprecated function (CGNode.addTarget) really seems to
be intended for internal use, not deprecated per se.  We are an
internal user here, so presumably it's OK for us to be using this API
entry point.
2017-03-17 21:18:36 -05:00
Ben Liblit 6caecce3e7 Suppress a deprecation warning about requesting an old AST version
Near as I can tell, the request for a deprecated version here is
intentional.  The non-deprecated version (AST.JLS8) is the latest and
greatest, but as far as I can tell we really do want the older version
here.
2017-03-17 21:18:36 -05:00
Ben Liblit 7cbbeb1d81 Fix 92 deprecation warnings
All of these fixes involve replacing junit.framework.Assert with
org.junit.Assert for JUnit 4.x and later.
2017-03-17 21:18:26 -05:00
Ben Liblit 2a61306338 Download "dx.jar" from Maven, as we already do for "android.jar"
This should make it easier for newcomers to get WALA up and running
from sources.  One no longer needs to manually find "dx.jar" using
instructions given at
<http://wala.sourceforge.net/wiki/index.php/UserGuide:Getting_Started#Building_the_code>
or
<https://groups.google.com/forum/#!msg/wala-sourceforge-net/cBYsfEvYVG0/Ua52dyQQU-YJ>.
Those instructions were already out-of-date, anyway.

Given that an official release of "dx.jar" is available in Maven, it
would be nice to have Maven itself manage that dependency.
Unfortunately, it seems that WALA in general does not use Maven for
dependency management.  As far as I can tell, the Maven configuration
just calls out to Ant for doing builds, including having Ant download
other needed components.  If WALA ever moved to using Maven more
fully, downloading "dx.jar" could easily come along with that.
2017-03-16 19:51:11 -05:00