Skip to content
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

[ANDROID] android compatible methods in azure core flagged by animal sniffer #36275

Open
jr1000000 opened this issue Aug 8, 2023 · 5 comments
Assignees
Labels
Android Azure.Core azure-core Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. massey-android needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team suggestion

Comments

@jr1000000
Copy link

Animal Sniffer identifies java.lang.invoke.MethodHandle.invoke and java.lang.invoke.MethodHandles.Lookup as not compatible with any android or java signatures.

animal-sniffer output on azure-core:

[INFO] --- animal-sniffer:1.23:check (default) @ azure-core ---
[INFO] Checking unresolved references to com.toasttab.android:gummy-bears-api-26:0.5.1
[ERROR] C:\Workspaces\azure-sdk-for-java2\sdk\core\azure-core\src\main\java\com\azure\core\util\ExpandableStringEnum.java:76: Undefined reference: com.azure.core.util.ExpandableStringEnum java.lang.invoke.MethodHandle.invoke()
[ERROR] C:\Workspaces\azure-sdk-for-java2\sdk\core\azure-core\src\main\java\com\azure\core\implementation\util\ReferenceManagerImpl.java:96: Undefined reference: void java.lang.invoke.MethodHandle.invoke(Object, Object, Runnable)
[ERROR] C:\Workspaces\azure-sdk-for-java2\sdk\core\azure-core\src\main\java\com\azure\core\implementation\jackson\XmlMapperFactory.java:88: Undefined reference: com.fasterxml.jackson.databind.cfg.MapperBuilder java.lang.invoke.MethodHandle.invoke()
[ERROR] C:\Workspaces\azure-sdk-for-java2\sdk\core\azure-core\src\main\java\com\azure\core\implementation\jackson\JacksonDatabind215.java:82: Undefined reference: Object java.lang.invoke.MethodHandle.invoke()
[ERROR] C:\Workspaces\azure-sdk-for-java2\sdk\core\azure-core\src\main\java\com\azure\core\implementation\jackson\JacksonDatabind215.java:84: Undefined reference: void java.lang.invoke.MethodHandle.invoke(Object, int)
[ERROR] C:\Workspaces\azure-sdk-for-java2\sdk\core\azure-core\src\main\java\com\azure\core\implementation\jackson\JacksonDatabind215.java:86: Undefined reference: Object java.lang.invoke.MethodHandle.invoke(Object)
[ERROR] C:\Workspaces\azure-sdk-for-java2\sdk\core\azure-core\src\main\java\com\azure\core\implementation\jackson\JacksonDatabind215.java:85: Undefined reference: void java.lang.invoke.MethodHandle.invoke(com.fasterxml.jackson.core.JsonFactory, Object)
[ERROR] C:\Workspaces\azure-sdk-for-java2\sdk\core\azure-core\src\main\java\com\azure\core\implementation\ReflectionUtils.java:120: Undefined reference: Object java.lang.invoke.MethodHandle.invoke(Class)
[ERROR] C:\Workspaces\azure-sdk-for-java2\sdk\core\azure-core\src\main\java\com\azure\core\implementation\ReflectionUtils.java:124: Undefined reference: boolean java.lang.invoke.MethodHandle.invoke(Object)
[ERROR] C:\Workspaces\azure-sdk-for-java2\sdk\core\azure-core\src\main\java\com\azure\core\implementation\ReflectionUtils.java:149: Undefined reference: java.lang.invoke.MethodHandles.Lookup java.lang.invoke.MethodHandle.invoke(Class)
[ERROR] C:\Workspaces\azure-sdk-for-java2\sdk\core\azure-core\src\main\java\com\azure\core\implementation\ReflectionUtils.java:169: Undefined reference: java.lang.invoke.MethodHandles.Lookup java.lang.invoke.MethodHandle.invokeExact(Class, java.lang.invoke.MethodHandles.Lookup)
[ERROR] C:\Workspaces\azure-sdk-for-java2\sdk\core\azure-core\src\main\java\com\azure\core\implementation\ReflectionUtils.java:174: Undefined reference: java.lang.invoke.MethodHandles.Lookup java.lang.invoke.MethodHandle.invokeExact(Class, java.lang.invoke.MethodHandles.Lookup)
[ERROR] C:\Workspaces\azure-sdk-for-java2\sdk\core\azure-core\src\main\java\com\azure\core\implementation\ReflectionSerializable.java:195: Undefined reference: Object java.lang.invoke.MethodHandle.invoke(com.azure.json.JsonReader)
[ERROR] C:\Workspaces\azure-sdk-for-java2\sdk\core\azure-core\src\main\java\com\azure\core\implementation\ReflectionSerializable.java:313: Undefined reference: Object java.lang.invoke.MethodHandle.invoke(AutoCloseable)

This occurs anytime animal-sniffer:check is run against azure-core.

java.lang.invoke.MethodHandle.invoke is supported under android api level 26 so these signature mismatches should not be flagged.
It is likely a result of issue mojohaus/animal-sniffer#67

@github-actions github-actions bot added Azure.Core azure-core Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-triage Workflow: This issue needs the team to triage. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Aug 8, 2023
jr1000000 added a commit to sayayayayaya/azure-sdk-for-java that referenced this issue Aug 8, 2023
Branch adding custom annotation and demonstration of functionality in Azure core class ReferenceManagerImpl.java
Potential workaround for Azure#36275
@joshfree joshfree added Android suggestion and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Aug 8, 2023
@joshfree
Copy link
Member

joshfree commented Aug 8, 2023

Thanks for sharing this feedback @jr1000000; @JonathanGiles could you follow up with the folks working on Android support?

@JonathanGiles
Copy link
Member

Thanks @jr1000000 for this report.
@joshfree FYI - this is from the Massey team working on Android support, we are now at the stage where the tooling will give us things to work on (which will initially be investigated by the Massey team). I'll triage these issues as they are filed.

@JonathanGiles JonathanGiles added massey-android and removed needs-team-triage Workflow: This issue needs the team to triage. labels Aug 8, 2023
@github-actions github-actions bot added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Aug 8, 2023
@JonathanGiles JonathanGiles removed the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Aug 8, 2023
@github-actions github-actions bot added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Aug 8, 2023
@srnagar srnagar added the needs-author-feedback Workflow: More information is needed from author to address the issue. label Aug 8, 2023
@github-actions
Copy link

github-actions bot commented Aug 8, 2023

Hi @jr1000000. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

@github-actions github-actions bot removed the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Aug 8, 2023
jr1000000 added a commit to sayayayayaya/azure-sdk-for-java that referenced this issue Aug 9, 2023
added alternate method to suppress all errors caused by a specific class using ignores tag in animal-sniffer maven plugin configuration.  commented out both suppression methods until there is a decision about how best to implement this in live.  Alternate workaround for issue Azure#36275
@github-actions
Copy link

Hi @jr1000000, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

@github-actions github-actions bot added the no-recent-activity There has been no recent activity on this issue. label Aug 16, 2023
@jr1000000
Copy link
Author

Investigating options for demonstrating compatibility in android before suppressing these errors.

@github-actions github-actions bot added needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team and removed needs-author-feedback Workflow: More information is needed from author to address the issue. no-recent-activity There has been no recent activity on this issue. labels Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Azure.Core azure-core Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. massey-android needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team suggestion
Projects
Status: No status
Development

No branches or pull requests

4 participants