On Jul 10, 2006, at 12:16 PM, Matthew Wringe wrote:

On Mon, 2006-07-10 at 10:08 -0600, Tom Tromey wrote:
"Matthew" == Matthew Wringe <[EMAIL PROTECTED]> writes:

Matthew> If this patch is approved, I can commit it.

Matthew> -    // If there is no property "service.algorithm"
Matthew> - if (provider.getProperty(service + "." + algorithm) == null)

There's something here I don't understand.

Looking at java.security.Provider, I see that it tries to
canonicalize the keys -- see toCanonicalKey().

Would just changing this to use get() fix the problem?
Or perhaps it would be better to override getProperty in Provider?

Changing it to get() does fix the problem if the user only ever uses the
classpath provider. If they were to use any other provider, it will
fail.

The classpath provider overwrites the hashtable's get() method to ignore the case (I have no idea why this is being done). Other providers do not
do this, nor is it expected behaviour.

The original patch I submitted does interact with other providers
without a problem.


I think putting the case-insensitive logic in Engine is best; it will work for providers that don't just use `put,' like you say, and with it we can do away with toCanonicalKey in Provider, which I don't like very much (it makes every key upper case, which is an ugly way to do it).

I think your approach (and patch) is good, and that we should additionally remove toCanonicalKey.


Attachment: PGP.sig
Description: This is a digitally signed message part

Reply via email to