Discussion about this post

User's avatar
Bruno Alves's avatar

Of course the link is not there!

But here it is

Do you want download the source?

https://github.com/brunobaiano/payment-service-refactoring/releases/tag/phase1-article-v1.0

Clone?

git clone --branch phase1-article-v1.0 https://github.com/brunobaiano/payment-service-refactoring.git

you can try to run tests

cd payment-service-refactoring

mvn -pl phase1-legacy-reflection clean test

Anderson Caxeta's avatar

Great post, Bruno! Studying for the OCP 21, I noticed that modern Java (11+) now favors "list.toArray(new T[0])" over "new T[list.size()]" as the performance standard. It’s a curious trade-off: we gain performance through JVM intrinsics, but we move away from static compile-time control by delegating allocation to internal reflection (a small but real trade-off). We're essentially trading explicit code for runtime optimization. Slightly disappointing, but it is what it is!

No posts

Ready for more?