Open jun7343 opened 1 year ago
@jun7343 can you please assign this issue to me?
@jun7343 can you please assign this issue to me?
I cannot do it, I don't have the authority.
@jun7343 can you please assign this issue to me?
I cannot do it, I don't have the authority.
okay I will open a pr in next 24hrs please review and approve
If the DeliveryMediumType value is received as null from the parameter, the default value specified in the API documentation, which is "SMS", should be executed.
DeliveryMediumType will default to SMS if no attribute is provided. This is different than providing null
.
Will bring this up to the rest of the team. As a workaround, you can add null check to your code.
We'll add a better error message than the NullPointerException.
We'll add a better error message than the NullPointerException.
ok. thanks
Hi is anyone working on this issue? If not, I would like to wrok on it.
Describe the bug
I tried to request the creation of an account using "AdminCreateRequest" to create an account. When creating "AdminCreateRequest" with a builder, if a null value is received for the DeliveryMediumType parameter, a Null Point Exception occurs.
Expected Behavior
If the DeliveryMediumType value is received as null from the parameter, the default value specified in the API documentation, which is "SMS", should be executed.
Current Behavior
As explained above, if you receive a DeliveryMediumType parameter value of null and build and execute an AdminCreateUserRequest, a NullPointException like the one below will occur.
Reproduction Steps
The issue occurs when calling the adminCreateUser method in the createUser method with null being passed as the DeliveryMediumType value, which is a variable argument parameter.
Possible Solution
The following code is a portion of the content within "AdminCreateUserRequest.java".
In my opinion, it would be better to replace Array.asList() with Arrays.nonNullElementsIn() which can filter out null values.
The following code is a portion of the content within "DeliveryMediumListTypeCopier.java
It seems that the condition should be added to include cases where the value of the Collection parameter is empty in the above code. This is because a NullPointException occurs when iterating through a forEach loop with an empty Collection.
Additional Information/Context
No response
AWS Java SDK version used
2.20.31
JDK version used
11
Operating System and version
Apple Mac M1 Pro Ventura 13.0.1