Use JDT clean up "Convert field into local variable if field is used
only local"
No need to save the value as field if it is only used locally.
Change-Id: I970e893d3cfe9f9ef2c408129777cc927169fce2
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
diff --git a/org.eclipse.help.base/src/org/eclipse/help/internal/search/IndexingOperation.java b/org.eclipse.help.base/src/org/eclipse/help/internal/search/IndexingOperation.java
index c70bc2e..6da41d4 100644
--- a/org.eclipse.help.base/src/org/eclipse/help/internal/search/IndexingOperation.java
+++ b/org.eclipse.help.base/src/org/eclipse/help/internal/search/IndexingOperation.java
@@ -54,7 +54,6 @@
private static final String ELEMENT_NAME_INDEX = "index"; //$NON-NLS-1$
private static final String ATTRIBUTE_NAME_PATH = "path"; //$NON-NLS-1$
- private int numAdded;
private int numRemoved;
private SearchIndex index = null;
@@ -89,7 +88,7 @@
Collection<URL> staleDocs = getRemovedDocuments(index);
numRemoved = staleDocs.size();
Collection<URL> newDocs = getAddedDocuments(index);
- numAdded = newDocs.size();
+ int numAdded = newDocs.size();
// if collection is empty, we may return right away
// need to check if we have to do anything to the progress monitor
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IndexTypeinPart.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IndexTypeinPart.java
index c31d426..39e007d 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IndexTypeinPart.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/views/IndexTypeinPart.java
@@ -48,7 +48,6 @@
private Button indexButton;
private IndexPart indexPart;
private Tree indexTree;
- private int itemCount;
private String[] rootItems;
private int currentIndex;
@@ -168,7 +167,7 @@
indexTree = indexPart.getTreeWidget();
if (indexTree == null) return;
- itemCount = indexTree.getItemCount();
+ int itemCount = indexTree.getItemCount();
if (itemCount == 0) {
indexTree = null;
} else {