The approach I was using to make special "fake" scheme recognized by the URL constructor was working in some scenarios but not others, for reasons I have been unable to determine.
After much hair-pulling I discovered a different approach, and this appears to be more reliable, namely using the URL(URL, string, URLStreamHandler) constructor. This provides the handler directly, rather than requiring the URL constructor to attempt to locate it dynamically.
The approach I was using to make special "fake" scheme recognized by the URL constructor was working in some scenarios but not others, for reasons I have been unable to determine.
After much hair-pulling I discovered a different approach, and this appears to be more reliable, namely using the
URL(URL, string, URLStreamHandler)
constructor. This provides the handler directly, rather than requiring the URL constructor to attempt to locate it dynamically.