On 10/03/2011 18:33, Neil Richards wrote:
On 10 March 2011 03:18, Charles Lee<litt...@linux.vnet.ibm.com>  wrote:
With a quick search in the SocketPermission using "cname =" as search word,
cname always seems to be lower cases. But hostname does not. It may need
some rework on the patch.

I think using String.regionMatches() [1] for the comparison (with
'ignoreCase' set to 'true') would solve the case-sensitivity problem.

Please find attached an updated diff with how that would look.
(Apols for not inlining it, I just know my current mail client would
mangle it with line wrapping).

Thanks Neil,

I pulled your patch into a webrev, and made some minimal changes to explicitly state the this reference for instance fields. This style is in keeping with other parts of the SocketPermission code, and makes the code more readable when trying to debug it later :-)

http://cr.openjdk.java.net/~chegar/7021280/webrev.01/webrev/

As Michael (cc'ed) mentioned in an earlier mail, he is going to be making some significant changes in this area in the next week or two. He will include this change with the other one, so their impact can be considered together, if that is ok?

Oh, when looking for Michaels mail I noticed I can't find it in the net-dev archives. You may have missed it ( attached )

-Chris.

And more, every place where cname compare with another cname should use
normal equalsTo (equalsIgnoreCase is not needed). Every place where getName
and hostname is involved should use case-insensitive comparison. Any
opinion, Neil and Chris?

 From a quick glance at the code, I think you're correct.
However, I'd suggest making those improvements under a separate RFE,
as they wouldn't directly relate to CR 7021280.

Hope this helps,
Neil

[1] 
http://download.oracle.com/javase/6/docs/api/java/lang/String.html#regionMatches%28boolean,%20int,%20java.lang.String,%20int,%20int%29

--
Unless stated above:
IBM email: neil_richards at uk.ibm.com
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
--- Begin Message ---
Chris,

The change looks fine in principle to me, though I think thatHost needs
to converted to lower case before the endswith() call.

We are going to be making some other changes in SocketPermission
in the next week or two. So, I will include this change with the other
one, so their impact can be considered together, if that is ok?

Thanks
Michael.


Chris Hegarty wrote:
Michael,

Can you please take a look at this change, CR 7021280: "SocketPermission trustProxy should accept wildcards".

This patch came from Charles (cc'ed), and I agree with the changes. Can you please take a look and give your feedback.

http://cr.openjdk.java.net/~chegar/7021280/webrev.00/webrev/

-Chris.

On 03/ 1/11 02:00 AM, Charles Lee wrote:
On 03/01/2011 02:40 AM, Alan Bateman wrote:
Charles Lee wrote:
On 02/22/2011 05:43 PM, Chris Hegarty wrote:
Hi Chris,

any news for this issue? And where is CR 7021280?
I think there has been issues with bugs.sun.com recently and it's not
keeping up. However this one is there:
http://bugs.sun.com/view_bug.do?bug_id=7021280

-Alan
I see. Should I post the patch there? Or it is waiting for vote?


--- End Message ---

Reply via email to