Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Nov 12, 2018
2 parents 5b765a3 + f1b8822 commit 4e6c571
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ public OpenSamlLocalDynamicMetadataResolver(ParserPool parserPool,

@Override
protected void initMetadataResolver() throws ComponentInitializationException {
super.initMetadataResolver();
if (sourceResolver.getDoInitialization()) {
super.initMetadataResolver();

delegate.addIndexedDescriptorsFromBackingStore(this.getBackingStore(),
this.sourceResolver.getResourceId(),
indexWriter);
delegate.addIndexedDescriptorsFromBackingStore(this.getBackingStore(),
this.sourceResolver.getResourceId(),
indexWriter);
}
}

public void refresh() throws ComponentInitializationException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,15 @@ private OpenSamlLocalDynamicMetadataResolver convertToOpenSamlRepresentation(Loc
IndexWriter indexWriter = indexWriterService.getIndexWriter(resolver.getResourceId());

XMLObjectLoadSaveManager manager = null;
try {
manager = new FilesystemLoadSaveManager(placeholderResolverService()
.resolveValueFromPossibleTokenPlaceholder(resolver.getSourceDirectory()));
} catch (ConstraintViolationException e) {
// the base directory string instance was null or empty
//TODO: What should we do here? Currently, this causes a test to fail.
if (resolver.getDoInitialization()) {
try {
manager = new FilesystemLoadSaveManager(placeholderResolverService()
.resolveValueFromPossibleTokenPlaceholder(resolver.getSourceDirectory()));
} catch (ConstraintViolationException e) {
// the base directory string instance was null or empty
//TODO: What should we do here? Currently, this causes a test to fail.
throw new RuntimeException("An exception occurred while attempting to instantiate a FilesystemLoadSaveManger for the path: " + resolver.getSourceDirectory(), e);
}
}

OpenSamlLocalDynamicMetadataResolver openSamlResolver = new OpenSamlLocalDynamicMetadataResolver(openSamlObjects.getParserPool(), indexWriter, resolver, manager);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class BadJSONMetadataSourcesUiDefinitionControllerIntegrationTests extends Speci
.jsonSchemaLocation('classpath:local-dynamic-metadata-provider.schema.json')
.resourceLoader(resourceLoader)
.jacksonMapper(jacksonMapper)
.detectMalformedJson(true)
.detectMalformedJson(false)
.build())
}
}
Expand Down

0 comments on commit 4e6c571

Please sign in to comment.