Home » Author Archives: Rafael Winterhalter

Author Archives: Rafael Winterhalter

Rafael Winterhalter
Rafael is a software engineer based in Oslo. He is a Java enthusiast with particular interests in byte code engineering, functional programming, multi-threaded applications and the Scala language.

Project Jigsaw: an incomplete puzzle

java-logo

Mark Reinhold just recently proposed a delay of Java 9 to buy more time for completing project Jigsaw as the major feature of the upcoming release. While this decision will surely bring the doomsayers of Java back onto stage, I am personally quite relieved and think this was a good and necessary decision. The milestone for feature completion of Java ...

Read More »

Dismantling invokedynamic

java-logo

Many Java developers regarded the JDK’s version seven release as somewhat a disappointment. On the surface, merely a few language and library extensions made it into the release, namely Project Coin and NIO2. But under the covers, the seventh version of the platform shipped the single biggest extension to the JVM’s type system ever introduced after its initial release. Adding ...

Read More »

Make agents, not frameworks

java-logo

Ever since their introduction, Java annotations have become an integral part of the APIs of larger application frameworks. Good examples for such APIs are those of Spring or Hibernate where adding a few lines of annotation code implements quite complex program logic. And while one can argue about the drawbacks of these particular APIs, most developers would agree that this ...

Read More »

Java 8 default methods can break your (users’) code

java-logo

At first glance, default methods brought a great new feature to the Java Virtual Machine’s instruction set. Finally, library developers are able to evolve established APIs without introducing incompatibilities to their user’s code. Using default methods, any user class that implements a library interface automatically adopts the default code when a new method is introduced to this interface. And once ...

Read More »

Memory leaks and memory management in Java applications

java-logo

One of the more prominent features of the Java platform is its automatic memory management. Many people translate this feature erroneously into there are no memory leaks in Java. However, this is not the case and I am under the impression that modern Java frameworks and Java-based platforms, especially the Android platform, increasingly contradict this erroneous assumption. In order to ...

Read More »

Extending Guava caches to overflow to disk

java-logo

Caching allows you to significantly speed up applications with only little effort. Two great cache implementations for the Java platform are the Guava caches and Ehcache. While Ehcache is much richer in features (such as its Searchable API, the possibility of persisting caches to disk or overflowing to big memory), it also comes with quite an overhead compared to Guava. ...

Read More »

Advanced Java generics: retreiving generic type arguments

java-logo

After their introduction in the JDK5, Java generics quickly became an integral element of many Java programs. However, as easy Java generics seem at first glance, as quickly a programer can get lost with this feature. Most Java programers are aware of the Java compiler’s type erasure. Generally speaking, type erasure means that all generic type information about a Java ...

Read More »

The infamous sun.misc.Unsafe explained

java-logo

The biggest competitor to the Java virtual machine might be Microsoft’s CLR that hosts languages such as C#. The CLR allows to write unsafe code as an entry gate for low level programming, something that is hard to achieve on the JVM. If you need such advanced functionality in Java, you might be forced to use the JNI which requires ...

Read More »

Subtyping in Java generics

java-logo

Generic types introduce a new spectrum of type safety to Java program. At the same type, generic types can be quite expressive, especially when using wildcards. In this article, I want to explain how subtyping works with Java generics. General thoughts on generic type subtyping Different generic types of the same class or interface do not define a subtype hierarchy linear ...

Read More »

Object-based micro-locking for concurrent applications by using Guava

java-logo

One of the presumably most annoying problems with writing concurrent Java applications is the handling of resources that are shared among threads as for example a web applications’ session and application data. As a result, many developers choose to not synchronize such resources at all, if an application’s concurrency level is low. It is for example unlikely that a session ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns