You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a variable in the @Sources annotation for a file path, if that variable is empty / undefined a URISyntaxException is thrown.
This is because of the resulting call to the URI constructor:
new URI("file:")
However, this produces an empty, non-null URI and is equivalent:
new URI("")
The logic in ConfigURIFactory::newURI should be updated to allow for this case.
==========
My example is below.
If BasicTestConfigWithClassPathOverridesAndVariableFile.pathToGatkConfig is not defined as a system variable, then at ConfigURIFactory.java:44 a URISyntaxException is thrown.
/**
* Simple test configuration file to check overrides and other configuration features.
*/
@Config.LoadPolicy(Config.LoadType.MERGE)
@Config.Sources({
"file:${" + BasicTestConfigWithClassPathOverridesAndVariableFile.CONFIG_FILE_VARIABLE_FILE_NAME + "}",
"file:/etc/jaiow", // Test of non-existent bad path
"classpath:org/broadinstitute/hellbender/utils/config/BasicTestConfigWithClassPathOverrides.properties",
})
public interface BasicTestConfigWithClassPathOverridesAndVariableFile extends Mutable, Accessible {
String CONFIG_FILE_VARIABLE_FILE_NAME = "BasicTestConfigWithClassPathOverridesAndVariableFile.pathToGatkConfig";
@DefaultValue("true")
boolean booleanDefTrue();
}
The text was updated successfully, but these errors were encountered:
jonn-smith
added a commit
to jonn-smith/owner
that referenced
this issue
Apr 9, 2018
When using a variable in the
@Sources
annotation for a file path, if that variable is empty / undefined aURISyntaxException
is thrown.This is because of the resulting call to the
URI
constructor:new URI("file:")
However, this produces an empty, non-null URI and is equivalent:
new URI("")
The logic in
ConfigURIFactory::newURI
should be updated to allow for this case.==========
My example is below.
If
BasicTestConfigWithClassPathOverridesAndVariableFile.pathToGatkConfig
is not defined as a system variable, then atConfigURIFactory.java:44
aURISyntaxException
is thrown.The text was updated successfully, but these errors were encountered: