Commit Graph

34 Commits

Author SHA1 Message Date
Julian Dolby b2503628a4 1) a bit more source mappimg information
2) fixes to how Contexts are combined
2018-10-13 08:42:08 -04:00
Ben Liblit 5336a08af2 Avoid using deprecated boxing constructors
Boxing a primitive using the constructor ("new Integer(4)") always
creates a distinct new boxed instance.  That's rarely what you need,
and in fact all of those constructors have been deprecated in Java 9.
Using the static "valueOf" method instead ("Integer.valueOf(4)") can
give better performance by reusing existing instances.  You no longer
get a unique boxed object, but generally that's OK.
2018-06-05 14:44:59 -05:00
Ben Liblit 559c577093 Treat diagnostics about unchecked type operations as errors 2017-08-28 11:55:56 -07:00
Ben Liblit c1572ec3a5 Remove unnecessary warning-suppression annotations
These annotations used to suppress real Eclipse warnings.  However,
we've now turned those warnings off for the entire project.
2017-07-26 20:08:34 -07:00
Ben Liblit 455a4a2bd6 Disable or suppress various Eclipse warnings in test data
These are all things one might consider fixing in real application
data.  Java code used as test inputs, though, serves a different
purpose.  Weird code is generally acceptable or even intentional.
2017-07-26 20:08:34 -07:00
Ben Liblit 10dff7fb1c Disable Eclipse warnings about assignments to parameters
Previously we had 227 such warnings.  That large number suggests that
the WALA developers consider this to be an acceptable coding style.
If that's so, then it's better to hide these warnings rather than keep
them around as a perpetual distraction.
2017-07-18 20:43:36 -07:00
Ben Liblit d3c4200bc3 Disable Eclipse warnings about name shadowing
Previously we had 242 such warnings.  That large number suggests that
the WALA developers consider this to be an acceptable coding style.
If that's so, then it's better to hide these warnings rather than keep
them around as a perpetual distraction.
2017-07-18 20:43:36 -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 cdce02573e Suppress warning about redundant type arguments in pre-1.7 code
Apparently this code is built using Java 1.6 under Tycho.  This leads
to complaints about the Java 1.7+ "<>" generic type inference feature,
if I try to use it.  Weirdly, the Eclipse GUI does not complain about
this, so apparently the Eclipse GUI is using Java 1.7 or later.  I do
not understand why Tycho and the Eclipse GUI are mismatched in this
way.
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 d32b2a29ad Ignore Eclipse warnings about potentially-static test code
In general, test code may do all sorts of things that would be
considered poor style in production code.  I assume that these
potentially-static methods are declared non-static by design.
2017-06-26 11:16:09 -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
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 ea39ad647e Don't warn about Javadoc tags with missing descriptions
These changes turn off Eclipse warnings for Javadoc tags without
descriptions.  In some subprojects, we turn these off entirely.  In
others, leave on missing-descrption checks for "@return" tags only.

We don't turn this warning off in all projects.  Rather, we turn it
off only in projects that were producing at least one such warning.
In other words, if a project was already completely "clean" with
respect to this warning, then we leave this warning enabled for that
project.

Turning off these warnings is a partial declaration of Javadoc
bankruptcy.  In an ideal world, we would enable and fix all of these
warnings.  However, there are 576 of them.  Apparently the WALA team's
implicit coding style says that omitting descriptions is OK.  If
there's no intent to systematically add descriptions, then we may as
well turn off these warnings so that we can see other warnings that we
may want to fix.
2017-03-22 20:39:36 -05:00
Julian Dolby b34fe4d21f Merge branch 'master' of https://github.com/wala/WALA
Conflicts:
	com.ibm.wala.ide.jsdt.tests/META-INF/MANIFEST.MF
2015-06-02 23:00:32 -04:00
Julian Dolby 36709b9d1a java 7 support, with much pain for stack maps :) 2014-10-06 15:34:16 -04:00
Manu Sridharan 67dd61e005 update build prefs to allow for referencing restricted libs 2013-04-11 11:57:14 -07: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
sjfink 3a49f17ebc update code formatting for Eclipse 3.6
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4048 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2011-02-03 15:14:47 +00:00
sjfink 1d9e899d93 fix some warnings
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3103 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-12-01 22:07:00 +00:00
msridhar1 c461057ece change to 1.5 execution environment; fix some warnings
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3102 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-12-01 21:50:54 +00:00
sjfink 66884c2c37 fix Eclipse 3.4.1 compiler warnings
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3100 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-12-01 19:40:43 +00:00
sjfink 7a5498d516 tweak code format
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2948 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-07-04 01:56:56 +00:00
sjfink c45322af44 tweak code format
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2902 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-06-25 14:07:22 +00:00
sjfink b795c92b4c tweak code format
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2365 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-01-11 16:50:43 +00:00
sjfink f7c3e90fd4 tweak code formatting for enums
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2340 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-01-10 16:26:29 +00:00
sjfink 280a5c80da tweak code formatting template
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2258 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2008-01-03 16:30:34 +00:00
sjfink 248053a418 revert code compliance level to 5.0
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2210 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-12-17 18:48:15 +00:00
sjfink f2e632f368 bump up source level to 6.0
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1844 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-10-11 14:25:25 +00:00
sjfink 8a7f23f284 share errors/warnings settings
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1086 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-05-07 13:28:52 +00:00
sjfink da8e9f6dab shared code formatter settings
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1076 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-05-07 13:21:40 +00:00
sjfink 4d5d40f5c1 enable project-specific compiler settings
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1024 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
2007-04-30 13:46:51 +00:00