-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
java.lang.IllegalAccessError: failed to access class
when calling Java API
#13841
Comments
@RaasAhsan Please also specify Java version and execution environment. |
Done, let me know if the provided information is sufficient |
With quick glance at smithy-model, is the difference in inference that That is, both return |
It looks like the specific overload of |
To address this, we will need a minimization that does not involve third part libraries. |
The issue is that the parent of the concrete builder is package-private, but javap shows it using that interface in the second call
After erasure, there is a missing cast
The reproductive element is that a method (it need not be an overload) is introduced in the package-private subclass, which is used from the client. The interface used to select the method is the private subclass instead of the public child class. The public superclass is
scala 2 also shows only the first cast at erasure, so it must be just a backend issue for the second invocation.
|
Here's a PR for this, which backports @lrytz's scala/scala#6023 from Scala 2.x - #21362 |
Environment
Compiler: 3.0.2, 3.1.0
JVM: tested on AdoptOpenJDK 8, Temurin 11 (compiler and runtime)
OS: tested on darwin x86_64 and darwin arm64
Minimized code
build.sbt
Main.scala
Output
Expectation
Snippet should terminate without raising an exception. Snippet compiles and terminates successfully on 2.13.5 compiler. This builder pattern is used considerably throughout AWS SDK so likely affects other AWS libraries as well.
The text was updated successfully, but these errors were encountered: