Примеры ошибок, обнаруженных с помощью диагностики V6037
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(....));
}
....
}