Commit Graph

35 Commits

Author SHA1 Message Date
Julian Dolby c8cdaf8616 further refactoring to enable more reuse
eliminate all non-jva 8 compilation
2018-02-05 15:18:37 -08:00
Ben Liblit ebfd885d22 Use modern for-each loops where possible
Java sources used as test data have been excluded from this mass
clean-up.
2017-11-28 14:44:53 -06:00
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 16492c7b78 Revert "Suppress 157 Eclipse warnings about unused exception parameters"
This reverts commit fe9f7a793a.
2017-03-23 16:32:00 -05: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 6766f1e261 Fix 42 Eclipse warnings about unused imports 2017-03-20 00:43:48 -05:00
Ben Liblit fde65340d2 Fix 132 Eclipse warnings about using raw generic types 2017-03-15 11:08:20 -05:00
Ben Liblit b1678882b3 Plug numerous potential resource leaks
This fixes 33 out of 37 Eclipse "Potential resource leak: '...' may
not be closed" warnings.  It also fixes 3 out of 37 Eclipse "Resource
'...' should be managed by try-with-resource" warnings, although that
was not the main focus of this effort.

The remaining 4 warnings about potential resource leaks all involve a
leaked JarFile instance that is passed to a JarFileModule constructor
call.  JarFileModile never attempts to close its underlying JarFile;
this code is written as though JarFile cleanup were the caller's
responsibility.  However, the JarFile often cannot be closed by the
code that creates the JarFileModule either, since the JarFile needs to
remain open while the JarFileModule is in use, and some of these
JarFileModules stay around beyond the lifetime of the code that
created them.  Truly fixing this would essentially require making
JarFileModule implement Closeable, which in turn would probably
require that Module implement Closeable, which in turn would require
changes to lots of code that deals with Module instances to arrange
for them to be properly closed.  That's more invasive than I'm
prepared to take on right now.
2017-03-12 21:38:43 -05: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
Andreas Sewe e2e5bcf435 SecurityExceptions when analyzing JARs with broken/expired signatures
See <https://github.com/wala/WALA/issues/100>
2016-06-08 11:08:10 +02:00
Juergen Graf 6f8aee80c6 Merge branch 'wala' into master 2014-07-28 17:09:02 +02:00
Michael Heilmann 0bb5e6998e Remove redundant casts and imports, improve doc comments 2014-06-26 17:51:26 +02:00
Juergen Graf 4772f36d47 add standard type parameter to most pointer analysis references. When it breaks we move back to ? extends InstanceKey. 2014-05-20 22:00:06 +02:00
Juergen Graf ef4513d377 revert PointerAnalysis hack that makes containsAny() and contains() methods in OrdinalSet unusable 2014-05-20 19:52:01 +02:00
Julian Dolby dbd9c60d4f type generalization 2014-05-20 13:10:22 +02:00
Julian Dolby 4c25c40789 type generalization 2014-02-08 22:52:19 -05:00
Manu Sridharan 256cd06460 Convert all Java source files to use Unix line endings; no semantic change 2012-09-04 15:56:05 -07:00
dolby-oss 7a6af352b9 moved IR-independent visualization of graphs to util project
added DFS path find that finds all paths in sequence rather than just one
moved the WalaException out of warnings subpackage

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4257 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-08-16 16:51:11 +00:00
sjfink a0efbee8ff Major refactoring to introduce com.ibm.wala.ide. Many related changes and patches from Marcelo Paternostro.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3693 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-06-22 15:06:12 +00:00
sjfink 140df4d31a tweak comments
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2629 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-02-27 18:38:00 +00:00
sjfink d6c5b3bb55 thread IProgressMonitor and CancelException through many APIs
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2578 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-02-13 22:34:50 +00:00
sjfink 0038fdb93b Delete CallGraphBuilderFactory. Related cleanups.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2458 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-01-24 22:38:54 +00:00
sjfink 5c175e7898 more EMF obliteration
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2037 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-11-16 19:41:32 +00:00
sjfink 0e041c99f2 add CancelException to interact with Eclipse progress monitors and thread it through some APIs
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2004 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-11-13 16:19:01 +00:00
sjfink dab123ec06 generalize variable types to support real numbers too
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1572 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-08-06 18:32:36 +00:00
dolby-oss 01287b8891 make SimpleThreadEscapeAnalysis look for wala.properties to find JRE libs, as well as the running JRE. Also, minor clean-ups and fixes to that example
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1557 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-07-31 14:13:27 +00:00
loginov 14691f40b2 AbstractAnalysisEngine now creates the AnalysisCache.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1546 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-07-24 19:57:28 +00:00
sjfink c0aab9e7ed decouple IR caching from AnalysisOptions with a new AnalysisCache object
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1516 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-07-20 15:19:57 +00:00
sjfink 10492c7298 massive overhaul of Warnings management
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1379 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-07-06 22:07:24 +00:00
sjfink a0cfeac136 1) adjust somewhat to recent API changes.
2) fix equals() bug in Statement
3) general cleanups

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1224 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-06-01 14:06:17 +00:00
dolby-oss 30f01f77a4 adapt to wala changes for cross-language call graphs
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1213 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-06-01 03:27:41 +00:00
sjfink 4f86c8500d delete Entrypoints interface.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1126 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-05-15 17:44:54 +00:00
sjfink 7938061118 make ClassHierarchy implement Iterable<IClass>
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@784 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-02-23 17:20:59 +00:00
sjfink 78c8e93f33 API change for IClass.getDeclaredMethods()
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@523 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-01-02 16:50:46 +00:00
sjfink 68270cad6f mv stuff to trunk
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@492 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2006-11-22 17:45:24 +00:00