On Thu, 24 Jun 2021 23:19:22 GMT, Kevin Rushforth <k...@openjdk.org> wrote:

>> We aren't ignoring it .. its just handed on, so its going to be the same as 
>> the other non-writable case .. file could not be created .. printing error 
>> .. 
>> we could do some up-front validation if that seems like the way we want to 
>> go. This could I guess also check if the file is writeable .. but since the 
>> user can select a non-writable file location in the dialog I don't think we 
>> should do that part. In which case I wonder about the URL validation too ..
>
> Consistency with other APIs would be the main reason. We could do something 
> similar to what we do for `Image`, and treat a string without a protocol as a 
> file (although not relative to the classpath as in the case of images), 
> turning it into a `file:` URL internally where needed.
> 
> @prrace what do you think?

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?

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

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

Reply via email to