On Tue, Sep 6, 2016 at 12:10 PM, Shi Jinghai <huaru...@hotmail.com> wrote:

> Hi Jacopo,
>
> I cleaned OFBizSolrContextFilter.java and submitted in rev. 1759401.
> Please check if it's required to do a further refactoring.
>
> Kind Regards,
>
> Shi Jinghai
>
>
Thank you, Jinghai.
I still see a lot of code that is duplicated.
Also, I don't think it is a good idea to have a servlet filter that
initializes another filter within its init method:

contextFilter = new ContextFilter();
contextFilter.init(config);

The initialization of filters should be left to the servlet container
(e.g. Tomcat) based on the configuration in web.xml.

As regards the duplication of code, it affects unfortunately several other
filters in OFBiz, like SeoContextFilter, CatalogUrlSeoFilter etc... I think
that all these classes need a serious cleanup.

I will start a separate thread to discuss this topic.

Kind regards,

Jacopo

Reply via email to