header names (sans dots)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

header names (sans dots)

Ramon Buckland
Hi Dev'sm,

Recently I remember reading about removing dotted notation header names from
code. (a slow wide reaching change).

I am currently working on CAMEL-1241 and have come across the following.

{{{
            getIn().setHeader("file.remote.host", remoteFile.getHostname());
            getIn().setHeader("file.remote.absoluteName",
remoteFile.getAbsolutelFileName());
            getIn().setHeader("file.remote.relativeName",
remoteFile.getRelativeFileName());
            getIn().setHeader("file.remote.name", remoteFile.getFileName());
}}}


With my refactoring, the properties logically change to

remote impl
            getIn().setHeader("file.remote.host", remoteFile.getHostname());
            ...
generic impl
            getIn().setHeader("file.absoluteName",
remoteFile.getAbsolutelFileName());
            getIn().setHeader("file.relativeName",
remoteFile.getRelativeFileName());
            getIn().setHeader("file.name", remoteFile.getFileName());

Should I leave the dotted notation properties as is ?
Or is there a standard to use for this ?