Skip to content

Commit

Permalink
Clarified Parser instances are not threadsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
jhy committed Feb 18, 2023
1 parent e52224f commit 6285062
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/org/jsoup/parser/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
import java.util.List;

/**
* Parses HTML into a {@link org.jsoup.nodes.Document}. Generally best to use one of the more convenient parse methods
* in {@link org.jsoup.Jsoup}.
*/
Parses HTML or XML into a {@link org.jsoup.nodes.Document}. Generally, it is simpler to use one of the parse methods in
{@link org.jsoup.Jsoup}.
<p>Note that a Parser instance object is not threadsafe. To reuse a Parser configuration in a multi-threaded
environment, use {@link #newInstance()} to make copies. */
public class Parser {
private TreeBuilder treeBuilder;
private ParseErrorList errors;
Expand Down

0 comments on commit 6285062

Please sign in to comment.