diff --git a/pom.xml b/pom.xml
index 2f2e2e8ed..cf21fbf8b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -175,7 +175,7 @@
br.com.rjconsultores
GeneradorBoletosCNAB
- 1.1.0
+ 1.1.2
diff --git a/src/com/rjconsultores/ventaboletos/service/impl/ArquivoRemessaCNABImpl.java b/src/com/rjconsultores/ventaboletos/service/impl/ArquivoRemessaCNABImpl.java
index d5594d51d..81edc2916 100644
--- a/src/com/rjconsultores/ventaboletos/service/impl/ArquivoRemessaCNABImpl.java
+++ b/src/com/rjconsultores/ventaboletos/service/impl/ArquivoRemessaCNABImpl.java
@@ -111,25 +111,21 @@ public class ArquivoRemessaCNABImpl implements ArquivoRemessaCNAB {
public boolean boletosOk(List boletos) {
BancoLayout banco = null;
- boolean toReturn = Boolean.TRUE;
if(boletos != null && !boletos.isEmpty()) {
- for (java.util.Iterator it = boletos.iterator(); it.hasNext();) {
-
- FechamentoBoleto fechamentoBoleto = it.next();
+ for (FechamentoBoleto fechamentoBoleto : boletos) {
if(banco == null){
banco = BancoLayout.getInstanceByCodBanco(remessaCNABBancosDAO.findBanco(fechamentoBoleto.getFechamentoCntcorrente().getEmpresa()));
}
- if(!NossoNumeroUtils.validaNossoNumero(fechamentoBoleto.getNossonumero(), banco)){
- it.remove();
- toReturn = Boolean.FALSE;
+ if(!NossoNumeroUtils.validaNossoNumero(fechamentoBoleto.getNossonumero(), banco)){
+ return false;
}
}
}
- return toReturn;
+ return true;
}
@Override