Skip to content

Commit

Permalink
Merge pull request #6 from reciprocum/patch-5
Browse files Browse the repository at this point in the history
Update GPXParser.java
  • Loading branch information
urizev committed Jan 8, 2016
2 parents 65dfd39 + ef52415 commit 0d8e98b
Showing 1 changed file with 9 additions and 19 deletions.
28 changes: 9 additions & 19 deletions src/com/urizev/gpx/GPXParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -514,16 +514,11 @@ private Route parseRoute(Node node) throws Exception {
}
} else if (GPXConstants.EXTENSIONS_NODE.equals(currentNode
.getNodeName())) {
Iterator<IExtensionParser> it = this.extensionParsers
.iterator();
while (it.hasNext()) {
while (it.hasNext()) {
IExtensionParser parser = it.next();
Object data = parser
.parseRouteExtension(currentNode);
rte.addExtensionData(parser.getId(), data);
}
}
for ( IExtensionParser extensionParser : extensionParsers )
{
Object data = extensionParser.parseRouteExtension( currentNode );
if (data != null) rte.addExtensionData( extensionParser.getId( ), data );
}
}
}
}
Expand Down Expand Up @@ -568,15 +563,10 @@ private Track parseTrack(Node node) throws Exception {
trk.addTrackSegment(segment);
} else if (GPXConstants.EXTENSIONS_NODE.equals(currentNode
.getNodeName())) {
Iterator<IExtensionParser> it = this.extensionParsers
.iterator();
while (it.hasNext()) {
while (it.hasNext()) {
IExtensionParser parser = it.next();
Object data = parser
.parseTrackExtension(currentNode);
trk.addExtensionData(parser.getId(), data);
}
for ( IExtensionParser extensionParser : extensionParsers )
{
Object data = extensionParser.parseTrackExtension( currentNode );
if (data != null) trk.addExtensionData( extensionParser.getId( ), data );
}
}
}
Expand Down

0 comments on commit 0d8e98b

Please sign in to comment.