Skip to content

Commit

Permalink
Optimize for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
lr279911 authored and lr279911 committed Aug 7, 2024
1 parent 9909637 commit c863024
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,16 @@ private List<Widget> readWidgetsAllowingRetry(final Element parent_xml)
final List<Widget> widgets = new ArrayList<>();
final String source = xml_file == null ? "line" : xml_file;
widget_errors_during_parse = 0;
for (final Element widget_xml : XMLUtil.getChildElements(parent_xml, XMLTags.WIDGET))
Iterable<Element> childElements = XMLUtil.getChildElements(parent_xml, XMLTags.WIDGET);
for (final Element widget_xml : childElements)
{
boolean added = false;

try
{
widgets.add(readWidget(widget_xml));
//Assign widget for debugging mode
Widget widget = readWidget(widget_xml);
widgets.add(widget);
added = true;
}
catch (ParseAgainException ex)
Expand Down

0 comments on commit c863024

Please sign in to comment.