directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Seelmann <>
Subject Usage of static variables in BaseInterceptor
Date Thu, 13 Aug 2015 18:40:43 GMT
Hi dev,

while doing some checkstyle cleanup in ApacheDS I found some strange
usage of static varables, e.g. in BaseInterceptor, there are lot of
definitions like

    protected static AttributeType OBJECT_CLASS_AT;

However those variables are not initialized in a static block, but in
the BaseInterceptor.init() method which is called for each interceptor
added. This means during server startup this static varables are set
multiple times.

Is there are reason that those are static? Is it to save some space
because I suspect that each AT is the same?

Otherwise I'd remove the static keyword and rename the variables,
because in fact they member variables.

Kind Regards,

View raw message