Field mappings are apparently now partially case sensitive in Dozer 5.5.1. There appears to be no option to switch back to the 5.4.0 case-insensitive mappings.
Example from discussion at https://groups.google.com/forum/#!topic/dozer-mapper/k6i_Bf6ZIMc.
import org.dozer.DozerBeanMapper;
public class App {
public static void main(String[] args) {
DozerBeanMapper mapper = new DozerBeanMapper();
UpperCaseBean src = new UpperCaseBean();
src.setMYSTRING("This is from the upper case bean");
LowerCaseBean dst = new LowerCaseBean();
mapper.map(src, dst);
System.out.println(dst.getmystring());
}
public static class UpperCaseBean {
private String MYSTRING;
public String getMYSTRING() {
return MYSTRING;
}
public void setMYSTRING(String MYSTRING) {
this.MYSTRING = MYSTRING;
}
}
public static class LowerCaseBean {
private String mystring;
public void setmystring(String mystring) {
this.mystring = mystring;
}
public String getmystring() {
return this.mystring;
}
}
}
With the following mapping, the "mystring" field will not be mapped:
UpperCaseBean
LowerCaseBean
However, with the following mapping, the field "mystring" will be mapped:
UpperCaseBean
LowerCaseBean
mystring
mystring
This seems like very counter-intuitive behavior. It would be nice to simply add a configuration option to control this behavior.