Skip to content

Commit c5a569f

Browse files
committed
Convert object to invalid port number.
In parseIntFromObjectOrString, if the provided object is null, convert it to -1, an invalid port number.
1 parent 1d3f2d1 commit c5a569f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/CommunityIdProcessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ static byte[] toUint16(int num) {
268268
*/
269269
static int parseIntFromObjectOrString(Object o, String fieldName) {
270270
if (o == null) {
271-
return 0;
271+
return -1;
272272
} else if (o instanceof Number number) {
273273
return number.intValue();
274274
} else if (o instanceof String string) {

0 commit comments

Comments
 (0)