-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PCS-2420: decode incoming requests independent of case of attribute n… #379
base: master
Are you sure you want to change the base?
PCS-2420: decode incoming requests independent of case of attribute n… #379
Conversation
…ames like userName
String attributeSchemaName = attributeSchema.getName().toLowerCase(); | ||
for (Iterator it = decodedJsonObj.keys(); it.hasNext(); ) { | ||
String key = (String) it.next(); | ||
if (key.toLowerCase().equals(attributeSchemaName)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could use key.equalsIgnoreCase()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the hint. Changed it accordingly: 58677aa
@@ -1247,7 +1247,7 @@ public void testGetUserName(Object objectUser, String scimObjectString) | |||
public Object[][] dataToTestGetUsernameErrorInGettingTheUsernameFromTheAnonymousRequest() { | |||
|
|||
String scimObjectString = "{\n" + | |||
"UserName: John,\n" + | |||
"UsrName: John,\n" + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This small change might be hard to notice by people looking at this test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. 58677aa
@AnuradhaSK @VivekVinushanth what do I need to do to get a review from one of the owners? |
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid * imports.
Import just only the required classes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I changed that: f276f89
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AnuradhaSK am I ready to merge?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AnuradhaSK am I still missing something?
Purpose
Goals
Approach
Release note
Automation tests
-> adjusted
testGetUserNameErrorInGettingTheUsernameFromTheAnonymousRequest
to only fail for wrong spelling of the attribute name and not for different case use.