This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Second ping: rewrite File.toCanonicalPath()


Gary Benson wrote:
A couple of months ago I posted a patch that rewrote File.toCanonicalPath()
on GNU/Posix systems in order for FilePermission checks to work properly,
so much of the security framework relies on it.  I rewrote it a couple of
times at various people's requests, but this (final?) version met with no
response whatsoever.

Can someone please approve it or tell me what's wrong with it?

As before the diff of the method itself is not very legible so I've
attached a copy of it as well as the patch.

Hi Gary,


Sorry for the delay in reviewing this. This patch looks pretty good to me, but I think a few extra comments would help to make it more readable - could you add one to nextChunkSize explaining what the algorithm does? Also, I think a comment in getCanonicalPath itself briefly explaining the approach and why it is necessary would be very helpful. A ChangeLog entry is needed as well.

Otherwise, OK - please go ahead and check it in to trunk with these changes (you can post the final patch to the list as an FYI).

Bryce


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]