You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/document/EnhancedDocument.java
+8-5Lines changed: 8 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -281,15 +281,18 @@ static Builder builder() {
281
281
StringgetJson(StringattributeName);
282
282
283
283
/**
284
-
* Gets the boolean value for the specified attribute.
284
+
* Gets the {@link Boolean} value for the specified attribute.
285
285
*
286
286
* @param attributeName Name of the attribute.
287
-
* @return value of the specified attribute in the current document as a non-null Boolean.
287
+
* @return value of the specified attribute in the current document as a Boolean representation; or null if the attribute
288
+
* either doesn't exist or the attribute value is null.
288
289
* @throws RuntimeException
289
-
* if either the attribute doesn't exist or if the attribute
290
-
* value cannot be converted into a boolean value.
290
+
* if the attribute value cannot be converted to a Boolean representation.
291
+
* Note that the Boolean representation of 0 and 1 in Numbers and "0" and "1" in Strings is false and true,
Copy file name to clipboardExpand all lines: services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/internal/document/DefaultEnhancedDocument.java
+2-3Lines changed: 2 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -189,11 +189,10 @@ public String getJson(String attributeName) {
189
189
}
190
190
191
191
@Override
192
-
publicbooleangetBoolean(StringattributeName) {
192
+
publicBooleangetBoolean(StringattributeName) {
193
193
Booleanvalue = get(attributeName, Boolean.class);
194
194
if (value == null) {
195
-
thrownewIllegalStateException("Value of " + "attribute " + attributeName + " of type null cannot be converted"
Copy file name to clipboardExpand all lines: services-custom/dynamodb-enhanced/src/test/java/software/amazon/awssdk/enhanced/dynamodb/document/EnhancedDocumentTest.java
0 commit comments