Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MissingMethodException with the wrapper class $CLV_safeEval [Grails] #120

Open
mauruch opened this issue Jan 24, 2020 · 0 comments
Open

Comments

@mauruch
Copy link

mauruch commented Jan 24, 2020

Hi!

When we try to migrate from code-coverage to open-clover some tests start to fail.
image

The exception occurs when this code is executed:
image

I sent an email to support@ and @marek Parfianowicz answered me:

The $CLV_safeEval_grails_utils_Holder() is a helper method generated by OpenClover and added to the class. It is a wrapper for safe-eval operator- '?.'

According to the exception stack trace, the safeEval method takes two arguments:
(grails.utils.Holder, java.lang.Integer)

and the arguments passed to this method are:
(java.lang.Class, java.lang.Integer)

I suspect this is due to the fact that your declaration:
Holders?.config?.locale

refers to the Holders class (type java.lang.Class) and not a Holders instance (type grails.utils.Holders).

I followed the workaround suggested by Marek and it worked perfect:
public static ConfigObject config = Holders.getConfig()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant