On Mon, 6 Jul 2026 15:16:38 GMT, Mark Powers <[email protected]> wrote:

> https://bugs.openjdk.org/browse/JDK-8358549
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

src/java.base/share/classes/java/security/Provider.java line 1094:

> 1092:                         break;
> 1093:                     }
> 1094:                 }

Note that the old version would use an empty String when all of `attrName` was 
spaces.

Suggestion:

                int pos = 0;
                for (; pos < attrName.length(); pos++) {
                    if (attrName.charAt(pos) != ' ') {
                        break;
                    }
                }
                if (pos > 0) {
                    attrName = attrName.substring(pos);
                }

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/31792#discussion_r3562942078

Reply via email to