-
-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix NullPointerException in TextRenderer#renderWithLinebreaks #822
Conversation
Fix NullPointerException in TextRenderer#renderWithLinebreaks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing, your first Pull Request in the LITIENGINE repository! You have earned the rank of "contributor" - let us know your nickname in the Forum and on Discord so we can reward you with the new role :).
Oh nice! I would like the nickname |
Looks good to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your improvements! I have only minor remarks (see comments).
TextRenderer#renderWithLinebreaks throws a NullPointerException when invoked with a multiline string:
I tracked this down to a typo on line 334:
>= text.length()
should be>= s.length()
, ass
is the string for the current line andtext
is the whole multiline string.This pull request:
The unit test checks that no exception is thrown and that something is rendered, but I was unable to fully assert that the correct Glyphs are drawn due to Oracle locking down the
sun.font
module.