lttng/tmf: Enable and fix parameter assignment warnings
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / internal / tmf / ui / parsers / wizards / CustomXmlParserInputWizardPage.java
index d6d0398470691a6df3faddfaac9cfc56a1f07f72..8efe1083e9914c32874d9ecfba3cc07524278ef2 100644 (file)
@@ -1161,9 +1161,10 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
         }
 
         private void removeAttribute(int attributeNumber) {
-            if (--attributeNumber < attributes.size()) {
-                attributes.remove(attributeNumber).dispose();
-                for (int i = attributeNumber; i < attributes.size(); i++) {
+            int nb = attributeNumber;
+            if (--nb < attributes.size()) {
+                attributes.remove(nb).dispose();
+                for (int i = nb; i < attributes.size(); i++) {
                     attributes.get(i).setAttributeNumber(i + 1);
                 }
                 elementContainer.layout();
@@ -1382,15 +1383,16 @@ public class CustomXmlParserInputWizardPage extends WizardPage {
     }
 
     private Element getPreviewElement(InputElement inputElement) {
+        InputElement currentElement = inputElement;
         Element element = documentElement;
         if (element != null) {
             if (!documentElement.getNodeName().equals(definition.rootInputElement.elementName)) {
                 return null;
             }
             ArrayList<String> elementNames = new ArrayList<String>();
-            while (inputElement != null) {
-                elementNames.add(inputElement.elementName);
-                inputElement = inputElement.parentElement;
+            while (currentElement != null) {
+                elementNames.add(currentElement.elementName);
+                currentElement = currentElement.parentElement;
             }
             for (int i = elementNames.size() - 1; --i >= 0;) {
                 NodeList childList = element.getChildNodes();
This page took 0.028159 seconds and 5 git commands to generate.