I have a processing with one class calling another.
Example:
I have the registry0100 . In it I call ED022 , ED021 , etc ...
In this ED022 , I have some validations, for example:
boolean achou = false;
if (modulo.equals("2")) {
String[] linhaSeparada = listaParametros.get(5).split(Pattern.quote("|"));
if (linhaSeparada[0].equals(tipoCnso)) {
achou = true;
}
}
if (!achou) {
apontandoErroAlerta(arquivo, erroAlerta, tipoRegistroCampo, tipoRegistro, erroAlertaEncontradoRepository,
erroAlertaCampoEncontradoRepository, tipoCnso, contadorLinha, registro, erroAlertaRepository,
tipoRegistroCampoRepository, tipoRegistroRepository);
return;
}
If the variable found turns true , it points to the error and should stop the process. But not to.
You should not go to the ED021 error, but it will.
How to stop the process itself.