On Mon, 13 Jul 2026 16:41:47 GMT, Mark Powers <[email protected]> wrote:

>> 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);
>>                 }
>
> You are right. Thanks for catching this.

Hmm, all spaces does not seem like a valid attribute name so maybe it should 
throw an exception. Please look into that further. But I'll approve this now 
since it retains current behavior.

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

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

Reply via email to