-
Notifications
You must be signed in to change notification settings - Fork 192
Illegal reflective access by org.springframework.util.ReflectionUtils #1057
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
Comments
|
Thanks @mp911de, I was never fond of our test case with the Optional<> properties. The problem still exists with UUID. I tried encapsulating UUID in a MYUUID class, but the problem remains - the class is introspected recursively. The only "solution" I found was to declare it as Object and convert it to a UUID object if it was ever set to a String. |
If |
Seems that adding BigInteger and UUID converters solves those two specific problems. I am not sure how CouchbaseSimpleTypes is used. @WritingConverter
} @ReadingConverter
} @WritingConverter
} @ReadingConverter
} |
The MappingCouchbaseConverter constructers need to work like the couchbaseMappingContext Bean and mappingCouchbaseConverter Bean in AbstractCouchbaseConfiguration - which both use the CouchbaseCustomConversions. mappingCouchbaseConverter uses CouchbaseCustomConversions as the arg to setCustomConversions, and couchbaseMappingContext uses CouchbaseCustomConversions.getSimpleTypeHolder() as the arg to setSimpleTypeHolder().
I don't know how a MappingCouchbaseConverter without the CouchbaseCustomConversions was handling any of the Couchbase-specific conversions (seems that it wasn't - whenever it was used in testing, the converters were added, which makes the test somewhat pointless). |
To support jdk 16, add converters and module-info. Closes #1057.
To support jdk 16, add converters and module-info. Closes #1057.
Uh oh!
There was an error while loading. Please reload this page.
This occurs for certain property types in my entities. Optional and UUID. The message that this will be denied in a future release is concerning.
This looks similar to spring-projects/spring-framework#24999. A work-around for UUID is to declare the property as Object, but store it as a UUID. This will/can result in it being set to a String by "accessor.setProperty(idProperty, generatedId);" in MappingCouchbaseConverter.writeInternal() and similarly by "accessor.setProperty(idProperty, id);" in CouchbaseTemplate.applyUpdatedId(). To accomodate that, getId() should always check for it being a String, and if so, replace it by id = UUID.fromString(id)
java version 11.0.6.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.springframework.util.ReflectionUtils (file:/Users/michaelreiche/.m2/repository/org/springframework/spring-core/5.3.3/spring-core-5.3.3.jar) to constructor java.util.Optional()
WARNING: Please consider reporting this to the maintainers of org.springframework.util.ReflectionUtils
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
with --illegal-access=debug
The text was updated successfully, but these errors were encountered: