Skip to content

Fix readme method name to produce client based in Target<T> - #502

Merged
codefromthecrypt merged 2 commits into
OpenFeign:masterfrom
marcel-dias:fix-readme-multi-api
Dec 5, 2016
Merged

codefromthecrypt merged 2 commits into
OpenFeign:masterfrom
marcel-dias:fix-readme-multi-api

Conversation

@marcel-dias

@marcel-dias marcel-dias commented Dec 5, 2016 •

Copy link
Copy Markdown
Contributor

Fix readme method name to produce client based in Target

From

Feign feign = Feign.builder().build();
CloudDNS cloudDNS = feign.target(new CloudIdentityTarget<CloudDNS>(user, apiKey));

To

CloudDNS cloudDNS = Feign.builder().target(new CloudIdentityTarget<CloudDNS>(user, apiKey));

@marcel-dias marcel-dias changed the title Fix method name to produce client based in Target<T> Fix readme method name to produce client based in Target<T> Dec 5, 2016
@spencergibb

Copy link
Copy Markdown
Contributor

Why? That's a major rename that I'm not keen on doing

@codefromthecrypt

Copy link
Copy Markdown

this is actually a doc bug. it is subtle because few use the newInstance method. Maybe it would be better to switch the reference to builder (as opposed to .build(); then .newInstance)

https://github.com/OpenFeign/feign/blob/master/core/src/main/java/feign/Feign.java#L92

@marcel-dias

Copy link
Copy Markdown
Contributor Author

@spencergibb I've modified that because target method is not accessible from a Feign instance.

As @adriancole suggested I just the doc to builder().target() approach.

@codefromthecrypt
codefromthecrypt merged commit dfb36eb into OpenFeign:master Dec 5, 2016
@codefromthecrypt

Copy link
Copy Markdown

thanks @MarcelDiass!

velo pushed a commit that referenced this pull request Oct 7, 2024
* Fix method name to produce client based in Target<T>

* Move from build().newInstance to .target()
velo pushed a commit that referenced this pull request Oct 8, 2024
* Fix method name to produce client based in Target<T>

* Move from build().newInstance to .target()
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.

3 participants