8144915: TextField throws NPE
Reviewed-by: ssadetsky, serb
This commit is contained in:
parent
18ace0f732
commit
f23d71b4f4
@ -309,6 +309,9 @@ public class TextField extends TextComponent {
|
||||
* @return Returns text after replacing EOL characters.
|
||||
*/
|
||||
private static String replaceEOL(String text) {
|
||||
if (text == null) {
|
||||
return text;
|
||||
}
|
||||
String[] strEOLs = {System.lineSeparator(), "\n"};
|
||||
for (String eol : strEOLs) {
|
||||
if (text.contains(eol)) {
|
||||
|
Loading…
Reference in New Issue
Block a user