@@ -1084,23 +1084,27 @@ public final List<JsonNode> findParents(String fieldName)
1084
1084
* If the node method is called on is not Object node,
1085
1085
* or if property exists and has value that is not Object node,
1086
1086
* {@link UnsupportedOperationException} is thrown
1087
- *<p>
1088
- * NOTE: since 2.10 has had co-variant return type
1089
1087
*/
1090
- public <T extends JsonNode > T with (String propertyName ) {
1088
+ public <T extends JsonNode > T withObject (String propertyName ) {
1091
1089
throw new UnsupportedOperationException ("JsonNode not of type ObjectNode (but "
1092
1090
+getClass ().getName ()+"), cannot call with() on it" );
1093
1091
}
1094
1092
1093
+ /**
1094
+ * @deprecated Since 2.14 use {@code withObject} instead
1095
+ */
1096
+ @ Deprecated // since 2.14
1097
+ public final <T extends JsonNode > T with (String propertyName ) {
1098
+ return withObject (propertyName );
1099
+ }
1100
+
1095
1101
/**
1096
1102
* Method that can be called on Object nodes, to access a property
1097
1103
* that has <code>Array</code> value; or if no such property exists, to create,
1098
1104
* add and return such Array node.
1099
1105
* If the node method is called on is not Object node,
1100
1106
* or if property exists and has value that is not Array node,
1101
1107
* {@link UnsupportedOperationException} is thrown
1102
- *<p>
1103
- * NOTE: since 2.10 has had co-variant return type
1104
1108
*/
1105
1109
public <T extends JsonNode > T withArray (String propertyName ) {
1106
1110
throw new UnsupportedOperationException ("JsonNode not of type ObjectNode (but "
0 commit comments