Commit Graph

4934 Commits

Author SHA1 Message Date
Manu Sridharan bfe378e7f2 1.4.0 release 2017-03-21 08:59:08 -07: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
Manu Sridharan 811ce5257c Merge pull request #145 from ponder-lab/IAnalysisCacheView
Additional refactorings for IAnalysisCacheView.
2017-03-15 13:18:12 -07:00
Manu Sridharan b144423ce4 Merge pull request #146 from liblit/warning-fixes-type-safety-and-raw-types
Fix Eclipse warnings about type safety and raw types
2017-03-15 13:08:26 -07:00
Ben Liblit ab5aa90114 Suppress an Eclipse warning about unsafe varargs
Nothing we can do about this statically, due to Java limitations about
non-reifiable types.
2017-03-15 11:24:45 -05:00
Ben Liblit e56686ddf5 Suppress a few Eclipse warnings about unchecked casts
These are all ones that we cannot really fix statically.
2017-03-15 11:24:45 -05:00
Ben Liblit c382934933 Fix an Eclipse warning about an unchecked cast 2017-03-15 11:24:40 -05:00
Ben Liblit fde65340d2 Fix 132 Eclipse warnings about using raw generic types 2017-03-15 11:08:20 -05:00
Raffi Khatchadourian 85e7f7e623 Merge branch 'master' into IAnalysisCacheView 2017-03-15 10:27:45 -04:00
Manu Sridharan 1ba27cd576 Merge pull request #143 from liblit/gitignore-nodejs-lib
Ignore a "lib" subdirectory that Maven creates
2017-03-14 20:11:44 -07:00
Raffi Khatchadourian d95b6e33f0 Merge remote-tracking branch 'origin/master' into IAnalysisCacheView 2017-03-14 17:24:19 -04:00
Julian Dolby 7e3066b6cd bug 144 2017-03-14 10:05:18 -04:00
Raffi Khatchadourian 8fd41c148f Use IAnalysisCacheView instead of AnalysisCache.
It seems that some additional types need to be changed due to
d24519e974. This may not be inclusive,
however.
2017-03-13 16:27:05 -04:00
Ben Liblit 7c1ec7d18a Ignore a "lib" subdirectory that Maven creates
This arises at some point during "mvn compile install".  I'm not sure
exactly when, but it's definitely automated, and therefore not
appropriate to track in git.
2017-03-13 14:01:13 -05:00
Julian Dolby bb0f38338e Merge branch 'warning-fixes-resource-management' of https://github.com/liblit/WALA 2017-03-13 10:44:38 -04:00
Julian Dolby 47f29192e6 Merge branch 'warning-fixes-generics-inference' of https://github.com/liblit/WALA 2017-03-13 10:42:52 -04:00
Ben Liblit 0165605c19 Simplify resource management using try-with-resource
This fixes the remaining 34 Eclipse "Resource '...' should be managed
by try-with-resource" warnings that were still left after the previous
commit.

Unlike the fixes in that previous commit, the changes here are *not*
plugging potential resource leaks.  However, in many cases that is
simply because the code before the close() call cannot currently throw
exceptions.  If exceptions became possible in the future, leaks could
result.  Using try-with-resource preemptively avoids that.
Furthermore, in code that was already dealing with exceptions, the
try-with-resource style is usually considerably simpler.
2017-03-12 21:38:43 -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
Ben Liblit 7a3a23b2b4 When using Maven, compile using Java 1.7, not 1.6
We already switched to using Java 1.7 in the Eclipse settings.  This
applies the corresponding change to Maven-managed builds.
2017-03-12 21:38:43 -05:00
Julian Dolby d890045a60 Merge branch 'master' of https://github.com/wala/WALA 2017-03-12 19:46:01 -04:00
Julian Dolby 774db6978a nodejs support updated to latest WALA and now on Travis 2017-03-12 19:45:19 -04:00
Manu Sridharan 064fa9a503 Merge pull request #140 from liblit/remove-execute-bits-from-non-scripts
Remove execute bits from many non-executable (i.e., non-script) files
2017-03-12 10:27:08 -07:00
Ben Liblit 32ab3aaa9b When using Maven, compile using Java 1.7, not 1.6
We already switched to using Java 1.7 in the Eclipse settings.  This
applies the corresponding change to Maven-managed builds.
2017-03-11 22:19:43 -06:00
Ben Liblit 994a70500f Remove redundant generic type parameters where possible
Instead, rely on Java's ability to infer type parameters in many
contexts.  This removes 665 Eclipse warnings.

Note: a few of these changes are to files under "test" subdirectories.
Presumably those are files that serve as test inputs rather than being
part of WALA code proper.  As far as I can tell, these changes do not
break any WALA tests.  But if any of those tests were specifically
intended to exercise WALA on code with non-inferred generic type
parameters, then I really should be leaving those alone.
2017-03-11 21:20:51 -06:00
Ben Liblit 1cf7f0f3d3 Merge branch 'master' of github.com:wala/WALA 2017-03-11 20:21:51 -06:00
Julian Dolby a1dd19b8d0 Merge branch 'pull-request__android-bugfixes' of https://github.com/joana-team/WALA 2017-03-11 16:56:09 -05:00
Julian Dolby 605e7373ce Merge branch 'pull-request__exception-pruning-for-safe-array-creation' of https://github.com/joana-team/WALA 2017-03-11 16:38:03 -05:00
Julian Dolby ef1994e146 Merge branch 'master' of https://github.com/wala/WALA 2017-03-11 16:21:16 -05:00
Julian Dolby db65c16863 Merge branch 'pull-request__typeannotations' of https://github.com/joana-team/WALA 2017-03-11 16:19:50 -05:00
Julian Dolby 6a8696e6e1 Merge pull request #118 from joana-team/pull-request__dalvik_typeinference
Make a variant of TypeInference which supports dalvik bytecode
2017-03-11 16:12:50 -05:00
Julian Dolby 2a4d24dc6f Merge branch 'pull-request__nullpointer-bugfixes' of https://github.com/joana-team/WALA 2017-03-11 14:48:13 -05:00
Julian Dolby 5c6cf9724a Merge branch 'warning-fixes-java-versions' of https://github.com/liblit/WALA 2017-03-11 13:46:06 -05:00
Julian Dolby ffe355bc74 Merge branch 'warning-fixes-model-behavior-class' of https://github.com/liblit/WALA 2017-03-11 13:45:20 -05:00
Julian Dolby 70501da941 Revert "IFDS Null Analysis files"
This reverts commit df99517df0.
2017-03-11 13:25:19 -05:00
Julian Dolby f595eb357e add some abstraction to IR, using IRView 2017-03-11 13:22:45 -05:00
Julian Dolby a1f8894ba1 Merge branch 'master' of https://github.com/wala/WALA 2017-03-10 13:49:09 -05:00
Julian Dolby 0545060886 merge 2017-03-10 13:49:07 -05:00
Julian Dolby a2c388b83d Merge branch 'nodejs' of https://github.com/Pfarrer/WALA 2017-03-09 09:02:28 -05:00
Julian Dolby 016c3940e8 Merge branch 'pull-request__misc-bugfixes' of https://github.com/joana-team/WALA 2017-03-09 08:59:40 -05:00
Julian Dolby f5c36d7411 Merge branch 'master' of https://github.com/d2an3/WALA 2017-03-09 08:53:30 -05:00
Julian Dolby 0784a9da6a Merge pull request #124 from joana-team/slightly-more-informative-output
display which classes each handler catches when outputting IR
2017-03-09 08:51:06 -05:00