intellij

The mystery of the endless Throwable's cause chain shown in the IntelliJ debugger

A Throwable in Java can have a cause which in turn is a Throwable as well. This cause can have a cause and we can have a chain of Throwableobjects which we can follow until a Throwable has no cause. Let me explain this with a small example: 1class Scratch { 2 public static void main(String[] args) { 3 try { 4 try { 5 int division = divide(4, 0); 6 } catch (Exception e) { 7 throw new IllegalArgumentException("got exception calling divide", e); 8 } 9 } catch (Throwable t) { 10 while (t !

Run IntelliJ IDEA with actual Java version on OS X

With every update of IntelliJ IDEA, I stumble over this: IDEA wants to run on Java Version 6. As I don’t have this buggy outdated version on my Mac anymore, I always have to patch the config. To do this, locate the file named Info.plist in the Contents folder of the IntelliJ IDEA 14 CE.app directory. Open the file with TextEdit or any text editor of your choice and change the line