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, 2022 , 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
@@ -849,10 +849,13 @@ private void initialize( Locale locale ) {
849849 * Obtains non-format single character from String
850850 */
851851 private char findNonFormatChar (String src , char defChar ) {
852- return (char )src .chars ()
853- .filter (c -> Character .getType (c ) != Character .FORMAT )
854- .findFirst ()
855- .orElse (defChar );
852+ for (int i = 0 ; i < src .length (); i ++) {
853+ char c = src .charAt (i );
854+ if (Character .getType (c ) != Character .FORMAT ) {
855+ return c ;
856+ }
857+ }
858+ return defChar ;
856859 }
857860
858861 /**
You can’t perform that action at this time.
0 commit comments