I am unable to build the dozer trunk, because 4 tests are failing with Java6.
The maven results are:
Failed tests:
testSetToArray(net.sf.dozer.functional_tests.proxied.ProxiedMapperTest)
testSetToArray(net.sf.dozer.functional_tests.MapperTest)
testPropertyToClassLevelMap(net.sf.dozer.functional_tests.proxied.ProxiedMapTypeTest)
testPropertyToClassLevelMap(net.sf.dozer.functional_tests.MapTypeTest)
Tests in error:
testNestedCustomMap(net.sf.dozer.functional_tests.proxied.ProxiedMapTypeTest)
testNestedCustomMap(net.sf.dozer.functional_tests.MapTypeTest)
Tests run: 455, Failures: 4, Errors: 2, Skipped: 0
My Java Version:
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)
I'd like to commit a patch for a problems with hints we had in our project, but I need the test running first...
I forgot to mention that the failing tests make assumptions about the ordering of elements in Sets - which does not make sense.
I also noticed that the test, as mentioned below/above, fail.
Hope this will be solved soon.
I made a simple fix for the test relying on Set ordering. But MapTypeTest is a bug for real. I spent half a day in debugger and could not really understand where it comes from. If anyone knows the answer don't keep it for yourself. Will continue to dig today...
I have decided to disable failing MapTypeTest for the 4.3 release. This issue will be addressed in version 4.4 with high priority.
MapTypeTest.testPropertyToClassLevelMap appears to be failing with 1.6. The workaround until this is fixed is to use jdk 1.5 for development
The fix should be quite simple: just test if the resulting set/list contains the mapped values and never check the order of object which are put in or fetched from a set since Sets do not guarantee a certain iteration order by definition.
But I think you already figured that out, right?
Current Dozer 5.3.3-SNAPSHOT builds well with Java 6 now, but it fails to build with Java 7. At http://www.oracle.com/technetwork/java/javase/jdk7-relnotes-418459.html it is stated:
Area: API: Utilities
Synopsis: Due to an error in java.util.TreeMap, it was previously possible to insert invalid null elements and elements not implementing Comparable into empty TreeMaps and TreeSets. Only a single invalid element could be inserted into the empty TreeMaps or TreeSets; additional elements would cause the expected NullPointerException or ClassCastException. Most other operations upon the collection would also fail. As of JDK 7, inserting an invalid null element or an element not implementing Comparable into an empty TreeMap or TreeSet throws a NullPointerException.
RFE: 5045147
Some Dozer tests fail because of this collections api misuse.
Also, there are several errors reported by compiler:
"...is internal proprietary API and may be removed in a future release"
Both compiler and resources maven plugins also report
"[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!"