I have the following code:
Boolean bool = null; try { if (bool) { //DoSomething } } catch (Exception e) { Syst
as your variable bool is pointing to a null, you will always get a NullPointerException, you need to initialize the variable first somewhere with a not null value, and then modify it.