-
Notifications
You must be signed in to change notification settings - Fork 361
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Character.isWhitespace(-1) returns false (#3284)
Fix #3154 Previously, `Character.isWhitespace(-1)` and `Character.isLowerCase(-1)` throw `java.lang.ArrayIndexOutOfBoundsException: -1`. However, they should return `false` as other java std libraries do. We may want to fix `getTypeLT256`, but this commit guaranteed that the codepoint is gte 0 on call-site of `getTypeLT256` for not introducing the duplicated check of `codePoint < 0`.
- Loading branch information
1 parent
89f8ed5
commit f71420c
Showing
2 changed files
with
27 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters