Skip to content

Commit f11988f

Browse files
committed
Modified select() getter to allow backwards compatibility. Removed unnecessary conversion from selectAsString().
1 parent 9bde83e commit f11988f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/model/QueryEnhancedRequest.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -119,19 +119,19 @@ public Boolean scanIndexForward() {
119119
}
120120

121121
/**
122-
* Returns the value of select, or null if it doesn't exist.
122+
* Returns the value of select as Enum, or null if it doesn't exist.
123123
* @return
124124
*/
125-
public String select() {
126-
return select;
125+
public Select select() {
126+
return Select.fromValue(this.select);
127127
}
128128

129129
/**
130130
* Returns the value of select as a string, or null if it doesn't exist.
131131
* @return
132132
*/
133133
public String selectAsString() {
134-
return String.valueOf(select);
134+
return select;
135135
}
136136

137137
/**
@@ -307,7 +307,7 @@ public Builder scanIndexForward(Boolean scanIndexForward) {
307307
* @return a builder of this type
308308
*/
309309
public Builder select(Select select) {
310-
this.select = select.toString();
310+
this.select = select == null ? null : select.toString();
311311
return this;
312312
}
313313

0 commit comments

Comments
 (0)