Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty system variables for file paths in @Sources cause URISyntaxException failures #226

jonn-smith opened this issue Apr 9, 2018 · 0 comments


Copy link

@jonn-smith jonn-smith commented Apr 9, 2018

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 a URISyntaxException is thrown.

 * Simple test configuration file to check overrides and other configuration features.
        "file:${" + BasicTestConfigWithClassPathOverridesAndVariableFile.CONFIG_FILE_VARIABLE_FILE_NAME + "}",
        "file:/etc/jaiow",                          // Test of non-existent bad path
public interface BasicTestConfigWithClassPathOverridesAndVariableFile extends Mutable, Accessible {
    String CONFIG_FILE_VARIABLE_FILE_NAME = "BasicTestConfigWithClassPathOverridesAndVariableFile.pathToGatkConfig";

    boolean booleanDefTrue();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

1 participant