Commit Graph

128 Commits

Author SHA1 Message Date
Julian Dolby 7e6cfe84f6 more support for method handles, particularly for ones created with
reflection.
2018-08-02 19:35:32 -04:00
Ben Liblit fa62aa03e6 "<verbatim>" is not a valid HTML tag; perhaps "<pre>" was intended? 2017-12-19 16:53:55 -06:00
Ben Liblit 6beaac98bd "<bf>" is not a valid HTML tag, but "<b>" is 2017-12-19 16:53:55 -06:00
Ben Liblit f60c164ec1 Escape "<" and ">" in Javadoc when not used as HTML tag syntax 2017-12-19 16:53:52 -06:00
Ben Liblit 544a71ae72 Remove type arguments that Java 1.7+ can infer for us 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
Julian Dolby b6af5267f1 java 8 changes
minor fixes, such as making CheckForFrontEndErrors more accessible
minor hacks to make stuff compile with TeaVM
2017-08-25 10:58:00 -04:00
Ben Liblit ab791f8c41 Throw a loud exception if switch encounters unexpected enum value
Previously each of these `switch` statements would implicitly do
nothing if an unanticipated `enum` value came along.  My impression is
that each of these `switch` statements is supposed to be exhaustive,
such that an unexpected (unhandled) value should never appear.  If one
does, we should recognize it and complain loudly.

Of course, sometimes the right behavior for previously-unhandled
values is to do nothing.  It may not always be clear whether an
exception or doing nothing is the right choice.  For this commit,
WALA's regression tests still pass even with the possibility of
throwing an exception for unexpected values.  If we assume that the
test suite is thorough, that tells me that throwing an exception is
the right policy for each `switch` statement that I'm changing here.
2017-08-15 14:55:34 -07:00
Julian Dolby b9b498bd17 Merge branch 'master' of https://github.com/wala/WALA 2017-08-05 21:10:28 -04:00
Ben Liblit d6ce679a72 Add static private serialVersionUID fields to Serializable classes
We already have plenty of examples of Serializable classes with this
field, and the vast majority of those fields have generated IDs rather
than "1L".  From this I infer that using proper serialVersionUID
fields is considered appropriate WALA coding style.
2017-08-05 13:30:35 -07:00
Julian Dolby 1d144db6d5 Merge branch 'master' of https://github.com/wala/WALA 2017-08-02 12:27:22 -04: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
Julian Dolby 12e736b36f Merge branch 'master' of https://github.com/wala/WALA 2017-07-15 14:01:51 -04: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
Julian Dolby fe636f4b97 Merge branch 'master' of https://github.com/wala/WALA 2017-04-24 16:28:34 -04:00
Manu Sridharan 0c424e12b3 Fix #164 2017-04-16 18:23:56 -07:00
Julian Dolby 11585f3d34 Merge branch 'master' of https://github.com/wala/WALA 2017-03-30 21:58:56 -04:00
Ben Liblit aaf66705e1 Fix 65 Eclipse warnings about unused exception parameters
In the cases addressed here, the caught exception was being "handled"
by throwing some new exception.  Instead of discarding the old
exception, pass it to the new exception's constructor to indicate the
original cause of the newly-created exception.  This practice, called
"exception chaining", can often be useful in debugging.
2017-03-20 00:44:39 -05:00
Julian Dolby 6cdeedd5e9 changes for analysis cache view 2017-03-15 22:06:19 -04:00
Martin Hecker 867a8ecf2b When creating TypeAnnotations with LocalVarTarget, somewhat deal with class files that lack a LocalVariableTable 2016-12-05 18:52:38 +01:00
Martin Hecker de0f9c2a1f WALA: Provide acces to JSR 308 Annotations via new Class TypeAnnotation.
Access is provided via corresponding methods in FieldImpl, ShrikeCTMethod and ShrikeClass.
Since we do not currently have implementation of these methods for front-ends other than Shrike, these new methods are not yet made available in the corresponding interfaces.
2016-12-05 18:52:38 +01:00
Julian Dolby 671bd98977 Java 8 suport enhancements, mostly to model lambdas compiled to
invokedynamic
2015-08-12 15:20:21 -04:00
Julian Dolby 563b6ba6aa fixes for for ... in ... form in JavaScript 2015-07-24 22:44:10 -04:00
Julian Dolby de26484098 java annotations support for dalvik 2015-03-04 13:49:58 -05:00
Julian Dolby 774be73672 Merge https://github.com/jgf/wala-mirror 2014-09-11 10:43:13 -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
Juergen Graf c05415720e remove custom change markers for code that will be merged to main branch 2014-08-01 12:27:22 +02:00
Juergen Graf cdaaddf88b Merge branch 'wala' into master 2013-07-02 14:23:24 +02:00
Manu Sridharan b984760100 support for reading method parameter annotations from Java bytecodes 2013-06-28 11:44:47 -04:00
Andreas Sewe d0b5e8ddd2 Made TypeName.findOrCreate thread-safe 2013-05-07 14:54:14 -07:00
Juergen Graf b82d5dba90 Merge branch 'wala' into master 2012-11-06 04:23:10 +01:00
Manu Sridharan 56f3d847a5 more conversion to Unix line endings 2012-09-04 15:59:50 -07: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 4cc3a08b63 comment attempting to explain how 'dimensionality' works 2012-08-31 15:45:56 -04:00
dolby e946d1deb9 fixes for misuse of getDimensionality 2012-08-28 12:02:48 -04:00
Manu Sridharan bab4777e4c some (very) basic support for pointer / reference types 2012-08-21 16:56:18 -07:00
Manu Sridharan 800203a71f improved documentation 2012-08-21 16:55:30 -07:00
Juergen Graf 6a8e8fe018 remove no longer needed work-around for duplicate field names 2012-04-04 11:53:17 +02:00
Juergen Graf d94a3d5b64 work around multiple fields with single name 2012-03-19 14:58:41 +01:00
Juergen Graf 7477b1730b Merge branch 'wala' into master 2012-03-19 13:33:48 +01:00
msridhar1 7630cd79c9 Revamped support for reading Java annotation information from .class files.
The code should handle all cases now, and the APIs are improved.

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4422 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2012-01-11 17:11:59 +00: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
Juergen Graf 496a98c4bd add possiblility to search existing types without creating new ones 2011-07-14 21:35:46 +02:00
msridhar1 857e456806 organize imports
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4081 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-04-03 04:08:05 +00:00
sartzi 4cda34d1e4 adding java.lang.enum to the existing TypeReference
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3804 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2010-03-05 22:04:22 +00:00
sjfink ae8b0a234c tweak comments
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3770 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-12-02 15:42:15 +00:00
sjfink eb513d76cb tweak comment
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3715 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-07-02 19:18:32 +00:00
sjfink 352257ea07 tweak comments
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3677 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-06-12 15:34:50 +00:00
sjfink ecb681b1c7 tweak comments
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3655 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-06-12 14:25:12 +00:00
dolby-oss d69012dfd9 fixes for non-Java primitive types
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3648 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2009-06-12 13:16:30 +00:00