File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
de.vogella.xml.stax.reader/src/de/vogella/xml/stax/read Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ public List<Item> readConfig(String configFile) {
4343 if (event .isStartElement ()) {
4444 StartElement startElement = event .asStartElement ();
4545 // If we have a item element we create a new item
46- if (startElement .getName ().getLocalPart () == (ITEM )) {
46+ if (startElement .getName ().getLocalPart (). equals (ITEM )) {
4747 item = new Item ();
4848 // We read the attributes from this tag and add the date
4949 // attribute to our object
@@ -90,7 +90,7 @@ public List<Item> readConfig(String configFile) {
9090 // If we reach the end of an item element we add it to the list
9191 if (event .isEndElement ()) {
9292 EndElement endElement = event .asEndElement ();
93- if (endElement .getName ().getLocalPart () == (ITEM )) {
93+ if (endElement .getName ().getLocalPart (). equals (ITEM )) {
9494 items .add (item );
9595 }
9696 }
You can’t perform that action at this time.
0 commit comments