René's URL Explorer Experiment


Title: StorageAccess.java ConcurrentModificationException · Issue #506 · ResearchStack/ResearchStack · GitHub

Open Graph Title: StorageAccess.java ConcurrentModificationException · Issue #506 · ResearchStack/ResearchStack

X Title: StorageAccess.java ConcurrentModificationException · Issue #506 · ResearchStack/ResearchStack

Description: In StorageAccess.java, listeners is initialized using Collections.synchronizedList. private List listeners = Collections.synchronizedList(new ArrayList<>()); Per the oracle Javadoc for syncrhonizedList, "It is impe...

Open Graph Description: In StorageAccess.java, listeners is initialized using Collections.synchronizedList. private List listeners = Collections.synchronizedList(new ArrayList<>()); Per the oracle J...

X Description: In StorageAccess.java, listeners is initialized using Collections.synchronizedList. private List<StorageAccessListener> listeners = Collections.synchronizedList(new ArrayList<>()); Per ...

Opengraph URL: https://github.com/ResearchStack/ResearchStack/issues/506

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"StorageAccess.java ConcurrentModificationException","articleBody":"In StorageAccess.java, listeners is initialized using Collections.synchronizedList. \r\n`    private List\u003cStorageAccessListener\u003e listeners = Collections.synchronizedList(new ArrayList\u003c\u003e());\r\n`\r\n\r\nPer the oracle Javadoc for syncrhonizedList, \"It is imperative that the user manually synchronize on the returned list when iterating over it\"\r\n\r\nThe notifyListenersReady method iterates over listeners, but does not synchronize on it. If one thread is running notifyListenersReady while a different thread adds or removes an element (i.e. registers / unregisters a listener) a ConcurrentModificationException will be thrown.\r\n\r\n` java.util.ConcurrentModificationException\r\n        at java.util.ArrayList$Itr.next(ArrayList.java:831)\r\n        at org.researchstack.backbone.StorageAccess.notifyListenersReady(StorageAccess.java:222)\r\n        at org.researchstack.backbone.StorageAccess.access$lambda$0(StorageAccess.java)\r\n        at org.researchstack.backbone.StorageAccess$$Lambda$1.run(Unknown Source)\r\n        at android.os.Handler.handleCallback(Handler.java:836)\r\n        at android.os.Handler.dispatchMessage(Handler.java:103)\r\n        at android.os.Looper.loop(Looper.java:203)\r\n        at android.app.ActivityThread.main(ActivityThread.java:6251)\r\n        at java.lang.reflect.Method.invoke(Native Method)\r\n        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)\r\n        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)`\r\n\r\n\r\nJavadoc: https://docs.oracle.com/javase/7/docs/api/java/util/Collections.html#synchronizedList(java.util.List)\r\n\r\n\r\nThe race condition is triggered under the following conditions:\r\n\r\n1. We launch a task from activity A (activity A extends PinCodeActivity). This task is required - meaning the participant will be prompted to complete it if he/she cancels out of the task.\r\n2. While the task is running, the participant presses the back button\r\n3. Activity A's onActivityResult method checks for the Activity.RESULT_CANCELED result code. It finds it and launches a TaskNeededActivity - an activity with a view saying \"Task Required\". TaskNeededActitivty also extends PinCodeActivity.\r\n\r\nIn step 2, when the participant presses the back button, Activity A's onStart() and onResume() get called after onActivityResult. \r\n\r\nMeanwhile, in step 3, TaskNeededActivity launches and its onResume() method is called. The onResume() calls the superclass PinCodeActivity's onResume(). PinCodeActivity's onResume() calls StorageAccess.requestStorageAccess(). This method calls notifyReady() which then calls notifyListenersReady() which iterates through the listeners list in an unsynchronized manner. \r\n\r\nWhile TaskNeededActivity's onResume() is causing the program to iterate through the listeners list, Activity A's onDataReady() is called. It calls super() and PinCodeActivity's onDataReady() method calls storageAccessUnregister() which calls StorageAccess.unregister() which removes a listener from the listeners list. \r\n\r\nWhen the iterator from TaskNeededActivity calls next(), it raises a ConcurrentModificationException upon discovering that a listener was removed.  \r\n\r\n","author":{"url":"https://github.com/ronykrell","@type":"Person","name":"ronykrell"},"datePublished":"2019-05-14T04:21:42.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/506/ResearchStack/issues/506"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:1c578f67-1e57-8a15-2d26-8c422c566d53
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD6A8:29F505:16F080D:1DEA78A:69816F19
html-safe-nonce819a035f14d58e5b395ca822355d31b8975492bfaddf1c04714b957e31015453
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENkE4OjI5RjUwNToxNkYwODBEOjFERUE3OEE6Njk4MTZGMTkiLCJ2aXNpdG9yX2lkIjoiNjIzMDQ2MTkxMjc3NDE3NjUzNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaca94f0d913ae811edbe16602e817c8429c5aff885e456367cdd01e53b97823f90
hovercard-subject-tagissue:443703322
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/ResearchStack/ResearchStack/506/issue_layout
twitter:imagehttps://opengraph.githubassets.com/8aeea25853c8c1582c5d811095fbac63b90ef20a2c2e73bde1b112efd1d63d99/ResearchStack/ResearchStack/issues/506
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/8aeea25853c8c1582c5d811095fbac63b90ef20a2c2e73bde1b112efd1d63d99/ResearchStack/ResearchStack/issues/506
og:image:altIn StorageAccess.java, listeners is initialized using Collections.synchronizedList. private List listeners = Collections.synchronizedList(new ArrayList<>()); Per the oracle J...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameronykrell
hostnamegithub.com
expected-hostnamegithub.com
Nonee137814e266030874fd2c86863529d0622b13889eeda04148c57654b6ea84ad6
turbo-cache-controlno-preview
go-importgithub.com/ResearchStack/ResearchStack git https://github.com/ResearchStack/ResearchStack.git
octolytics-dimension-user_id15782830
octolytics-dimension-user_loginResearchStack
octolytics-dimension-repository_id43707061
octolytics-dimension-repository_nwoResearchStack/ResearchStack
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id43707061
octolytics-dimension-repository_network_root_nwoResearchStack/ResearchStack
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasedd58d68a7813bbec9c91422c8c35f4af33832d70
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/ResearchStack/ResearchStack/issues/506#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FResearchStack%2FResearchStack%2Fissues%2F506
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FResearchStack%2FResearchStack%2Fissues%2F506
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=ResearchStack%2FResearchStack
Reloadhttps://patch-diff.githubusercontent.com/ResearchStack/ResearchStack/issues/506
Reloadhttps://patch-diff.githubusercontent.com/ResearchStack/ResearchStack/issues/506
Reloadhttps://patch-diff.githubusercontent.com/ResearchStack/ResearchStack/issues/506
ResearchStack https://patch-diff.githubusercontent.com/ResearchStack
ResearchStackhttps://patch-diff.githubusercontent.com/ResearchStack/ResearchStack
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2FResearchStack%2FResearchStack
Fork 80 https://patch-diff.githubusercontent.com/login?return_to=%2FResearchStack%2FResearchStack
Star 152 https://patch-diff.githubusercontent.com/login?return_to=%2FResearchStack%2FResearchStack
Code https://patch-diff.githubusercontent.com/ResearchStack/ResearchStack
Issues 74 https://patch-diff.githubusercontent.com/ResearchStack/ResearchStack/issues
Pull requests 9 https://patch-diff.githubusercontent.com/ResearchStack/ResearchStack/pulls
Actions https://patch-diff.githubusercontent.com/ResearchStack/ResearchStack/actions
Projects 0 https://patch-diff.githubusercontent.com/ResearchStack/ResearchStack/projects
Wiki https://patch-diff.githubusercontent.com/ResearchStack/ResearchStack/wiki
Security 0 https://patch-diff.githubusercontent.com/ResearchStack/ResearchStack/security
Insights https://patch-diff.githubusercontent.com/ResearchStack/ResearchStack/pulse
Code https://patch-diff.githubusercontent.com/ResearchStack/ResearchStack
Issues https://patch-diff.githubusercontent.com/ResearchStack/ResearchStack/issues
Pull requests https://patch-diff.githubusercontent.com/ResearchStack/ResearchStack/pulls
Actions https://patch-diff.githubusercontent.com/ResearchStack/ResearchStack/actions
Projects https://patch-diff.githubusercontent.com/ResearchStack/ResearchStack/projects
Wiki https://patch-diff.githubusercontent.com/ResearchStack/ResearchStack/wiki
Security https://patch-diff.githubusercontent.com/ResearchStack/ResearchStack/security
Insights https://patch-diff.githubusercontent.com/ResearchStack/ResearchStack/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/ResearchStack/ResearchStack/issues/506
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/ResearchStack/ResearchStack/issues/506
StorageAccess.java ConcurrentModificationExceptionhttps://patch-diff.githubusercontent.com/ResearchStack/ResearchStack/issues/506#top
https://github.com/ronykrell
https://github.com/ronykrell
ronykrellhttps://github.com/ronykrell
on May 14, 2019https://github.com/ResearchStack/ResearchStack/issues/506#issue-443703322
https://docs.oracle.com/javase/7/docs/api/java/util/Collections.html#synchronizedList(java.util.List)https://docs.oracle.com/javase/7/docs/api/java/util/Collections.html#synchronizedList(java.util.List)
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.