- edited description
Entering empty class name causes StringOutOfBoundsException
Issue #26
resolved
Steps to reproduce:
- Create a new class
- Don't enter text
- Press enter
Result:
Exception in thread "Animation Thread" java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(String.java:686)
at ca.mcgill.ram.ui.handler.impl.ClassNameHandler.shouldDismissKeyboard(ClassNameHandler.java:52)
at ca.mcgill.ram.ui.views.TextView.verifyKeyboardDismissed(TextView.java:263)
at ca.mcgill.ram.events.RamKeyboard.dimissKeyboard(RamKeyboard.java:101)
at ca.mcgill.ram.ui.components.RamTextComponent.appendCharByUnicode(RamTextComponent.java:227)
This is due to the following line in ClassNameHandler.shouldDismissKeyboard(...)
:
textView.setText(Character.toUpperCase(text.charAt(0)) + text.substring(1));
Comments (3)
-
reporter -
reporter -
assigned issue to
-
assigned issue to
-
reporter - changed status to resolved
Fixed issue
#26: Making first letter upper case not performed when text is empty.→ <<cset babb188418c4>>
- Log in to comment