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

fix: Use WeakHashMap for caching proxy classes #2260

Merged
merged 14 commits into from
Jan 20, 2025

Conversation

Auto81
Copy link
Contributor

@Auto81 Auto81 commented Jan 20, 2025

Change list

Fix for #2247

Types of changes

  • New feature (non-breaking change which adds functionality)
  • No changes in production code.
  • Bugfix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Details

Expanded test asserts in CombinedWidgetTest, happy to move if better place.

Sorry, something went wrong.

Replace ConcurrentHashMap with WeakHashMap wrapped with Collections.synchronizedMap to ensure thread-safety.
Copy link

linux-foundation-easycla bot commented Jan 20, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link
Contributor

@asolntsev asolntsev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved (except the abovementioned logging and formatting)

@mykola-mokhnach
Copy link
Contributor

mykola-mokhnach commented Jan 20, 2025

Thank you @Auto81

Please sign the CLA and update the PR title to comply with conventional commit naming rules as well as styling/linter ones

resolve PR comments
Update Helpers.java
remove unused import
re align formatting to original
@Auto81 Auto81 changed the title AppiumFieldDecorator - CACHED_PROXY_CLASSES fix fix: Use WeakHashMap for caching proxy classes Jan 20, 2025
Update CombinedWidgetTest.java
@mykola-mokhnach mykola-mokhnach merged commit eac05b1 into appium:master Jan 20, 2025
7 checks passed
@KazuCocoa KazuCocoa added the size:S contribution size: S label Feb 1, 2025
@jlipps
Copy link
Member

jlipps commented Feb 13, 2025

Hi @Auto81, congrats: the Appium project wants to compensate you for this contribution! Please reply to this comment mentioning @jlipps and @KazuCocoa and sharing your OpenCollective account name, so that we can initiate payment! Or let us know if you decline to receive compensation via OpenCollective. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:S contribution size: S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

java.lang.OutOfMemoryError: Metaspace happen on appium java client 9.2.3
6 participants