Skip to content

Commit

Permalink
Fix #1401: rename TreeNode.isContainerNode() as isContainer() (#1402
Browse files Browse the repository at this point in the history
)
  • Loading branch information
cowtowncoder authored Feb 7, 2025
1 parent d83012a commit 781ebfd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions release-notes/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ JSON library.
#1380: Change 3.0 to use `module-info.java` directly (and not via Moditect)
#1385: Create `jackson-core-[VERSION]-tests.jar` to contain shared
test utility classes
#1401: Rename `TreeNode.isContainerNode()` as `isContainer()` (3.0)
- Rename `JsonGenerator.Feature.AUTO_CLOSE_JSON_CONTENT` as `AUTO_CLOSE_CONTENT`
- Add `TreeCodec.nullNode()`, `TreeNode.isNull()` methods
- Change the way `JsonLocation.NA` is included in exception messages
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/tools/jackson/core/TreeNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public interface TreeNode
* and null values from JSON.
*<p>
* Note: one and only one of methods {@link #isValueNode},
* {@link #isContainerNode} and {@link #isMissingNode} ever
* {@link #isContainer()} and {@link #isMissingNode} ever
* returns true for any given node.
*
* @return True if this node is considered a value node; something that
Expand All @@ -73,20 +73,20 @@ public interface TreeNode
* Method that returns true for container nodes: Arrays and Objects.
*<p>
* Note: one and only one of methods {@link #isValueNode},
* {@link #isContainerNode} and {@link #isMissingNode} ever
* {@link #isContainer()} and {@link #isMissingNode} ever
* returns true for any given node.
*
* @return {@code True} for Array and Object nodes, {@code false} otherwise
*/
boolean isContainerNode();
boolean isContainer();

/**
* Method that returns true for "virtual" nodes which represent
* missing entries constructed by path accessor methods when
* there is no actual node matching given criteria.
*<p>
* Note: one and only one of methods {@link #isValueNode},
* {@link #isContainerNode} and {@link #isMissingNode} ever
* {@link #isContainer()} and {@link #isMissingNode} ever
* returns true for any given node.
*
* @return {@code True} if this node represents a "missing" node
Expand All @@ -96,7 +96,7 @@ public interface TreeNode
/**
* Method that returns true if this node is an Array node, false
* otherwise.
* Note that if true is returned, {@link #isContainerNode}
* Note that if true is returned, {@link #isContainer()}
* must also return true.
*
* @return {@code True} for Array nodes, {@code false} for everything else
Expand All @@ -106,7 +106,7 @@ public interface TreeNode
/**
* Method that returns true if this node is an Object node, false
* otherwise.
* Note that if true is returned, {@link #isContainerNode}
* Note that if true is returned, {@link #isContainer()}
* must also return true.
*
* @return {@code True} for Object nodes, {@code false} for everything else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public boolean isValueNode() {
}

@Override
public boolean isContainerNode() {
public boolean isContainer() {
return false;
}

Expand Down

0 comments on commit 781ebfd

Please sign in to comment.