How to Build Java Applications Today: #51
Tags: java, bpf
Published: 2021-08-30 22:15:23

---
canonical_url: https://bpfnl.substack.com/p/how-to-build-java-applications-today-17a
---

## TL;DR
Spring One Preview, 40% of GitHub Copilot Code Has Security Holes, Kotlin 1.5.30, and Hibernate ORM 5.3.22.

***

## README
Welcome to my weekly newsletter “How To Build Java Applications Today”! I read all the Java newsletters so **you** don’t have to! And it’s “Java news with a smile”.

If you like my newsletter, then [subscribe to it on Substack](https://bpfnl.substack.com)! Or read it on [dev.to](https://dev.to/ksilz/series/11995),  the [Java Cafe](https://thejavacafe.com/ksilz/series/1), or [Medium](https://ksilz.medium.com). Even better: Share it with people who may be interested.

***

## Quote of the Week
*I fundamentally believe a company becomes the people it hires, not the plan it makes.*
[Vinod Khosla](https://overcast.fm/+Vl3twamAA/13:55), one of the [Sun Microsystems co-founders](https://en.wikipedia.org/wiki/Vinod_Khosla), gives us another reason to be careful at hiring.

***

## Stand-Up
It's the dog days of summer, news-wise - nothing's happening in Java land these days! Even the Quarkus guys didn't muster the energy to put out a new release! Of course, this will all change this week as the Spring Framework 6.0 gets its day in the sun at Spring One (Sep 1-2). Read below for more!

My next conference talk is at the "[Java Forum Stuttgart](https://www.java-forum-stuttgart.de)" in Germany. It's an online conference again this year. I have fond memories - I lived in Stuttgart and gave my first [conference talk there](https://betterprojectsfaster.com/learn/talks-java-forum-stuttgart-2019/) two years ago!

So I spent last week working on my "usual talk" - [how Java developers should build front-ends today](https://betterprojectsfaster.com/learn/talks-jfs-2021-how-to-build-front-ends/) - and recording it. It was about 48 minutes raw. That included waiting three times for my cat to stop scratching at the door. 🐱 And me repeating sentences multiple times, sometimes even a whole slide! The end result is 38 minutes and 4 seconds long - with a little intro, an outro, and some credits.

***

## ADVERTISEMENT
### 22 YEARS OF FULL-STACK JAVA FOR HIRE NEXT JANUARY
I’m a full-stack Java developer with 22 years of experience: Spring Boot, Angular, Flutter. I'm looking for a project in January 2022, in Milton Keynes, London, or remote. I’ll work as a contractor or fixed-term employee but don’t take permanent positions. 

Interested? Then check out my resume & work samples!

[Check out my resume & work samples ](https://ksilz.com/)

***

### Frameworks & Libraries
#### Spring One Preview
*Spring 6 will be revealed this Wednesday. I expect its GraalVM support to be the highlight, with Java 11 as the new baseline.*

The annual conference for the dominating Java frameworks starts this Wednesday: Spring One. It's a free online conference again this year.

And it's one of these conferences where the Spring framework gets a new major version: Juergen "Spring" Hoeller [will unveil Spring Framework 6.0 on Wednesday](https://springone.io/2021/sessions/from-spring-framework-5-3-to-6-0). I'm looking forward to finding out three things: Themes, Spring Native, and Java version.

"Themes" is what Juergen Holler calls overarching initiatives or goals for a new Spring version. Spring 5.0, for instance, had functional style, reactive architectures, HTTP/2, Servlet 4, and Kotlin as themes ([timed YouTube link](https://youtu.be/pukAOfnouPc?t=664)). It also had Java modularity (Jigsaw) as a theme, but I don't think that went anywhere. But it's apparently on the table again for version 6.0 as Juergen revealed the “introduction of module-info definitions across the codebase” last April (see [issue #35](https://bpfnl.substack.com/p/how-to-build-java-applications-today-faf)).

So what could the themes be for Spring 6.0?

The elephant in the room is built-in support for GraalVM - building small & fast native applications. Spring needs that to fight off the likes of Quarkus and Micronaut. Last year, Pivotal said that Spring Boot 3 and Spring 6 are “expected to provide first-class support for native application deployment” ([time-coded YouTube link](https://youtu.be/Um9djPTtPe0?t=2791)). [Spring Native](https://docs.spring.io/spring-native/docs/current/reference/htmlsingle/) will do that. 

But Spring Native [is still in beta](https://github.com/spring-projects-experimental/spring-native) and still listed under "[spring-projects-experimental](https://github.com/spring-projects-experimental)". Will Spring Native be ready for Spring 6.0? We'll know on Wednesday. Will Spring Native be competitive with Quarkus (in May, a Spring Native app used 126 MB, Quarkus just 15 MB)? We'll find that out later this fall.

The next point of interest is the baseline Java version for Spring 6.0. If it uses Java modules, it's got to be Java 9+. And because the vast majority of organizations only use LTS Java releases, it's either Java 11 or Java 17. I bet on Java 11: Spring 5.0 in 2017 used Java 8, which was 3.5 years old at that point. Java 11 is now 3 years old, and Java 17 is not even out for another two weeks. I'd love to be proven wrong here! Java 17 as the baseline would push modern Java adoption forward but hold Spring 6 adoption back - it takes a while to migrate from Java 8 or earlier to Java 17.

Now, most of us don't use the Spring Framework directly but use it through Spring Boot. The current beta is [Spring Boot 2.6](https://spring.io/blog/2021/08/19/spring-boot-2-6-0-m2-is-now-available) which relies on Spring 5.3. So when's Spring Boot 3 going to appear? Next Spring is my best bet - Spring Boot 2.5 appeared on [May 20 this year](https://spring.io/blog/2021/05/20/spring-boot-2-5-is-now-ga).

[Conference site](https://springone.io)

***

### Tools
#### 40% of GitHub Copilot Code Has Security Holes 
In July, GitHub previewed an "AI pair programmer" (see [issue #44](https://bpfnl.substack.com/p/how-to-build-java-applications-today-6e6)). It would implement a method after a (human) programmer defined a method signature and described what that method would do in a comment. So are the machines about to take our jobs?

Researchers created 1.692 programs with GitHub Copilot. And 40% of them had security holes. Pew, that's a relief - i surely that must disqualify GitHub Copilot from serious use! Machines bad, humans good, we Java developers keep our jobs, yay, confetti…

Now before we get too cocky: **How** did Copilot learn? Here's what I wrote in July: "GitHub trained it with - you guessed it - code from GitHub repositories." So Copilot learned the security vulnerabilities **from us humans**! 

Maybe some of those vulnerabilities have been fixed by now, but the Copilot never picked that up. Or perhaps the vulnerabilities weren't identified as such when the original code was written. Either way, I think there's no place for [Schadenfreude](https://en.wikipedia.org/wiki/Schadenfreude) about the shortcomings of Copilot here!

[Visual Studio Magazine article](https://visualstudiomagazine.com/articles/2021/08/26/github-copilot-security.aspx)

***

### Releases
#### Kotlin 1.5.30
This release previews improvements in many areas that Kotlin 1.6 will finalize: [Language](https://blog.jetbrains.com/kotlin/2021/08/kotlin-1-5-30-released/#language), [Kotlin/JVM](https://blog.jetbrains.com/kotlin/2021/08/kotlin-1-5-30-released/#kotlin-jvm), [Standard library](https://blog.jetbrains.com/kotlin/2021/08/kotlin-1-5-30-released/#stdlib), [Gradle](https://blog.jetbrains.com/kotlin/2021/08/kotlin-1-5-30-released/#gradle), [Kotlin/Native](https://blog.jetbrains.com/kotlin/2021/08/kotlin-1-5-30-released/#kotlin-native), and [Kotlin/JS IR](https://blog.jetbrains.com/kotlin/2021/08/kotlin-1-5-30-released/#kotlin-js).

The announcement includes a [video about the new features](https://youtu.be/rNbb3A9IdOo).

[Announcement](https://blog.jetbrains.com/kotlin/2021/08/kotlin-1-5-30-released/)

***

#### Hibernate ORM 5.3.22
This release [updates 12 dependencies](https://hibernate.atlassian.net/secure/ReleaseNote.jspa?version=31962&styleName=Html&projectId=10031) and adds —the `add-opens` option.

[Announcement](https://in.relation.to/2021/08/23/hibernate-orm-5322-final-release/)

***

## About
Karsten Silz is the author of this newsletter. He is a full-stack web & mobile developer with 22 years of Java experience, author, speaker, and marathon runner. Karsten got a Master's degree in Computer Science at the Dresden University of Technology (Germany) in 1996.

Karsten has worked in Europe and the US. He co-founded a software start-up in the US in 2004. Karsten led product development for 13 years and left after the company was sold successfully. He co-founded the UK SaaS start-up "[Your Home in Good Hands](https://yourhomeingoodhands.co.uk/)" as CTO in 2020. Since 2019, Karsten also works as a contractor in the UK.

Karsten has [this newsletter](https://bpfnl.substack.com/), a [developer website](https://betterprojectsfaster.com/), and a [contractor site](https://ksilz.com/). He's on [LinkedIn](https://www.linkedin.com/in/ksilz/), [Twitter](https://twitter.com/karsilz), and [GitHub](https://github.com/ksilz). Karsten is also an [author at InfoQ](https://www.infoq.com/profile/Karsten-Silz).