----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/74692/#review225886 -----------------------------------------------------------
security-admin/src/main/java/org/apache/ranger/biz/GdsDBStore.java Lines 184 (patched) <https://reviews.apache.org/r/74692/#comment314295> Consider the following, which is simpler: dataset.setName(StringUtils.trim(dataset.getName())); - Madhan Neethiraj On Oct. 23, 2023, 6:01 a.m., Prashant Satam wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/74692/ > ----------------------------------------------------------- > > (Updated Oct. 23, 2023, 6:01 a.m.) > > > Review request for ranger, Anand Nadar, Ankita Sinha, Madhan Neethiraj, > Monika Kachhadiya, and Subhrat Chaudhary. > > > Repository: ranger > > > Description > ------- > > Dataset/Datashare/SharedResource/project names are being created with > trailing spaces which should not be happening since in the UI they will be > seen as duplicate with the same names. > > > Diffs > ----- > > security-admin/src/main/java/org/apache/ranger/biz/GdsDBStore.java > 10986823d > > > Diff: https://reviews.apache.org/r/74692/diff/1/ > > > Testing > ------- > > 1)Create /Datashare/SharedResource/project with trailing spaces > 2)The response we receive after POST will not have trailing spaces for field > name > Example > Request ---------------> POST - service/gds/project > > Response --------------> > { > "id": 3, > "guid": "7254a3b0-972a-4fe4-88af-b9fb591b812b", > "isEnabled": true, > "createdBy": "Admin", > "updatedBy": "Admin", > "createTime": 1698040479295, > "updateTime": 1698040479295, > "version": 1, > "name": "Ranger-Project-1", > "acl": { > "users": { > "admin": "ADMIN" > } > } > } > > > Thanks, > > Prashant Satam > >