Rocinante – a poor mans protocol buffer

For a software developer who wants to improve his own skills, it is always helpful to try out new topics. A nice side effect of such small projects is that you always get new material for articles like this one.

Welcome Gatherers!

With Java 22, the Gatherers (JEP 461) have joined stream processing. Until now, stream processing consisted of three parts: the source, intermediate operations and a terminal operation. While the source and the termination operation were already quite flexible since Java 8, there were few possibilities to break out of the existing set for the intermediate operators.

REST endpoints with filters

Java Bibliotheken

This article is a slightly updated English version of the article “REST Endpunkte mit Filtern”.

In addition to sorting and pagination, filtering is a fairly common action on REST endpoints. In contrast to the first two, however, there is no adequate solution for filtering in the Spring Boot framework. With little effort, however, this can be elegantly implemented with the Spring Boot tools.

REST Endpoints annotated for Cache-Control

Java Bibliotheken

Spring Boot endpoints can be formulated briefly and concisely. Their return values are automatically converted into suitable responses. Occasionally, the developer has to fall back on the ResponseEntity class as a return value. This is the case, for example, when additional HTTP headers are required, such as the Cache-Control header.

Better names for JUnit 5 Test

Java Bibliotheken

The JUnit 5 test library offers a wide range of options for extending the framework and thus simplifying the work of software developers. One of these options is the DisplayNameGenerator, which can be used to modify the generation of test names in the console output. When creating exercises for a course, I was surprised to find that there is a DisplayNameGenerator that replaces underscores with spaces, but none that handles the camel case form. Fortunately, this can be changed.

How to test Error Prone Bug Patterns

Java Bibliotheken

The article Bug Pattern in Eigenbau showed how easily the Error Prone catalogue can be expanded with your own Bug Patterns. However, it failed to mention what unit tests for such Bug Patterns look like.

Of bridges and tunnels – agile system creation

Tunnel constructions are classic waterfall projects in which extensive planning is carried out and then construction can be completed without major changes. There are geological surprises from time to time, but a tunnel plan is, quite literally, set in stone.

Optimistic Locking mit dem ETag Header

Bild von Kerstin Riemer https://pixabay.com/de/users/kriemer-932379/

Wenn mehr als ein Beteiligter beim Speichern von Daten involviert ist, kann es zu ungewollten Überschreibungen kommen. Um solche Probleme zu umgehen, existieren drei Vorgehensweisen. Pessimistic Locking, Optimistic Locking und Ignore It!

Error Details in Spring Boot with RFC 7807

Java Bibliotheken

Spring Boot has an excellent error mechanism for REST endpoints. A @RestontrollerAdvice provides handling methods for various types of exception that can occur when processing REST requests. If you are not careful here, you can end up with an unsightly spread of different error message formats.

Error Prone on Java 17 and beyond

Java Bibliotheken

The Error Prone library from Google is a useful tool for detecting unnecessary Bug Patterns in your own sources. When converting some of my own libraries to Java 17, the Error Prone checks suddenly stopped working. The problem was quickly identified, but fixing it was a real strain on the developer’s patience..

Eigene DSL mit CongoCC erstellen (2)

Java Bibliotheken

Im ersten Beitrag zum Thema wurde eine einfache DSL zur Verarbeitung von CSV Dateien vorgestellt. In diesem Beitrag soll die DSL um einige weitere Feature ergänzt werden.