rombert commented on PR #61:
URL:
https://github.com/apache/sling-org-apache-sling-models-impl/pull/61#issuecomment-2472961677
> > @joerghoh - if we're doing reflection anyway, I think it would be faster
to use the {{Class.getRecord}} method to check, rather than isAssignableFrom
>
> I don't think that this works on a Java11 runtime, which we still have to
support.
Right, but you don't have the `java.lang.Record` class on Java 11, right?
What I'm saying is that you can get by reflection the
"java.lang.Class.isRecord" method. If it fails, records are not supported and
if it works they are.
This can be done instead of the reflection-based lookup for the Record
class, not in addition to.
Then the "isRecord" class invokes the "java.lang.Class.isRecord" method by
reflection.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]