-
Bug
-
Resolution: Fixed
-
Medium
-
2.1
Crowd performs case-insensitive comparisons of user/group name by:
1) String.toLowerCase and comparing the lowercase values
2) String.compareToIgnoreCase
This is inconsistent and produces an ordering/equality based on the system locale.
We should to using a single form of normalising user/group names for case-insensitive comparison, for a specific locale:
String.toLowerCase(FIXED_LOCALE)
This method should be available on a util class. The FIXED_LOCALE should default to Locale.ENGLISH.
This affects equals, hashcode, compareTo and comparators for domain objects with case-insensitive/case-preserving name schemes.
If Crowd 2.1 users are on a system locale that's not compatible with Locale.ENGLISH, then:
1) They would be able to export their data to XML and re-import it, so the normalisation process happens in Locale.ENGLISH for Crowd 2.2
2) We could allow them to specify an override for the FIXED_LOCALE via a system property
- causes
-
CWD-2804 ApplicationServiceGeneric.searchUsers is slow with large numbers of users
- Closed
[CWD-2103] Case-insensitive String comparison is not tied to a locale
Workflow | Original: Simplified Crowd Development Workflow v2 - restricted [ 1511010 ] | New: JAC Bug Workflow v3 [ 3365386 ] |
Status | Original: Resolved [ 5 ] | New: Closed [ 6 ] |
Workflow | Original: Simplified Crowd Development Workflow v2 [ 1392861 ] | New: Simplified Crowd Development Workflow v2 - restricted [ 1511010 ] |
Workflow | Original: Crowd Development Workflow v2 [ 273856 ] | New: Simplified Crowd Development Workflow v2 [ 1392861 ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Technical Review [ 10028 ] | New: Resolved [ 5 ] |
Status | Original: In Progress [ 3 ] | New: Technical Review [ 10028 ] |
Fix Version/s | New: 2.2 Iteration 2 [ 15835 ] | |
Fix Version/s | Original: 2.2 Iteration 1 [ 15782 ] |
Fix Version/s | New: 2.2 Iteration 1 [ 15782 ] |
Worklog Id | Original: 93881 [ 93881 ] | |
Remaining Estimate | Original: 16h [ 57600 ] | New: 8h [ 28800 ] |
Time Spent | New: 8h [ 28800 ] |
Note:
1) String.toLowerCase() and then equals() is always locale-sensitive
2) String.compareToIgnoreCase() does not take locale into account (from javadoc)