Netflix / archaius

Library for configuration management API
Apache License 2.0
2.47k stars 486 forks source link

[2.x] ConfigProxyFactory#isDefault fails in Java 9 if interface has default methods #568

Closed akhaku closed 1 year ago

akhaku commented 5 years ago
Caused by: java.lang.IllegalAccessException: access to public member failed: com.mypackage.MyInterface.getSomething()Set/invokeSpecial, from com.mypackage.MyInterface/2 (unnamed module @5a5c1ce0)
    at java.base/java.lang.invoke.MemberName.makeAccessException(MemberName.java:914)
    at java.base/java.lang.invoke.MethodHandles$Lookup.checkAccess(MethodHandles.java:2193)
    at java.base/java.lang.invoke.MethodHandles$Lookup.checkMethod(MethodHandles.java:2133)
    at java.base/java.lang.invoke.MethodHandles$Lookup.getDirectMethodCommon(MethodHandles.java:2282)
    at java.base/java.lang.invoke.MethodHandles$Lookup.getDirectMethodNoSecurityManager(MethodHandles.java:2276)
    at java.base/java.lang.invoke.MethodHandles$Lookup.unreflectSpecial(MethodHandles.java:1800)
    at com.netflix.archaius.ConfigProxyFactory.newProxy(ConfigProxyFactory.java:312)
    ... 101 more

See also: #537 and https://github.com/Netflix/spectator/issues/425

rgallardo-netflix commented 1 year ago

This should have been fixed by https://github.com/Netflix/archaius/pull/579