Uploaded image for project: 'Sentry (Retired)'
  1. Sentry (Retired)
  2. SENTRY-1664

HMSPaths compares strings using ==

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • 1.8.0
    • None
    • Sentry

    Description

      HMSPaths contains the following code:

        void renameAuthzObject(String oldName, List<List<String>> oldPathElems,
            String newName, List<List<String>> newPathElems) {
      
          if ( oldPathElems == null || oldPathElems.size() == 0 || newPathElems == null || newPathElems.size() == 0
                  || newName == null || oldName == null || oldName == newName) {
            return;
          }
      

      Note that it used oldName == newName comparison which isn't correct - it should use equals(). Also, instead of using size() it should use isEmpty()

      Attachments

        Issue Links

          Activity

            People

              kkalyan Krishna Kalyan
              akolb Alex Kolbasov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: