ADLINK-IST / opensplice

This is the Vortex OpenSplice Community Edition source repository. For our commercial offering see
https://www.adlinktech.com/en/vortex-opensplice-data-distribution-service
Apache License 2.0
259 stars 157 forks source link

QosProvider doesn't accept Java URLs #53

Open Gasper opened 6 years ago

Gasper commented 6 years ago

When creating QosProvider Java constructed URLs cannot be used to point to QoS XML file.

For example, if we have QoS file File qos = new File("qos.xml");

this will work: QosProvider.newQosProvider("file://" + qos.getAbsolutePath(), "profile", environment)

but the following will not: QosProvider.newQosProvider(qos.toURI().toString(), "profile", environment) QosProvider.newQosProvider(qos.toURI().toURL().toString(), "profile", environment)

This is apparently because Java constructs file URLs with one forward slash file:/path/folder/qos.xml, while QosProvider expects two or three forward slashes file://path/folder/qos.xml.

This was tested on Centos 7.3 with Java 1.8 update 144 and with opensplice release OSPL_V6_7_180404OSS_RELEASE.

b3em commented 6 years ago

I've put this issue on our roadmap, but to be honest it's not a high priority