Bug 529426 - [sonar] Resolve "instanceof will always return true"

Change-Id: If011ab24cdbd99b312b58b3e497bca63dfcc2793
Signed-off-by: René Purrio <rpurrio@itemis.de>
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureCreator.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureCreator.java
index 9264a19..c92c109 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureCreator.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureCreator.java
@@ -378,11 +378,10 @@
 				for (int i= 0; i < children.length; i++) {
 					IStructureComparator child= (IStructureComparator) children[i];
 					if (child instanceof ITypedElement && child instanceof DocumentRangeNode) {
-						String n1= null;
-						if (child instanceof DocumentRangeNode)
-							n1= ((DocumentRangeNode)child).getId();
-						if (n1 == null)
+						String n1= ((DocumentRangeNode)child).getId();
+						if (n1 == null) {
 							n1= ((ITypedElement)child).getName();
+						}
 						String n2= path[index];
 						if (n1.equals(n2)) {
 							if (index == path.length-1)