As it turns out URL.getFile() does the wrong thing, leading to us
taking the whole path as the module name, resulting in wrong comparison.
Change the code to analyze URL.getPath(), stripping it down to the
last component.
Change-Id: Ica3e387caf2924712151f4da5939487872f8e98c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
IOException, YangSyntaxErrorException {
checkArgument(url != null, "Supplied URL must not be null");
- final SourceIdentifier guessedId = guessSourceIdentifier(url.getFile());
+ final String path = url.getPath();
+ final String fileName = path.substring(path.lastIndexOf('/') + 1);
+ final SourceIdentifier guessedId = guessSourceIdentifier(fileName);
return registerSource(new YangTextSchemaSource(guessedId) {
@Override
public InputStream openStream() throws IOException {