Examples of errors detected by the V6037 diagnostic
V6037. An unconditional 'break/continue/return/goto' within a loop.
CUBA Platform
V6037 An unconditional 'return' within a loop. QueryCacheManager.java(128)
public <T> T getSingleResultFromCache(QueryKey queryKey, List<View> views) {
....
for (Object id : queryResult.getResult()) {
return (T) em.find(metaClass.getJavaClass(), id, views.toArray(....));
}
....
}