Skip to content

Commit

Permalink
Update javadoc to clarify buffering of JsonParser.getText(Writer) wrt #…
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed May 6, 2024
1 parent 27edeb7 commit 449ed86
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main/java/com/fasterxml/jackson/core/JsonParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
import com.fasterxml.jackson.core.exc.InputCoercionException;
import com.fasterxml.jackson.core.json.JsonReadFeature;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.core.util.JacksonFeatureSet;
import com.fasterxml.jackson.core.util.RequestPayload;
import com.fasterxml.jackson.core.util.*;

/**
* Base class that defines public API for reading JSON content.
Expand Down Expand Up @@ -1575,6 +1574,12 @@ public String currentName() throws IOException {
* but should typically be more efficient as longer content does need to
* be combined into a single <code>String</code> to return, and write
* can occur directly from intermediate buffers Jackson uses.
*<p>
* NOTE: textual content <b>will</b> still be buffered (usually
* using {@link TextBuffer}) and <b>will</b> be accessible with
* other {@code getText()} calls (that is, it will not be consumed).
* So this accessor only avoids construction of {@link java.lang.String}
* compared to plain {@link #getText()} method.
*
* @param writer Writer to write textual content to
*
Expand Down

0 comments on commit 449ed86

Please sign in to comment.