Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorhave not tried2018-06-19 09:162018-06-25 18:14
ReporteralostaleView Statuspublic 
Assigned Toalostale 
PriorityimmediateResolutionfixedFixed in Version3.0PR18Q3
StatusclosedFix in branchFixed in SCM revisionfead1878df42
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned ToAugustoMauch
Web browser
Regression levelAutomated tests
Regression date2018-06-14
Regression introduced in releasepi
Regression introduced by commit [^]
Triggers an Emergency PackNo

0038787: tests fail to compile with JDK10+

DescriptionUsing JDK10+ test fail to compile in command line, tested with OpenJDK Runtime Environment (build 10.0.1+10-Ubuntu-3ubuntu1) and jdk11ea18. It is working fine with JDK 7, 8 and 9. When compiling from Eclipse it is also working properly.

The problem seems to be related with generics in org.hamcrest.CoreMatchers.anyOf, being this part of a compiled jar, might it be a byte-code incompatibility?
Steps To Reproduce1. With JDK10+
2. run ant compile.test
    [mkdir] Created dir: /srv/ci/workspace/try-full-pgsql/src-test/build/classes
    [javac] Compiling 548 source files to /srv/ci/workspace/try-full-pgsql/src-test/build/classes
    [javac] /srv/ci/workspace/try-full-pgsql/src-test/src/org/openbravo/test/security/ error: no suitable method found for assertThat(String,List<String>,Matcher<Iterable<? super Object>>)
    [javac] assertThat("Role should not be able to read any US organization", readableOrgs,
    [javac] ^
    [javac] method Assert.<T#1>assertThat(String,T#1,Matcher<? super T#1>) is not applicable
    [javac] (inference variable T#2 has incompatible bounds
    [javac] upper bounds: String,Object
    [javac] lower bounds: CAP#1,CAP#2,CAP#3,Object,String,CAP#4)
    [javac] method Assert.<T#3>assertThat(T#3,Matcher<? super T#3>) is not applicable
    [javac] (cannot infer type-variable(s) T#3
    [javac] (actual and formal argument lists differ in length))
    [javac] where T#1,T#2,T#3 are type-variables:
    [javac] T#1 extends Object declared in method <T#1>assertThat(String,T#1,Matcher<? super T#1>)
    [javac] T#2 extends Object declared in method <T#2>hasItem(T#2)
    [javac] T#3 extends Object declared in method <T#3>assertThat(T#3,Matcher<? super T#3>)
    [javac] where CAP#1,CAP#2,CAP#3,CAP#4 are fresh type-variables:
    [javac] CAP#1 extends Object super: T#2? from capture of ? super T#2?
    [javac] CAP#2 extends Object super: Object from capture of ? super Object
    [javac] CAP#3 extends Object super: Object from capture of ? super Object
    [javac] CAP#4 extends Object super: T#2? from capture of ? super T#2?
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] 1 error

/srv/ci/workspace/try-full-pgsql/build.xml:589: The following error occurred while executing this line:
/srv/ci/workspace/try-full-pgsql/src-test/build.xml:63: Compile failed; see the compiler error output for details.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
caused by defect 0038761 closedalostale having write access to a parent and one of its children orgs, sometimes it's not possible to read siblings of child one 

-  Notes
hgbot (developer)
2018-06-19 09:20

Repository: erp/devel/pi
Changeset: fead1878df420f23a5fb005e6a1034ab708366aa
Author: Asier Lostalé <asier.lostale <at>>
Date: Tue Jun 19 08:58:47 2018 +0200
URL: [^]

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.

M src-test/src/org/openbravo/test/security/
hudsonbot (developer)
2018-06-19 13:24

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: [^]
Maturity status: Test
alostale (developer)
2018-06-19 16:40

Asked in SO to understand root cause [1]

[1] [^]
AugustoMauch (developer)
2018-06-25 18:14

Code reviewed and verified

- Issue History
Date Modified Username Field Change
2018-06-19 09:16 alostale New Issue
2018-06-19 09:16 alostale Assigned To => alostale
2018-06-19 09:16 alostale Modules => Core
2018-06-19 09:16 alostale Regression level => Automated tests
2018-06-19 09:16 alostale Regression date => 2018-06-14
2018-06-19 09:16 alostale Regression introduced in release => pi
2018-06-19 09:16 alostale Regression introduced by commit => [^]
2018-06-19 09:16 alostale Triggers an Emergency Pack => No
2018-06-19 09:17 alostale Relationship added caused by 0038761
2018-06-19 09:19 alostale Review Assigned To => AugustoMauch
2018-06-19 09:20 hgbot Checkin
2018-06-19 09:20 hgbot Note Added: 0105208
2018-06-19 09:20 hgbot Status new => resolved
2018-06-19 09:20 hgbot Resolution open => fixed
2018-06-19 09:20 hgbot Fixed in SCM revision => [^]
2018-06-19 13:24 hudsonbot Checkin
2018-06-19 13:24 hudsonbot Note Added: 0105241
2018-06-19 16:40 alostale Note Added: 0105261
2018-06-25 18:14 AugustoMauch Note Added: 0105367
2018-06-25 18:14 AugustoMauch Status resolved => closed
2018-06-25 18:14 AugustoMauch Fixed in Version => 3.0PR18Q3

Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker