This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Do you know what the method Integer.getInteger() does? It most likely does not do what you think it does.
The API documentation says:
Determines the integer value of the system property with the specified name.
If there is no system property named "42", then Integer.getInteger() returns null, and because Parser.getInt() returns a primitive int, the JVM is trying to auto-unwrap null to an int - which causes a NullPointerException.