If you are experiencing an issue please mention the full platform your 
issue applies to:
IDE: NetBeans
OS: iOS
Device: iPhone 4 (ios 7.1.2), iPhone 5 (ios 9.3.2)
CN1 version: 3.4.3

I found a very rare bug in ios, when an exception occurs when trying to get 
a substring of an empty string inside a for loop, even when this code is 
inside a try-catch block, the system breaks the loop. Here is the code to 
reproduce it:

    String[] names = {"Ulises", "John", "", "Alexis", "Willy"}; 
    String resultStr = "";
    for (int i = 0; i < names.length; i++){
        try{
            String firstChar = names[i].substring(0, 1);
            resultStr += firstChar;
        }catch(Exception ex){
            Dialog.show("Error Dialog", "This dialog will show but the for 
statment should not have to break", "ok", "cancel");
        }
    }
    Dialog.show("Result Dialog", resultStr, "ok", "cancel");

*The result string should be "UJAW" but in iOS the result string is "UJ".*

I have already submited the issue #1834

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/5836a656-78a4-41a5-88c4-a6b8625e1917%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to