Commit 905c81f5 authored by Kristof Szabados's avatar Kristof Szabados
Browse files

could be final.


Signed-off-by: Kristof Szabados's avatarKristof Szabados <Kristof.Szabados@ericsson.com>
parent 591255fa
......@@ -255,7 +255,7 @@ public class ExtractToFunctionRefactoring extends Refactoring {
}
final StringBuilder ret = new StringBuilder();
for (StringBuilder sb: functionText) {
for (final StringBuilder sb: functionText) {
ret.append(sb);
}
functionTextReady = ret.toString();
......@@ -274,7 +274,7 @@ public class ExtractToFunctionRefactoring extends Refactoring {
}
final StringBuilder ret = new StringBuilder();
for (StringBuilder sb: functionCallText) {
for (final StringBuilder sb: functionCallText) {
ret.append(sb);
}
functionCallTextReady = ret.toString();
......
......@@ -111,7 +111,7 @@ class FunctionCreator implements IModelProvider<ParamTableItem> {
if (params == null) {
return items;
}
for (Param p: params) {
for (final Param p: params) {
if (p.getPassingType() == ArgumentPassingType.NONE) {
continue;
}
......@@ -132,9 +132,9 @@ class FunctionCreator implements IModelProvider<ParamTableItem> {
if (params == null) {
return hitSet;
}
for (Param p: params) {
for (final Param p: params) {
final List<ISubReference> srs = p.getRefs();
for (ISubReference isr: srs) {
for (final ISubReference isr: srs) {
hitSet.add(new TextReplaceItem(isr, p, sourceText, sourceOffset));
}
if (p.isDeclaredInside()) {
......
......@@ -86,7 +86,7 @@ class ParamCollector {
private String createDebugInfo() {
final StringBuilder sb = new StringBuilder();
sb.append("ExtractToFunctionRefactoring->ParamCollector debug info: \n");
for (Param p: params) {
for (final Param p: params) {
sb.append(p.createDebugInfo());
sb.append('\n');
}
......@@ -228,7 +228,7 @@ class ParamCollector {
* @return whether there are any refs that are located in <code>locationModule</code> beyond location <code>loc</code>
*/
private boolean isAnyRefsAfterLocation(final Module locationModule, final Location loc, final Map<Module, List<Hit>> refs) {
for (Map.Entry<Module, List<Hit>> e: refs.entrySet()) {
for (final Map.Entry<Module, List<Hit>> e: refs.entrySet()) {
if (!e.getKey().equals(locationModule)) {
continue;
}
......@@ -250,7 +250,7 @@ class ParamCollector {
*/
private List<ISubReference> getRefsInRange(final Module module, final Map<Module, List<Hit>> refs) {
final List<ISubReference> subrefs = new ArrayList<ISubReference>();
for (Map.Entry<Module, List<Hit>> e: refs.entrySet()) {
for (final Map.Entry<Module, List<Hit>> e: refs.entrySet()) {
if (!e.getKey().equals(module)) {
continue;
}
......@@ -280,13 +280,13 @@ class ParamCollector {
ErrorReporter.logError("ParamFinderVisitor::isAnyReferenceOutsideRange(): StatementList 'toVisit' is null! ");
return false;
}
for (Map.Entry<Module, List<Hit>> e: refs.entrySet()) {
for (final Map.Entry<Module, List<Hit>> e: refs.entrySet()) {
if (!e.getKey().equals(moduleOfRange)) {
return true;
}
final List<Hit> hs = e.getValue();
for (Hit h: hs) {
for (final Hit h: hs) {
if (!isInsideRange(h.reference.getLocation())) {
return true;
}
......
......@@ -649,7 +649,7 @@ class SelectionFinder {
sb.append(" Return clause: ");
sb.append(returnType == null ? "null" : returnType.getIdentifier());
sb.append(" Warnings: ");
for (RefactoringStatusEntry rse : warnings) {
for (final RefactoringStatusEntry rse : warnings) {
sb.append("severity: " + rse.getSeverity() + "; msg: "
+ rse.getMessage());
sb.append('\n');
......
......@@ -28,7 +28,7 @@ class StatementList extends ASTNode implements ILocateableNode {
protected List<Statement> statements;
protected StatementBlock myStatementBlock;
protected StatementList(List<Statement> statements) {
protected StatementList(final List<Statement> statements) {
this.statements = statements;
if (statements == null) {
this.statements = new ArrayList<Statement>();
......@@ -71,7 +71,7 @@ class StatementList extends ASTNode implements ILocateableNode {
@Override
protected boolean memberAccept(final ASTVisitor v) {
for (Statement s: statements) {
for (final Statement s: statements) {
if (!s.accept(v)) {
return false;
}
......@@ -103,7 +103,7 @@ class StatementList extends ASTNode implements ILocateableNode {
sb.append("(count: ");
sb.append(statements.size());
sb.append(") \n");
for (Statement s: statements) {
for (final Statement s: statements) {
sb.append(" ");
sb.append(s.getStatementName());
sb.append(", loc: ");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment