Commit Graph

126 Commits

Author SHA1 Message Date
Ben Liblit e316471d88 Fix nearly all Eclipse warnings about using raw types
Along the way, I also converted many "for (;;)" loops into modern
"for (:)" loops.  I didn't systematically look for all opportunities
to do this, though.  I merely made this change where I was already
converting raw Iterator uses into modern Iterator<...> uses.

Better use of generics also allowed many casts to become statically
redundant.  I have removed all such redundant casts.

Only three raw-types warnings remain after this batch of fixes.  All
three involve raw uses of CallGraphBuilder.  I've tried to fix these
too, but it quickly snowballs into a cascade of changes that may or
may not eventually reach a statically-type-save fixed point.  I may
give these last few problem areas another go in the future.  For now,
though, the hundreds of other fixes seem worth keeping even if there
are a few stragglers.

This commit may change some public APIs, but only by making weaker
type signatures stronger by replacing raw types with generic types.
For example, we may change something like "Set" into "Set<String>",
but we're not adding new arguments, changing any
underlying (post-generics-erasure) types, etc.
2017-07-12 10:39:06 -07:00
Ben Liblit 0bbe9970c6 Enable Eclipse Oxygen's new "unlikely argument types" diagnostics
There are two such diagnostics: one for collection methods and one for
equals().  See
<https://www.eclipse.org/eclipse/news/4.7/jdt.php#unlikely-argument-types>
for more information about these two new diagnostics.

For each of these diagnostics, I've set the severity level to
"warning" in projects that have some instances of the suspicious code,
or to "error" in projects that have no instances of the suspicious
code.
2017-07-08 13:22:00 -07:00
Ben Liblit 3187d09c1f Roll some diagnostics back to ignore instead of warning or error
These should mostly be things that we've already decided earlier that
we explicitly don't want to "fix" because they simply disagree with
the WALA project's coding style.
2017-06-26 11:16:09 -07:00
Ben Liblit fb9042d3a6 Activate more Eclipse diagnostics, and treat many warnings as errors
The additional diagnostics are ones that were previously being
ignored, but which we seem to have been ignoring by default rather
than as a conscious choice.

