File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
src/main/java/com/fasterxml/jackson/core/base Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -1526,14 +1526,30 @@ protected Object _getSourceReference() {
15261526 * Helper method used to encapsulate logic of including (or not) of
15271527 * "content reference" when constructing {@link JsonLocation} instances.
15281528 *
1529- * @return Source reference object, if any; {@code null} if none
1529+ * @return ContentReference object to use.
15301530 *
15311531 * @since 2.13
15321532 */
15331533 protected ContentReference _contentReference () {
15341534 if (JsonParser .Feature .INCLUDE_SOURCE_IN_LOCATION .enabledIn (_features )) {
15351535 return _ioContext .contentReference ();
15361536 }
1537+ return _contentReferenceNoSource ();
1538+ }
1539+
1540+ /**
1541+ * Helper method used to encapsulate logic of providing
1542+ * "content reference" when constructing {@link JsonLocation} instances
1543+ * and source information is <b>NOT</b> to be included
1544+ * ({@code StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION} disabled).
1545+ *<p>
1546+ * Default implementation will simply return {@code ContentReference.unknown()}.
1547+ *
1548+ * @return ContentReference object to use when source is not to be included
1549+ *
1550+ * @since 2.16
1551+ */
1552+ protected ContentReference _contentReferenceNoSource () {
15371553 return ContentReference .unknown ();
15381554 }
15391555
You can’t perform that action at this time.
0 commit comments