On Fri, 25 Jun 2021 21:08:31 GMT, Kevin Rushforth <k...@openjdk.org> wrote:

>> I agree with @kevinrushforth that if a String without protocol is passed, it 
>> should be treated as a file (absolute or relative to <what>?) 
>> I'm also not sure that the URL should be exposed here. I understand it's 
>> needed in the lower-level print API but you already do the conversion in the 
>> `syncOutputFile` method. Hence, since only the file protocol is supported, 
>> it might be easier for API users to pass the location of the file instead of 
>> a URL.
>> In case later other URL protocols are supported, a property `outputURL` 
>> might be introduced?
>
> I like the flexibility and consistency of defining it as a URL, as long as we 
> also interpret a url without a scheme as a file name. Borrowing language from 
> the Image docs, perhaps something like this?
> 
> 
> The URL string can either be a URL with a "file:" protocol that can be 
> resolved
> by @link java.net.URL} or a file path that can be resolved by {@link 
> java.io.File}.

I am changing it to be just a file path. We can extend it later if ever needed.
It does simplify the code and the potential for errors.

-------------

PR: https://git.openjdk.java.net/jfx/pull/543

Reply via email to