« Return to Thread: Common Bugs

Re: Common Bugs

by brettporter :: Rate this Message:

Reply to Author | View in Thread

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: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>

--
Brett Porter
brett@...
http://blogs.exist.com/bporter/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...

 « Return to Thread: Common Bugs