Fix conditions in #showEm()

* return when the pOriginal is null, not when it is non-null
  (Eclipse noticed a definitive NPE)
* return when running in headless mode (unit tests via maven)
This commit is contained in:
Andreas Kohn 2014-03-17 12:11:49 +01:00
parent 52aa7e974b
commit 552ab24658

View File

@ -439,7 +439,11 @@ public class ImageUtilTestCase extends TestCase {
}
private void showEm(final BufferedImage pOriginal, final BufferedImage pNotSharpened, final BufferedImage pSharpened, final BufferedImage pSharpenedDefault, final BufferedImage pSharpenedMore, final String pTitle) {
if (pOriginal != null) {
if (pOriginal == null) {
return;
}
if (GraphicsEnvironment.isHeadless()) {
return;
}