Update for feedback

This commit is contained in:
Felicity Chapman
2018-11-13 16:34:06 +00:00
parent fa8fd0513c
commit fe15159756
4 changed files with 4 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
/**
* @name Local variable is initialized but not used
* @description Assigning a value to a local variable that is not used may indicate an error in the code.
* @description A local variable that is initialized but not subsequently used may indicate an error in the code.
* @kind problem
* @problem.severity recommendation
* @precision low

View File

@@ -1,6 +1,6 @@
/**
* @name Unused local variable
* @description Assigning a value to a local variable that is not used may indicate incomplete code.
* @description A local variable that is not initialized, assigned, or read may indicate incomplete code.
* @kind problem
* @problem.severity recommendation
* @precision low

View File

@@ -7,7 +7,7 @@ class InexactVarArg
public static void main(String[] args) {
String[] words = { "apple", "banana", "cherry" };
String[][] lists = { words, words };
length(words); // wrong: Argument does not clarify
length(words); // avoid: Argument does not clarify
length(lists); // which parameter type is used.
}
}

View File

@@ -49,7 +49,7 @@ versions of Eclipse, the output may be:</p>
<sample src="InexactVarArg.java" />
<p>To remove this dependency on the compiler, <code>length(words)</code> should be replaced by either of the following:</p>
<p>To avoid this compiler-dependent behavior, <code>length(words)</code> should be replaced by either of the following:</p>
<ul>
<li><code>length((Object) words)</code></li>