Conversation
b5ec9cf to
fe64c13
Compare
ctrueden
left a comment
There was a problem hiding this comment.
Let's resolve how we want toString() to work for all these location types. Then this will be easy to finalize and merge.
|
|
||
| @Override | ||
| public String toString() { | ||
| return "FileLocation: " + file.getAbsolutePath(); |
There was a problem hiding this comment.
I'd like to be consistent about what toString() returns for the different location types, as much as we feasibly can. Would it make sense to always return a URI-style format? Or simply return file.toString() directly, perhaps? Are these strings only going to be used for debugging? Or might they appear in a UI somewhere?
There was a problem hiding this comment.
This might be of particular interest when calling modules/scripts headless (e.g. from the CLI) and handing over parameters as Strings, no? In that case, I'd vote for URI-style formats to be able to losslessly convert between String and Location both ways.
There was a problem hiding this comment.
We already have a mechanism to convert from String to Location via the LocationService. Also every location has a toURI method to turn it into an URI which can be turned into an Location. This toString override was meant for logging etc.
fe64c13 to
1c835ab
Compare
This will make it easier to understand Location objects when debugging.
1c835ab to
d9eac4e
Compare
|
👍 |
Uh oh!
There was an error while loading. Please reload this page.