home.social

#java19 — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #java19, aggregated by home.social.

fetched live
  1. Updated community
    @awscloud custom base images for 17.0.6 and 19.0.2 are now available in @DockerHub hub.docker.com/repository/dock and ECR Public Gallery gallery.ecr.aws/aleph0io/lambd. Enjoy!

  2. Community @awscloud custom base images for , , and are now officially verified in the ECR Public Gallery! gallery.ecr.aws/aleph0io/lambd

  3. #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")`

  4. #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. #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")`

  6. #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")`

  7. #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")`

  8. #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.

  9. #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.

  10. #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.

  11. #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.

  12. #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.

  13. 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 🙂

    RT @[email protected]

    After a short intro, our star speaker of the evening is kicking it all off! @ammbra1508 talking about #java19.

    #JUG

  14. 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 🙂

    RT @[email protected]

    After a short intro, our star speaker of the evening is kicking it all off! @ammbra1508 talking about #java19.

    #JUG

  15. 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 🙂

    RT @[email protected]

    After a short intro, our star speaker of the evening is kicking it all off! @ammbra1508 talking about #java19.

    #JUG

  16. 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 🙂

    RT @[email protected]

    After a short intro, our star speaker of the evening is kicking it all off! @ammbra1508 talking about #java19.

    #JUG

  17. 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 🙂

    RT @[email protected]

    After a short intro, our star speaker of the evening is kicking it all off! @ammbra1508 talking about #java19.

    #JUG

  18. 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: launchpad.net/~coffeelibs/+arc

  19. 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: launchpad.net/~coffeelibs/+arc

  20. 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: launchpad.net/~coffeelibs/+arc

  21. 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

  22. 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

  23. 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: gist.github.com/overheadhunter

    #java #performance #encryption

  24. Of course there's already a #Java19 related issue for @[email protected]. I wish I could be the first to think of such things 🤣

    Thanks @[email protected]! 👋🏻

    github.com/OpenLiberty/open-li