diff options
| author | Lars Vogel | 2021-03-29 12:49:08 +0000 |
|---|---|---|
| committer | Fabrice Tiercelin | 2021-03-30 09:14:57 +0000 |
| commit | 98d73a5b7aa3afcd5971a300cecede6c7f409664 (patch) | |
| tree | 2f702860f6f48b64ea7f1a2d173579f759d3aee1 | |
| parent | b0a071bce332073e01a478150282e8c7dc7cce01 (diff) | |
| download | eclipse.jdt.core-98d73a5b7aa3afcd5971a300cecede6c7f409664.tar.gz eclipse.jdt.core-98d73a5b7aa3afcd5971a300cecede6c7f409664.tar.xz eclipse.jdt.core-98d73a5b7aa3afcd5971a300cecede6c7f409664.zip | |
Bug 572213 - Dogfooding - Use "Exit loop earlier" in JDT core
Changes the loop in Javadoc to be finished by a break statement. This
way it is handled as the rest of the JDT core, using a break statement
instead of an additional condition. This aligns the usage of a break
pattern in the JDT core code base instead of using a different pattern
to exit a loop in one place.
Change-Id: I4a7223a053d11d7e68cc2c6d88a370b0ebb74619
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
| -rw-r--r-- | org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java index cd8de06778..f52a9b7a2b 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java @@ -609,10 +609,11 @@ public class Javadoc extends ASTNode { for (int i = 0; i < argumentsSize; i++) { Argument arg = methodDecl.arguments[i]; boolean found = false; - for (int j = 0; j < maxBindings && !found; j++) { + for (int j = 0; j < maxBindings; j++) { LocalVariableBinding binding = bindings[j]; if (arg.binding == binding) { found = true; + break; } } if (!found) { |
