Overview of Changes
- Add annotation
@JsonIgnoreon variableauthHeaderto avoid auto-serialization. - Import package
com.fasterxml.jackson.annotation.JsonIgnoreto make annotation valid.
Related Issues
Fixed #42905
Type of Change
- [X] Fix bug
Impact
Now when class DockerRegistryUserAuthentication and DockerRegistryTokenAuthentication use method createAuthHeader() would't add "authHeader" : null field.
Test
I've already test the class DockerRegistryUserAuthentication and DockerRegistryTokenAuthentication method getAuthHeader(), but only write rough test code not create a new branch to test. Do I need create a new branch?
Effect of Test
Use decode tools to display the original string.
Expected Result:
{
"username" : "Ben",
"password" : "123455",
"serveraddress" : "docker@example.com",
"email" : "https://docker.example.com"
}
it works as expected.
Note
If anything I did worked not as expected, plz contact with me. Finally, looking forward to your reply.