Ben Liblit
0286c2b048
Use Iterator2Iterable helper to convert more loops to for-each
2017-12-04 14:04:39 -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
8ef6ad5069
Add proper type parameters to nearly all uses of Iterator
...
Java sources used as test data have been excluded.
2017-11-28 14:09:30 -06:00
Ben Liblit
3825c03b16
Plug a `JarInputStream` resource leak
2017-08-27 11:03:14 -07:00
Ben Liblit
6087b73cee
Fix or suppress all 242 Eclipse warnings about unused parameters
...
In general, my approach was to try to eliminate each unused parameter
using Eclipse's "Change Method Signature" refactoring. That did not
always succeed: a parameter may be unused in some base class method,
but then be used in subclass's override of that method. In cases
where refactoring to eliminate a parameter failed, I instead annotated
the parameter with '@SuppressWarnings("unused")' to silence the
warning.
Note: this group of changes creates a significant risk of
incompatibility for third-party WALA code. Some removed parameters
change externally-visible APIs. Furthermore, these changes do not
necessarily lead to Java compilation errors. For example, suppose
third-party code subclasses a WALA class or interface, overrides a
method, but does not annotate that method as @Override. Removing a
parameter means that the third-party method no longer overrides. This
can quietly change code behavior without compile-time errors or
warnings. This is exactly why one should use @Override wherever
possible, but we cannot guarantee that third-party WALA users have
done that.
2017-07-31 15:29:00 -07:00
Ben Liblit
594525a83f
Fix Eclipse warnings about methods that can be declared static
...
The fix is to add "static" where appropriate, of course. I've also
simplified calls to such methods to reflect the fact that they no
longer need a specific object to call the method on.
In projects that contain test inputs, I've left the non-static
declarations unchanged, and instead downgraded the warning to be
ignored. In all other projects, this warning has been upgraded to an
error.
2017-07-14 22:38:38 -07: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
Martin Mohr
64823846c0
get rid of HashCodeComparator and all its usages
...
This addresses both https://github.com/wala/WALA/issues/133 and
https://github.com/wala/WALA/issues/88
2017-01-26 14:16:48 +01: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
Julian Dolby
bf7dbe6359
misc fixes
2014-11-18 22:37:51 -05:00
Julian Dolby
92bec0cc0b
move to Reader API to help with annoying /r/n issues is source mapping
2014-04-29 11:21:01 -04:00
Julian Dolby
0ccaae3b2c
pull exclusions file support into util project and then share it with
...
the shrike-based dynamic call graph builder so that static and dynamic
graphs can be built consistently more easily.
2013-11-14 13:02:56 -05:00
Manu Sridharan
e11f8b3182
patch to improve mapping of classes to source files
2013-07-08 15:26:28 -07:00
Julian Dolby
080325b5f6
merge
2013-06-25 11:57:37 -04: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
Manu Sridharan
2edb070437
changed FileProvider to have instance methods
2012-04-16 14:57:14 -04:00
msridhar1
59e46916ce
Generalize certain IR data structures to be less Java-specific. Generalize annotations code to allow for reading annotation parameters. Various other fixes
...
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4290 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-12-28 17:03:27 +00:00
msridhar1
53bea40ab6
give up on optimizing jar file I/O for now. fix existing code to not even temporarily store jar file content for now.
...
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3999 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2010-11-22 22:41:29 +00:00
msridhar1
2a4d3869de
temporary fix for issue with bad I/O patterns when reading large jar files. a work in progress
...
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3988 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2010-11-04 16:47:35 +00:00
dolby-oss
21cc158777
new class loader apis to allow querying source file names and streams using a method and offset into it, rather than a class. This is to accommodate languages in which method bodies can be from multiple places, e.g. due to constructs lie #include. To reflect the fact that classes are no longer assumed to have a single source file, the old apis using just a class are deprecated and declared to throw NoSuchElementException.
...
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3588 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-05-07 16:47:04 +00:00
sjfink
f39b9cf43a
revert previous checkin (a major API change to IClass.getSourceFile())
...
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3584 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-05-07 14:38:07 +00:00
omertripp
2ca8a07943
REFACTOR: - code changes to accommodate .NET into WALA. A .NET class maps onto multiple source files, and thus these changes.
...
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3582 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-05-07 14:14:18 +00:00
sjfink
de6adbc4d7
more migration to Java assertions
...
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3559 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-05-01 17:42:28 +00:00
sjfink
9939142eae
switch from Assertions._assert to Java assertions
...
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3555 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-04-30 13:16:52 +00:00
dolby-oss
33949b78a9
fix to avoid loading a class when a parent classloader has already done so
...
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3505 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-04-22 16:38:30 +00:00
dolby-oss
e80dc6ef8c
refactor handling of constants in Shrike to abstract away from Java bytecode
...
introduce factories to create SSAInstruction objects
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3433 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-04-10 18:33:07 +00:00
msridhar1
e08ed2663f
Deprecate Iterator2Collection.toCollection(); use toSet() or toList() instead.
...
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3421 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-04-09 15:24:42 +00:00
sjfink
22f74154da
minor tweaks from Satish
...
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3334 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-03-17 19:19:29 +00:00
sjfink
f9aa9e6d96
patch from Y. Havviv to enforce deterministic order loading classes
...
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3314 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-03-15 13:01:57 +00:00
sjfink
9293a5fdeb
more support for linking bytecode to Java source
...
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3308 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-03-13 18:51:06 +00:00
sjfink
e4a6ae61a7
more IllegalArgumentExceptions
...
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3286 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-03-11 19:33:02 +00:00
sjfink
b1f300156e
patch from yinnon to make analysis scopes obey list order
...
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3144 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-12-17 19:52:27 +00:00
msridhar1
09074aa83f
remove use of Trace class
...
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3074 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-11-03 17:46:03 +00:00
sjfink
072fb04c32
generalize some shrike implementation details to play more nicely with others
...
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2814 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-05-13 19:24:57 +00:00
sjfink
1ff3ab7361
tweak comments
...
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2618 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-02-26 03:09:29 +00:00
sjfink
dc39a8dd86
refactoring: move some classes into appropriate packages
...
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2452 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-01-24 22:20:38 +00:00
sjfink
e6a904b715
just refactoring ... introduce 2 new packages in wala.util.
...
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2446 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-01-24 22:05:28 +00:00
sjfink
2f2a0a1990
misc. small cleanups
...
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2199 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-12-17 15:29:44 +00:00
sjfink
059761fb70
use Hash factories everywhere
...
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1438 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-07-11 21:08:12 +00:00
sjfink
5eb76541f0
massive overhaul of Warnings management
...
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1382 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-07-06 22:08:13 +00:00
sjfink
8864b70d50
miscellaneous housekeeping
...
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1364 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-07-06 03:07:14 +00:00
sjfink
6421783e52
introduce factory for Iterator2Collection
...
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1308 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-06-21 16:14:00 +00:00
sjfink
65cc4433cd
make some fields final
...
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1244 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-06-05 14:01:26 +00:00
sjfink
8e52444761
make many fields final
...
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1232 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-06-01 21:38:35 +00:00
sjfink
576251be0c
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@1223 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-06-01 14:06:13 +00:00
dolby-oss
0ed8d96d55
Changes to allow cross-language call graphs. The three biggest changes are as follows:
...
1) The visitors nested in the SSAPropagationCallGraph have become static classes so that they can be reused in a delegation pattern for the cross-language call graph builder.
2) The ClassHierarchy is now encapsulated behind an IClassHierarchy interface to allow for a CrossLanguageClassHierarchy that delegates to a set of child hierarchies, one for each language. The internals of the ClassHierarchy are almost entirely unchanged
3) There is now a new Language interface in com.ibm.wala.classLoader, and all IClassLoader objects have to know what language they load for. This language object now encapsulates a few language-specific options that were previously hacked into the AnalysisOptions object.
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1212 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-06-01 03:26:18 +00:00
sjfink
ea3caa1e8a
mostly clean up old comments.
...
also rename InferGraphRootsImpl to InferGraphRoots
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1200 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-05-30 19:05:23 +00:00
sjfink
fdb7a17af3
add @Overrides annotations and nuke unnecessary casts
...
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1197 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-05-30 15:16:05 +00:00
sjfink
b0598a95f4
more argument checking
...
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1133 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-05-15 19:35:57 +00:00
sjfink
4acf542744
validate some arguments; throw IllegalArgumentExceptions
...
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1119 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-05-15 03:15:05 +00:00