For diagnostics of which we currently have *zero* instances, treat
these as errors rather than merely warnings.  The intent is to
permanently lock out future regressions of things we've completely
fixed.  In the future, whenever we fix the last instance of a given
warning in a given Eclipse project, we should also promote that
diagnostic to an error to keep things clean into the future.
2017-06-26 11:16:09 -07:00
Ben Liblit 9c81cae9be Externalize bundle names and vendors
This fixes 33 Eclipse "The value for attribute '...' is not
externalized.  The value must begin with %" warnings in the "Plug-in
Development" category.
2017-06-07 17:42:11 +02: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
Ben Liblit e753aba3cc Fix warnings about unset javacProjectSettings build entries (#176)
Specifically, these are all warnings of the form "The
'javacProjectSettings' build entry should be set when there are project
specific compiler settings".
2017-05-04 11:44:32 -07:00
Manu Sridharan c9022b0743 update version to 1.4.3-SNAPSHOT 2017-04-19 09:19:09 -07:00
Manu Sridharan 44e433085e tag 1.4.2 release 2017-04-19 09:17:13 -07:00
Manu Sridharan d7878b2bbd Merge pull request #163 from liblit/warning-fixes-plug-in-development
Disable Eclipse warnings about missing version constraints
2017-04-06 16:19:59 -07:00
Ben Liblit d35e8d0fa2 Disable Eclipse warnings about missing version constraints
Specifically, we're turning off Eclipse warnings about missing version
constraints on required bundles ("Require-Bundle"), exported
packages ("Export-Package"), and imported packages ("Import-Package").
We're not turning these off absolutely everywhere, though: only in
packages where one or more such warnings were actually being reported.
So if a given package was already providing all version constraints
for, say, package imports, then we've kept that warning on in that
package.

Honestly I don't entirely understand the practical implications of
these warnings.  However, there were 355 of them across many WALA
subprojects.  I take this as evidence that the WALA developers do not
consider these version constraints to be important.  Therefore, we may
as well stop warning about something we have no intention of fixing.

That being said, if we *do* want to fix some or all of these, I
welcome any advice on what those fixes should look like.  I am rather
ignorant about all things OSGi.
2017-03-28 20:37:41 -05:00
Ben Liblit c522344f67 Suppress 14 Eclipse warnings about discouraged access to restricted APIs
Based on what this code seems to be doing, there's really no
officially-sanctioned alternative to the APIs we're using here.
2017-03-28 17:25:53 -05:00
Ben Liblit 65be11f222 Merge branch 'master' into warning-fixes-unnecessary-code-controversial 2017-03-25 22:12:03 -05:00
Manu Sridharan ab7e638c29 version 1.4.2-SNAPSHOT 2017-03-25 13:54:21 -07:00
Manu Sridharan 2d0518963d Tag release 1.4.1 2017-03-25 13:24:39 -07:00
Manu Sridharan b82e808b32 Merge pull request #156 from liblit/warning-fixes-unnecessary-code-uncontroversial
Fix 265 Eclipse warnings about unnecessary code
2017-03-23 17:48:10 -07:00
Ben Liblit 1bb3d827c4 Turn off Eclipse warnings about unused caught-exception parameters
Manu requested that we use this approach instead of adding
`@SuppressWarnings("unused")` at each affected catch block.  That
seems reasonable to me, given the large number of such warnings and
the lack of likely harm from ignoring such caught exceptions.
2017-03-23 16:39:58 -05: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
Manu Sridharan 9b692e714f switch version to 1.4.1-SNAPSHOT 2017-03-21 09:38:36 -07:00
Manu Sridharan bfe378e7f2 1.4.0 release 2017-03-21 08:59:08 -07:00
Ben Liblit e04816ec7a Fix 2 Eclipse warnings about unused generic type parameters
Note: this changes some public APIs.
2017-03-20 00:44:42 -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
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
Ben Liblit 18b79bf0f9 Merge branch 'master' into warning-fixes-xml-validation 2016-11-29 10:08:00 -06:00
Ben Liblit 3b1547f0a7 Exclude Maven-generated (?) files from XML validation
I think the "target/p2artifacts.xml" and "target/p2content.xml" files
are generated by Maven.  They are well-formed XML but Eclipse's XML
validator legitimately warns that they lack grammar constraints.
Since we're not maintaining the tool that creates these files, we are
not in a position to do anything about that.  Therefore, we may as
well exclude these from validation entirely.  That way we can
more-clearly recognize warnings that we *can* do something about.
2016-11-28 14:55:25 -06:00
Ben Liblit 2a5503b9aa Exclude Maven-generated HTML pages from validation
Eclipse validation warns about invalid HTML content in all
Maven-generated "target/site/dependency-convergence.html" files.  The
warnings are legitimate: these HTML files are indeed invalid.
However, we don't maintain the tool that generates these files, so we
are not in a position to fix them.  Better, therefore, to suppress
these warnings so that we can notice and fix other problems over which
we do have control.
2016-11-27 21:24:03 -06:00
Ben Liblit dace7b709f Ignore missing non-null-by-default annotations in Eclipse
In general, the WALA code base is not really ready for nullness
checking.  It would be nice if we got there some day, but I'm not
planning to take that on now or any time soon.  Until then, it's not
useful to warn about missing @NonNullByDefault declarations on WALA
packages.

See also older commit 7b6811b.
2016-11-26 18:47:35 -06:00
Julian Dolby 0f0c3d6bd9 add more functionality to analysis engine: create SDGs and
parameterize to do both regular and field-based analysis in JavaScript
2016-08-18 22:43:12 -04:00
Manu Sridharan cd560b3b2b switch version to 1.3.10-SNAPSHOT 2016-05-10 22:53:28 +09:00
Manu Sridharan 158a5deeb0 Version 1.3.9 2016-05-10 21:59:26 +09:00
Julian Dolby ab22d9abb0 enable specialization of source extractor for Web pages 2015-11-30 21:28:40 -05:00
Manu Sridharan e46bb81081 Update version to 1.3.9-SNAPSHOT 2015-10-09 12:55:49 -07:00
Manu Sridharan ed5093d6db Properly update version to 1.3.8
Other changes were accidentally committed last time.
2015-10-09 11:06:03 -07:00
Manu Sridharan 077cabc4eb Revert "update version to 1.3.8"
This reverts commit 4aac703ee5.
2015-10-09 11:03:46 -07:00
Manu Sridharan 4aac703ee5 update version to 1.3.8 2015-10-09 10:45:57 -07:00
Manu Sridharan 87d22be3fb Attempt to fix JSDT tests 2015-07-30 16:37:02 -07:00
Manu Sridharan b7ab80734f remove Eclipse dependendence from cast.js 2015-07-30 15:03:45 -07:00
Manu Sridharan 052023581d update version to 1.3.8-SNAPSHOT 2015-05-31 13:53:07 -07:00
Manu Sridharan f2f65bfbc5 oops, version should be 1.3.7 2015-05-29 13:20:25 -07:00
Manu Sridharan 894f010ff9 version 1.3.8 2015-05-29 12:20:53 -07:00
Manu Sridharan 7ad8700064 update version numbers to 1.3.7-SNAPSHOT everywhere 2015-05-28 10:37:01 -07:00
Julian Dolby 43c37d6d0e fixes to regression tests:
now, for me, code works using e44 with maven
  dalvik tests refactored for mobile version with android dev tools
  IDE tests Eclipse metadata fixed to make e44 work for me
  new android entrypoint to fix failure in new droidbench tests
2015-03-24 21:51:35 -04:00
Julian Dolby 8f0f64f5fa add missing file 2014-10-19 23:14:36 -04:00
Julian Dolby 1bb7610011 work toward pointer analysis based on the flowgraph from field-based
call graph builder
2014-10-19 22:44:03 -04:00
Julian Dolby a1bc84356d scandriod merge 2014-10-01 21:32:36 -04:00
Juergen Graf 6f8aee80c6 Merge branch 'wala' into master 2014-07-28 17:09:02 +02:00
Julian Dolby ae595088a3 adapt to field-based api changes 2014-05-28 13:30:34 -04: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 99512c5cd0 uuse PrinterWriter; make DOM model optional 2014-04-11 10:00:05 -04:00
Julian Dolby dd6748e159 pointer analysis simulation for field-based CGs 2014-02-08 21:40:32 -05:00
Julian Dolby c7d0c452e9 more detail in assertion 2014-01-03 10:07:52 -05:00
Julian Dolby f408697759 try adding more dependencies. it all works on maven on my mac, but
somehow the travis ci install is having trouble finding eclipse
components.
2013-12-02 10:57:39 -05:00
Julian Dolby 6886791fc0 try to make maven on travis cl find the needed Eclipse projects 2013-12-02 10:26:19 -05:00
Julian Dolby 7e3c7f8512 make tests of integration with JSDT and JDT work on Maven 2013-12-02 09:35:47 -05: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
Julian Dolby 56236dec53 further work on analysis for JavaScript in Eclipse 2013-10-16 17:37:53 -04:00
Julian Dolby 24aeda3ef8 more flexible eclipse project paths and engines for javascript to
support adding different model JS files as prologues.
2013-08-07 15:19:27 -04:00
Julian Dolby 824cd3db24 utility to use Eclipse to find JS prologue files for analysis 2013-08-07 15:15:20 -04:00
Julian Dolby d528c16b0f refactoring to integrate field-based cg builders with Eclipse-based
JavaScript front end
2013-08-05 14:35:41 -04:00
Julian Dolby beab92e359 Fixed bugs in the front end handling esoteric cases of weird control
flow.

added support for JavaScript projects read from Eclipse that are based
on HTML files as well as JavaScript files
2013-07-30 14:04:08 -04:00
Julian Dolby de6b644e8c work on eclipse javascript project analysis 2013-07-24 11:18:54 -04:00
Julian Dolby 080325b5f6 merge 2013-06-25 11:57:37 -04:00
Manu Sridharan 3b1889121b add missing copyright headers 2013-05-22 15:39:19 -07:00
Marcel Bruch 87c164e402 added js projects to tycho build 2013-04-29 13:13:23 +02:00
Cosmin Radoi c0a8d621e2 small fix to manifest 2013-04-29 13:13:23 +02:00
Marcel Bruch 7c2d18cd58 [releng] added preliminary maven tycho build support 2013-04-29 13:13:22 +02:00
Manu Sridharan 00eb1d2bd2 Set all projects to build against Java 6; no semantic change. Fixes #20 2013-04-10 16:01:27 -07:00
dolby fae5c86114 fixes for users of JDT interfaces, such as Miniatur/MemSAT 2012-10-01 13:11:10 -04:00
Manu Sridharan fcab11e5b8 Remove dependence from com.ibm.wala.ide to com.ibm.wala.cast.
Removing this dependence allows our Getting Started instructions to still work.
It requires some minor code duplication, but otherwise we'd have to change a
bunch of documentation.
2012-09-04 10:38:40 -07:00
dolby 319eacc529 merge changes and changes for atomic sets work 2012-08-29 16:35:34 -04:00
Manu Sridharan 9f732622f0 don't require Eclipse 3.8 in version dependencies 2012-08-28 10:02:48 -07:00
dolby 0518b5242b more JS stuff 2012-08-22 12:15:46 -04:00
dolby 53cad9e7ba more separation for JS eclipse stuff 2012-08-21 16:06:01 -04:00
dolby a54707f22e separate JSDT stuff 2012-08-21 15:53:16 -04:00