hi jian,

we need a better approach because e.g. solaris uses a different format
- there are a lot of different constellations...

regards,
gerhard



2012/5/9 Jian Ouyang <[email protected]>

> Update on the bug:
> (the following fix works for both linux and windows)
>
>
>    private String ensureCorrectUrlFormat(String url)
>    {
>        //fix for wls
>        if(!url.startsWith("file:/"))
>        {
>               if(isWindows())
>               {
>                     url = "file:/" + url;
>              }
>               else
>               {
>                     url = "file://" + url;
>              }
>        }
>        return url;
>    }
>
>     private boolean isWindows() {
>
>              String os = System.getProperty("os.name").toLowerCase();
>              // windows
>              return (os.indexOf("win") >= 0);
>      }
>
>
> From: Jian Ouyang
> Sent: Tuesday, May 08, 2012 5:24 PM
> To: '[email protected]'
> Subject: OWB bug in AnnotationDB.java
>
> OWB developers,
>
> For class AnnotationDB in package  org.apache.webbeans.corespi.scanner:
> The following method implementation
>
>    private String ensureCorrectUrlFormat(String url)
>    {
>        //fix for wls
>        if(!url.startsWith("file:/"))
>        {
>            url = "file:/" + url;
>        }
>        return url;
>    }
>
> should be updated to (double forward slash instead single forward slash):
>    private String ensureCorrectUrlFormat(String url)
>    {
>        //fix for wls
>        if(!url.startsWith("file:/"))
>        {
>            url = "file://" + url;
>        }
>        return url;
>    }
>
> Jian
>
>
>

Reply via email to