Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(720)

Side by Side Diff: doc/manual.xml

Issue 1232833004: Update findbugs from 3.0.0 to 3.0.1. (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/findbugs.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?> 1 <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
2 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" 2 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "file:../etc/docbook/docbookx.dtd" [ 3 "../../etc/docbook/docbookx.dtd" [
4 <!ENTITY FindBugs "<application>FindBugs</application>"> 4 <!ENTITY FindBugs "<application>FindBugs</application>">
5 <!ENTITY Ant "<application>Ant</application>"> 5 <!ENTITY Ant "<application>Ant</application>">
6 <!ENTITY Saxon "<application>Saxon</application>"> 6 <!ENTITY Saxon "<application>Saxon</application>">
7 <!ENTITY FBHome "<replaceable>$FINDBUGS_HOME</replaceable>"> 7 <!ENTITY FBHome "<replaceable>$FINDBUGS_HOME</replaceable>">
8 <!ENTITY FBHomeWin "<replaceable>&#x25;FINDBUGS_HOME&#x25;</replaceable>"> 8 <!ENTITY FBHomeWin "<replaceable>&#x25;FINDBUGS_HOME&#x25;</replaceable>">
9 <!ENTITY nbsp "&#160;"> 9 <!ENTITY nbsp "&#160;">
10 ]> 10 ]>
11 11
12 <book lang="en" id="findbugs-manual"> 12 <book lang="en" id="findbugs-manual">
13 13
(...skipping 23 matching lines...) Expand all
37 This manual is licensed under the Creative Commons Attribution-NonCommercial-Sha reAlike License. 37 This manual is licensed under the Creative Commons Attribution-NonCommercial-Sha reAlike License.
38 To view a copy of this license, visit 38 To view a copy of this license, visit
39 <ulink url="http://creativecommons.org/licenses/by-nc-sa/1.0/">http://creativeco mmons.org/licenses/by-nc-sa/1.0/</ulink> 39 <ulink url="http://creativecommons.org/licenses/by-nc-sa/1.0/">http://creativeco mmons.org/licenses/by-nc-sa/1.0/</ulink>
40 or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, Californi a 94305, USA. 40 or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, Californi a 94305, USA.
41 </para> 41 </para>
42 <para> 42 <para>
43 The name FindBugs and the FindBugs logo are trademarked by the University of Mar yland. 43 The name FindBugs and the FindBugs logo are trademarked by the University of Mar yland.
44 </para> 44 </para>
45 </legalnotice> 45 </legalnotice>
46 46
47 <edition>2.0.3</edition> 47 <edition>3.0.1</edition>
48 48
49 <pubdate>17:16:15 EST, 22 November, 2013</pubdate> 49 <pubdate>12:37:51 EST, 06 March, 2015</pubdate>
50 50
51 </bookinfo> 51 </bookinfo>
52 52
53 <!-- 53 <!--
54 ************************************************************************** 54 **************************************************************************
55 Introduction 55 Introduction
56 ************************************************************************** 56 **************************************************************************
57 --> 57 -->
58 58
59 <chapter id="introduction"> 59 <chapter id="introduction">
60 <title>Introduction</title> 60 <title>Introduction</title>
61 61
62 <para> &FindBugs;&trade; is a program to find bugs in Java programs. It looks f or instances 62 <para> &FindBugs;&trade; is a program to find bugs in Java programs. It looks f or instances
63 of "bug patterns" --- code instances that are likely to be errors.</para> 63 of "bug patterns" --- code instances that are likely to be errors.</para>
64 64
65 <para> This document describes version 2.0.3 of &FindBugs;.We 65 <para> This document describes version 3.0.1 of &FindBugs;.We
66 are very interested in getting your feedback on &FindBugs;. Please visit 66 are very interested in getting your feedback on &FindBugs;. Please visit
67 the <ulink url="http://findbugs.sourceforge.net">&FindBugs; web page</ulink> for 67 the <ulink url="http://findbugs.sourceforge.net">&FindBugs; web page</ulink> for
68 the latest information on &FindBugs;, contact information, and support resources such 68 the latest information on &FindBugs;, contact information, and support resources such
69 as information about the &FindBugs; mailing lists.</para> 69 as information about the &FindBugs; mailing lists.</para>
70 70
71 <sect1> 71 <sect1>
72 <title>Requirements</title> 72 <title>Requirements</title>
73 <para> To use &FindBugs;, you need a runtime environment compatible with 73 <para> To use &FindBugs;, you need a runtime environment compatible with
74 <ulink url="http://java.sun.com/j2se">Java 2 Standard Edition</ulink>, version 1 .5 or later. 74 <ulink url="http://java.sun.com/j2se">Java 2 Standard Edition</ulink>, version 1 .5 or later.
75 &FindBugs; is platform independent, and is known to run on GNU/Linux, Windows, a nd 75 &FindBugs; is platform independent, and is known to run on GNU/Linux, Windows, a nd
(...skipping 17 matching lines...) Expand all
93 <para> 93 <para>
94 This chapter explains how to install &FindBugs;. 94 This chapter explains how to install &FindBugs;.
95 </para> 95 </para>
96 96
97 <sect1> 97 <sect1>
98 <title>Extracting the Distribution</title> 98 <title>Extracting the Distribution</title>
99 99
100 <para> 100 <para>
101 The easiest way to install &FindBugs; is to download a binary distribution. 101 The easiest way to install &FindBugs; is to download a binary distribution.
102 Binary distributions are available in 102 Binary distributions are available in
103 <ulink url="http://prdownloads.sourceforge.net/findbugs/findbugs-2.0.3.tar.gz?do wnload">gzipped tar format</ulink> and 103 <ulink url="http://prdownloads.sourceforge.net/findbugs/findbugs-3.0.1.tar.gz?do wnload">gzipped tar format</ulink> and
104 <ulink url="http://prdownloads.sourceforge.net/findbugs/findbugs-2.0.3.zip?downl oad">zip format</ulink>. 104 <ulink url="http://prdownloads.sourceforge.net/findbugs/findbugs-3.0.1.zip?downl oad">zip format</ulink>.
105 Once you have downloaded a binary distribution, extract it into a directory of y our choice. 105 Once you have downloaded a binary distribution, extract it into a directory of y our choice.
106 </para> 106 </para>
107 107
108 <para> 108 <para>
109 Extracting a gzipped tar format distribution: 109 Extracting a gzipped tar format distribution:
110 <screen> 110 <screen>
111 <prompt>$ </prompt><command>gunzip -c findbugs-2.0.3.tar.gz | tar xvf -</command > 111 <prompt>$ </prompt><command>gunzip -c findbugs-3.0.1.tar.gz | tar xvf -</command >
112 </screen> 112 </screen>
113 </para> 113 </para>
114 114
115 <para> 115 <para>
116 Extracting a zip format distribution: 116 Extracting a zip format distribution:
117 <screen> 117 <screen>
118 <prompt>C:\Software></prompt><command>unzip findbugs-2.0.3.zip</command> 118 <prompt>C:\Software></prompt><command>unzip findbugs-3.0.1.zip</command>
119 </screen> 119 </screen>
120 </para> 120 </para>
121 121
122 <para> 122 <para>
123 Usually, extracting a binary distribution will create a directory ending in 123 Usually, extracting a binary distribution will create a directory ending in
124 <filename class="directory">findbugs-2.0.3</filename>. For example, if you extra cted 124 <filename class="directory">findbugs-3.0.1</filename>. For example, if you extra cted
125 the binary distribution from the <filename class="directory">C:\Software</filena me> 125 the binary distribution from the <filename class="directory">C:\Software</filena me>
126 directory, then the &FindBugs; software will be extracted into the directory 126 directory, then the &FindBugs; software will be extracted into the directory
127 <filename class="directory">C:\Software\findbugs-2.0.3</filename>. 127 <filename class="directory">C:\Software\findbugs-3.0.1</filename>.
128 This directory is the &FindBugs; home directory. We'll refer to it as 128 This directory is the &FindBugs; home directory. We'll refer to it as
129 &FBHome; (or &FBHomeWin; for Windows) throughout this manual. 129 &FBHome; (or &FBHomeWin; for Windows) throughout this manual.
130 </para> 130 </para>
131 </sect1> 131 </sect1>
132 132
133 </chapter> 133 </chapter>
134 134
135 <!-- 135 <!--
136 ************************************************************************** 136 **************************************************************************
137 Compiling FindBugs from Source 137 Compiling FindBugs from Source
(...skipping 10 matching lines...) Expand all
148 </para> 148 </para>
149 149
150 <sect1> 150 <sect1>
151 <title>Prerequisites</title> 151 <title>Prerequisites</title>
152 152
153 <para> 153 <para>
154 To compile &FindBugs; from source, you will need the following: 154 To compile &FindBugs; from source, you will need the following:
155 <itemizedlist> 155 <itemizedlist>
156 <listitem> 156 <listitem>
157 <para> 157 <para>
158 The <ulink url="http://prdownloads.sourceforge.net/findbugs/findbugs-2.0.3 -source.zip?download" 158 The <ulink url="http://prdownloads.sourceforge.net/findbugs/findbugs-3.0.1 -source.zip?download"
159 >&FindBugs; source distribution</ulink> 159 >&FindBugs; source distribution</ulink>
160 </para> 160 </para>
161 </listitem> 161 </listitem>
162 <listitem> 162 <listitem>
163 <para> 163 <para>
164 <ulink url="http://java.sun.com/j2se/">JDK 1.5.0 or later</ulink> 164 <ulink url="http://java.sun.com/j2se/">JDK 1.5.0 or later</ulink>
165 </para> 165 </para>
166 </listitem> 166 </listitem>
167 <listitem> 167 <listitem>
168 <para> 168 <para>
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 211
212 </sect1> 212 </sect1>
213 213
214 <sect1> 214 <sect1>
215 <title>Extracting the Source Distribution</title> 215 <title>Extracting the Source Distribution</title>
216 <para> 216 <para>
217 After you download the source distribution, you'll need to extract it into 217 After you download the source distribution, you'll need to extract it into
218 a working directory. A typical command to do this is: 218 a working directory. A typical command to do this is:
219 219
220 <screen> 220 <screen>
221 <prompt>$ </prompt><command>unzip findbugs-2.0.3-source.zip</command> 221 <prompt>$ </prompt><command>unzip findbugs-3.0.1-source.zip</command>
222 </screen> 222 </screen>
223 223
224 </para> 224 </para>
225 </sect1> 225 </sect1>
226 226
227 <sect1> 227 <sect1>
228 <title>Modifying <filename>local.properties</filename></title> 228 <title>Modifying <filename>local.properties</filename></title>
229 <para> 229 <para>
230 If you intend to build the FindBugs documentation, 230 If you intend to build the FindBugs documentation,
231 you will need to modify the <filename>local.properties</filename> file 231 you will need to modify the <filename>local.properties</filename> file
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 <listitem> 932 <listitem>
933 <para> 933 <para>
934 Set the auxiliary classpath for analysis. This classpath should include all 934 Set the auxiliary classpath for analysis. This classpath should include all
935 jar files and directories containing classes that are part of the program 935 jar files and directories containing classes that are part of the program
936 being analyzed but you do not want to have analyzed for bugs. 936 being analyzed but you do not want to have analyzed for bugs.
937 </para> 937 </para>
938 </listitem> 938 </listitem>
939 </varlistentry> 939 </varlistentry>
940 940
941 <varlistentry> 941 <varlistentry>
942 <term><command>-auxclasspathFromInput</command> </term>
943 <listitem>
944 <para>
945 Read the auxiliary classpath for analysis from standard input, each line add s new
946 entry to the auxiliary classpath for analysis.
947 </para>
948 </listitem>
949 </varlistentry>
950
951 <varlistentry>
952 <term><command>-auxclasspathFromFile</command> <replaceable>filepath</replacea ble></term>
953 <listitem>
954 <para>
955 Read the auxiliary classpath for analysis from file, each line adds new
956 entry to the auxiliary classpath for analysis.
957 </para>
958 </listitem>
959 </varlistentry>
960
961 <varlistentry>
962 <term><command>-analyzeFromFile</command> <replaceable>filepath</replaceable>< /term>
963 <listitem>
964 <para>
965 Read the files to analyze from file, each line adds new
966 entry to the classpath for analysis.
967 </para>
968 </listitem>
969 </varlistentry>
970
971 <varlistentry>
942 <term><command>-userPrefs</command> <replaceable>edu.umd.cs.findbugs.core.pref s</replaceable></term> 972 <term><command>-userPrefs</command> <replaceable>edu.umd.cs.findbugs.core.pref s</replaceable></term>
943 <listitem> 973 <listitem>
944 <para> 974 <para>
945 Set the path of the user preferences file to use, which might override some of the options abobe. 975 Set the path of the user preferences file to use, which might override some of the options abobe.
946 Specifying <literal>userPrefs</literal> as first argument would mean some la ter 976 Specifying <literal>userPrefs</literal> as first argument would mean some la ter
947 options will override them, as last argument would mean they will override s ome previous options). 977 options will override them, as last argument would mean they will override s ome previous options).
948 This rationale behind this option is to reuse FindBugs Eclipse project setti ngs for command 978 This rationale behind this option is to reuse FindBugs Eclipse project setti ngs for command
949 line execution. 979 line execution.
950 </para> 980 </para>
951 </listitem> 981 </listitem>
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
1409 without any package qualification. By default, all detectors which are 1439 without any package qualification. By default, all detectors which are
1410 not disabled by default are run. 1440 not disabled by default are run.
1411 </para> 1441 </para>
1412 </listitem> 1442 </listitem>
1413 </varlistentry> 1443 </varlistentry>
1414 1444
1415 <varlistentry> 1445 <varlistentry>
1416 <term><literal>omitVisitors</literal></term> 1446 <term><literal>omitVisitors</literal></term>
1417 <listitem> 1447 <listitem>
1418 <para> 1448 <para>
1419 Optional attribute. It is like the <literal>visitors</literal> attribute , 1449 Optional attribute. It specifies a comma-separated list of bug detectors.
1450 It is like the <literal>visitors</literal> attribute,
1420 except it specifies detectors which will <emphasis>not</emphasis> be run. 1451 except it specifies detectors which will <emphasis>not</emphasis> be run.
1421 </para> 1452 </para>
1422 </listitem> 1453 </listitem>
1423 </varlistentry> 1454 </varlistentry>
1424 1455
1425 <varlistentry> 1456 <varlistentry>
1457 <term><literal>chooseVisitors</literal></term>
1458 <listitem>
1459 <para>
1460 Optional attribute. It specifies a comma-separated list of bug detectors
1461 prefixed with "+" or "-" to selectively enable/disable them.
1462 </para>
1463 </listitem>
1464 </varlistentry>
1465
1466 <varlistentry>
1426 <term><literal>excludeFilter</literal></term> 1467 <term><literal>excludeFilter</literal></term>
1427 <listitem> 1468 <listitem>
1428 <para> 1469 <para>
1429 Optional attribute. It specifies the filename of a filter specifying bug s 1470 Optional attribute. It specifies the filename of a filter specifying bug s
1430 to exclude from being reported. See <xref linkend="filter" />. 1471 to exclude from being reported. See <xref linkend="filter" />.
1431 </para> 1472 </para>
1432 </listitem> 1473 </listitem>
1433 </varlistentry> 1474 </varlistentry>
1434 1475
1435 <varlistentry> 1476 <varlistentry>
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
1532 <para> 1573 <para>
1533 Optional attribute. Set the path of the user preferences file to u se, which might override some of the options abobe. 1574 Optional attribute. Set the path of the user preferences file to u se, which might override some of the options abobe.
1534 Specifying <literal>userPreferencesFile</literal> as first argumen t would mean some later 1575 Specifying <literal>userPreferencesFile</literal> as first argumen t would mean some later
1535 options will override them, as last argument would mean they will override some previous options). 1576 options will override them, as last argument would mean they will override some previous options).
1536 This rationale behind this option is to reuse FindBugs Eclipse pro ject settings for command 1577 This rationale behind this option is to reuse FindBugs Eclipse pro ject settings for command
1537 line execution. 1578 line execution.
1538 </para> 1579 </para>
1539 </listitem> 1580 </listitem>
1540 </varlistentry> 1581 </varlistentry>
1541 1582
1583 <varlistentry>
1584 <term><literal>nested</literal></term>
1585 <listitem>
1586 <para>
1587 Optional attribute which enables or disables scanning of nested ja r and zip files found in
1588 the list of files and directories to be analyzed.
1589 By default, scanning of nested jar/zip files is enabled.
1590 </para>
1591 </listitem>
1592 </varlistentry>
1593
1594 <varlistentry>
1595 <term><literal>setExitCode</literal></term>
1596 <listitem>
1597 <para>
1598 Optional boolean attribute. Whether the exit code will be returned to
1599 the main ant job. Defaults to "true".
1600 </para>
1601 </listitem>
1602 </varlistentry>
1603
1542 </variablelist> 1604 </variablelist>
1543 1605
1544 1606
1545 </para> 1607 </para>
1546 1608
1547 <!-- 1609 <!--
1548 1610
1549 --> 1611 -->
1550 1612
1551 </sect1> 1613 </sect1>
1552 1614
1553 </chapter> 1615 </chapter>
1554 1616
1555 <!-- 1617 <!--
1556 ************************************************************************** 1618 **************************************************************************
1557 Using the FindBugs Eclipse plugin 1619 Using the FindBugs Eclipse plugin
1558 ************************************************************************** 1620 **************************************************************************
1559 --> 1621 -->
1560 1622
1561 <chapter id="eclipse"> 1623 <chapter id="eclipse">
1562 <title>Using the &FindBugs;&trade; Eclipse plugin</title> 1624 <title>Using the &FindBugs;&trade; Eclipse plugin</title>
1563 1625
1564 <para> 1626 <para>
1565 The FindBugs Eclipse plugin allows &FindBugs; to be used within 1627 The FindBugs Eclipse plugin allows &FindBugs; to be used within
1566 the <ulink url="http://www.eclipse.org/">Eclipse</ulink> IDE. 1628 the <ulink url="http://www.eclipse.org/">Eclipse</ulink> IDE.
1567 The FindBugs Eclipse plugin was generously contributed by Peter Friese. 1629 The FindBugs Eclipse plugin was generously contributed by Peter Friese.
1568 Phil Crosby and Andrei Loskutov contributed major improvements 1630 Phil Crosby and Andrey Loskutov contributed major improvements
1569 to the plugin. 1631 to the plugin.
1570 </para> 1632 </para>
1571 1633
1572 <sect1> 1634 <sect1>
1573 <title>Requirements</title> 1635 <title>Requirements</title>
1574 1636
1575 <para> 1637 <para>
1576 To use the &FindBugs; Plugin for Eclipse, you need Eclipse 3.3 or later, 1638 To use the &FindBugs; Plugin for Eclipse, you need Eclipse 3.3 or later,
1577 and JRE/JDK 1.5 or later. 1639 and JRE/JDK 1.5 or later.
1578 </para> 1640 </para>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1610 <listitem> 1672 <listitem>
1611 <para> 1673 <para>
1612 Provides the daily build of FindBugs. No testing other than that it com piles. 1674 Provides the daily build of FindBugs. No testing other than that it com piles.
1613 </para> 1675 </para>
1614 </listitem> 1676 </listitem>
1615 </varlistentry> 1677 </varlistentry>
1616 </variablelist> 1678 </variablelist>
1617 1679
1618 <para>You can also manually 1680 <para>You can also manually
1619 download the plugin from the following link: 1681 download the plugin from the following link:
1620 <ulink url="http://prdownloads.sourceforge.net/findbugs/edu.umd.cs.findbugs.plug in.eclipse_2.0.3.20131122.zip?download" 1682 <ulink url="http://prdownloads.sourceforge.net/findbugs/edu.umd.cs.findbugs.plug in.eclipse_3.0.1.20150306.zip?download"
1621 >http://prdownloads.sourceforge.net/findbugs/edu.umd.cs.findbugs.plugin.eclipse_ 2.0.3.20131122.zip?download</ulink>. 1683 >http://prdownloads.sourceforge.net/findbugs/edu.umd.cs.findbugs.plugin.eclipse_ 3.0.1.20150306.zip?download</ulink>.
1622 Extract it in Eclipse's "plugins" subdirectory. 1684 Extract it in Eclipse's "plugins" subdirectory.
1623 (So &lt;eclipse_install_dir&gt;/plugins/edu.umd.cs.findbugs.plugin.eclipse_2.0.3 .20131122/findbugs.png 1685 (So &lt;eclipse_install_dir&gt;/plugins/edu.umd.cs.findbugs.plugin.eclipse_3.0.1 .20150306/findbugs.png
1624 should be the path to the &FindBugs; logo.) 1686 should be the path to the &FindBugs; logo.)
1625 1687
1626 </para> 1688 </para>
1627 1689
1628 <para> 1690 <para>
1629 Once the plugin is extracted, start Eclipse and choose 1691 Once the plugin is extracted, start Eclipse and choose
1630 <menuchoice> 1692 <menuchoice>
1631 <guimenu>Help</guimenu> 1693 <guimenu>Help</guimenu>
1632 <guimenuitem>About Eclipse Platform</guimenuitem> 1694 <guimenuitem>About Eclipse Platform</guimenuitem>
1633 <guimenuitem>Plug-in Details</guimenuitem> 1695 <guimenuitem>Plug-in Details</guimenuitem>
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1687 </para> 1749 </para>
1688 </listitem> 1750 </listitem>
1689 </itemizedlist> 1751 </itemizedlist>
1690 1752
1691 </sect1> 1753 </sect1>
1692 1754
1693 <sect1> 1755 <sect1>
1694 <title>Extending the Eclipse Plugin (since 2.0.0)</title> 1756 <title>Extending the Eclipse Plugin (since 2.0.0)</title>
1695 <para> 1757 <para>
1696 Eclipse plugin supports contribution of custom &FindBugs; detectors (see also 1758 Eclipse plugin supports contribution of custom &FindBugs; detectors (see also
1697 <ulink url="http://code.google.com/p/findbugs/source/browse/trunk/findbugs/src/d oc/AddingDetectors.txt">AddingDetectors.txt</ulink> 1759 <ulink url="http://code.google.com/p/findbugs/source/browse/findbugs/src/doc/Add ingDetectors.txt">AddingDetectors.txt</ulink>
1698 for more information). There are two ways to contribute custom plugins to the Ec lipse: 1760 for more information). There are two ways to contribute custom plugins to the Ec lipse:
1699 </para> 1761 </para>
1700 <itemizedlist> 1762 <itemizedlist>
1701 <listitem> 1763 <listitem>
1702 <para> 1764 <para>
1703 Existing standard &FindBugs; detector packages can be configured via 1765 Existing standard &FindBugs; detector packages can be configured via
1704 <menuchoice> 1766 <menuchoice>
1705 <guimenu>Window</guimenu> 1767 <guimenu>Window</guimenu>
1706 <guimenuitem>Preferences</guimenuitem> 1768 <guimenuitem>Preferences</guimenuitem>
1707 <guimenuitem>Java</guimenuitem> 1769 <guimenuitem>Java</guimenuitem>
1708 <guimenuitem>&FindBugs;</guimenuitem> 1770 <guimenuitem>FindBugs</guimenuitem>
1709 <guimenuitem>Misc. Settings</guimenuitem> 1771 <guimenuitem>Misc. Settings</guimenuitem>
1710 <guimenuitem>Custom Detectors</guimenuitem> 1772 <guimenuitem>Custom Detectors</guimenuitem>
1711 </menuchoice>. 1773 </menuchoice>.
1712 Simply specify there locations of any additional plugin libraries. 1774 Simply specify there locations of any additional plugin libraries.
1713 </para> 1775 </para>
1714 1776
1715 <para> 1777 <para>
1716 The benefit of this solution is that already existing detector packages can be 1778 The benefit of this solution is that already existing detector packages can be
1717 used "as is", and that you can quickly verify the quality of third party det ectors. 1779 used "as is", and that you can quickly verify the quality of third party det ectors.
1718 The drawback is that you have to apply this settings in each 1780 The drawback is that you have to apply this settings in each
1719 new Eclipse workspace, and this settings can't be shared between team member s. 1781 new Eclipse workspace, and this settings can't be shared between team member s.
1720 </para> 1782 </para>
1721 </listitem> 1783 </listitem>
1722 1784
1723 <listitem> 1785 <listitem>
1724 <para> 1786 <para>
1725 It is possible to contribute custom detectors via standard Eclipse extension s mechanism. 1787 It is possible to contribute custom detectors via standard Eclipse extension s mechanism.
1726 </para> 1788 </para>
1727 1789
1728 <para> 1790 <para>
1729 Please check the documentation of the 1791 Please check the documentation of the
1730 <ulink url="http://code.google.com/p/findbugs/source/browse/trunk/eclipsePlu gin/schema/detectorPlugins.exsd"> 1792 <ulink url="http://code.google.com/p/findbugs/source/browse/eclipsePlugin/sc hema/detectorPlugins.exsd">
1731 findBugsEclipsePlugin/schema/detectorPlugins.exsd</ulink> 1793 findBugsEclipsePlugin/schema/detectorPlugins.exsd</ulink>
1732 extension point how to update the plugin.xml. Existing &FindBugs; detector p lugins can 1794 extension point how to update the plugin.xml. Existing &FindBugs; detector p lugins can
1733 be easily "extended" to be full featured &FindBugs; AND Eclipse detector plu gins. 1795 be easily "extended" to be full featured &FindBugs; AND Eclipse detector plu gins.
1734 Usually you only need to add META-INF/MANIFEST.MF and plugin.xml to the jar and 1796 Usually you only need to add META-INF/MANIFEST.MF and plugin.xml to the jar and
1735 update your build scripts to not to override the MANIFEST.MF during the buil d. 1797 update your build scripts to not to override the MANIFEST.MF during the buil d.
1736 </para> 1798 </para>
1737 1799
1738 <para> 1800 <para>
1739 The benefit of this solution is that for given (shared) Eclipse installation 1801 The benefit of this solution is that for given (shared) Eclipse installation
1740 each team member has exactly same detectors set, and there is no need to con figure 1802 each team member has exactly same detectors set, and there is no need to con figure
1741 anything anymore. The (really small) precondition 1803 anything anymore. The (really small) precondition
1742 is that you have to convert your existing detectors package to the valid 1804 is that you have to convert your existing detectors package to the valid
1743 Eclipse plugin. You can do this even for third-party detector packages. 1805 Eclipse plugin. You can do this even for third-party detector packages.
1744 Another major differentiator is the ability to extend the default FindBugs 1806 Another major differentiator is the ability to extend the default FindBugs
1745 classpath at runtime with required third party libraries (see 1807 classpath at runtime with required third party libraries (see
1746 <ulink url="http://code.google.com/p/findbugs/source/browse/trunk/findbugs/s rc/doc/AddingDetectors.txt">AddingDetectors.txt</ulink> 1808 <ulink url="http://code.google.com/p/findbugs/source/browse/findbugs/src/doc /AddingDetectors.txt">AddingDetectors.txt</ulink>
1747 for more information). 1809 for more information).
1748 </para> 1810 </para>
1749 </listitem> 1811 </listitem>
1750 1812
1751 </itemizedlist> 1813 </itemizedlist>
1752 1814
1753 </sect1> 1815 </sect1>
1754 1816
1755 <sect1> 1817 <sect1>
1756 <title>Troubleshooting</title> 1818 <title>Troubleshooting</title>
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1795 Filter files 1857 Filter files
1796 ************************************************************************** 1858 **************************************************************************
1797 --> 1859 -->
1798 1860
1799 <chapter id="filter"> 1861 <chapter id="filter">
1800 <title>Filter Files</title> 1862 <title>Filter Files</title>
1801 1863
1802 <para> 1864 <para>
1803 Filter files may be used to include or exclude bug reports for particular classe s 1865 Filter files may be used to include or exclude bug reports for particular classe s
1804 and methods. This chapter explains how to use filter files. 1866 and methods. This chapter explains how to use filter files.
1805
1806 <note>
1807 <title>Planned Features</title>
1808 <para>
1809 Filters are currently only supported by the Command Line interface.
1810 Eventually, filter support will be added to the GUI.
1811 </para>
1812 </note>
1813 </para> 1867 </para>
1814 1868
1815 1869
1816 <sect1> 1870 <sect1>
1817 <title>Introduction to Filter Files</title> 1871 <title>Introduction to Filter Files</title>
1818 1872
1819 <para> 1873 <para>
1820 Conceptually, a filter matches bug instances against a set of criteria. 1874 Conceptually, a filter matches bug instances against a set of criteria.
1821 By defining a filter, you can select bug instances for special treatment; 1875 By defining a filter, you can select bug instances for special treatment;
1822 for example, to exclude or include them in a report. 1876 for example, to exclude or include them in a report.
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
1925 </para> 1979 </para>
1926 </listitem> 1980 </listitem>
1927 </varlistentry> 1981 </varlistentry>
1928 1982
1929 <varlistentry> 1983 <varlistentry>
1930 <term><literal>&lt;Class&gt;</literal></term> 1984 <term><literal>&lt;Class&gt;</literal></term>
1931 <listitem> 1985 <listitem>
1932 <para> 1986 <para>
1933 This element matches warnings associated with a particular class. Th e 1987 This element matches warnings associated with a particular class. Th e
1934 <literal>name</literal> attribute is used to specify the exact or re gex match pattern 1988 <literal>name</literal> attribute is used to specify the exact or re gex match pattern
1935 for the class name. 1989 for the class name. The <literal>role</literal> attribute is the cl ass role.
1936 </para> 1990 </para>
1937 1991
1938 <para> 1992 <para>
1939 As a backward compatibility measure, instead of element of this type , you can use 1993 As a backward compatibility measure, instead of element of this type , you can use
1940 <literal>class</literal> attribute on a <literal>Match</literal> el ement to specify 1994 <literal>class</literal> attribute on a <literal>Match</literal> el ement to specify
1941 exact an class name or <literal>classregex</literal> attribute to s pecify a regular 1995 exact an class name or <literal>classregex</literal> attribute to s pecify a regular
1942 expression to match the class name against. 1996 expression to match the class name against.
1943 </para> 1997 </para>
1944 1998
1945 <para> 1999 <para>
1946 If the <literal>Match</literal> element contains neither a <literal> Class</literal> element, 2000 If the <literal>Match</literal> element contains neither a <literal> Class</literal> element,
1947 nor a <literal>class</literal> / <literal>classregex</literal> attri bute, the predicate will apply 2001 nor a <literal>class</literal> / <literal>classregex</literal> attri bute, the predicate will apply
1948 to all classes. Such predicate is likely to match more bug instances than you want, unless it is 2002 to all classes. Such predicate is likely to match more bug instances than you want, unless it is
1949 refined further down with apropriate method or field predicates. 2003 refined further down with apropriate method or field predicates.
1950 </para> 2004 </para>
1951 </listitem> 2005 </listitem>
1952 </varlistentry> 2006 </varlistentry>
1953 2007
1954 <varlistentry> 2008 <varlistentry>
2009 <term><literal>&lt;Source&gt;</literal></term>
2010 <listitem>
2011 <para>
2012 This element matches warnings associated with a particular source fi le. The
2013 <literal>name</literal> attribute is used to specify the exact or re gex match pattern
2014 for the source file name.
2015 </para>
2016 </listitem>
2017 </varlistentry>
2018
2019 <varlistentry>
1955 <term><literal>&lt;Method&gt;</literal></term> 2020 <term><literal>&lt;Method&gt;</literal></term>
1956 2021
1957 <listitem><para>This element specifies a method. The <literal>name</literal> is used to specify 2022 <listitem><para>This element specifies a method. The <literal>name</literal> is used to specify
1958 the exact or regex match pattern for the method name. 2023 the exact or regex match pattern for the method name.
1959 The <literal>params</literal> attribute is a comma-separated list 2024 The <literal>params</literal> attribute is a comma-separated list
1960 of the types of the method's parameters. The <literal>returns</literal> attr ibute is 2025 of the types of the method's parameters. The <literal>returns</literal> attr ibute is
1961 the method's return type. In <literal>params</literal> and <literal>returns< /literal>, class names 2026 the method's return type. The <literal>role</literal> attribute is
2027 the method role. In <literal>params</literal> and <literal>returns</literal>, class names
1962 must be fully qualified. (E.g., "java.lang.String" instead of just 2028 must be fully qualified. (E.g., "java.lang.String" instead of just
1963 "String".) If one of the latter attributes is specified the other is required for creating a method signature. 2029 "String".) If one of the latter attributes is specified the other is required for creating a method signature.
1964 Note that you can provide either <literal>name</literal> attribute or <litera l>params</literal> 2030 Note that you can provide either <literal>name</literal> attribute or <litera l>params</literal>
1965 and <literal>returns</literal> attributes or all three of them. This way you can provide various kinds of 2031 and <literal>returns</literal> attributes or all three of them. This way you can provide various kinds of
1966 name and signature based matches. 2032 name and signature based matches.
1967 </para></listitem> 2033 </para></listitem>
1968 </varlistentry> 2034 </varlistentry>
1969 2035
1970 <varlistentry> 2036 <varlistentry>
1971 <term><literal>&lt;Field&gt;</literal></term> 2037 <term><literal>&lt;Field&gt;</literal></term>
1972 2038
1973 <listitem><para>This element specifies a field. The <literal>name</literal> a ttribute is is used to specify 2039 <listitem><para>This element specifies a field. The <literal>name</literal> a ttribute is is used to specify
1974 the exact or regex match pattern for the field name. You can also filter fiel ds according to their signature - 2040 the exact or regex match pattern for the field name. You can also filter fiel ds according to their signature -
1975 use <literal>type</literal> attribute to specify fully qualified type of the field. You can specify eiter or both 2041 use <literal>type</literal> attribute to specify fully qualified type of the field. You can specify eiter or both
1976 of these attributes in order to perform name / signature based matches. 2042 of these attributes in order to perform name / signature based matches. The < literal>role</literal> attribute is
2043 the field role.
1977 </para></listitem> 2044 </para></listitem>
1978 </varlistentry> 2045 </varlistentry>
1979 2046
1980 <varlistentry> 2047 <varlistentry>
1981 <term><literal>&lt;Local&gt;</literal></term> 2048 <term><literal>&lt;Local&gt;</literal></term>
1982 2049
1983 <listitem><para>This element specifies a local variable. The <literal>name</l iteral> attribute is is used to specify 2050 <listitem><para>This element specifies a local variable. The <literal>name</l iteral> attribute is is used to specify
1984 the exact or regex match pattern for the local variable name. Local variables are variables defined within a method. 2051 the exact or regex match pattern for the local variable name. Local variables are variables defined within a method.
1985 </para></listitem> 2052 </para></listitem>
1986 </varlistentry> 2053 </varlistentry>
1987 2054
1988 <varlistentry> 2055 <varlistentry>
1989 <term><literal>&lt;Or&gt;</literal></term> 2056 <term><literal>&lt;Or&gt;</literal></term>
1990 <listitem><para> 2057 <listitem><para>
1991 This element combines <literal>Match</literal> clauses as disjuncts. I.e., y ou can put two 2058 This element combines <literal>Match</literal> clauses as disjuncts. I.e., y ou can put two
1992 <literal>Method</literal> elements in an <literal>Or</literal> clause in orde r to match either method. 2059 <literal>Method</literal> elements in an <literal>Or</literal> clause in orde r to match either method.
1993 </para></listitem> 2060 </para></listitem>
1994 </varlistentry> 2061 </varlistentry>
1995 <varlistentry> 2062 <varlistentry>
1996 <term><literal>&lt;And&gt;</literal></term> 2063 <term><literal>&lt;And&gt;</literal></term>
1997 <listitem><para> 2064 <listitem><para>
1998 This element combines <literal>Match</literal> clauses which both must evalua te to true. I.e., you can put 2065 This element combines <literal>Match</literal> clauses which both must evalua te to true. I.e., you can put
1999 <literal>Bug</literal> and <literal>Priority</literal> elements in an <litera l>And</literal> clause in order 2066 <literal>Bug</literal> and <literal>Confidence</literal> elements in an <lite ral>And</literal> clause in order
2000 to match specific bugs with given priority only. 2067 to match specific bugs with given confidence only.
2001 </para></listitem> 2068 </para></listitem>
2002 </varlistentry> 2069 </varlistentry>
2003 <varlistentry> 2070 <varlistentry>
2004 <term><literal>&lt;Not&gt;</literal></term> 2071 <term><literal>&lt;Not&gt;</literal></term>
2005 <listitem><para> 2072 <listitem><para>
2006 This element inverts the included child <literal>Match</literal>. I.e., you c an put a 2073 This element inverts the included child <literal>Match</literal>. I.e., you c an put a
2007 <literal>Bug</literal> element in a <literal>Not</literal> clause in order to match any bug 2074 <literal>Bug</literal> element in a <literal>Not</literal> clause in order to match any bug
2008 excluding the given one. 2075 excluding the given one.
2009 </para></listitem> 2076 </para></listitem>
2010 </varlistentry> 2077 </varlistentry>
2011 </variablelist> 2078 </variablelist>
2012 2079
2013 </sect1> 2080 </sect1>
2014 2081
2015 <sect1> 2082 <sect1>
2016 <title>Java element name matching</title> 2083 <title>Java element name matching</title>
2017 2084
2018 <para> 2085 <para>
2019 If the <literal>name</literal> attribute of <literal>Class</literal>, <literal>M ethod</literal> or 2086 If the <literal>name</literal> attribute of <literal>Class</literal>, <literal>S ource</literal>,
2020 <literal>Field</literal> starts with the ~ character the rest of attribute conte nt is interpreted as 2087 <literal>Method</literal> or <literal>Field</literal> starts with the ~ characte r
2088 the rest of attribute content is interpreted as
2021 a Java regular expression that is matched against the names of the Java element in question. 2089 a Java regular expression that is matched against the names of the Java element in question.
2022 </para> 2090 </para>
2023 2091
2024 <para> 2092 <para>
2025 Note that the pattern is matched against whole element name and therefore .* cla uses need to be used 2093 Note that the pattern is matched against whole element name and therefore .* cla uses need to be used
2026 at pattern beginning and/or end to perform substring matching. 2094 at pattern beginning and/or end to perform substring matching.
2027 </para> 2095 </para>
2028 2096
2029 <para> 2097 <para>
2030 See <ulink url="http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern. html"><literal>java.util.regex.Pattern</literal></ulink> 2098 See <ulink url="http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern. html"><literal>java.util.regex.Pattern</literal></ulink>
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
2252 <!-- test classes are suffixed by 'Test' --> 2320 <!-- test classes are suffixed by 'Test' -->
2253 2321
2254 <Not> 2322 <Not>
2255 <Bug code="IJU" /> <!-- 'IJU' is the code for bugs related to JUnit test c ode --> 2323 <Bug code="IJU" /> <!-- 'IJU' is the code for bugs related to JUnit test c ode -->
2256 </Not> 2324 </Not>
2257 </Match> 2325 </Match>
2258 ]]> 2326 ]]>
2259 </programlisting> 2327 </programlisting>
2260 </para> 2328 </para>
2261 2329
2330 <para>
2331 12. Full exclusion filter file to match all classes generated from Groovy sour ce files.
2332
2333 <programlisting>
2334 <![CDATA[
2335 <?xml version="1.0" encoding="UTF-8"?>
2336 <FindBugsFilter>
2337 <Match>
2338 <Source name="~.*\.groovy" />
2339 </Match>
2340 </FindBugsFilter>
2341 ]]>
2342 </programlisting>
2343 </para>
2344
2262 </sect1> 2345 </sect1>
2263 2346
2264 <sect1> 2347 <sect1>
2265 <title>Complete Example</title> 2348 <title>Complete Example</title>
2266 2349
2267 <programlisting> 2350 <programlisting>
2268 <![CDATA[ 2351 <![CDATA[
2269 <FindBugsFilter> 2352 <FindBugsFilter>
2270 <Match> 2353 <Match>
2271 <Class name="com.foobar.ClassNotToBeAnalyzed" /> 2354 <Class name="com.foobar.ClassNotToBeAnalyzed" />
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
2454 &FindBugs; supports several annotations to express the developer's intent 2537 &FindBugs; supports several annotations to express the developer's intent
2455 so that FindBugs can issue warnings more appropriately. You need to use 2538 so that FindBugs can issue warnings more appropriately. You need to use
2456 Java 5 to use annotations, and must place the annotations.jar and jsr305.jar 2539 Java 5 to use annotations, and must place the annotations.jar and jsr305.jar
2457 files in the classpath while compiling your program. 2540 files in the classpath while compiling your program.
2458 </para> 2541 </para>
2459 2542
2460 <variablelist> 2543 <variablelist>
2461 <varlistentry> 2544 <varlistentry>
2462 <term><command>edu.umd.cs.findbugs.annotations.CheckForNull</command></term> 2545 <term><command>edu.umd.cs.findbugs.annotations.CheckForNull</command></term>
2463 <listitem> 2546 <listitem>
2464 <command>[Target]</command> Field, Method, Parameter 2547 <para>
2548 <command>[Target]</command> Field, Method, Parameter
2549 </para>
2465 </listitem> 2550 </listitem>
2466 <listitem> 2551 <listitem>
2467 <para> 2552 <para>
2468 The annotated element might be null, and uses of the element should check for nu ll. 2553 The annotated element might be null, and uses of the element should check for nu ll.
2469 When this annotation is applied to a method it applies to the method return valu e. 2554 When this annotation is applied to a method it applies to the method return valu e.
2470 </para> 2555 </para>
2471 </listitem> 2556 </listitem>
2472 </varlistentry> 2557 </varlistentry>
2473 2558
2474 <varlistentry> 2559 <varlistentry>
2475 <term><command>edu.umd.cs.findbugs.annotations.CheckReturnValue</command></t erm> 2560 <term><command>edu.umd.cs.findbugs.annotations.CheckReturnValue</command></t erm>
2476 <listitem> 2561 <listitem>
2562 <para>
2477 <command>[Target]</command> Method, Constructor 2563 <command>[Target]</command> Method, Constructor
2564 </para>
2478 </listitem> 2565 </listitem>
2479 <listitem> 2566 <listitem>
2480 <variablelist> 2567 <variablelist>
2481 <varlistentry> 2568 <varlistentry>
2482 <term><command>[Parameter]</command></term> 2569 <term><command>[Parameter]</command></term>
2483 <listitem> 2570 <listitem>
2484 <para> 2571 <para>
2485 <command>priority:</command>The priority of the warning (HIGH, MED IUM, LOW, IGNORE). Default value:MEDIUM. 2572 <command>priority:</command>The priority of the warning (HIGH, MED IUM, LOW, IGNORE). Default value:MEDIUM.
2486 </para> 2573 </para>
2487 </listitem> 2574 </listitem>
2488 <listitem> 2575 <listitem>
2489 <para> 2576 <para>
2490 <command>explanation:</command>A textual explaination of why the r eturn value should be checked. Default value:"". 2577 <command>explanation:</command>A textual explaination of why the r eturn value should be checked. Default value:"".
2491 </para> 2578 </para>
2492 </listitem> 2579 </listitem>
2493 </varlistentry> 2580 </varlistentry>
2494 </variablelist> 2581 </variablelist>
2495 </listitem> 2582 </listitem>
2496 <listitem> 2583 <listitem>
2497 <para> 2584 <para>
2498 This annotation is used to denote a method whose return value should always be c hecked after invoking the method. 2585 This annotation is used to denote a method whose return value should always be c hecked after invoking the method.
2499 </para> 2586 </para>
2500 </listitem> 2587 </listitem>
2501 </varlistentry> 2588 </varlistentry>
2502 2589
2503 <varlistentry> 2590 <varlistentry>
2504 <term><command>edu.umd.cs.findbugs.annotations.DefaultAnnotation</command></ term> 2591 <term><command>edu.umd.cs.findbugs.annotations.DefaultAnnotation</command></ term>
2505 <listitem> 2592 <listitem>
2506 <command>[Target]</command> Type, Package 2593 <para>
2594 <command>[Target]</command> Type, Package
2595 </para>
2507 </listitem> 2596 </listitem>
2508 <listitem> 2597 <listitem>
2509 <variablelist> 2598 <variablelist>
2510 <varlistentry> 2599 <varlistentry>
2511 <term><command>[Parameter]</command></term> 2600 <term><command>[Parameter]</command></term>
2512 <listitem> 2601 <listitem>
2513 <para> 2602 <para>
2514 <command>value:</command>Annotation class objects. More than one c lass can be specified. 2603 <command>value:</command>Annotation class objects. More than one c lass can be specified.
2515 </para> 2604 </para>
2516 </listitem> 2605 </listitem>
(...skipping 12 matching lines...) Expand all
2529 such as @NonNull, @CheckForNull, or @CheckReturnValue. In particular, you can us e 2618 such as @NonNull, @CheckForNull, or @CheckReturnValue. In particular, you can us e
2530 @DefaultAnnotation(NonNull.class) on a class or package, and then use @Nullable only 2619 @DefaultAnnotation(NonNull.class) on a class or package, and then use @Nullable only
2531 on those parameters, methods or fields that you want to allow to be null. 2620 on those parameters, methods or fields that you want to allow to be null.
2532 </para> 2621 </para>
2533 </listitem> 2622 </listitem>
2534 </varlistentry> 2623 </varlistentry>
2535 2624
2536 <varlistentry> 2625 <varlistentry>
2537 <term><command>edu.umd.cs.findbugs.annotations.DefaultAnnotationForFields</c ommand></term> 2626 <term><command>edu.umd.cs.findbugs.annotations.DefaultAnnotationForFields</c ommand></term>
2538 <listitem> 2627 <listitem>
2628 <para>
2539 <command>[Target]</command> Type, Package 2629 <command>[Target]</command> Type, Package
2630 </para>
2540 </listitem> 2631 </listitem>
2541 <listitem> 2632 <listitem>
2542 <variablelist> 2633 <variablelist>
2543 <varlistentry> 2634 <varlistentry>
2544 <term><command>[Parameter]</command></term> 2635 <term><command>[Parameter]</command></term>
2545 <listitem> 2636 <listitem>
2546 <para> 2637 <para>
2547 <command>value:</command>Annotation class objects. More than one c lass can be specified. 2638 <command>value:</command>Annotation class objects. More than one c lass can be specified.
2548 </para> 2639 </para>
2549 </listitem> 2640 </listitem>
2550 <listitem> 2641 <listitem>
2551 <para> 2642 <para>
2552 <command>priority:</command>Default priority(HIGH, MEDIUM, LOW, IG NORE). Default value:MEDIUM. 2643 <command>priority:</command>Default priority(HIGH, MEDIUM, LOW, IG NORE). Default value:MEDIUM.
2553 </para> 2644 </para>
2554 </listitem> 2645 </listitem>
2555 </varlistentry> 2646 </varlistentry>
2556 </variablelist> 2647 </variablelist>
2557 </listitem> 2648 </listitem>
2558 <listitem> 2649 <listitem>
2559 <para> 2650 <para>
2560 This is same as the DefaultAnnotation except it only applys to fields. 2651 This is same as the DefaultAnnotation except it only applys to fields.
2561 </para> 2652 </para>
2562 </listitem> 2653 </listitem>
2563 </varlistentry> 2654 </varlistentry>
2564 2655
2565 <varlistentry> 2656 <varlistentry>
2566 <term><command>edu.umd.cs.findbugs.annotations.DefaultAnnotationForMethods</ command></term> 2657 <term><command>edu.umd.cs.findbugs.annotations.DefaultAnnotationForMethods</ command></term>
2567 <listitem> 2658 <listitem>
2659 <para>
2568 <command>[Target]</command> Type, Package 2660 <command>[Target]</command> Type, Package
2661 </para>
2569 </listitem> 2662 </listitem>
2570 <listitem> 2663 <listitem>
2571 <variablelist> 2664 <variablelist>
2572 <varlistentry> 2665 <varlistentry>
2573 <term><command>[Parameter]</command></term> 2666 <term><command>[Parameter]</command></term>
2574 <listitem> 2667 <listitem>
2575 <para> 2668 <para>
2576 <command>value:</command>Annotation class objects. More than one c lass can be specified. 2669 <command>value:</command>Annotation class objects. More than one c lass can be specified.
2577 </para> 2670 </para>
2578 </listitem> 2671 </listitem>
2579 <listitem> 2672 <listitem>
2580 <para> 2673 <para>
2581 <command>priority:</command>Default priority(HIGH, MEDIUM, LOW, IG NORE). Default value:MEDIUM. 2674 <command>priority:</command>Default priority(HIGH, MEDIUM, LOW, IG NORE). Default value:MEDIUM.
2582 </para> 2675 </para>
2583 </listitem> 2676 </listitem>
2584 </varlistentry> 2677 </varlistentry>
2585 </variablelist> 2678 </variablelist>
2586 </listitem> 2679 </listitem>
2587 <listitem> 2680 <listitem>
2588 <para> 2681 <para>
2589 This is same as the DefaultAnnotation except it only applys to methods. 2682 This is same as the DefaultAnnotation except it only applys to methods.
2590 </para> 2683 </para>
2591 </listitem> 2684 </listitem>
2592 </varlistentry> 2685 </varlistentry>
2593 2686
2594 <varlistentry> 2687 <varlistentry>
2595 <term><command>edu.umd.cs.findbugs.annotations.DefaultAnnotationForParameter s</command></term> 2688 <term><command>edu.umd.cs.findbugs.annotations.DefaultAnnotationForParameter s</command></term>
2596 <listitem> 2689 <listitem>
2690 <para>
2597 <command>[Target]</command> Type, Package 2691 <command>[Target]</command> Type, Package
2692 </para>
2598 </listitem> 2693 </listitem>
2599 <listitem> 2694 <listitem>
2600 <variablelist> 2695 <variablelist>
2601 <varlistentry> 2696 <varlistentry>
2602 <term><command>[Parameter]</command></term> 2697 <term><command>[Parameter]</command></term>
2603 <listitem> 2698 <listitem>
2604 <para> 2699 <para>
2605 <command>value:</command>Annotation class objects. More than one c lass can be specified. 2700 <command>value:</command>Annotation class objects. More than one c lass can be specified.
2606 </para> 2701 </para>
2607 </listitem> 2702 </listitem>
2608 <listitem> 2703 <listitem>
2609 <para> 2704 <para>
2610 <command>priority:</command>Default priority(HIGH, MEDIUM, LOW, IG NORE). Default value:MEDIUM. 2705 <command>priority:</command>Default priority(HIGH, MEDIUM, LOW, IG NORE). Default value:MEDIUM.
2611 </para> 2706 </para>
2612 </listitem> 2707 </listitem>
2613 </varlistentry> 2708 </varlistentry>
2614 </variablelist> 2709 </variablelist>
2615 </listitem> 2710 </listitem>
2616 <listitem> 2711 <listitem>
2617 <para> 2712 <para>
2618 This is same as the DefaultAnnotation except it only applys to method parameters . 2713 This is same as the DefaultAnnotation except it only applys to method parameters .
2619 </para> 2714 </para>
2620 </listitem> 2715 </listitem>
2621 </varlistentry> 2716 </varlistentry>
2622 2717
2623 <varlistentry> 2718 <varlistentry>
2624 <term><command>edu.umd.cs.findbugs.annotations.NonNull</command></term> 2719 <term><command>edu.umd.cs.findbugs.annotations.NonNull</command></term>
2625 <listitem> 2720 <listitem>
2721 <para>
2626 <command>[Target]</command> Field, Method, Parameter 2722 <command>[Target]</command> Field, Method, Parameter
2723 </para>
2627 </listitem> 2724 </listitem>
2628 <listitem> 2725 <listitem>
2629 <para> 2726 <para>
2630 The annotated element must not be null. 2727 The annotated element must not be null.
2631 Annotated fields must not be null after construction has completed. Annotated me thods must have non-null return values. 2728 Annotated fields must not be null after construction has completed. Annotated me thods must have non-null return values.
2632 </para> 2729 </para>
2633 </listitem> 2730 </listitem>
2634 </varlistentry> 2731 </varlistentry>
2635 2732
2636 <varlistentry> 2733 <varlistentry>
2637 <term><command>edu.umd.cs.findbugs.annotations.Nullable</command></term> 2734 <term><command>edu.umd.cs.findbugs.annotations.Nullable</command></term>
2638 <listitem> 2735 <listitem>
2736 <para>
2639 <command>[Target]</command> Field, Method, Parameter 2737 <command>[Target]</command> Field, Method, Parameter
2738 </para>
2640 </listitem> 2739 </listitem>
2641 <listitem> 2740 <listitem>
2642 <para> 2741 <para>
2643 The annotated element could be null under some circumstances. In general, this m eans 2742 The annotated element could be null under some circumstances. In general, this m eans
2644 developers will have to read the documentation to determine when a null value is 2743 developers will have to read the documentation to determine when a null value is
2645 acceptable and whether it is neccessary to check for a null value. FindBugs wil l 2744 acceptable and whether it is neccessary to check for a null value. FindBugs wil l
2646 treat the annotated items as though they had no annotation. 2745 treat the annotated items as though they had no annotation.
2647 </para> 2746 </para>
2648 <para> 2747 <para>
2649 In pratice this annotation is useful only for overriding an overarching NonNull 2748 In practice this annotation is useful only for overriding an overarching NonNull
2650 annotation. 2749 annotation.
2651 </para> 2750 </para>
2652 </listitem> 2751 </listitem>
2653 </varlistentry> 2752 </varlistentry>
2654 2753
2655 <varlistentry> 2754 <varlistentry>
2656 <term><command>edu.umd.cs.findbugs.annotations.OverrideMustInvoke</command>< /term> 2755 <term><command>edu.umd.cs.findbugs.annotations.OverrideMustInvoke</command>< /term>
2657 <listitem> 2756 <listitem>
2757 <para>
2658 <command>[Target]</command> Method 2758 <command>[Target]</command> Method
2759 </para>
2659 </listitem> 2760 </listitem>
2660 <listitem> 2761 <listitem>
2661 <variablelist> 2762 <variablelist>
2662 <varlistentry> 2763 <varlistentry>
2663 <term><command>[Parameter]</command></term> 2764 <term><command>[Parameter]</command></term>
2664 <listitem> 2765 <listitem>
2665 <para> 2766 <para>
2666 <command>value:</command>Specify when the super invocation should be 2767 <command>value:</command>Specify when the super invocation should be
2667 performed (FIRST, ANYTIME, LAST). Default value:ANYTIME. 2768 performed (FIRST, ANYTIME, LAST). Default value:ANYTIME.
2668 </para> 2769 </para>
(...skipping 17 matching lines...) Expand all
2686 <listitem> 2787 <listitem>
2687 <para> 2788 <para>
2688 This annotation is deprecated. Use CheckForNull instead. 2789 This annotation is deprecated. Use CheckForNull instead.
2689 </para> 2790 </para>
2690 </listitem> 2791 </listitem>
2691 </varlistentry> 2792 </varlistentry>
2692 2793
2693 <varlistentry> 2794 <varlistentry>
2694 <term><command>edu.umd.cs.findbugs.annotations.SuppressWarnings</command></t erm> 2795 <term><command>edu.umd.cs.findbugs.annotations.SuppressWarnings</command></t erm>
2695 <listitem> 2796 <listitem>
2797 <para>
2696 <command>[Target]</command> Type, Field, Method, Parameter, Constructor, P ackage 2798 <command>[Target]</command> Type, Field, Method, Parameter, Constructor, P ackage
2799 </para>
2697 </listitem> 2800 </listitem>
2698 <listitem> 2801 <listitem>
2699 <variablelist> 2802 <variablelist>
2700 <varlistentry> 2803 <varlistentry>
2701 <term><command>[Parameter]</command></term> 2804 <term><command>[Parameter]</command></term>
2702 <listitem> 2805 <listitem>
2703 <para> 2806 <para>
2704 <command>value:</command>The name of the warning. More than one na me can be specified. 2807 <command>value:</command>The name of the warning. More than one na me can be specified.
2705 </para> 2808 </para>
2706 </listitem> 2809 </listitem>
(...skipping 14 matching lines...) Expand all
2721 warning if an annotation contains an unrecognized warning name. Compiler vendors should 2824 warning if an annotation contains an unrecognized warning name. Compiler vendors should
2722 document the warning names they support in conjunction with this annotation type . They 2825 document the warning names they support in conjunction with this annotation type . They
2723 are encouraged to cooperate to ensure that the same names work across multiple c ompilers. 2826 are encouraged to cooperate to ensure that the same names work across multiple c ompilers.
2724 </para> 2827 </para>
2725 </listitem> 2828 </listitem>
2726 </varlistentry> 2829 </varlistentry>
2727 2830
2728 <varlistentry> 2831 <varlistentry>
2729 <term><command>edu.umd.cs.findbugs.annotations.UnknownNullness</command></te rm> 2832 <term><command>edu.umd.cs.findbugs.annotations.UnknownNullness</command></te rm>
2730 <listitem> 2833 <listitem>
2834 <para>
2731 <command>[Target]</command> Field, Method, Parameter 2835 <command>[Target]</command> Field, Method, Parameter
2836 </para>
2732 </listitem> 2837 </listitem>
2733 <listitem> 2838 <listitem>
2734 <para> 2839 <para>
2735 Used to indicate that the nullness of the target is unknown, or my vary in unkno wn ways in subclasses. 2840 Used to indicate that the nullness of the target is unknown, or my vary in unkno wn ways in subclasses.
2736 </para> 2841 </para>
2737 </listitem> 2842 </listitem>
2738 </varlistentry> 2843 </varlistentry>
2739 2844
2740 <varlistentry> 2845 <varlistentry>
2741 <term><command>edu.umd.cs.findbugs.annotations.UnknownNullness</command></te rm> 2846 <term><command>edu.umd.cs.findbugs.annotations.UnknownNullness</command></te rm>
2742 <listitem> 2847 <listitem>
2848 <para>
2743 <command>[Target]</command> Field, Method, Parameter 2849 <command>[Target]</command> Field, Method, Parameter
2850 </para>
2744 </listitem> 2851 </listitem>
2745 <listitem> 2852 <listitem>
2746 <para> 2853 <para>
2747 Used to indicate that the nullness of the target is unknown, or my vary in unkno wn ways in subclasses. 2854 Used to indicate that the nullness of the target is unknown, or my vary in unkno wn ways in subclasses.
2748 </para> 2855 </para>
2749 </listitem> 2856 </listitem>
2750 </varlistentry> 2857 </varlistentry>
2751 </variablelist> 2858 </variablelist>
2752 2859
2753 <para> 2860 <para>
2754 &FindBugs; also supports the following annotations: 2861 &FindBugs; also supports the following annotations:
2755 <itemizedlist> 2862 <itemizedlist>
2756 <listitem>net.jcip.annotations.GuardedBy</listitem> 2863 <listitem><para>net.jcip.annotations.GuardedBy</para></listitem>
2757 <listitem>net.jcip.annotations.Immutable</listitem> 2864 <listitem><para>net.jcip.annotations.Immutable</para></listitem>
2758 <listitem>net.jcip.annotations.NotThreadSafe</listitem> 2865 <listitem><para>net.jcip.annotations.NotThreadSafe</para></listitem>
2759 <listitem>net.jcip.annotations.ThreadSafe</listitem> 2866 <listitem><para>net.jcip.annotations.ThreadSafe</para></listitem>
2760 </itemizedlist> 2867 </itemizedlist>
2761 </para> 2868 </para>
2762 <para> 2869 <para>
2763 You can refer the JCIP annotation <ulink url="http://jcip.net/annotations/doc/in dex.html"> 2870 You can refer the JCIP annotation <ulink url="http://jcip.net/annotations/doc/in dex.html">
2764 API documentation</ulink> at <ulink url="http://jcip.net/">Java Concurrency in P ractice</ulink>. 2871 API documentation</ulink> at <ulink url="http://jcip.net/">Java Concurrency in P ractice</ulink>.
2765 </para> 2872 </para>
2766 </chapter> 2873 </chapter>
2767 2874
2768 <!-- 2875 <!--
2769 ************************************************************************** 2876 **************************************************************************
(...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after
3759 <para>Phil Crosby enhanced the Eclipse plugin to add a view 3866 <para>Phil Crosby enhanced the Eclipse plugin to add a view
3760 to display the bug details.</para> 3867 to display the bug details.</para>
3761 3868
3762 <para>Dave Brosius fixed a number of bugs, added user preferences 3869 <para>Dave Brosius fixed a number of bugs, added user preferences
3763 to the Swing GUI, improved several bug detectors, and 3870 to the Swing GUI, improved several bug detectors, and
3764 contributed the string concatenation detector.</para> 3871 contributed the string concatenation detector.</para>
3765 3872
3766 <para>Thomas Klaeger contributed a number of bug fixes and 3873 <para>Thomas Klaeger contributed a number of bug fixes and
3767 bug detector improvements.</para> 3874 bug detector improvements.</para>
3768 3875
3769 <para>Andrei Loskutov made a number of improvements to the 3876 <para>Andrey Loskutov made a number of bug fixes and
3770 Eclipse plugin.</para> 3877 bug detector improvements. He is maintainer of the Eclipse plugin.</para>
3771 3878
3772 <para>Brian Goetz contributed a major refactoring of the 3879 <para>Brian Goetz contributed a major refactoring of the
3773 visitor classes to improve readability and understandability.</para> 3880 visitor classes to improve readability and understandability.</para>
3774 3881
3775 <para> Pete Angstadt fixed several problems in the Swing GUI.</para> 3882 <para> Pete Angstadt fixed several problems in the Swing GUI.</para>
3776 3883
3777 <para>Francis Lalonde provided a task resource file for the 3884 <para>Francis Lalonde provided a task resource file for the
3778 FindBugs Ant task.</para> 3885 FindBugs Ant task.</para>
3779 3886
3780 <para>Garvin LeClaire contributed support for output in 3887 <para>Garvin LeClaire contributed support for output in
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
3845 in the Ant task.</para> 3952 in the Ant task.</para>
3846 3953
3847 <para>Peter Hendriks extended the Eclipse plugin preferences, 3954 <para>Peter Hendriks extended the Eclipse plugin preferences,
3848 and fixed a bug related to renaming the Eclipse plugin ID.</para> 3955 and fixed a bug related to renaming the Eclipse plugin ID.</para>
3849 3956
3850 <para>Mark McKay contributed an Ant task to launch the findbugs frame.</para> 3957 <para>Mark McKay contributed an Ant task to launch the findbugs frame.</para>
3851 3958
3852 <para>Dieter von Holten (dvholten) contributed 3959 <para>Dieter von Holten (dvholten) contributed
3853 some German improvements to findbugs_de.properties.</para> 3960 some German improvements to findbugs_de.properties.</para>
3854 3961
3962 <para>Kevin Lubick contributed fixes and tests for multi-quick-fixes and customi zable
3963 annotation colors for Eclipse plugin.</para>
3964
3965 <para>Tagir Valeev contributed several new bug detectors and improved existing o nes.</para>
3855 3966
3856 <para>If you have contributed to &FindBugs;, but aren't mentioned above, 3967 <para>If you have contributed to &FindBugs;, but aren't mentioned above,
3857 please send email to <email>findbugs@cs.umd.edu</email> (and also accept 3968 please send email to <email>findbugs@cs.umd.edu</email> (and also accept
3858 our humble apologies).</para> 3969 our humble apologies).</para>
3859 3970
3860 </sect1> 3971 </sect1>
3861 3972
3862 <sect1> 3973 <sect1>
3863 <title>Software Used</title> 3974 <title>Software Used</title>
3864 3975
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
3981 </blockquote> 4092 </blockquote>
3982 4093
3983 </sect2> 4094 </sect2>
3984 4095
3985 </sect1> 4096 </sect1>
3986 4097
3987 </chapter> 4098 </chapter>
3988 4099
3989 4100
3990 </book> 4101 </book>
OLDNEW
« README.chromium ('K') | « doc/mailingLists.html ('k') | doc/manual.xsl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698