Author jeff.allen
Recipients jeff.allen, otmarhumbel, stefan.richthofer
Date 2018-07-14.22:19:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Hmmm ... I've learned a lot about URLs and a bit about JBoss (or WildFly now) trying to find a good answer to this. One thing I definitely understand is that one should not use a URLDecoder on a URL. (

The best way to derive a file path from a URL is surely to use the facilities Java offers: it knows what platform we're on and is more likely to get the parsing right (UNC paths anyone?). And it's satisfyingly brief. But precisely because Java does this properly, I end up with the platform-specific separator character in my file path.

The behaviour I'm not totally sure about is the one for the JBoss protocols. I've gone for the same solution here, the one that produces the platform-specific slash. Essentially one simply replaces the vfs: or vfszip: with file: and assumes the URL is valid. It is difficult to know whether this is right: I'm fairly sure the current code only works in particular circumstances anyway. In general, these VFS URLs cannot be translated to a file path, but when they can, it makes sense to me that the path should be properly slashed, not as "required" by the test.

I'm going to assume that the forward-slash we currently end up with universally (and the test enforces) is just a consequence of the home-cooked parser, and of relying on the tolerance of on Windows. As indeed is the pesky leading slash: #msg6157.

It would be a problem if some application (on Windows) depended on the forward slash, for example to re-compose a URL into VFS, but I've no evidence of such a use.

Now here:
Except I've credited it to Richie Bendall :( Not sure I can fix that now.
Date User Action Args
2018-07-14 22:19:14jeff.allensetmessageid: <>
2018-07-14 22:19:14jeff.allensetrecipients: + jeff.allen, otmarhumbel, stefan.richthofer
2018-07-14 22:19:14jeff.allenlinkissue2410 messages
2018-07-14 22:19:13jeff.allencreate