RFR: Make instantiating forges from known hosts faster
Robin Westberg
rwestberg at openjdk.java.net
Thu Dec 5 06:56:40 UTC 2019
On Wed, 4 Dec 2019 15:45:04 GMT, Erik Helin <ehelin at openjdk.org> wrote:
> Hi all,
>
> please review this pull request that speeds things up a little when calling `Forge.from`. If the hostname of the provided URI exactly matches a known host for exactly one `ForgeFactory`, then I argue that it is safe to create a `Forge` from that factory and return it without calling `isValid()` first. In other words, I would be very surprised if we ever encounter an issue with returning a `GitHubForge` instance for URIs with a hostname of `github.com` (and vice-versa, a `GitLabForge` instance for URIs with a hostname of `gitlab.com`).
>
> Thanks,
> Erik
>
> ## Testing
> - [x] `make test` on Linux x64
Looks good, I agree that it should be safe!
----------------
Approved by rwestberg (Reviewer).
-------------
PR: https://git.openjdk.java.net/skara/pull/293
More information about the skara-dev
mailing list