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

Illegal reflective access #86

Closed
nxtstep opened this issue Jun 20, 2021 · 2 comments
Closed

Illegal reflective access #86

nxtstep opened this issue Jun 20, 2021 · 2 comments
Labels
bug 🐛 Something isn't working

Comments

@nxtstep
Copy link
Contributor

nxtstep commented Jun 20, 2021

WARNING: An illegal reflective access operation has occurred 
WARNING: Illegal reflective access by io.github.hellocuriosity.ModelForge (file~/.gradle/caches/modules-2/files-2.1/io.github.hellocuriosity/model-forge/0.7.0/5a914fb11f1f98c55a15673356fdab5fb36513c3/model-forge-0.7.0.jar) to field java.lang.String.value
WARNING: Please consider reporting this to the maintainers of io.github.hellocuriosity.ModelForge
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
@nxtstep
Copy link
Contributor Author

nxtstep commented Jun 20, 2021

It seems that the instantiator is being asked to take care of forging instead of an added provider:

ModelForge.kt:41:

        val model: T = instantiator.newInstance() as T

        if (providers.isNotEmpty()) {
            providers[clazz]?.let { return it.get() as T }
        }

@hopeman15 hopeman15 added the bug 🐛 Something isn't working label Jun 21, 2021
@hopeman15
Copy link
Contributor

hopeman15 commented Jun 21, 2021

Do you have a provider example where this is showing up? The solution might be as easy as putting the provider check first, I mean no need to instantiate all the other stuff if we are using a provider anyway.

If its showing up in an android project then we need to get #74 in to catch this kind of thing sooner 🙈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants