#102 BeanModel for non-public classes

Затворени
отворен преди 2 години от ranides · 3 коментара
ranides коментира преди 2 години

If we try to create BeanModel for non-public class, newer JDK will warn about illegal reflective access.

Essentially default behaviour of IClass.methods should be changed.

If we try to list all public methods, we should replace non-public this class with stream of public ancestor + public interfaces and inspect those classes.

Maybe we should even implement something like new method IClasses IClass#publicThis which will return colloection with exactly that: public ancestor and public interfaces

If we try to create BeanModel for non-public class, newer JDK will warn about illegal reflective access. Essentially default behaviour of `IClass.methods` should be changed. If we try to list all public methods, we should replace non-public `this` class with stream of _public ancestor + public interfaces_ and inspect those classes. Maybe we should even implement something like new method `IClasses IClass#publicThis` which will return colloection with exactly that: public ancestor and public interfaces
ranides коментира преди 2 години
Притежател

We need to run junit tests in JDK 11 because of RuntimeConfiguration.FEATURE_BEAN_MODEL_FOR_PRIVATE

We need to write additional tests in JDK 11 to see reflective access warning

Please note it is not exactly about "private class", it is much more complicated

We need to run junit tests in JDK 11 because of RuntimeConfiguration.FEATURE_BEAN_MODEL_FOR_PRIVATE We need to write additional tests in JDK 11 to see reflective access warning Please note it is not exactly about "private class", it is much more complicated
ranides коментира преди 2 години
Притежател
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.ranides.assira.reflection.util.ReflectUtils (file:/C:/ms/src/assira/assira.core/target/classes/) to field java.lang.Enum.name
WARNING: Please consider reporting this to the maintainers of net.ranides.assira.reflection.util.ReflectUtils
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
``` WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by net.ranides.assira.reflection.util.ReflectUtils (file:/C:/ms/src/assira/assira.core/target/classes/) to field java.lang.Enum.name WARNING: Please consider reporting this to the maintainers of net.ranides.assira.reflection.util.ReflectUtils 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 ```
ranides коментира преди 2 години
Притежател

Current solution for FEATURE_BEAN_MODEL_FOR_PRIVATE is in reality very weak, not always working hack

Current solution for FEATURE_BEAN_MODEL_FOR_PRIVATE is in reality very weak, not always working hack
ranides посочи тази задача от ревизия преди 2 години
ranides посочи тази задача от ревизия преди 1 година
Впишете се за да се присъедините към разговора.
Няма етап
Няма изпълнител
1 участника
Зареждане...
Отказ
Запис
Все още няма съдържание.