Community
Participate
Working Groups
>Getting the following on one machine view without any overrides of the 2.0 spec jar and 1.6 compile level in jpa.test JPA2: SimpleSerializeFetchGroupTests find(,,Map) may report Type mismatch error on expected Employee not Object >1 of 4 Description Resource Path Location Type Type mismatch: cannot convert from Object to Employee SimpleSerializeFetchGroupTests.java /eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/fieldaccess/fetchgroups line 884 Java Problem >Fix is to use generics like other tests in the file For the JPA 2.0 spec function public <T> T find(Class<T> entityClass, Object primaryKey, Map<String, Object> properties); >Compiling Map<String, Object> properties = new HashMap<String, Object>(); Employee emp = em.find(Employee.class, minId, properties); >broken HashMap hints = new HashMap(2); Employee empShared = em.find(Employee.class, id, hints); >Trivial Fix is to specify generics in the map HashMap hints = new HashMap(2); to HashMap<String, Object> hints = new HashMap<String, Object>(2); or Map<String, Object> hints = new HashMap<String, Object>(2);
Created attachment 180813 [details] find api requires generics specified on 3rd map parameter
>Regression Testing Results: OK <testsuite errors="0" failures="0" hostname="t4400" name="org.eclipse.persistence.testing.tests.jpa.AllCMP3TestRunModel" tests="2156" time="2107.439" timestamp="2010-10-13T19:19:00"> >See SVN rev # 8356 https://fisheye2.atlassian.com/changelog/eclipselink/?cs=8356
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink