JEP 110 - Violating Naming Convention ?
Rahman USTA
rahman.usta.88 at gmail.com
Wed Aug 17 23:26:53 UTC 2016
There is a JaxRS-Client API sample here;
String entity = client.target("http://example.com/rest")
.register(FilterForExampleCom.class)
.path("resource/helloworld")
.queryParam("greeting", "Hi World!")
.request(MediaType.TEXT_PLAIN_TYPE)
.header("some-header", "true")
.get(String.class);
I have liked this API design, it follows the traditional naming convention.
2016-08-18 2:20 GMT+03:00 Bernd Eckenfels <ecki at zusammenkunft.net>:
> Hello
>
> I think .get() or .put() would look even strange. With all uppercase
> it is rather clear its an HTTP/2 method keyword.
>
> Gruss
> Bernd
>
> Am Wed, 17 Aug 2016
> 16:51:18 +0300 schrieb Rahman USTA <rahman.usta.88 at gmail.com>:
>
> > Thank you Pavel, this uncommon usage looks to me very weird.
> >
> > I hope it could be re-evaluated again.
> >
> > Thanks
> >
> > 2016-08-17 16:29 GMT+03:00 Pavel Rappo <pavel.rappo at oracle.com>:
> >
> > > The correct mailing list for issues in java.net area would be
> > > net-dev at openjdk.java.net
> > >
> > > IMO, these conventions are just guidelines. One can override them
> > > in some circumstances where it makes a lot of sense. Yes, the
> > > barrier for violations
> > > should be high. I believe this is one of the cases.
> > >
> > > > On 17 Aug 2016, at 14:12, Rahman USTA <rahman.usta.88 at gmail.com>
> > > > wrote:
> > > >
> > > > Hello;
> > > >
> > > > I'm trying the new HTTP/2 Client API. For example I have a sample
> > > > code below;
> > > >
> > > > HttpResponse response = HttpRequest
> > > > .create(URI.create("https://istanbul-jug.org"))
> > > > .GET()
> > > > .response();
> > > >
> > > > System.out.println(response.body(HttpResponse.asString()));
> > > >
> > > > It works excepted, however I see that the method name GET is
> > > > written
> > > fully
> > > > uppercase. I have never seen this usage yet anywhere in Java. Is
> > > > that a right usage in Java?
> > > >
> > > > Thanks.
> > > >
> > > > --
> > > > Rahman USTA
> > > > Istanbul JUG
> > > > https://github.com/rahmanusta <http://www.kodcu.com/>
> > >
> > >
> >
> >
>
>
--
Rahman USTA
Istanbul JUG
https://github.com/rahmanusta <http://www.kodcu.com/>
More information about the jdk9-dev
mailing list