Commit Graph

15 Commits

Author SHA1 Message Date
Ben Liblit 191904d607 Remove "throws XYZ" declarations where XYZ cannot be thrown
Unnecessary "throws" declarations tend to cascade.  If foo() calls
bar() and bar() falsely declares that it might throw IOException, that
often leads a programmer to declare that foo() might throw IOException
as well.  Fixing the bar() throws declaration then reveals that we can
fix the foo() throws declaration too.  By the time we reach a fixed
point with cleaning these up, we have removed roughly 320 unnecessary
throws declarations.

In a few cases, this cleanup even lets us remove entire "try
... catch" statements where the only thing being caught was an
exception that we now statically know cannot be thrown.  Nice!

In Eclipse project configurations, upgrade any future such shenanigans
from warnings to errors.  Now that we've fixed this, we don't want it
coming back again.

There is a potential drawback to this change.  Conceivably some public
WALA API entry point might have declared that it could throw some
exception merely to reserve the *option* of throwing that exception in
third-party code that subclasses and overrides the API entry point in
question.  I have no idea whether this is a significant concern in
practice, though.
2017-07-28 10:20:28 -07:00
Ben Liblit 72c754e874 Declare private methods static wherever possible
If a method is private, there's no risk that a subclass elsewhere
might be overriding it and depending on dynamic dispatch to choose the
right implementation.  So all of these private methods can safely be
declared static without risk of regression in either WALA code or
unseen third-party code.
2017-06-07 08:29:23 -07:00
Julian Dolby d24519e974 cross-cutting changes to make more of WALA runnable with TeaVM. The biggest change is refactoring to AnalysisCache and friends; since TeaVM does not support SoftReference, I needed to add a layer of interfaces so that I can use a more simpleminded caching implementation for TeaVM. There are other changes to Module and friends to break connections with File and URL, which also cause TeaVM grief. I also organized imports in many places to remove unused types that caused trouble. 2017-02-02 20:33:27 -05:00
Julian Dolby c9b1006305 changes for allowing seq. and conc. CHAs 2017-01-12 16:34:54 -05:00
Julian Dolby 76286a330c make Android entrypoint locator work for source code 2016-06-10 21:21:08 -04:00
Julian Dolby a6a060ed25 changes for handling of 'callbacks' in dynamic CGs 2015-06-28 17:06:21 -04:00
Julian Dolby 71f16d4f1b try not using URLClassLoader 2014-11-11 20:03:09 -05:00
Julian Dolby a1bc84356d scandriod merge 2014-10-01 21:32:36 -04:00
Julian Dolby 26f5254e3e more support for Java 7:
analysis now understands and propagates MethodHandle objects
  fixes to Shrike InvokeDynamic instruction


Former-commit-id: fb826f124423bcbca08f729cee1794fbda711d16
2014-08-07 16:02:48 -04:00
Julian Dolby 861bf48c7f remove hard-coded refs to /tmp 2014-06-29 15:07:09 +02:00
Julian Dolby b04a3f9b35 try new way to find classpath entries for travis ci 2014-03-17 10:09:48 -04:00
Julian Dolby 371695506d avoid running on travis for now 2014-03-16 22:29:54 -04:00
Julian Dolby b422fd500e try to find jar file for travis tests 2014-03-16 22:14:36 -04:00
Julian Dolby 95c13203de try to find jar file for travis tests 2014-03-16 22:01:02 -04:00
Julian Dolby bfd999e03b rename dynamic cg test 2014-03-16 18:04:21 -04:00