-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathUnusedField.qhelp
More file actions
35 lines (24 loc) · 1.01 KB
/
UnusedField.qhelp
File metadata and controls
35 lines (24 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE qhelp PUBLIC
"-//Semmle//qhelp//EN"
"qhelp.dtd">
<qhelp>
<overview>
<p>A field that is neither public nor protected and never accessed
is typically a leftover from old refactorings or a sign of incomplete or pending
code changes.</p>
<p>This rule does not apply to a field in a serializable class because it may be accessed during
serialization and deserialization.</p>
<p>Fields annotated with <code>@SuppressWarnings("unused")</code> are also not reported.</p>
</overview>
<recommendation>
<p>If an unused field is a leftover from old refactorings, you should just remove it. If it indicates
incomplete or pending code changes, finish making the changes and remove the field if it is not
needed.</p>
</recommendation>
<references>
<li>
Help - Eclipse Platform:
<a href="http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Freference%2Fpreferences%2Fjava%2Fcompiler%2Fref-preferences-errors-warnings.htm">Java Compiler Errors/Warnings Preferences</a>.
</li>
</references>
</qhelp>