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

Side by Side Diff: doc/manual.xml

Issue 594833004: Roll FindBugs from 2.0.3 to 3.0.0 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/findbugs.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « doc/mailingLists.html ('k') | doc/manual/acknowledgments.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.0</edition>
48 48
49 <pubdate>17:16:15 EST, 22 November, 2013</pubdate> 49 <pubdate>20:25:27 CDT, 06 July, 2014</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.0 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.0.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.0.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.0.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.0.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.0</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.0</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.0 -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.0-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
1542 </variablelist> 1594 </variablelist>
1543 1595
1544 1596
1545 </para> 1597 </para>
1546 1598
1547 <!-- 1599 <!--
1548 1600
1549 --> 1601 -->
1550 1602
1551 </sect1> 1603 </sect1>
1552 1604
1553 </chapter> 1605 </chapter>
1554 1606
1555 <!-- 1607 <!--
1556 ************************************************************************** 1608 **************************************************************************
1557 Using the FindBugs Eclipse plugin 1609 Using the FindBugs Eclipse plugin
1558 ************************************************************************** 1610 **************************************************************************
1559 --> 1611 -->
1560 1612
1561 <chapter id="eclipse"> 1613 <chapter id="eclipse">
1562 <title>Using the &FindBugs;&trade; Eclipse plugin</title> 1614 <title>Using the &FindBugs;&trade; Eclipse plugin</title>
1563 1615
1564 <para> 1616 <para>
1565 The FindBugs Eclipse plugin allows &FindBugs; to be used within 1617 The FindBugs Eclipse plugin allows &FindBugs; to be used within
1566 the <ulink url="http://www.eclipse.org/">Eclipse</ulink> IDE. 1618 the <ulink url="http://www.eclipse.org/">Eclipse</ulink> IDE.
1567 The FindBugs Eclipse plugin was generously contributed by Peter Friese. 1619 The FindBugs Eclipse plugin was generously contributed by Peter Friese.
1568 Phil Crosby and Andrei Loskutov contributed major improvements 1620 Phil Crosby and Andrey Loskutov contributed major improvements
1569 to the plugin. 1621 to the plugin.
1570 </para> 1622 </para>
1571 1623
1572 <sect1> 1624 <sect1>
1573 <title>Requirements</title> 1625 <title>Requirements</title>
1574 1626
1575 <para> 1627 <para>
1576 To use the &FindBugs; Plugin for Eclipse, you need Eclipse 3.3 or later, 1628 To use the &FindBugs; Plugin for Eclipse, you need Eclipse 3.3 or later,
1577 and JRE/JDK 1.5 or later. 1629 and JRE/JDK 1.5 or later.
1578 </para> 1630 </para>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1610 <listitem> 1662 <listitem>
1611 <para> 1663 <para>
1612 Provides the daily build of FindBugs. No testing other than that it com piles. 1664 Provides the daily build of FindBugs. No testing other than that it com piles.
1613 </para> 1665 </para>
1614 </listitem> 1666 </listitem>
1615 </varlistentry> 1667 </varlistentry>
1616 </variablelist> 1668 </variablelist>
1617 1669
1618 <para>You can also manually 1670 <para>You can also manually
1619 download the plugin from the following link: 1671 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" 1672 <ulink url="http://prdownloads.sourceforge.net/findbugs/edu.umd.cs.findbugs.plug in.eclipse_3.0.0.20140706.zip?download"
1621 >http://prdownloads.sourceforge.net/findbugs/edu.umd.cs.findbugs.plugin.eclipse_ 2.0.3.20131122.zip?download</ulink>. 1673 >http://prdownloads.sourceforge.net/findbugs/edu.umd.cs.findbugs.plugin.eclipse_ 3.0.0.20140706.zip?download</ulink>.
1622 Extract it in Eclipse's "plugins" subdirectory. 1674 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 1675 (So &lt;eclipse_install_dir&gt;/plugins/edu.umd.cs.findbugs.plugin.eclipse_3.0.0 .20140706/findbugs.png
1624 should be the path to the &FindBugs; logo.) 1676 should be the path to the &FindBugs; logo.)
1625 1677
1626 </para> 1678 </para>
1627 1679
1628 <para> 1680 <para>
1629 Once the plugin is extracted, start Eclipse and choose 1681 Once the plugin is extracted, start Eclipse and choose
1630 <menuchoice> 1682 <menuchoice>
1631 <guimenu>Help</guimenu> 1683 <guimenu>Help</guimenu>
1632 <guimenuitem>About Eclipse Platform</guimenuitem> 1684 <guimenuitem>About Eclipse Platform</guimenuitem>
1633 <guimenuitem>Plug-in Details</guimenuitem> 1685 <guimenuitem>Plug-in Details</guimenuitem>
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1687 </para> 1739 </para>
1688 </listitem> 1740 </listitem>
1689 </itemizedlist> 1741 </itemizedlist>
1690 1742
1691 </sect1> 1743 </sect1>
1692 1744
1693 <sect1> 1745 <sect1>
1694 <title>Extending the Eclipse Plugin (since 2.0.0)</title> 1746 <title>Extending the Eclipse Plugin (since 2.0.0)</title>
1695 <para> 1747 <para>
1696 Eclipse plugin supports contribution of custom &FindBugs; detectors (see also 1748 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> 1749 <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: 1750 for more information). There are two ways to contribute custom plugins to the Ec lipse:
1699 </para> 1751 </para>
1700 <itemizedlist> 1752 <itemizedlist>
1701 <listitem> 1753 <listitem>
1702 <para> 1754 <para>
1703 Existing standard &FindBugs; detector packages can be configured via 1755 Existing standard &FindBugs; detector packages can be configured via
1704 <menuchoice> 1756 <menuchoice>
1705 <guimenu>Window</guimenu> 1757 <guimenu>Window</guimenu>
1706 <guimenuitem>Preferences</guimenuitem> 1758 <guimenuitem>Preferences</guimenuitem>
1707 <guimenuitem>Java</guimenuitem> 1759 <guimenuitem>Java</guimenuitem>
1708 <guimenuitem>&FindBugs;</guimenuitem> 1760 <guimenuitem>FindBugs</guimenuitem>
1709 <guimenuitem>Misc. Settings</guimenuitem> 1761 <guimenuitem>Misc. Settings</guimenuitem>
1710 <guimenuitem>Custom Detectors</guimenuitem> 1762 <guimenuitem>Custom Detectors</guimenuitem>
1711 </menuchoice>. 1763 </menuchoice>.
1712 Simply specify there locations of any additional plugin libraries. 1764 Simply specify there locations of any additional plugin libraries.
1713 </para> 1765 </para>
1714 1766
1715 <para> 1767 <para>
1716 The benefit of this solution is that already existing detector packages can be 1768 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. 1769 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 1770 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. 1771 new Eclipse workspace, and this settings can't be shared between team member s.
1720 </para> 1772 </para>
1721 </listitem> 1773 </listitem>
1722 1774
1723 <listitem> 1775 <listitem>
1724 <para> 1776 <para>
1725 It is possible to contribute custom detectors via standard Eclipse extension s mechanism. 1777 It is possible to contribute custom detectors via standard Eclipse extension s mechanism.
1726 </para> 1778 </para>
1727 1779
1728 <para> 1780 <para>
1729 Please check the documentation of the 1781 Please check the documentation of the
1730 <ulink url="http://code.google.com/p/findbugs/source/browse/trunk/eclipsePlu gin/schema/detectorPlugins.exsd"> 1782 <ulink url="http://code.google.com/p/findbugs/source/browse/eclipsePlugin/sc hema/detectorPlugins.exsd">
1731 findBugsEclipsePlugin/schema/detectorPlugins.exsd</ulink> 1783 findBugsEclipsePlugin/schema/detectorPlugins.exsd</ulink>
1732 extension point how to update the plugin.xml. Existing &FindBugs; detector p lugins can 1784 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. 1785 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 1786 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. 1787 update your build scripts to not to override the MANIFEST.MF during the buil d.
1736 </para> 1788 </para>
1737 1789
1738 <para> 1790 <para>
1739 The benefit of this solution is that for given (shared) Eclipse installation 1791 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 1792 each team member has exactly same detectors set, and there is no need to con figure
1741 anything anymore. The (really small) precondition 1793 anything anymore. The (really small) precondition
1742 is that you have to convert your existing detectors package to the valid 1794 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. 1795 Eclipse plugin. You can do this even for third-party detector packages.
1744 Another major differentiator is the ability to extend the default FindBugs 1796 Another major differentiator is the ability to extend the default FindBugs
1745 classpath at runtime with required third party libraries (see 1797 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> 1798 <ulink url="http://code.google.com/p/findbugs/source/browse/findbugs/src/doc /AddingDetectors.txt">AddingDetectors.txt</ulink>
1747 for more information). 1799 for more information).
1748 </para> 1800 </para>
1749 </listitem> 1801 </listitem>
1750 1802
1751 </itemizedlist> 1803 </itemizedlist>
1752 1804
1753 </sect1> 1805 </sect1>
1754 1806
1755 <sect1> 1807 <sect1>
1756 <title>Troubleshooting</title> 1808 <title>Troubleshooting</title>
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
1945 <para> 1997 <para>
1946 If the <literal>Match</literal> element contains neither a <literal> Class</literal> element, 1998 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 1999 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 2000 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. 2001 refined further down with apropriate method or field predicates.
1950 </para> 2002 </para>
1951 </listitem> 2003 </listitem>
1952 </varlistentry> 2004 </varlistentry>
1953 2005
1954 <varlistentry> 2006 <varlistentry>
2007 <term><literal>&lt;Source&gt;</literal></term>
2008 <listitem>
2009 <para>
2010 This element matches warnings associated with a particular source fi le. The
2011 <literal>name</literal> attribute is used to specify the exact or re gex match pattern
2012 for the source file name.
2013 </para>
2014 </listitem>
2015 </varlistentry>
2016
2017 <varlistentry>
1955 <term><literal>&lt;Method&gt;</literal></term> 2018 <term><literal>&lt;Method&gt;</literal></term>
1956 2019
1957 <listitem><para>This element specifies a method. The <literal>name</literal> is used to specify 2020 <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. 2021 the exact or regex match pattern for the method name.
1959 The <literal>params</literal> attribute is a comma-separated list 2022 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 2023 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 2024 the method's return type. In <literal>params</literal> and <literal>returns< /literal>, class names
1962 must be fully qualified. (E.g., "java.lang.String" instead of just 2025 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. 2026 "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> 2027 Note that you can provide either <literal>name</literal> attribute or <litera l>params</literal>
(...skipping 24 matching lines...) Expand all
1989 <term><literal>&lt;Or&gt;</literal></term> 2052 <term><literal>&lt;Or&gt;</literal></term>
1990 <listitem><para> 2053 <listitem><para>
1991 This element combines <literal>Match</literal> clauses as disjuncts. I.e., y ou can put two 2054 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. 2055 <literal>Method</literal> elements in an <literal>Or</literal> clause in orde r to match either method.
1993 </para></listitem> 2056 </para></listitem>
1994 </varlistentry> 2057 </varlistentry>
1995 <varlistentry> 2058 <varlistentry>
1996 <term><literal>&lt;And&gt;</literal></term> 2059 <term><literal>&lt;And&gt;</literal></term>
1997 <listitem><para> 2060 <listitem><para>
1998 This element combines <literal>Match</literal> clauses which both must evalua te to true. I.e., you can put 2061 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 2062 <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. 2063 to match specific bugs with given confidence only.
2001 </para></listitem> 2064 </para></listitem>
2002 </varlistentry> 2065 </varlistentry>
2003 <varlistentry> 2066 <varlistentry>
2004 <term><literal>&lt;Not&gt;</literal></term> 2067 <term><literal>&lt;Not&gt;</literal></term>
2005 <listitem><para> 2068 <listitem><para>
2006 This element inverts the included child <literal>Match</literal>. I.e., you c an put a 2069 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 2070 <literal>Bug</literal> element in a <literal>Not</literal> clause in order to match any bug
2008 excluding the given one. 2071 excluding the given one.
2009 </para></listitem> 2072 </para></listitem>
2010 </varlistentry> 2073 </varlistentry>
2011 </variablelist> 2074 </variablelist>
2012 2075
2013 </sect1> 2076 </sect1>
2014 2077
2015 <sect1> 2078 <sect1>
2016 <title>Java element name matching</title> 2079 <title>Java element name matching</title>
2017 2080
2018 <para> 2081 <para>
2019 If the <literal>name</literal> attribute of <literal>Class</literal>, <literal>M ethod</literal> or 2082 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 2083 <literal>Method</literal> or <literal>Field</literal> starts with the ~ characte r
2084 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. 2085 a Java regular expression that is matched against the names of the Java element in question.
2022 </para> 2086 </para>
2023 2087
2024 <para> 2088 <para>
2025 Note that the pattern is matched against whole element name and therefore .* cla uses need to be used 2089 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. 2090 at pattern beginning and/or end to perform substring matching.
2027 </para> 2091 </para>
2028 2092
2029 <para> 2093 <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> 2094 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' --> 2316 <!-- test classes are suffixed by 'Test' -->
2253 2317
2254 <Not> 2318 <Not>
2255 <Bug code="IJU" /> <!-- 'IJU' is the code for bugs related to JUnit test c ode --> 2319 <Bug code="IJU" /> <!-- 'IJU' is the code for bugs related to JUnit test c ode -->
2256 </Not> 2320 </Not>
2257 </Match> 2321 </Match>
2258 ]]> 2322 ]]>
2259 </programlisting> 2323 </programlisting>
2260 </para> 2324 </para>
2261 2325
2326 <para>
2327 12. Full exclusion filter file to match all classes generated from Groovy sour ce files.
2328
2329 <programlisting>
2330 <![CDATA[
2331 <?xml version="1.0" encoding="UTF-8"?>
2332 <FindBugsFilter>
2333 <Match>
2334 <Source name="~.*\.groovy" />
2335 </Match>
2336 </FindBugsFilter>
2337 ]]>
2338 </programlisting>
2339 </para>
2340
2262 </sect1> 2341 </sect1>
2263 2342
2264 <sect1> 2343 <sect1>
2265 <title>Complete Example</title> 2344 <title>Complete Example</title>
2266 2345
2267 <programlisting> 2346 <programlisting>
2268 <![CDATA[ 2347 <![CDATA[
2269 <FindBugsFilter> 2348 <FindBugsFilter>
2270 <Match> 2349 <Match>
2271 <Class name="com.foobar.ClassNotToBeAnalyzed" /> 2350 <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 2533 &FindBugs; supports several annotations to express the developer's intent
2455 so that FindBugs can issue warnings more appropriately. You need to use 2534 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 2535 Java 5 to use annotations, and must place the annotations.jar and jsr305.jar
2457 files in the classpath while compiling your program. 2536 files in the classpath while compiling your program.
2458 </para> 2537 </para>
2459 2538
2460 <variablelist> 2539 <variablelist>
2461 <varlistentry> 2540 <varlistentry>
2462 <term><command>edu.umd.cs.findbugs.annotations.CheckForNull</command></term> 2541 <term><command>edu.umd.cs.findbugs.annotations.CheckForNull</command></term>
2463 <listitem> 2542 <listitem>
2464 <command>[Target]</command> Field, Method, Parameter 2543 <para>
2544 <command>[Target]</command> Field, Method, Parameter
2545 </para>
2465 </listitem> 2546 </listitem>
2466 <listitem> 2547 <listitem>
2467 <para> 2548 <para>
2468 The annotated element might be null, and uses of the element should check for nu ll. 2549 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. 2550 When this annotation is applied to a method it applies to the method return valu e.
2470 </para> 2551 </para>
2471 </listitem> 2552 </listitem>
2472 </varlistentry> 2553 </varlistentry>
2473 2554
2474 <varlistentry> 2555 <varlistentry>
2475 <term><command>edu.umd.cs.findbugs.annotations.CheckReturnValue</command></t erm> 2556 <term><command>edu.umd.cs.findbugs.annotations.CheckReturnValue</command></t erm>
2476 <listitem> 2557 <listitem>
2558 <para>
2477 <command>[Target]</command> Method, Constructor 2559 <command>[Target]</command> Method, Constructor
2560 </para>
2478 </listitem> 2561 </listitem>
2479 <listitem> 2562 <listitem>
2480 <variablelist> 2563 <variablelist>
2481 <varlistentry> 2564 <varlistentry>
2482 <term><command>[Parameter]</command></term> 2565 <term><command>[Parameter]</command></term>
2483 <listitem> 2566 <listitem>
2484 <para> 2567 <para>
2485 <command>priority:</command>The priority of the warning (HIGH, MED IUM, LOW, IGNORE). Default value:MEDIUM. 2568 <command>priority:</command>The priority of the warning (HIGH, MED IUM, LOW, IGNORE). Default value:MEDIUM.
2486 </para> 2569 </para>
2487 </listitem> 2570 </listitem>
2488 <listitem> 2571 <listitem>
2489 <para> 2572 <para>
2490 <command>explanation:</command>A textual explaination of why the r eturn value should be checked. Default value:"". 2573 <command>explanation:</command>A textual explaination of why the r eturn value should be checked. Default value:"".
2491 </para> 2574 </para>
2492 </listitem> 2575 </listitem>
2493 </varlistentry> 2576 </varlistentry>
2494 </variablelist> 2577 </variablelist>
2495 </listitem> 2578 </listitem>
2496 <listitem> 2579 <listitem>
2497 <para> 2580 <para>
2498 This annotation is used to denote a method whose return value should always be c hecked after invoking the method. 2581 This annotation is used to denote a method whose return value should always be c hecked after invoking the method.
2499 </para> 2582 </para>
2500 </listitem> 2583 </listitem>
2501 </varlistentry> 2584 </varlistentry>
2502 2585
2503 <varlistentry> 2586 <varlistentry>
2504 <term><command>edu.umd.cs.findbugs.annotations.DefaultAnnotation</command></ term> 2587 <term><command>edu.umd.cs.findbugs.annotations.DefaultAnnotation</command></ term>
2505 <listitem> 2588 <listitem>
2506 <command>[Target]</command> Type, Package 2589 <para>
2590 <command>[Target]</command> Type, Package
2591 </para>
2507 </listitem> 2592 </listitem>
2508 <listitem> 2593 <listitem>
2509 <variablelist> 2594 <variablelist>
2510 <varlistentry> 2595 <varlistentry>
2511 <term><command>[Parameter]</command></term> 2596 <term><command>[Parameter]</command></term>
2512 <listitem> 2597 <listitem>
2513 <para> 2598 <para>
2514 <command>value:</command>Annotation class objects. More than one c lass can be specified. 2599 <command>value:</command>Annotation class objects. More than one c lass can be specified.
2515 </para> 2600 </para>
2516 </listitem> 2601 </listitem>
(...skipping 12 matching lines...) Expand all
2529 such as @NonNull, @CheckForNull, or @CheckReturnValue. In particular, you can us e 2614 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 2615 @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. 2616 on those parameters, methods or fields that you want to allow to be null.
2532 </para> 2617 </para>
2533 </listitem> 2618 </listitem>
2534 </varlistentry> 2619 </varlistentry>
2535 2620
2536 <varlistentry> 2621 <varlistentry>
2537 <term><command>edu.umd.cs.findbugs.annotations.DefaultAnnotationForFields</c ommand></term> 2622 <term><command>edu.umd.cs.findbugs.annotations.DefaultAnnotationForFields</c ommand></term>
2538 <listitem> 2623 <listitem>
2624 <para>
2539 <command>[Target]</command> Type, Package 2625 <command>[Target]</command> Type, Package
2626 </para>
2540 </listitem> 2627 </listitem>
2541 <listitem> 2628 <listitem>
2542 <variablelist> 2629 <variablelist>
2543 <varlistentry> 2630 <varlistentry>
2544 <term><command>[Parameter]</command></term> 2631 <term><command>[Parameter]</command></term>
2545 <listitem> 2632 <listitem>
2546 <para> 2633 <para>
2547 <command>value:</command>Annotation class objects. More than one c lass can be specified. 2634 <command>value:</command>Annotation class objects. More than one c lass can be specified.
2548 </para> 2635 </para>
2549 </listitem> 2636 </listitem>
2550 <listitem> 2637 <listitem>
2551 <para> 2638 <para>
2552 <command>priority:</command>Default priority(HIGH, MEDIUM, LOW, IG NORE). Default value:MEDIUM. 2639 <command>priority:</command>Default priority(HIGH, MEDIUM, LOW, IG NORE). Default value:MEDIUM.
2553 </para> 2640 </para>
2554 </listitem> 2641 </listitem>
2555 </varlistentry> 2642 </varlistentry>
2556 </variablelist> 2643 </variablelist>
2557 </listitem> 2644 </listitem>
2558 <listitem> 2645 <listitem>
2559 <para> 2646 <para>
2560 This is same as the DefaultAnnotation except it only applys to fields. 2647 This is same as the DefaultAnnotation except it only applys to fields.
2561 </para> 2648 </para>
2562 </listitem> 2649 </listitem>
2563 </varlistentry> 2650 </varlistentry>
2564 2651
2565 <varlistentry> 2652 <varlistentry>
2566 <term><command>edu.umd.cs.findbugs.annotations.DefaultAnnotationForMethods</ command></term> 2653 <term><command>edu.umd.cs.findbugs.annotations.DefaultAnnotationForMethods</ command></term>
2567 <listitem> 2654 <listitem>
2655 <para>
2568 <command>[Target]</command> Type, Package 2656 <command>[Target]</command> Type, Package
2657 </para>
2569 </listitem> 2658 </listitem>
2570 <listitem> 2659 <listitem>
2571 <variablelist> 2660 <variablelist>
2572 <varlistentry> 2661 <varlistentry>
2573 <term><command>[Parameter]</command></term> 2662 <term><command>[Parameter]</command></term>
2574 <listitem> 2663 <listitem>
2575 <para> 2664 <para>
2576 <command>value:</command>Annotation class objects. More than one c lass can be specified. 2665 <command>value:</command>Annotation class objects. More than one c lass can be specified.
2577 </para> 2666 </para>
2578 </listitem> 2667 </listitem>
2579 <listitem> 2668 <listitem>
2580 <para> 2669 <para>
2581 <command>priority:</command>Default priority(HIGH, MEDIUM, LOW, IG NORE). Default value:MEDIUM. 2670 <command>priority:</command>Default priority(HIGH, MEDIUM, LOW, IG NORE). Default value:MEDIUM.
2582 </para> 2671 </para>
2583 </listitem> 2672 </listitem>
2584 </varlistentry> 2673 </varlistentry>
2585 </variablelist> 2674 </variablelist>
2586 </listitem> 2675 </listitem>
2587 <listitem> 2676 <listitem>
2588 <para> 2677 <para>
2589 This is same as the DefaultAnnotation except it only applys to methods. 2678 This is same as the DefaultAnnotation except it only applys to methods.
2590 </para> 2679 </para>
2591 </listitem> 2680 </listitem>
2592 </varlistentry> 2681 </varlistentry>
2593 2682
2594 <varlistentry> 2683 <varlistentry>
2595 <term><command>edu.umd.cs.findbugs.annotations.DefaultAnnotationForParameter s</command></term> 2684 <term><command>edu.umd.cs.findbugs.annotations.DefaultAnnotationForParameter s</command></term>
2596 <listitem> 2685 <listitem>
2686 <para>
2597 <command>[Target]</command> Type, Package 2687 <command>[Target]</command> Type, Package
2688 </para>
2598 </listitem> 2689 </listitem>
2599 <listitem> 2690 <listitem>
2600 <variablelist> 2691 <variablelist>
2601 <varlistentry> 2692 <varlistentry>
2602 <term><command>[Parameter]</command></term> 2693 <term><command>[Parameter]</command></term>
2603 <listitem> 2694 <listitem>
2604 <para> 2695 <para>
2605 <command>value:</command>Annotation class objects. More than one c lass can be specified. 2696 <command>value:</command>Annotation class objects. More than one c lass can be specified.
2606 </para> 2697 </para>
2607 </listitem> 2698 </listitem>
2608 <listitem> 2699 <listitem>
2609 <para> 2700 <para>
2610 <command>priority:</command>Default priority(HIGH, MEDIUM, LOW, IG NORE). Default value:MEDIUM. 2701 <command>priority:</command>Default priority(HIGH, MEDIUM, LOW, IG NORE). Default value:MEDIUM.
2611 </para> 2702 </para>
2612 </listitem> 2703 </listitem>
2613 </varlistentry> 2704 </varlistentry>
2614 </variablelist> 2705 </variablelist>
2615 </listitem> 2706 </listitem>
2616 <listitem> 2707 <listitem>
2617 <para> 2708 <para>
2618 This is same as the DefaultAnnotation except it only applys to method parameters . 2709 This is same as the DefaultAnnotation except it only applys to method parameters .
2619 </para> 2710 </para>
2620 </listitem> 2711 </listitem>
2621 </varlistentry> 2712 </varlistentry>
2622 2713
2623 <varlistentry> 2714 <varlistentry>
2624 <term><command>edu.umd.cs.findbugs.annotations.NonNull</command></term> 2715 <term><command>edu.umd.cs.findbugs.annotations.NonNull</command></term>
2625 <listitem> 2716 <listitem>
2717 <para>
2626 <command>[Target]</command> Field, Method, Parameter 2718 <command>[Target]</command> Field, Method, Parameter
2719 </para>
2627 </listitem> 2720 </listitem>
2628 <listitem> 2721 <listitem>
2629 <para> 2722 <para>
2630 The annotated element must not be null. 2723 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. 2724 Annotated fields must not be null after construction has completed. Annotated me thods must have non-null return values.
2632 </para> 2725 </para>
2633 </listitem> 2726 </listitem>
2634 </varlistentry> 2727 </varlistentry>
2635 2728
2636 <varlistentry> 2729 <varlistentry>
2637 <term><command>edu.umd.cs.findbugs.annotations.Nullable</command></term> 2730 <term><command>edu.umd.cs.findbugs.annotations.Nullable</command></term>
2638 <listitem> 2731 <listitem>
2732 <para>
2639 <command>[Target]</command> Field, Method, Parameter 2733 <command>[Target]</command> Field, Method, Parameter
2734 </para>
2640 </listitem> 2735 </listitem>
2641 <listitem> 2736 <listitem>
2642 <para> 2737 <para>
2643 The annotated element could be null under some circumstances. In general, this m eans 2738 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 2739 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 2740 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. 2741 treat the annotated items as though they had no annotation.
2647 </para> 2742 </para>
2648 <para> 2743 <para>
2649 In pratice this annotation is useful only for overriding an overarching NonNull 2744 In practice this annotation is useful only for overriding an overarching NonNull
2650 annotation. 2745 annotation.
2651 </para> 2746 </para>
2652 </listitem> 2747 </listitem>
2653 </varlistentry> 2748 </varlistentry>
2654 2749
2655 <varlistentry> 2750 <varlistentry>
2656 <term><command>edu.umd.cs.findbugs.annotations.OverrideMustInvoke</command>< /term> 2751 <term><command>edu.umd.cs.findbugs.annotations.OverrideMustInvoke</command>< /term>
2657 <listitem> 2752 <listitem>
2753 <para>
2658 <command>[Target]</command> Method 2754 <command>[Target]</command> Method
2755 </para>
2659 </listitem> 2756 </listitem>
2660 <listitem> 2757 <listitem>
2661 <variablelist> 2758 <variablelist>
2662 <varlistentry> 2759 <varlistentry>
2663 <term><command>[Parameter]</command></term> 2760 <term><command>[Parameter]</command></term>
2664 <listitem> 2761 <listitem>
2665 <para> 2762 <para>
2666 <command>value:</command>Specify when the super invocation should be 2763 <command>value:</command>Specify when the super invocation should be
2667 performed (FIRST, ANYTIME, LAST). Default value:ANYTIME. 2764 performed (FIRST, ANYTIME, LAST). Default value:ANYTIME.
2668 </para> 2765 </para>
(...skipping 17 matching lines...) Expand all
2686 <listitem> 2783 <listitem>
2687 <para> 2784 <para>
2688 This annotation is deprecated. Use CheckForNull instead. 2785 This annotation is deprecated. Use CheckForNull instead.
2689 </para> 2786 </para>
2690 </listitem> 2787 </listitem>
2691 </varlistentry> 2788 </varlistentry>
2692 2789
2693 <varlistentry> 2790 <varlistentry>
2694 <term><command>edu.umd.cs.findbugs.annotations.SuppressWarnings</command></t erm> 2791 <term><command>edu.umd.cs.findbugs.annotations.SuppressWarnings</command></t erm>
2695 <listitem> 2792 <listitem>
2793 <para>
2696 <command>[Target]</command> Type, Field, Method, Parameter, Constructor, P ackage 2794 <command>[Target]</command> Type, Field, Method, Parameter, Constructor, P ackage
2795 </para>
2697 </listitem> 2796 </listitem>
2698 <listitem> 2797 <listitem>
2699 <variablelist> 2798 <variablelist>
2700 <varlistentry> 2799 <varlistentry>
2701 <term><command>[Parameter]</command></term> 2800 <term><command>[Parameter]</command></term>
2702 <listitem> 2801 <listitem>
2703 <para> 2802 <para>
2704 <command>value:</command>The name of the warning. More than one na me can be specified. 2803 <command>value:</command>The name of the warning. More than one na me can be specified.
2705 </para> 2804 </para>
2706 </listitem> 2805 </listitem>
(...skipping 14 matching lines...) Expand all
2721 warning if an annotation contains an unrecognized warning name. Compiler vendors should 2820 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 2821 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. 2822 are encouraged to cooperate to ensure that the same names work across multiple c ompilers.
2724 </para> 2823 </para>
2725 </listitem> 2824 </listitem>
2726 </varlistentry> 2825 </varlistentry>
2727 2826
2728 <varlistentry> 2827 <varlistentry>
2729 <term><command>edu.umd.cs.findbugs.annotations.UnknownNullness</command></te rm> 2828 <term><command>edu.umd.cs.findbugs.annotations.UnknownNullness</command></te rm>
2730 <listitem> 2829 <listitem>
2830 <para>
2731 <command>[Target]</command> Field, Method, Parameter 2831 <command>[Target]</command> Field, Method, Parameter
2832 </para>
2732 </listitem> 2833 </listitem>
2733 <listitem> 2834 <listitem>
2734 <para> 2835 <para>
2735 Used to indicate that the nullness of the target is unknown, or my vary in unkno wn ways in subclasses. 2836 Used to indicate that the nullness of the target is unknown, or my vary in unkno wn ways in subclasses.
2736 </para> 2837 </para>
2737 </listitem> 2838 </listitem>
2738 </varlistentry> 2839 </varlistentry>
2739 2840
2740 <varlistentry> 2841 <varlistentry>
2741 <term><command>edu.umd.cs.findbugs.annotations.UnknownNullness</command></te rm> 2842 <term><command>edu.umd.cs.findbugs.annotations.UnknownNullness</command></te rm>
2742 <listitem> 2843 <listitem>
2844 <para>
2743 <command>[Target]</command> Field, Method, Parameter 2845 <command>[Target]</command> Field, Method, Parameter
2846 </para>
2744 </listitem> 2847 </listitem>
2745 <listitem> 2848 <listitem>
2746 <para> 2849 <para>
2747 Used to indicate that the nullness of the target is unknown, or my vary in unkno wn ways in subclasses. 2850 Used to indicate that the nullness of the target is unknown, or my vary in unkno wn ways in subclasses.
2748 </para> 2851 </para>
2749 </listitem> 2852 </listitem>
2750 </varlistentry> 2853 </varlistentry>
2751 </variablelist> 2854 </variablelist>
2752 2855
2753 <para> 2856 <para>
2754 &FindBugs; also supports the following annotations: 2857 &FindBugs; also supports the following annotations:
2755 <itemizedlist> 2858 <itemizedlist>
2756 <listitem>net.jcip.annotations.GuardedBy</listitem> 2859 <listitem><para>net.jcip.annotations.GuardedBy</para></listitem>
2757 <listitem>net.jcip.annotations.Immutable</listitem> 2860 <listitem><para>net.jcip.annotations.Immutable</para></listitem>
2758 <listitem>net.jcip.annotations.NotThreadSafe</listitem> 2861 <listitem><para>net.jcip.annotations.NotThreadSafe</para></listitem>
2759 <listitem>net.jcip.annotations.ThreadSafe</listitem> 2862 <listitem><para>net.jcip.annotations.ThreadSafe</para></listitem>
2760 </itemizedlist> 2863 </itemizedlist>
2761 </para> 2864 </para>
2762 <para> 2865 <para>
2763 You can refer the JCIP annotation <ulink url="http://jcip.net/annotations/doc/in dex.html"> 2866 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>. 2867 API documentation</ulink> at <ulink url="http://jcip.net/">Java Concurrency in P ractice</ulink>.
2765 </para> 2868 </para>
2766 </chapter> 2869 </chapter>
2767 2870
2768 <!-- 2871 <!--
2769 ************************************************************************** 2872 **************************************************************************
(...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after
3759 <para>Phil Crosby enhanced the Eclipse plugin to add a view 3862 <para>Phil Crosby enhanced the Eclipse plugin to add a view
3760 to display the bug details.</para> 3863 to display the bug details.</para>
3761 3864
3762 <para>Dave Brosius fixed a number of bugs, added user preferences 3865 <para>Dave Brosius fixed a number of bugs, added user preferences
3763 to the Swing GUI, improved several bug detectors, and 3866 to the Swing GUI, improved several bug detectors, and
3764 contributed the string concatenation detector.</para> 3867 contributed the string concatenation detector.</para>
3765 3868
3766 <para>Thomas Klaeger contributed a number of bug fixes and 3869 <para>Thomas Klaeger contributed a number of bug fixes and
3767 bug detector improvements.</para> 3870 bug detector improvements.</para>
3768 3871
3769 <para>Andrei Loskutov made a number of improvements to the 3872 <para>Andrey Loskutov made a number of bug fixes and
3770 Eclipse plugin.</para> 3873 bug detector improvements. He is maintainer of the Eclipse plugin.</para>
3771 3874
3772 <para>Brian Goetz contributed a major refactoring of the 3875 <para>Brian Goetz contributed a major refactoring of the
3773 visitor classes to improve readability and understandability.</para> 3876 visitor classes to improve readability and understandability.</para>
3774 3877
3775 <para> Pete Angstadt fixed several problems in the Swing GUI.</para> 3878 <para> Pete Angstadt fixed several problems in the Swing GUI.</para>
3776 3879
3777 <para>Francis Lalonde provided a task resource file for the 3880 <para>Francis Lalonde provided a task resource file for the
3778 FindBugs Ant task.</para> 3881 FindBugs Ant task.</para>
3779 3882
3780 <para>Garvin LeClaire contributed support for output in 3883 <para>Garvin LeClaire contributed support for output in
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
3981 </blockquote> 4084 </blockquote>
3982 4085
3983 </sect2> 4086 </sect2>
3984 4087
3985 </sect1> 4088 </sect1>
3986 4089
3987 </chapter> 4090 </chapter>
3988 4091
3989 4092
3990 </book> 4093 </book>
OLDNEW
« no previous file with comments | « doc/mailingLists.html ('k') | doc/manual/acknowledgments.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698