Skip to content

Conversation

wheelerlaw
Copy link
Contributor

This lets me do something like this:

JsonSchemaFactory factory = JsonSchemaFactory.builder(JsonSchemaFactory.getInstance(SpecVersion.VersionFlag.V7))
            .uriFetcher(new JenkinsWorkspaceFileFetcher(), JenkinsWorkspaceFileFetcher.SUPPORTED_SCHEMES)

JenkinsWorkspaceFileFetcher.SUPPORTED_SCHEMES is a Set<String>, which can't be passed into varargs. But varargs can be passed into an Iterable<String> if you wrap it with Arrays.asList(varargs), and it is cheap too since an ArrayList<> is just backed by an array.

@stevehu stevehu merged commit 0d442fd into networknt:master Nov 21, 2020
@stevehu
Copy link
Contributor

stevehu commented Nov 21, 2020

@wheelerlaw It makes perfect sense. Thanks a lot for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants