details: https://code.openbravo.com/erp/devel/pi/rev/fead1878df42 changeset: 34210:fead1878df42 user: Asier Lostalé <asier.lostale <at> openbravo.com> date: Tue Jun 19 08:58:47 2018 +0200 summary: fixed bug 38787: tests fail to compile with JDK10+
org.hamcrest.CoreMatchers.anyOf was failing when compiling in JDK10+ due to generics handling. Although root cause of the problem is still unknown, replacing anyOf with allOf works. So the test using it has been changed for it. diffstat: src-test/src/org/openbravo/test/security/WritableReadableOrganizationClientTest.java | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diffs (23 lines): diff -r 07a2d9822553 -r fead1878df42 src-test/src/org/openbravo/test/security/WritableReadableOrganizationClientTest.java --- a/src-test/src/org/openbravo/test/security/WritableReadableOrganizationClientTest.java Fri Jun 15 10:12:46 2018 +0000 +++ b/src-test/src/org/openbravo/test/security/WritableReadableOrganizationClientTest.java Tue Jun 19 08:58:47 2018 +0200 @@ -19,8 +19,8 @@ package org.openbravo.test.security; -import static org.hamcrest.CoreMatchers.anyOf; -import static org.hamcrest.CoreMatchers.hasItem; +import static org.hamcrest.CoreMatchers.allOf; +import static org.hamcrest.Matchers.hasItem; import static org.hamcrest.Matchers.not; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; @@ -199,7 +199,7 @@ // and it should not be able to read them if it has no access to their ancestor assertThat("Role should not be able to read any US organization", readableOrgs, - not(anyOf(hasItem(Orgs.US_EST), hasItem(Orgs.US_WEST), hasItem(Orgs.US)))); + allOf(not(hasItem(Orgs.US_EST)), not(hasItem(Orgs.US_WEST)), not(hasItem(Orgs.US)))); } finally { if (disabledAccess != null) { disabledAccess.setActive(true); ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits