File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
src/java.base/share/classes/java/text Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 1996, 2023 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 1996, 2024 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
@@ -862,10 +862,13 @@ private void initialize( Locale locale ) {
862862 * Obtains non-format single character from String
863863 */
864864 private char findNonFormatChar (String src , char defChar ) {
865- return (char )src .chars ()
866- .filter (c -> Character .getType (c ) != Character .FORMAT )
867- .findFirst ()
868- .orElse (defChar );
865+ for (int i = 0 ; i < src .length (); i ++) {
866+ char c = src .charAt (i );
867+ if (Character .getType (c ) != Character .FORMAT ) {
868+ return c ;
869+ }
870+ }
871+ return defChar ;
869872 }
870873
871874 /**
You can’t perform that action at this time.
0 commit comments