Skip to content

Commit a8276dd

Browse files
authored
Fix integer overflow issue in DocStatus by changing Integer to Long (#1644)
Signed-off-by: leedonggyu <donggyu04@naver.com>
1 parent c1ae512 commit a8276dd

8 files changed

Lines changed: 55 additions & 54 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
1414
- Bump `org.opensearch.gradle:build-tools` from 3.1.0-SNAPSHOT to 3.2.0-SNAPSHOT ([#1642](https://github.com/opensearch-project/opensearch-java/pull/1642))
1515

1616
### Changed
17+
- Changed the type of the properties in DocStatus from integer to Long to resolve the integer overflow issue ([#1644](https://github.com/opensearch-project/opensearch-java/pull/1644))
1718

1819
### Deprecated
1920

java-client/src/generated/java/org/opensearch/client/opensearch/_types/DocStatus.java

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,19 @@
6363
public class DocStatus implements PlainJsonSerializable, ToCopyableBuilder<DocStatus.Builder, DocStatus> {
6464

6565
@Nullable
66-
private final Integer _1xx;
66+
private final Long _1xx;
6767

6868
@Nullable
69-
private final Integer _2xx;
69+
private final Long _2xx;
7070

7171
@Nullable
72-
private final Integer _3xx;
72+
private final Long _3xx;
7373

7474
@Nullable
75-
private final Integer _4xx;
75+
private final Long _4xx;
7676

7777
@Nullable
78-
private final Integer _5xx;
78+
private final Long _5xx;
7979

8080
// ---------------------------------------------------------------------------------------------
8181

@@ -98,7 +98,7 @@ public static DocStatus of(Function<DocStatus.Builder, ObjectBuilder<DocStatus>>
9898
* </p>
9999
*/
100100
@Nullable
101-
public final Integer _1xx() {
101+
public final Long _1xx() {
102102
return this._1xx;
103103
}
104104

@@ -109,7 +109,7 @@ public final Integer _1xx() {
109109
* </p>
110110
*/
111111
@Nullable
112-
public final Integer _2xx() {
112+
public final Long _2xx() {
113113
return this._2xx;
114114
}
115115

@@ -120,7 +120,7 @@ public final Integer _2xx() {
120120
* </p>
121121
*/
122122
@Nullable
123-
public final Integer _3xx() {
123+
public final Long _3xx() {
124124
return this._3xx;
125125
}
126126

@@ -131,7 +131,7 @@ public final Integer _3xx() {
131131
* </p>
132132
*/
133133
@Nullable
134-
public final Integer _4xx() {
134+
public final Long _4xx() {
135135
return this._4xx;
136136
}
137137

@@ -142,7 +142,7 @@ public final Integer _4xx() {
142142
* </p>
143143
*/
144144
@Nullable
145-
public final Integer _5xx() {
145+
public final Long _5xx() {
146146
return this._5xx;
147147
}
148148

@@ -201,15 +201,15 @@ public static Builder builder() {
201201
*/
202202
public static class Builder extends ObjectBuilderBase implements CopyableBuilder<Builder, DocStatus> {
203203
@Nullable
204-
private Integer _1xx;
204+
private Long _1xx;
205205
@Nullable
206-
private Integer _2xx;
206+
private Long _2xx;
207207
@Nullable
208-
private Integer _3xx;
208+
private Long _3xx;
209209
@Nullable
210-
private Integer _4xx;
210+
private Long _4xx;
211211
@Nullable
212-
private Integer _5xx;
212+
private Long _5xx;
213213

214214
public Builder() {}
215215

@@ -242,7 +242,7 @@ public Builder copy() {
242242
* </p>
243243
*/
244244
@Nonnull
245-
public final Builder _1xx(@Nullable Integer value) {
245+
public final Builder _1xx(@Nullable Long value) {
246246
this._1xx = value;
247247
return this;
248248
}
@@ -254,7 +254,7 @@ public final Builder _1xx(@Nullable Integer value) {
254254
* </p>
255255
*/
256256
@Nonnull
257-
public final Builder _2xx(@Nullable Integer value) {
257+
public final Builder _2xx(@Nullable Long value) {
258258
this._2xx = value;
259259
return this;
260260
}
@@ -266,7 +266,7 @@ public final Builder _2xx(@Nullable Integer value) {
266266
* </p>
267267
*/
268268
@Nonnull
269-
public final Builder _3xx(@Nullable Integer value) {
269+
public final Builder _3xx(@Nullable Long value) {
270270
this._3xx = value;
271271
return this;
272272
}
@@ -278,7 +278,7 @@ public final Builder _3xx(@Nullable Integer value) {
278278
* </p>
279279
*/
280280
@Nonnull
281-
public final Builder _4xx(@Nullable Integer value) {
281+
public final Builder _4xx(@Nullable Long value) {
282282
this._4xx = value;
283283
return this;
284284
}
@@ -290,7 +290,7 @@ public final Builder _4xx(@Nullable Integer value) {
290290
* </p>
291291
*/
292292
@Nonnull
293-
public final Builder _5xx(@Nullable Integer value) {
293+
public final Builder _5xx(@Nullable Long value) {
294294
this._5xx = value;
295295
return this;
296296
}
@@ -320,11 +320,11 @@ public DocStatus build() {
320320
);
321321

322322
protected static void setupDocStatusDeserializer(ObjectDeserializer<DocStatus.Builder> op) {
323-
op.add(Builder::_1xx, JsonpDeserializer.integerDeserializer(), "1xx");
324-
op.add(Builder::_2xx, JsonpDeserializer.integerDeserializer(), "2xx");
325-
op.add(Builder::_3xx, JsonpDeserializer.integerDeserializer(), "3xx");
326-
op.add(Builder::_4xx, JsonpDeserializer.integerDeserializer(), "4xx");
327-
op.add(Builder::_5xx, JsonpDeserializer.integerDeserializer(), "5xx");
323+
op.add(Builder::_1xx, JsonpDeserializer.longDeserializer(), "1xx");
324+
op.add(Builder::_2xx, JsonpDeserializer.longDeserializer(), "2xx");
325+
op.add(Builder::_3xx, JsonpDeserializer.longDeserializer(), "3xx");
326+
op.add(Builder::_4xx, JsonpDeserializer.longDeserializer(), "4xx");
327+
op.add(Builder::_5xx, JsonpDeserializer.longDeserializer(), "5xx");
328328
}
329329

330330
@Override

java-client/src/generated/java/org/opensearch/client/opensearch/core/ExistsRequest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public final String preference() {
158158
}
159159

160160
/**
161-
* If <code>true</code>, the request is real-time as opposed to near-real-time.
161+
* If <code>true</code>, the request is real time as opposed to near real time.
162162
* <p>
163163
* API name: {@code realtime}
164164
* </p>
@@ -381,7 +381,7 @@ public final Builder preference(@Nullable String value) {
381381
}
382382

383383
/**
384-
* If <code>true</code>, the request is real-time as opposed to near-real-time.
384+
* If <code>true</code>, the request is real time as opposed to near real time.
385385
* <p>
386386
* API name: {@code realtime}
387387
* </p>

java-client/src/generated/java/org/opensearch/client/opensearch/core/ExistsSourceRequest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public final String preference() {
154154
}
155155

156156
/**
157-
* If <code>true</code>, the request is real-time as opposed to near-real-time.
157+
* If <code>true</code>, the request is real time as opposed to near real time.
158158
* <p>
159159
* API name: {@code realtime}
160160
* </p>
@@ -361,7 +361,7 @@ public final Builder preference(@Nullable String value) {
361361
}
362362

363363
/**
364-
* If <code>true</code>, the request is real-time as opposed to near-real-time.
364+
* If <code>true</code>, the request is real time as opposed to near real time.
365365
* <p>
366366
* API name: {@code realtime}
367367
* </p>

java-client/src/generated/java/org/opensearch/client/opensearch/core/GetRequest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public final String id() {
135135
}
136136

137137
/**
138-
* Required - The name of the index that contains the document.
138+
* Required - The name of the index containing the document.
139139
* <p>
140140
* API name: {@code index}
141141
* </p>
@@ -157,7 +157,7 @@ public final String preference() {
157157
}
158158

159159
/**
160-
* If <code>true</code>, the request is real-time as opposed to near-real-time.
160+
* If <code>true</code>, the request is real time as opposed to near real time.
161161
* <p>
162162
* API name: {@code realtime}
163163
* </p>
@@ -357,7 +357,7 @@ public final Builder id(String value) {
357357
}
358358

359359
/**
360-
* Required - The name of the index that contains the document.
360+
* Required - The name of the index containing the document.
361361
* <p>
362362
* API name: {@code index}
363363
* </p>
@@ -381,7 +381,7 @@ public final Builder preference(@Nullable String value) {
381381
}
382382

383383
/**
384-
* If <code>true</code>, the request is real-time as opposed to near-real-time.
384+
* If <code>true</code>, the request is real time as opposed to near real time.
385385
* <p>
386386
* API name: {@code realtime}
387387
* </p>

java-client/src/generated/java/org/opensearch/client/opensearch/core/GetSourceRequest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public final String id() {
131131
}
132132

133133
/**
134-
* Required - The name of the index that contains the document.
134+
* Required - The name of the index containing the document.
135135
* <p>
136136
* API name: {@code index}
137137
* </p>
@@ -153,7 +153,7 @@ public final String preference() {
153153
}
154154

155155
/**
156-
* Boolean) If <code>true</code>, the request is real-time as opposed to near-real-time.
156+
* Boolean) If <code>true</code>, the request is real time as opposed to near real time.
157157
* <p>
158158
* API name: {@code realtime}
159159
* </p>
@@ -337,7 +337,7 @@ public final Builder id(String value) {
337337
}
338338

339339
/**
340-
* Required - The name of the index that contains the document.
340+
* Required - The name of the index containing the document.
341341
* <p>
342342
* API name: {@code index}
343343
* </p>
@@ -361,7 +361,7 @@ public final Builder preference(@Nullable String value) {
361361
}
362362

363363
/**
364-
* Boolean) If <code>true</code>, the request is real-time as opposed to near-real-time.
364+
* Boolean) If <code>true</code>, the request is real time as opposed to near real time.
365365
* <p>
366366
* API name: {@code realtime}
367367
* </p>

java-client/src/generated/java/org/opensearch/client/opensearch/core/MtermvectorsRequest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ public final String preference() {
244244
}
245245

246246
/**
247-
* If <code>true</code>, the request is real-time as opposed to near-real-time.
247+
* If <code>true</code>, the request is real time as opposed to near real time.
248248
* <p>
249249
* API name: {@code realtime}
250250
* </p>
@@ -613,7 +613,7 @@ public final Builder preference(@Nullable String value) {
613613
}
614614

615615
/**
616-
* If <code>true</code>, the request is real-time as opposed to near-real-time.
616+
* If <code>true</code>, the request is real time as opposed to near real time.
617617
* <p>
618618
* API name: {@code realtime}
619619
* </p>

0 commit comments

Comments
 (0)