#java11 — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #java11, aggregated by home.social.
-
Java 25 độc đáo với 6 tính năng دائم: Scoped Values, Module Import, Flexible Constructor Bodies... Cập nhật cho JDK LTS, hỗ trợ lập trình hiệu quả. PHP developer nên quan tâm!
#Java #JDK25 #Programming #Tecnologia #Java11 #Java17 #Java20 #Java25 #XAY
(498 ký tự) -
So yes, it turns out that though our communication partner pretends to accept HTTP/2, their API server adheres to HTTP/1.1 standards. And with HTTP/1.1, the #Java11 #HttpClient will send a #ContentLength header even if the payload is 0 bytes. Which is exactly what our communication partner expects. A bit weird, and sad.
-
So yes, it turns out that though our communication partner pretends to accept HTTP/2, their API server adheres to HTTP/1.1 standards. And with HTTP/1.1, the #Java11 #HttpClient will send a #ContentLength header even if the payload is 0 bytes. Which is exactly what our communication partner expects. A bit weird, and sad.
-
It looks like #Java11 decided to completely omit the #contentLength header of an #HttpPost request if the content length equals 0 (zero). That's possible with HTTP/2, but not with HTTP/1.0 or 1.1.
The #RESTAPI server we talk to requires a content-length header even if the payload is empty. Does downgrading to HTTP/1.1 change the behavior of #JavaNetHttp? Does that get the header included?
Or do we have to override default header filtering?
-
It looks like #Java11 decided to completely omit the #contentLength header of an #HttpPost request if the content length equals 0 (zero). That's possible with HTTP/2, but not with HTTP/1.0 or 1.1.
The #RESTAPI server we talk to requires a content-length header even if the payload is empty. Does downgrading to HTTP/1.1 change the behavior of #JavaNetHttp? Does that get the header included?
Or do we have to override default header filtering?
-
#Enterprise #Message #Queues require a different mindset than batchwise #processing. With an #EMQ one gets nudged to handle 1 message at a time. It needs #software #languages that have quick start-up times. Historically, #Java has a bad rep for that.
With #Java11 and IBM
's #OJ9 the cold-start speed of a program can be greatly increased (vs Oracle
's #Hotspot) to the point where the program no longer needs to run forever... which is why we can use it on #AwsLambda with #Kafka. -
#Enterprise #Message #Queues require a different mindset than batchwise #processing. With an #EMQ one gets nudged to handle 1 message at a time. It needs #software #languages that have quick start-up times. Historically, #Java has a bad rep for that.
With #Java11 and IBM
's #OJ9 the cold-start speed of a program can be greatly increased (vs Oracle
's #Hotspot) to the point where the program no longer needs to run forever... which is why we can use it on #AwsLambda with #Kafka. -
The other day I learned that the #javaNetHttpClient should be cached and reused. It doesn't really matter if you have 1 or 2 calls. It does matter if you have thousands.
This client became available with #Java11.
The problem is lingering opened sockets, waiting for a response from the communication partner. They cost memory and system resources. Reusing the #HttpClient allows it to streamline itself.
-
The other day I learned that the #javaNetHttpClient should be cached and reused. It doesn't really matter if you have 1 or 2 calls. It does matter if you have thousands.
This client became available with #Java11.
The problem is lingering opened sockets, waiting for a response from the communication partner. They cost memory and system resources. Reusing the #HttpClient allows it to streamline itself.
-
While migrating the #SoftSmithy Utility Library to #Java11 (no #JavaWebStart support), I've started migration to #OpenWebStart (based on #IcedTeaWeb), and a first old Swing sample worked on first try! Thanks to @[email protected] and @[email protected]! Great work!
-
Last week I migrated one of my #dataIntegration #software applications. It went from #XML input and #JSON output to JSON input and output, and at the same time from #Oracle #Java8 to #IBM #Java11.
That move cut away 2/3rds of the #sourceCode.
The functionality stayed roughly the same. Some validations got omitted. I may wind up adding them back in.
This is the way forward. It wouldn't have been possible without tooling that produces JSON documents. #OpenText #BizMapper -
Last week I migrated one of my #dataIntegration #software applications. It went from #XML input and #JSON output to JSON input and output, and at the same time from #Oracle #Java8 to #IBM #Java11.
That move cut away 2/3rds of the #sourceCode.
The functionality stayed roughly the same. Some validations got omitted. I may wind up adding them back in.
This is the way forward. It wouldn't have been possible without tooling that produces JSON documents. #OpenText #BizMapper -
👍 TV-Browser 4.2 Final
📌 Heute veröffentlichen wir TV-Browser 4.2. Die Veröffentlichung hat diesmal etwas länger gedauert, da durch den Wechsel auf Java 11 längere Tests nötig waren, um sicher zu stellen, dass TV-Browser stabil läuft.
#TVBrowser #TVBrowser42 #TV-Browser #Java11 #TV #Programm #Fernsehprogramm
https://www.tvbrowser.org/index.php?id=news-20190928-1105&setlang=de
-
See, in #java all data types that aren't primitives inherit from the Object class. And that means that any process could generate an Object #array as its return value. It would be a single compound value, the elements of which can be accessed by index.
Up until #java11 however, if we were to access those elements, we were responsible for telling the compiler what #dataType we expected, and we would have to perform a type cast.
And the compiler couldn't check for type safety. -
Yes, #Microsoft, what I want #MSWindows to do is take a whole day to paste #Java11 into a different server.
-
#TypeInference in the #Java11 #programming #language still is in its infancy. We recognize that when our toolsets start failing to infer the types of our variables and method results due to us making the data types more verbose and more explicit. Thanks, #Java.
-
This in response to the earlier revelation that a #java method can't have more than an integer count of arguments, so we can't pass in more than 65,535 lines of a file (because the 65,536th argument is for the implied "this" argument). And my file happens to be slightly larger than that. By about 130,000 lines. Gzipping and Base64 encoding reduced that to a single line of roughly 10,000 characters, which is accepted by the #java11 #compiler.
-
#TodayILearned that the new #Java11 #java.net.http #HttpClient and #HttpRequest are not equipped to handle multipart/form-data out of the box. One has to generate and add their own form boundaries.
This is a problem for those of us who never needed to know the #HTTP/1.1 and #Multipart RFCs by heart, and had hoped that the tools built into the programming language's ecosystem would handle common use cases.
Which HTTP component do you use for multipart/form-data? -
Then I noticed that this new #HTTP client in #Java11 had HTTP2 turned on by default. It should downstep to HTTP1.1 automatically if the remote server indicates it doesn't speak version 2.
So I explicitely made that client talk HTTP1.1.
To no avail.
But that wasn't apparent immediately. First I thought it helped: the 1st response body after switching wasn't GZipped.
And the one after that was.
And the one after that wasn't.
What?!
So I reached out to their support.