Quantcast

RFR: 8177069: File separator mismatch on Win-64

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RFR: 8177069: File separator mismatch on Win-64

Rickard Bäckman
Hi, can I please have this patch reviewed?

With AOT being ported to Windows some of the file path stuff had to be
updated.

Webrev: http://cr.openjdk.java.net/~rbackman/8177069.2/
Bugs: https://bugs.openjdk.java.net/browse/JDK-8177069

Thanks
/R
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFR: 8177069: File separator mismatch on Win-64

Vladimir Kozlov
Looks good.

Thanks,
Vladimir

On 3/24/17 6:17 AM, Rickard Bäckman wrote:

> Hi, can I please have this patch reviewed?
>
> With AOT being ported to Windows some of the file path stuff had to be
> updated.
>
> Webrev: http://cr.openjdk.java.net/~rbackman/8177069.2/
> Bugs: https://bugs.openjdk.java.net/browse/JDK-8177069
>
> Thanks
> /R
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFR: 8177069: File separator mismatch on Win-64

dean.long
In reply to this post by Rickard Bäckman

Did you forget to remove this println?


  61     public void itShouldUsePathIfPathIsAbsoluteAndExisting() {
  62       System.out.println(System.getProperty("os.name"));

dl

On 3/24/17 6:17 AM, Rickard Bäckman wrote:
Hi, can I please have this patch reviewed?

With AOT being ported to Windows some of the file path stuff had to be
updated.

Webrev: http://cr.openjdk.java.net/~rbackman/8177069.2/
Bugs: https://bugs.openjdk.java.net/browse/JDK-8177069

Thanks
/R

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFR: 8177069: File separator mismatch on Win-64

dean.long

And how about using File.getAbsoluteFile() here:

  51     public static Path getpath(String path) {
  52         if (path.startsWith("/") && System.getProperty("os.name").startsWith("Windows")) {
  53             path = "C:\\" + path.substring(1); 
  54         }
  55         return Paths.get(path);
  56     }

dl

On 3/24/17 12:55 PM, [hidden email] wrote:

Did you forget to remove this println?


  61     public void itShouldUsePathIfPathIsAbsoluteAndExisting() {
  62       System.out.println(System.getProperty("os.name"));

dl

On 3/24/17 6:17 AM, Rickard Bäckman wrote:
Hi, can I please have this patch reviewed?

With AOT being ported to Windows some of the file path stuff had to be
updated.

Webrev: http://cr.openjdk.java.net/~rbackman/8177069.2/
Bugs: https://bugs.openjdk.java.net/browse/JDK-8177069

Thanks
/R


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFR: 8177069: File separator mismatch on Win-64

Rickard Bäckman
Removed the comment, changed to getAbsolutePath. Thanks I didn't know
that method would do the job.

Thanks for the review.

On 03/24, [hidden email] wrote:

> And how about using File.getAbsoluteFile() here:
>
> 51 public static Path getpath(String path) {
> 52 if (path.startsWith("/") &&
> System.getProperty("os.name").startsWith("Windows")) {
> 53 path = "C:\\" + path.substring(1);
> 54 }
> 55 return Paths.get(path);
>   56     }
>
>
> dl
>
> On 3/24/17 12:55 PM, [hidden email] wrote:
> >
> >Did you forget to remove this println?
> >
> >
> >   61     public void itShouldUsePathIfPathIsAbsoluteAndExisting() {
> >62 System.out.println(System.getProperty("os.name"));
> >
> >dl
> >
> >On 3/24/17 6:17 AM, Rickard Bäckman wrote:
> >>Hi, can I please have this patch reviewed?
> >>
> >>With AOT being ported to Windows some of the file path stuff had to be
> >>updated.
> >>
> >>Webrev:http://cr.openjdk.java.net/~rbackman/8177069.2/
> >>Bugs:https://bugs.openjdk.java.net/browse/JDK-8177069
> >>
> >>Thanks
> >>/R
> >
>
/R
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFR: 8177069: File separator mismatch on Win-64

Rickard Bäckman
In reply to this post by Vladimir Kozlov
Thank you.

On 03/24, Vladimir Kozlov wrote:

> Looks good.
>
> Thanks,
> Vladimir
>
> On 3/24/17 6:17 AM, Rickard Bäckman wrote:
> >Hi, can I please have this patch reviewed?
> >
> >With AOT being ported to Windows some of the file path stuff had to be
> >updated.
> >
> >Webrev: http://cr.openjdk.java.net/~rbackman/8177069.2/
> >Bugs: https://bugs.openjdk.java.net/browse/JDK-8177069
> >
> >Thanks
> >/R
> >
/R
Loading...