isartcanyameres/opennaas — comment on commit c4c122ace0e29959e8207efab59946241b44fd89
File: manticore/bundles/net.i2cat.mantychore.actionsets.junos/src/main/java/net/i2cat/mantychore/actionsets/junos/actions/ospf/EnableOSPFInInterfaceAction.java line 99
By gbehrmann:

Unless you explicitly want to find the last match, using a return inside the loop here is cleaner and faster.

Or with Guava:

OSPFProtocolEndpoint endpoint =
(OSPFProtocolEndpoint) find(lProtocolEndpoint, instanceOf(OSPFProtocolEndpoint.class), null);
return (endpoint == null) ? null : IPUtilsHelper.ipv4LongToString(endpoint.getOSPFArea().getAreaID());