variablesplayframeworklocalplayframework-1.x

is were way to disable LocalvariablesNamesEnhancer


Is there way to disable LocalvariablesNamesEnhancer for my controllers in playframework in 1.2.4/5

Preferably by setting configuration parameter?

My problem is that it causes a lot of issues with JPA. I used to use older versions of play and my app worked well but since introduction this enhancer it produces weird errors here and there. I am tired of it.


Solution

  • This does not seem to be possible. In CorePlugin.enhance method the enhancer is added without any condition and in LocalvariablesNamesEnhancer.enhanceThisClass method there is no disable flag.

    A workaround for you could be to put problematic code in another class that does not inherit from Controller and call it by delegation in your controller