details: https://code.openbravo.com/erp/devel/pi/rev/6e5c6474aebe changeset: 35123:6e5c6474aebe user: Carlos Aristu <carlos.aristu <at> openbravo.com> date: Tue Nov 27 10:52:36 2018 +0100 summary: Fixes issue 39699: Avoid NPE when test is skipped
When the assumption done in the @BeforeClass method is not fullfilled, then initialization of the "coreWasInDevelopment" variable is not done. In that case, a NPE was being thrown later in the @AfterClass method. Now we are just simply avoiding that NPE in the @AfterClass method. diffstat: src-test/src/org/openbravo/test/views/SortingFilteringGridConfiguration.java | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r cf5f7b83f80e -r 6e5c6474aebe src-test/src/org/openbravo/test/views/SortingFilteringGridConfiguration.java --- a/src-test/src/org/openbravo/test/views/SortingFilteringGridConfiguration.java Mon Nov 26 19:31:15 2018 +0100 +++ b/src-test/src/org/openbravo/test/views/SortingFilteringGridConfiguration.java Tue Nov 27 10:52:36 2018 +0100 @@ -81,7 +81,7 @@ @AfterClass public static void cleanUp() { - if (coreWasInDevelopment) { + if (Boolean.TRUE.equals(coreWasInDevelopment)) { return; } OBContext.setAdminMode(true); _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits