Commit 0d13712c authored by Matti Pulkkinen's avatar Matti Pulkkinen
Browse files

removed unnecessary object type check

parent 8acdc0f1
......@@ -141,12 +141,10 @@ public class MapDialog extends JFrame {
Element mapservice = document.getDocumentElement();
NodeList capabilities = mapservice.getElementsByTagName("Layer");
for (int i = 0; i < capabilities.getLength(); i++) {
if (capabilities.item(i) instanceof Element) {
Element layer = (Element) capabilities.item(i);
String name = layer.getElementsByTagName("Name").item(0).getTextContent();
String title = layer.getElementsByTagName("Title").item(0).getTextContent();
this.leftPanel.add(new LayerCheckBox(name, title, false));
}
Element layer = (Element) capabilities.item(i);
String name = layer.getElementsByTagName("Name").item(0).getTextContent();
String title = layer.getElementsByTagName("Title").item(0).getTextContent();
this.leftPanel.add(new LayerCheckBox(name, title, false));
}
this.leftPanel.add(this.refreshB);
......
Supports Markdown
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