jonathanlermitage/tikione-jacocoverage — pull request #3 by jlahoda (2013-05-06 18:22:44+00:00)
Title: Preventing NPE when right-clicking on a project that does not have nbproject/project.properties

A NPE is thrown when rightclicking on a project that does not have nbproject/project.properties:
java.lang.NullPointerException
at fr.tikione.jacocoverage.plugin.RunProjectWithJaCoCoAction$ContextAction.(RunProjectWithJaCoCoAction.java:70)
at fr.tikione.jacocoverage.plugin.RunProjectWithJaCoCoAction.createContextAwareInstance(RunProjectWithJaCoCoAction.java:48)
[snip]

This commit prevents that, and also ensures the stream is closed after reading the properties.

BTW, this is more a hotfix - reading from disk in context action's constructor is not very good: this constructor runs (AFAIK) in the AWT thread, and so if the properties will be on a slow filesystem, the whole UI will be blocked (and one should ideally not read the properties anyway). Not sure offhand what would be a better solution, though.