persistence@glassfish.java.net

Re: Fixing issue 228

From: Tom Ware <tom.ware_at_oracle.com>
Date: Wed, 22 Feb 2006 09:19:17 -0500

Hi Marina,

   When we fixed a similar issue (184) a while ago, we were having
problems with the URI class handling directories with spaces. If you
take a look at the difference between version 1.5 and version 1.6 in
CVS, you will be able to see the changes we made.

  If you can make the URI version work for both issues, I think the
suggested fix should be fine.

  If there are appropriate PersistenceUnitLoadingExceptions, feel free
to reuse them. Otherwise, adding a new error code is a good idea.

-Tom

Marina Vatkina wrote:

>Hi Tom,
>
>To fix issue 228 in all of the PersistenceUnitProcessor.java, I need
>a) to change in PersistenceUnitProcessor.java the code from:
>
> String filePath = url.getFile();
> ...
> File file = new File(filePath);
>
>to
>
> File file = new File(url.toURI());
>
>b) Wrap URISyntaxException that can be thrown from URL.toURI().
>
>See the latest comments to the issue
>https://glassfish.dev.java.net/issues/show_bug.cgi?id=228
>and the attached file as the 1st cut, where duplicate code is moved to a
>separate private static method.
>
>Should I reuse any of the existing PersistenceUnitLoadingException exceptions or
>add a new one?
>
>Do you see any problems with the proposed changes?
>
>thanks,
>-marina
>
>
>

-- 
Tom Ware
Principal Software Engineer
Oracle Canada Inc.
Direct: (613) 783-4598
Email: tom.ware_at_oracle.com