#java19 — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #java19, aggregated by home.social.
-
#17: Custom Localized Date-Time Formats
You can have a `DateTimeFormatter` with a custom pattern: `ofPattern("y-MM-dd")`
You can have a localized one, too:
`ofLocalizedDate(FormatStyle.SHORT)`And since #Java19, custom localized one works, too: `ofLocalizedPattern("yMM")`
-
#5: `newHashSet`
The `HashSet` constructor that takes an `int` argument interprets that as capacity, not as the number of expected elements. Once the number of elements reaches $LOAD-FACTOR (by default 75%) of capacity, the set resizes itself.
To avoid that resize with the constructor you either need to compute capacity from number of expected elements or set the load factor accordingly.
Or, since #Java19, call `HashSet::newHashSet` and pass the number of expected elements.
-
The recent #Gradle 7.6 release supports #compiling, #testing, and running on #Java19 - https://docs.gradle.org/7.6/release-notes.html#:~:text=Added%20Support%20for%20Java%2019
-
Lots of learning to be had at the return of the #Belgian Java User Group where the great @ammbra1508 talked about new features in #Java 19 . Kudos to @TCoolsIT and @ohubaut for reviving (resuscitating?) the group 👏 And nice to see @geoffreydesmet there as well 🙂
After a short intro, our star speaker of the evening is kicking it all off! @ammbra1508 talking about #java19.
-
We use #jlink and #jpackage to distribute @cryptomator. This makes the #JDK only a build time requirement. Users don't need to install #Java separately.
The challenge: During a #PPA build (for our users of #Ubuntu based distros) one may only depend on existing software. No downloads allowed. The latest #OpenJDK version in Ubuntu Focal is 17. But we still want to use #Java19.
The solution is to create an intermediary PPA which is allowed as build dependency: https://launchpad.net/~coffeelibs/+archive/ubuntu/openjdk
-
Just a single day to go until J-Fall! For the 6th consecutive time I'll be speaking at the largest #Java event in my home country. 🇳🇱 At 8AM in Room 5 @peterwessels, me & a room full of early birds will dive into #PatternMatching! #Java19 #JFall
-
What's new in Java 19 for us, developers ?
(both in french and english)https://loicmathieu.fr/wordpress/informatique/java-19-quoi-de-neuf/
#java #java19 -
A while ago, I committed a patch to the #OpenJDK, which is now included in #Java19. It kills unnecessary allocation of byte[] during certain types of decryption, such as AES-CTR.
I did some before-and-after tests using JFR, decrypting 4 GiB. On JDK 17 you can see 4 GiB of allocations and plenty of GC pauses (the orange vertical bars). On JDK 19 you see virtually no allocations at all (note the different scale on the y axis).
Test case: https://gist.github.com/overheadhunter/f3969950c0fdbaecaa77c857b2246cc5
-
Did you see FOSSlife Weekly this week? Check out the latest issue and subscribe now to get it every week! https://app.moosend.com/show_campaign/7dad8003-4da5-43de-9eb3-4b4ee9d6e037 #Blocky #OpenSource #FOSS #DNS #AllThingsOpen #Hacktoberfest #BigCode #YAML #Java19 #Kubernetes