Hi,
I'm wondering if CaseInsensitiveMap is behaving as designed, or if I have
uncovered an issue
I'm trying (best not to ask why :) )
private static void copyHeaders(org.apache.camel.Message in,
MyInterimMessageType out) {
Map<String, Object> hdrs = in.getHeaders();
for (String s : hdrs.keySet()) {
out.addHeader(s, in.getHeader(s, String.class));
}
}
If previously in my route I have added headers to the message whose keys are
CamelCase, this is not preserved in my MyInterimMessageType headers, they are
all lower case.
Looking at the source; surely CaseInsensitiveMap should override the keySet()
method from HashMap so that it returns the original keys rather than all the
lower case keys.
I can work around this behaviour in code of course, I'm just trying to
ascertain if this behaviour is intended.
Regards
Lewin