Skip to content
This repository has been archived by the owner on May 26, 2020. It is now read-only.

Fix duplicate key exception for class path catalog loader. #42

Merged
merged 1 commit into from
Aug 9, 2018

Conversation

MartinYSpasov
Copy link
Contributor

No description provided.

@coveralls
Copy link

coveralls commented Aug 8, 2018

Coverage Status

Coverage increased (+0.003%) to 98.854% when pulling c3b78e5 on fix-duplicate-key-exception into bc76883 on master.

@@ -44,7 +44,7 @@ public ClasspathCatalogLoader(final ObjectMapper objectMapper,
*/
public Map<URI, Catalog> getCatalogs() {
return listAllCatalogsFromClasspath().stream()
.collect(toMap(urlConverter::toUri, this::loadCatalog));
.collect(toMap(urlConverter::toUri, this::loadCatalog, (c1, c2) -> c1));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could the function be called something to make it clear what is going on here

@@ -78,4 +80,22 @@ public void shouldThrowExceptionIfLoadingResourcesThrowsIOException() throws Exc

}
}

@Test
public void shouldNotThrowExceptionIgDuplicateKeyAdded() throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ExceptionIg shopuld be ExceptionIf

@mapingo mapingo merged commit 198d0b8 into master Aug 9, 2018
@mapingo mapingo deleted the fix-duplicate-key-exception branch August 9, 2018 14:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants