From 6881c33f6ea17d80ab93ac89e61e39f8fb5c2ba4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Plantiko?= Date: Wed, 9 Apr 2025 20:53:16 +0000 Subject: [PATCH] abaplint detected a false negative "Exit is only allowed in loops" - it is wrong by any programming standard to prohibit the EXIT statement in WHILE loops (as it is used here) But I used this commit to change the idiom `WHILE lo_iterator->has_next( )` to `WHILE lo_iterator->has_next( ) EQ abap_true` for backwards compatibility instead --- src/zcl_excel_writer_2007.clas.abap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zcl_excel_writer_2007.clas.abap b/src/zcl_excel_writer_2007.clas.abap index eb33056..d1dd862 100644 --- a/src/zcl_excel_writer_2007.clas.abap +++ b/src/zcl_excel_writer_2007.clas.abap @@ -3270,7 +3270,7 @@ METHOD create_xl_drawing_for_comments. ). lo_iterator = lo_comments->get_iterator( ). - WHILE lo_iterator->has_next( ). + WHILE lo_iterator->has_next( ) EQ abap_true. lo_anchor ?= lo_anchors->get_item( sy-index - 1 ). IF lo_anchor IS NOT BOUND. EXIT.