I saw an uses case were it was null. So the method returned null. But know if I just executed this.deploymentClassLoader.getClasLoader() then it will throw a NullPointerException. That's why I have to check for null and in that case return null.