Hey Benjamin,

I wonder if it's worth posting these as a series under the developers section of the Maven site?

- Brett

On 06/04/2008, at 9:46 PM, Benjamin Bentmann wrote:

new File( new URI( url.toString() ) )

Correction:
JRE 1.4 is happily returning invalid/unescaped URLs from ClassLoader.getResource(), making the above suggestion fail with a URISyntaxException.

The new suggestion is to use FileUtils.toFile(URL) [0] from Commons IO. A similar methods exists in Plexus Utils but it's currently not decoding escape sequences.


Benjamin


[0] 
http://commons.apache.org/io/api-release/org/apache/commons/io/FileUtils.html#toFile(java.net.URL)

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
Brett Porter
[EMAIL PROTECTED]
http://blogs.exist.com/bporter/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to