Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "iff" typo in Javadoc, comments and release notes #4502

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion release-notes/VERSION-2.x
Original file line number Diff line number Diff line change
Expand Up @@ -2815,7 +2815,7 @@ Other changes:

* New variant of AnnotationIntrospector.getFormat(), to support class
annotations
* It is now possible to serialize instances of plain old Object, iff
* It is now possible to serialize instances of plain old Object, if
cowtowncoder marked this conversation as resolved.
Show resolved Hide resolved
'FAIL_ON_EMPTY_BEANS' is disabled.
* Trying to remove reference to "JSON" in datatype conversion errors
(since databinding is format-agnostic)
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/fasterxml/jackson/databind/JsonNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ public final JsonNode at(String jsonPtrExpr) {

/**
* Method that can be used to check if the node is a wrapper
* for a POJO ("Plain Old Java Object" aka "bean".
* for a POJO ("Plain Old Java Object" aka "bean").
* Returns true only for
* instances of <code>POJONode</code>.
*
Expand Down Expand Up @@ -493,7 +493,7 @@ public boolean canConvertToExactIntegral() {
* false) null will be returned.
* For String values, null is never returned (but empty Strings may be)
*
* @return Textual value this node contains, iff it is a textual
* @return Textual value this node contains, if (and only if) it is a textual
* JSON node (comes from JSON String value entry)
*/
public String textValue() { return null; }
Expand All @@ -505,7 +505,7 @@ public boolean canConvertToExactIntegral() {
* to read decoded base64 data.
* For other types of nodes, returns null.
*
* @return Binary data this node contains, iff it is a binary
* @return Binary data this node contains, if (and only if) it is a binary
* node; null otherwise
*/
public byte[] binaryValue() throws IOException {
Expand All @@ -517,7 +517,7 @@ public byte[] binaryValue() throws IOException {
* literals 'true' and 'false').
* For other types, always returns false.
*
* @return Textual value this node contains, iff it is a textual
* @return Textual value this node contains, if (and only if) it is a textual
* json node (comes from JSON String value entry)
*/
public boolean booleanValue() { return false; }
Expand Down Expand Up @@ -1009,7 +1009,7 @@ public boolean hasNonNull(int index) {
public final Iterator<JsonNode> iterator() { return elements(); }

/**
* Method for accessing all value nodes of this Node, iff
* Method for accessing all value nodes of this Node, if
* this node is a JSON Array or Object node. In case of Object node,
* field names (keys) are not included, only values.
* For other types of nodes, returns empty iterator.
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public class ObjectMapper
* is found, but this enumeration further limits subset of those types.
*<p>
* Since 2.4 there are special exceptions for JSON Tree model
* types (sub-types of {@link TreeNode}: default typing is never
* types (sub-types of {@link TreeNode}): default typing is never
* applied to them.
* Since 2.8(.4) additional checks are made to avoid attempts at default
* typing primitive-valued properties.
Expand Down Expand Up @@ -211,7 +211,7 @@ public enum DefaultTyping {
* as it tends to add Type Ids everywhere, even in cases
* where type can not be anything other than declared (for example
* if declared value type of a property is {@code final} -- for example,
* properties of type {@code long} (or wrapper {@code Long}).
* properties of type {@code long} or wrapper {@code Long}).
*<p>
* Note that this is rarely the option you should use as it results
* in adding type information in many places where it should not be needed:
Expand Down Expand Up @@ -543,8 +543,8 @@ public boolean useForType(JavaType t)
*/

/**
* Set of module types (as per {@link Module#getTypeId()} that have been
* registered; kept track of iff {@link MapperFeature#IGNORE_DUPLICATE_MODULE_REGISTRATIONS}
* Set of module types (as per {@link Module#getTypeId()}) that have been
* registered; kept track of if (and only if) {@link MapperFeature#IGNORE_DUPLICATE_MODULE_REGISTRATIONS}
* is enabled, so that duplicate registration calls can be ignored
* (to avoid adding same handlers multiple times, mostly).
*
Expand Down Expand Up @@ -3657,7 +3657,7 @@ public boolean canSerialize(Class<?> type, AtomicReference<Throwable> cause) {
* it could deserialize an Object of given type.
* Check is done by checking whether a registered deserializer can
* be found or built for the type; if not (either by no mapping being
* found, or through an <code>Exception</code> being thrown, false
* found, or through an <code>Exception</code> being thrown) false
* is returned.
*<p>
* <b>NOTE</b>: in case an exception is thrown during course of trying
Expand Down Expand Up @@ -4114,7 +4114,7 @@ public ObjectWriter writer(SerializationFeature first,
/**
* Factory method for constructing {@link ObjectWriter} that will
* serialize objects using specified {@link DateFormat}; or, if
* null passed, using timestamp (64-bit number.
* null passed, using timestamp (64-bit number).
*/
public ObjectWriter writer(DateFormat df) {
return _newWriter(getSerializationConfig().with(df));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1912,7 +1912,7 @@ public <T> MappingIterator<T> readValues(JsonParser p) throws IOException
* Sequence can be either wrapped or unwrapped root-level sequence:
* wrapped means that the elements are enclosed in JSON Array;
* and unwrapped that elements are directly accessed at main level.
* Assumption is that iff the first token of the document is
* Assumption is that if the first token of the document is
* <code>START_ARRAY</code>, we have a wrapped sequence; otherwise
* unwrapped. For wrapped sequences, leading <code>START_ARRAY</code>
* is skipped, so that for both cases, underlying {@link JsonParser}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ public boolean isExplicitlyDisabled(DatatypeFeature f) {

/**
* Accessor for getting explicit state of given feature in this set
* iff explicitly set, or {@code null} if not explicitly set (default value)
* if explicitly set, or {@code null} if not explicitly set (default value)
*
* @param f Feature to check
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ protected void _addImplicitConstructorCreators(DeserializationContext ctxt,
*/
continue;
}
// One more thing: implicit names are ok iff ctor has creator annotation
// One more thing: implicit names are ok if ctor has creator annotation
/*
if (isCreator && (name != null && !name.isEmpty())) {
++implicitWithCreatorCount;
Expand Down Expand Up @@ -749,7 +749,7 @@ protected void _addImplicitFactoryCreators(DeserializationContext ctxt,
*/
continue;
}
// One more thing: implicit names are ok iff ctor has creator annotation
// One more thing: implicit names are ok if ctor has creator annotation
/*
if (isCreator) {
if (name != null && !name.isEmpty()) {
Expand Down Expand Up @@ -1136,7 +1136,7 @@ protected boolean _handleSingleArgumentCreator(CreatorCollector creators,
creators.addBigDecimalCreator(ctor, isCreator);
}
}
// Delegating Creator ok iff it has @JsonCreator (etc)
// Delegating Creator ok if it has @JsonCreator (etc)
if (isCreator) {
creators.addDelegatingCreator(ctor, isCreator, null, 0);
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public abstract class BeanDeserializerBase
protected final ValueInstantiator _valueInstantiator;

/**
* Deserializer that is used iff delegate-based creator is
* Deserializer that is used if delegate-based creator is
* to be used for deserializing from JSON Object.
*<p>
* NOTE: cannot be {@code final} because we need to get it during
Expand All @@ -75,7 +75,7 @@ public abstract class BeanDeserializerBase
protected JsonDeserializer<Object> _delegateDeserializer;

/**
* Deserializer that is used iff array-delegate-based creator
* Deserializer that is used if array-delegate-based creator
* is to be used for deserializing from JSON Object.
*<p>
* NOTE: cannot be {@code final} because we need to get it during
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class CollectionDeserializer
protected final ValueInstantiator _valueInstantiator;

/**
* Deserializer that is used iff delegate-based creator is
* Deserializer that is used if delegate-based creator is
* to be used for deserializing from JSON Object.
*/
protected final JsonDeserializer<Object> _delegateDeserializer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class EnumMapDeserializer
protected final ValueInstantiator _valueInstantiator;

/**
* Deserializer that is used iff delegate-based creator is
* Deserializer that is used if delegate-based creator is
* to be used for deserializing from JSON Object.
*/
protected JsonDeserializer<Object> _delegateDeserializer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public class MapDeserializer
protected final ValueInstantiator _valueInstantiator;

/**
* Deserializer that is used iff delegate-based creator is
* Deserializer that is used if delegate-based creator is
* to be used for deserializing from JSON Object.
*/
protected JsonDeserializer<Object> _delegateDeserializer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ public Character deserialize(JsonParser p, DeserializationContext ctxt)
// coercion -- as long as it has length of 1.
text = p.getText();
break;
case JsonTokenId.ID_NUMBER_INT: // ok iff Unicode value
case JsonTokenId.ID_NUMBER_INT: // ok if Unicode value
CoercionAction act = ctxt.findCoercionAction(logicalType(), _valueClass, CoercionInputShape.Integer);
switch (act) {
case Fail:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public final class StringCollectionDeserializer
protected final ValueInstantiator _valueInstantiator;

/**
* Deserializer that is used iff delegate-based creator is
* Deserializer that is used if delegate-based creator is
* to be used for deserializing from JSON Object.
*/
protected final JsonDeserializer<Object> _delegateDeserializer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public Boolean findTransient(Annotated a) {
public Boolean hasCreatorAnnotation(Annotated a) {
ConstructorProperties props = a.getAnnotation(ConstructorProperties.class);
// 08-Nov-2015, tatu: One possible check would be to ensure there is at least
// one name iff constructor has arguments. But seems unnecessary for now.
// one name if constructor has arguments. But seems unnecessary for now.
if (props != null) {
return Boolean.TRUE;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public class POJOPropertyBuilder
protected transient PropertyMetadata _metadata;

/**
* Lazily accessed information about this property iff it is a forward or
* Lazily accessed information about this property if it is a forward or
* back reference.
*
* @since 2.9
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public abstract class DefaultSerializerProvider
*/

/**
* Per-serialization map Object Ids that have seen so far, iff
* Per-serialization map Object Ids that have seen so far, if
* Object Id handling is enabled.
*/
protected transient Map<Object, WritableObjectId> _seenObjectIds;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ public void testFactoryAndProps() throws Exception
}

/**
* Test to verify that multiple creators may co-exist, iff
* Test to verify that multiple creators may co-exist, if
* they use different JSON type as input
*/
@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ public void testStackTraceElementWithCustom() throws Exception
assertNotNull(bean.location);
assertEquals(StackTraceBean.NUM, bean.location.getLineNumber());

// and then directly, iff registered
// and then directly, if registered
ObjectMapper mapper = new ObjectMapper();
SimpleModule module = new SimpleModule();
module.addDeserializer(StackTraceElement.class, new MyStackTraceElementDeserializer());
Expand Down