GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — document.clone().append(html) is not threadsafe · Issue #2281 · jhy/jsoup

document.clone().append(html) is not threadsafe #2281

New issue
Copy link
New issue
Copy link
Closed
Closed
document.clone().append(html) is not threadsafe#2281
Copy link
Assignees
jhy
Labels
bugA confirmed bug, that we should fixfixedAn {bug|improvement} that has been {fixed|implemented}
Milestone
1.19.1

Description

@jhy
jhy
opened on Mar 2, 2025
Issue body actions

If multiple threads try to call document.clone().append(html), they will fail.

.append(html) uses the document's parser, and that is not being cloned along with the document. And so multiple threads are hitting the same parser, which is not thread safe.

This is the root cause of #2280

Activity

  1. jhy
    self-assigned this
    on Mar 2, 2025
  2. jhy
    added
    bugA confirmed bug, that we should fix
    on Mar 2, 2025
  3. jhy
    added this to the 1.19.1 milestone on Mar 2, 2025
  4. jhy
    closed this as completedin d55469aon Mar 2, 2025
  5. jhy
    added a commit that references this issue on Mar 2, 2025

    Changelog for #2281

    5fde3d9
  6. jhy
    added
    fixedAn {bug|improvement} that has been {fixed|implemented}
    on Mar 2, 2025
  7. pull
    added a commit that references this issue on Mar 2, 2025

    Clone the Parser when cloning a Document

    This issue will close once commit d55469a is merged into the 'master' branch.
    d55469a
  8. Repository owner deleted a comment from abcdefghijklmnopqrstuvwxyzx1 on Mar 23, 2025
  9. jhy commented on Apr 28, 2025

    @jhy
    jhy
    on Apr 28, 2025
    OwnerAuthor
    More actions

    I changed this in #2314 so that the Parser itself is threadsafe, and in #2315 so that we don't create Parser clones or new instances on every Document.clone or Element.clone.

  10. benkard
    added a commit that references this issue on Jul 4, 2025

    chore(deps): update all non-major dependencies (mulk/mulkcms2!58)

    4680b8c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @jhy
    jhy

Labels

bugA confirmed bug, that we should fixfixedAn {bug|improvement} that has been {fixed|implemented}

Type

No type

Projects

No projects

    Milestone

    • 1.19.1

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402792 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.