Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are many failures in test when publicLookup is used.
I added a test class to replace existing classes in test-runtime:
When tests are executed with maven-surefire-plugin the content of
'classes' is in a different module-path than 'test-classes'.
This causes the MethodHandles#publicLookup to fail. The reason is that
test classes to serialize/deserialize are coming from module 'test-classes'
and the module 'classes' has no access to it. The 'publicLookup' makes some
validations and because different modules, it fails.
This class is a workaround to bypass this issue, as it is happening in test only.
It should work if 'classes' and 'test-classes' are merged in one unique module. Probably you are questioning now, - why we don't merge both modules in one?. I actually tried it here:
https://github.com/jbescos/yasson/tree/publicLookupFix1
The problem is that we need to introduce a module-info in the test-classes and this brings a new set of problems. Currently I'm having the next issue and I don't know how to fix it: