Alexey N. Solofnenko wrote:
Relying on order of stuff in classloaders is just wrong.
-gets complicated when you bring signing into the bix
-gets complex when the IDE sets up the build order
-makes debugging a PITA.
I think we should not limit supported features supported by modern Java
while keeping backward compatibility with older versions. One way is to
use reflection. Another is to provide an alternative implementation of
some classes (FileResource) to be used with modern Java. The later is
straightforward, but the most recent Java is required to build it.
That's effectively what we do at build time...you need to build under
1.5 to get everything compiled, though we omit the stuff to let people
still build on java 1.3+.
For the proxy diagnostics, I abuse the toString() method, so we just
cast the proxy diags to a method and do it from there. For the other
stuff, well, there's nothing to stop FileUtils looking for a subclass of
itself if it is there
If something could be done better with modern Java, why not to use it
when possible?
Only one reason: when it makes backwards compatibility odd, or screws up
x-platformness. For example, for all the failings with file perms on
java, requiring people to spec permissions when tarring a folder
guarantees that the permissions in the tar get set in all platforms
At the same time, sometimes I do want copy to preserve stuff, untar to
propagate permissions, at least on unix. I may even want to use file
permissions as a selector, selecting all files that are executable for
some further action. As long as people understand the operations are not
portable, well, they have the right to use them.
Perhaps a limited set of operations could have permissions enabled, with
some enum like
permissions="always" - copy all perms, fail if we are a windows box or
if the build doesnt allow it (wrong JVM, wrong class file)
permissions="never" -the default
permissions="optional" -copy perms if the JVM is right and the OS
supports perms.
we could also add another Permissions interface to resources, so you can
read/write perms of files. This would work inside zip/tar files today,
and on filesystem files on Java6+unix.
I worry about what cygwin does here...how does it manage permissions?
Because people are going to be disappointed if they expect ant to handle it.
-Steve
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]